Changeset 220 for quests/includes


Ignore:
Timestamp:
Jan 13, 2008, 11:25:19 AM (17 years ago)
Author:
maron
Message:

Různé opravy

File:
1 edited

Legend:

Unmodified
Added
Removed
  • quests/includes/global.php

    r217 r220  
    1515    $_SESSION['Pass'] = $_POST['LoginPass'];
    1616   
    17     $Line = mysql_fetch_array($Database->SQLCommand("SELECT ID FROM user WHERE LOWER(user) = LOWER('".$_SESSION['User']."')"));
     17    $Line = mysql_fetch_array($Database->SQLCommand("SELECT * FROM user WHERE LOWER(user) = LOWER('".$_SESSION['User']."')"));
    1818    $_SESSION['UserID'] = $Line['ID'];
     19    $_SESSION['User'] = $Line['user'];
    1920  }
    2021//odhlá¹ení
     
    2425    $_SESSION['UserID'] = '';
    2526  }
     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']);
    2630
    2731  function Licence($Licence)
     
    2933    global $Database;
    3034    if (isset($_SESSION['User']) and $_SESSION['User'] <> '') {
    31       $User = $_SESSION['User'];
     35    //  $User = $_SESSION['User'];
    3236      $Pass = $_SESSION['Pass'];
    3337   
    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']));
    3539    if (!$Line) {
    3640       return false;
     
    8690    <tr>
    8791      <td width="150" valign="top">
    88       <br /><br />
     92      <br />
    8993      <b>Odkazy:</b><br />
    9094      <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 />
    9197      <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 />
    9399      <a href="statistic.php">Statistika</a><br />
    94       <a href="export.php">Export</a><br />
    95100      <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 />
    96102      <br />
    97103      <a href="ListQuests.php?selection">Nepøelo¾ené questy</a><br />
    98104      <a href="ListQuests.php?Translate">Pøelo¾ené questy</a><br />';
    99105
    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      }
    107115     
    108 <form action="action.php" method="get">
     116      echo '<form action="action.php" method="get">
    109117<input type="text" name="search" size="13"><br>
    110118<input type="submit" value="Hledat">
     
    132140  ';
    133141}
     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
    134148  echo '</td>
    135149      <td>';
Note: See TracChangeset for help on using the changeset viewer.