Changeset 240 for quests/includes/global.php
- Timestamp:
- Jan 17, 2008, 2:02:18 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
quests/includes/global.php
r238 r240 14 14 15 15 16 //pøihlá¹ení17 if (array_key_exists('LoginUser',$_POST)) {18 $_SESSION['User'] = $_POST['LoginUser'];19 $_SESSION['Pass'] = $_POST['LoginPass'];20 21 $Line = mysql_fetch_array($Database->SQLCommand("SELECT * FROM user WHERE LOWER(user) = LOWER('".$_SESSION['User']."')"));22 $_SESSION['UserID'] = $Line['ID'];23 $_SESSION['User'] = $Line['user'];24 WriteLog('Login: '.$_SESSION['User'], 3);25 }26 //odhlá¹ení27 if (array_key_exists('Logout',$_GET)) {28 $_SESSION['User'] = '';29 $_SESSION['Pass'] = '';30 $_SESSION['UserID'] = '';31 WriteLog('Odhlá¹ení', 3);32 }33 //záznam o aktivitì34 if (Licence(0))35 $Database->SQLCommand("UPDATE user SET LastIP = '".$_SERVER['REMOTE_ADDR']."', LastLogin = now() WHERE ID = ".$_SESSION['UserID']);36 37 38 16 echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 39 17 <HTML> … … 45 23 <TITLE>WoW server Heroes of Fantasy - Projekt pøekládání Questù do CZ</TITLE> 46 24 </HEAD> 47 <body> 48 <table border="0" width="100%"> 25 <body>'; 26 27 //pøihlá¹ení 28 if (array_key_exists('LoginUser',$_POST)) { 29 $_SESSION['User'] = $_POST['LoginUser']; 30 $_SESSION['Pass'] = $_POST['LoginPass']; 31 32 $Line = mysql_fetch_array($Database->SQLCommand("SELECT * FROM user WHERE LOWER(user) = LOWER('".$_SESSION['User']."') AND pass = '".$_SESSION['Pass']."'")); 33 if (!$Line ) { 34 echo '<script> alert("Jméno nebo heslo bylo zadáno ¹patnì!"); </script>'; 35 $_SESSION['UserID'] = ''; 36 $_SESSION['User'] = ''; 37 } else { 38 $_SESSION['UserID'] = $Line['ID']; 39 $_SESSION['User'] = $Line['user']; 40 WriteLog('Login: '.$_SESSION['User'], 3); 41 } 42 } 43 //odhlá¹ení 44 if (array_key_exists('Logout',$_GET)) { 45 WriteLog('Odhlá¹ení', 3); 46 $_SESSION['User'] = ''; 47 $_SESSION['Pass'] = ''; 48 $_SESSION['UserID'] = ''; 49 } 50 //záznam o aktivitì 51 if (Licence(0)) 52 $Database->SQLCommand("UPDATE user SET LastIP = '".$_SERVER['REMOTE_ADDR']."', LastLogin = now() WHERE ID = ".$_SESSION['UserID']); 53 54 55 echo'<table border="0" width="100%"> 49 56 <tr> 50 57 <td width="150" valign="top"> 51 <a href="index.php">Domù</a><br /> 52 <a href="http://wow.zdechov.net/forum/viewforum.php?f=22">Forum projektu</a><br /> 53 <a href="http://wow.zdechov.net/">Web serveru</a><br /> 54 <a href="registrace.php" style="color: red">Registrace</a><br /> 55 <a href="Options.php" Title="Nastavení u¾ivatele">Nastavení</a><br /> 56 <a href="statistic.php">Statistika</a><br /> 58 <a Title="Hlavní stránka" href="index.php">Domù</a><br /> 59 <a Title="Diskuze na téma pøeklárání" href="http://wow.zdechov.net/forum/viewforum.php?f=22">Forum projektu</a><br /> 60 <a Title="Domácí server" href="http://wow.zdechov.net/">Web serveru</a><br /> 57 61 <a Title="Slovník wow výrazù" href="javascript: window.open(\'dictionary.php\', \'Slovník\', \'width=400, height=412\'); blur()">Slovníèek</a><br /> 58 <a href="export.php" Title="Zdes i mù¾ete stáhnout pøelo¾ené texty">Download</a><br /> 59 <br /> 60 <a href="ListQuests.php?selection">Nepøelo¾ené questy</a><br /> 61 <a href="ListQuests.php?Translate">Pøelo¾ené questy</a><br />'; 62 <a Title="Statistika pøekládání" href="statistic.php">Statistika</a><br /> 63 <a href="export.php" Title="Zde si mù¾ete stáhnout pøelo¾ené texty">Download</a><br />'; 64 65 if (Licence(0)) 66 echo '<a Title="Nastavení u¾ivatele" href="Options.php" Title="Nastavení u¾ivatele">Nastavení</a><br />'; 67 else 68 echo '<a Title="Registrace u¾ivatele pro pøekládání" href="registrace.php" style="color: red">Registrace</a><br />'; 69 70 echo '<br /> 71 <a Title="Zde mù¾ete zaèít pøekládat" href="ListQuests.php?selection">Nepøelo¾ené questy</a><br /> 72 <a Title="Pøelo¾ené quest, mù¾ete zde hlasovat, nebo opravovat Quest" href="ListQuests.php?Translate">Pøelo¾ené questy</a><br />'; 62 73 63 74 if (Licence(0)) { 64 echo '<a href="ListQuests.php?mydevelop">Rozepsané questy</a><br /> 65 <a href="ListQuests.php?my">Moje questy</a><br />'; 75 echo '<a Title="Nedokonèené questy" href="ListQuests.php?mydevelop">Rozepsané questy</a><br /> 76 <a Title="Pøelo¾ené questy pøilá¹eného u¾ivatele" href="ListQuests.php?my">Moje questy</a><br /> 77 <br />'; 66 78 } 67 79 68 80 if (Licence(1)) { 69 81 // echo 'Administrace:'; 70 echo '<br /><a href="priorite.php" Title="Naètení priority questù (Moderator only)">Priorita</a><br />'; 71 echo '<a href="log.php" Title="Log dìní (Moderator only)">Log</a><br />'; 82 echo '<a href="priorite.php" Title="Naètení priority questù (Moderator only)">Priorita</a><br />'; 83 echo '<a href="log.php" Title="Log dìní (Moderator only)">Log</a><br /> 84 <br />'; 72 85 } 73 86 74 echo '<br /><form action="action.php" method="get">75 <input type="text" name="search" size="8">76 <input type="submit" value="Hledat">77 </form>78 ';79 87 80 88 if (Licence(0)) { 81 89 // echo 'Jste pøihlá¹en jako: <b>'.$_SESSION['User'].'</b> <a href="index.php?Logout">Odhlásit</a>'; 82 90 } else { 83 echo ' 91 echo ' <br /> 84 92 <b>Login:</b><br> 85 93 <form action="index.php" method="post"> … … 114 122 '; 115 123 124 echo '<form action="action.php" method="get"> 125 <input type="text" name="search" size="8"> 126 <input type="submit" value="Hledat"> 127 </form> 128 '; 116 129 117 130 echo '</td>
Note:
See TracChangeset
for help on using the changeset viewer.