Commits

Ivan Vučica committed b40f7de

Separated default account data into defaults.php

Comments (0)

Files changed (4)

-cfe24ec9f3fc9b38893e24e4ba6380009691b023 zxmpp
+52dade6f4749f3f42113d386a6b5dd880257842f zxmpp

defaults.php.example

+<?php
+$pong_server = "tvzpong.vucica.net:5222";
+$pong_user = "tvzpong@tvzpong.vucica.net";
+$pong_pass = "123";
 <link href='http://fonts.googleapis.com/css?family=Luckiest+Guy' rel='stylesheet' type='text/css'>
 <script src="pong.js"></script>
 <?php
+if(file_exists("defaults.php")) include_once 'defaults.php';
 zxmpp_headers();
 ?>
 </head>
 <h1>TVZ Pong</h1>
 
 <div class="loginbox" id="loginbox">
-	<label>Server: <input id="pongServer" class="server" value="tvzpong.vucica.net:5222"></label>
-	<label>Username: <input id="pongUsername" class="username" placeholder="marcus@gmail.com" value="tvzpong@tvzpong.vucica.net"></label>
-	<label>Password: <input id="pongPassword" class="password" type="password" value="123"></label>
+	<label>Server: <input id="pongServer" class="server" value="<?=$pong_server?>"></label>
+	<label>Username: <input id="pongUsername" class="username" placeholder="marcus@gmail.com" value="<?=$pong_user?>"></label>
+	<label>Password: <input id="pongPassword" class="password" type="password" value="<?=$pong_pass?>"></label>
 	<input type="button" value="Log in" class="button" onclick="pongLogin(document.getElementById('pongServer').value, document.getElementById('pongUsername').value, document.getElementById('pongPassword').value);">
 </div>
 
 
     for (var resource in presences)
     {
-        if(presences[resource].caps && presences[resource].caps.supports("http://tvzpong.vucica.net/protocol/"))
+        var presence = presences[resource];
+        if(presence.caps && presence.caps.supports("http://tvzpong.vucica.net/protocol/"))
             supportsPong = true;
     }
     return supportsPong;
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.