Changeset 188
- Timestamp:
- Jan 1, 2008, 3:22:42 PM (17 years ago)
- Location:
- administrace
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
administrace/home.php
r186 r188 14 14 echo('</td><td valign="top">'); 15 15 echo('<a href="rss.php">RSS GM zpráv</a><br>'); 16 echo('<a href="rss_tickets.php">RSS herních ádanek</a><br>');16 echo('<a href="rss_tickets.php">RSS herních ¾ádanek</a><br>'); 17 17 echo('</td></table><br>'); 18 18 19 19 echo('<form action="?op=AddMessage" method="post"> 20 U¾ivatel: '.$_SESSION['UserName'].' <a href="?op=Logout">Odhlásit</a><br> 20 21 <input name="text" size="80"> <input type="submit" value="Pøidat">'); 21 22 echo('</form>'); -
administrace/index.php
r186 r188 30 30 $Database->select_db('wow'); 31 31 $Database->insert('gm_news', array('author' => $_SESSION['UserId'], 'text' => addslashes($_POST['text']), 'time' => 'NOW()')); 32 //echo('Zpráva vlo ena.<br>');32 //echo('Zpráva vlo¾ena.<br>'); 33 33 } 34 34 break; … … 39 39 else { 40 40 41 echo('<h3>Správa serveru:</h3><br><strong>Pøihlá ení:</strong><br>41 echo('<h3>Správa serveru:</h3><br><strong>Pøihlá¹ení:</strong><br> 42 42 <form action="?op=Login" method="post"> 43 43 <table> -
administrace/user.php
r186 r188 14 14 { 15 15 $_SESSION['UserId'] = 0; 16 $_SESSION['UserName'] = ''; 16 17 } 17 18 $_SESSION['Time'] = time(); … … 24 25 global $Database; 25 26 $Database->select_db('realmd'); 26 $DbResult = $Database->select('account', 'Id ', '(gmlevel > 0) AND (username = "'.$Username.'") AND (I = SHA1(CONCAT(UCASE("'.$Username.'"),":",UCASE("'.$Password.'"))))');27 $DbResult = $Database->select('account', 'Id,username', '(gmlevel > 0) AND (username = "'.$Username.'") AND (I = SHA1(CONCAT(UCASE("'.$Username.'"),":",UCASE("'.$Password.'"))))'); 27 28 if($DbResult->num_rows > 0) 28 29 { 29 30 $User = $DbResult->fetch_array(); 30 31 $_SESSION['UserId'] = $User['Id']; 32 $_SESSION['UserName'] = $User['username']; 31 33 echo('Byl jste pøihlá¹en.<br>'); 32 34 } else {
Note:
See TracChangeset
for help on using the changeset viewer.