Changeset 220 for quests/includes/global.php
- Timestamp:
- Jan 13, 2008, 11:25:19 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
quests/includes/global.php
r217 r220 15 15 $_SESSION['Pass'] = $_POST['LoginPass']; 16 16 17 $Line = mysql_fetch_array($Database->SQLCommand("SELECT IDFROM user WHERE LOWER(user) = LOWER('".$_SESSION['User']."')"));17 $Line = mysql_fetch_array($Database->SQLCommand("SELECT * FROM user WHERE LOWER(user) = LOWER('".$_SESSION['User']."')")); 18 18 $_SESSION['UserID'] = $Line['ID']; 19 $_SESSION['User'] = $Line['user']; 19 20 } 20 21 //odhlá¹ení … … 24 25 $_SESSION['UserID'] = ''; 25 26 } 27 //záznam o aktivitì 28 if (Licence(0)) 29 $Database->SQLCommand("UPDATE user SET LastIP = '".$_SERVER['REMOTE_ADDR']."', LastLogin = now() WHERE ID = ".$_SESSION['UserID']); 26 30 27 31 function Licence($Licence) … … 29 33 global $Database; 30 34 if (isset($_SESSION['User']) and $_SESSION['User'] <> '') { 31 $User = $_SESSION['User'];35 // $User = $_SESSION['User']; 32 36 $Pass = $_SESSION['Pass']; 33 37 34 $Line = mysql_fetch_array($Database->SQLCommand("SELECT * FROM user WHERE LOWER(user) = LOWER('$User')"));38 $Line = mysql_fetch_array($Database->SQLCommand("SELECT * FROM user WHERE ID = ".$_SESSION['UserID'])); 35 39 if (!$Line) { 36 40 return false; … … 86 90 <tr> 87 91 <td width="150" valign="top"> 88 <br /> <br />92 <br /> 89 93 <b>Odkazy:</b><br /> 90 94 <a href="index.php">Domù</a><br /> 95 <a href="http://wow.zdechov.net/forum/viewforum.php?f=22">Forum projektu</a><br /> 96 <a href="http://wow.zdechov.net/">Web serveru</a><br /> 91 97 <a href="registrace.php" style="color: red">Registrace</a><br /> 92 <a href="Options.php" >Nastavení</a><br />98 <a href="Options.php" Title="Nastavení u¾ivatele">Nastavení</a><br /> 93 99 <a href="statistic.php">Statistika</a><br /> 94 <a href="export.php">Export</a><br />95 100 <a Title="Slovník wow výrazù" href="javascript: window.open(\'dictionary.php\', \'Slovník\', \'width=400, height=400\'); blur()">Slovníèek</a><br /> 101 <a href="export.php" Title="Zdes i mù¾ete stáhnout pøelo¾ené texty">Export</a><br /> 96 102 <br /> 97 103 <a href="ListQuests.php?selection">Nepøelo¾ené questy</a><br /> 98 104 <a href="ListQuests.php?Translate">Pøelo¾ené questy</a><br />'; 99 105 100 if (Licence(0)) { 101 echo '<a href="ListQuests.php?mydevelop">Rozepsané questy</a><br /> 102 <a href="ListQuests.php?my">Moje questy</a><br />'; 103 } 104 echo '<br /> 105 <a href="http://wow.zdechov.net/forum/viewforum.php?f=22">Forum projektu</a><br /> 106 <a href="http://wow.zdechov.net/">Web serveru</a><br /><br /> 106 if (Licence(0)) { 107 echo '<a href="ListQuests.php?mydevelop">Rozepsané questy</a><br /> 108 <a href="ListQuests.php?my">Moje questy</a><br />'; 109 } 110 111 if (Licence(1)) { 112 // echo 'Administrace:'; 113 echo '<br /><a href="priorite.php" Title="Naètení priority questù (Moderator only)">Priorita</a><br /><br />'; 114 } 107 115 108 <form action="action.php" method="get">116 echo '<form action="action.php" method="get"> 109 117 <input type="text" name="search" size="13"><br> 110 118 <input type="submit" value="Hledat"> … … 132 140 '; 133 141 } 142 echo '<br /><br />Online u¾ivatelé:<br />'; 143 $ID = $Database->SQLCommand("SELECT user FROM `user` WHERE LastLogin >= Now()-300"); 144 while ($Line = mysql_fetch_array($ID)) 145 echo '<b>'.$Line['user'].'</b><br />'; 146 147 134 148 echo '</td> 135 149 <td>';
Note:
See TracChangeset
for help on using the changeset viewer.