Changeset 51 for administrace/master.php
- Timestamp:
- Aug 20, 2007, 3:58:00 PM (17 years ago)
- Location:
- administrace
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
administrace
-
Property svn:ignore
set to
php_script_error.log
-
Property svn:ignore
set to
-
administrace/master.php
r11 r51 1 1 <?php 2 include('../config.php'); 3 // Test zda je registrovaný uivatel 4 session_start(); 2 include('../global.php'); 5 3 6 7 8 if (@$_SESSION['Licence'] == 1) { 9 // echo 'Registerovany'; 10 include 'SubFiles/DatabaseConection.php'; 11 } else { 12 include 'SubFiles/LoginMaster.php'; 13 } 4 if (@$_SESSION['Licence'] == 1) 5 { 6 } else { 7 include 'SubFiles/LoginMaster.php'; 8 } 14 9 ?> 15 10 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> … … 91 86 <td valign="top"> 92 87 <?php 93 $Database2 = new Database($DatabaseHost, $DatabaseUser, $DatabasePassword); // dodìlat IP94 $Database2->SelectDatabase('mangos');95 96 97 88 // Update last login time 98 $Database 2->SelectDatabase('wow');89 $Database->select('wow'); 99 90 $User = $_SESSION['User']; 100 $Database 2->SQLCommand("UPDATE user SET LastLogin = now() WHERE User = '$User'");91 $Database->query("UPDATE user SET LastLogin = now() WHERE User = '$User'"); 101 92 102 93 echo('<b>Uivatelské úèty s oprávnìním:</b><br />'); 103 94 // Show all user 104 $ID = $Database2->SQLCommand("SELECT * FROM user WHERE ban = 0"); 105 while ($Line = mysql_fetch_array($ID)) echo $Line['User'].'<br />'; 95 $DbResult = $Database->query("SELECT * FROM user WHERE ban = 0"); 96 while ($Line = $DbResult->fetch_array()) 97 echo($Line['User'].'<br/>'); 106 98 107 99 echo('<br><b>Online:</b><br />'); 108 100 // Show online users list 109 $ID = $Database2->SQLCommand("SELECT * FROM user WHERE LastLogin > (NOW() - 60)"); 110 while ($Line = mysql_fetch_array($ID)) echo $Line['User'].'<br />'; 101 $DbResult = $Database->query("SELECT * FROM user WHERE LastLogin > (NOW() - 60)"); 102 while ($Line = $DbResult->fetch_array()) 103 echo($Line['User'].'<br />'); 111 104 ?> 112 105 … … 126 119 echo('<strong>Poadavky hráèù (<a href="http://wow.zdechov.net/administrace/george/rss_tickets.php">RSS</a>):</strong><br/>'); 127 120 128 $Database2->SelectDatabase('mangos'); 129 $Result = $Database2->SQLCommand("SELECT character_ticket.ticket_text AS text, character.name AS name FROM character_ticket JOIN `character` ON character.guid = character_ticket.guid"); 130 while ($Line = mysql_fetch_array($Result)) echo($Line['name'].': '.$Line['text'].'<br/>'); 121 $Database->select_db('mangos'); 122 $Result = $Database->query("SELECT character_ticket.ticket_text AS text, character.name AS name FROM character_ticket JOIN `character` ON character.guid = character_ticket.guid"); 123 while ($Line = $Result->fetch_array()) 124 echo($Line['name'].': '.$Line['text'].'<br/>'); 131 125 132 $Database2->Disconnect();133 126 ?> 134 127
Note:
See TracChangeset
for help on using the changeset viewer.