Changeset 168


Ignore:
Timestamp:
Mar 24, 2009, 1:36:24 PM (16 years ago)
Author:
george
Message:
  • Přidáno: Ukládání poslední otevřené stránky do tabulky online uživatelů.
  • Opraveno: Nesledovat online uživatele pokud je skript spuštěn místně.
  • Opraveno: Chyba zobrazování odkazů na hlavní stránce dle práv uživatelů.
Location:
www
Files:
1 added
10 edited

Legend:

Unmodified
Added
Removed
  • www/global.php

    r167 r168  
    77foreach($_GET as $Index => $Item) $_GET[$Index] = addslashes($Item);
    88
    9 if(!isset($SessionDisable)) session_start();
     9if(isset($_SERVER['REMOTE_ADDR'])) session_start();
    1010include('config.php');
    1111include('database.php');
     
    4545include_once('user.php');
    4646$System->AddModule(new User());
    47 $System->Modules['User']->Check();
     47if(isset($_SERVER['REMOTE_ADDR'])) $System->Modules['User']->Check();
    4848include_once('aktuality/news.php');
    4949$System->AddModule(new News());
  • www/index.php

    r167 r168  
    2929      array('Technické informace', '/network.php', 'tech.gif'),
    3030      array('Webkamera', '/webcam/', 'clear.gif'),
    31       array('Stránky naší sítě', 'http://www.zdechov.net/', ''),
     31      array('Vnější stránky sítě', 'http://www.zdechov.net/', ''),
    3232      array('Kanály kabelovky', '/tkr.php', 'tv.gif'),
    3333      array('Historie sítě', '/history.php', ''),
     
    8484      foreach($LinkGroup as $Link)
    8585      {
     86        if($Link[2] == '') $Link[2] = 'clear.gif';
    8687        if(substr($Link[1], 0, 4) != 'http') $Link[1] = $this->System->Config['Web']['RootFolder'].$Link[1];
    8788        if(!isset($Link[3]) or (isset($Link[3]) and $this->System->Modules['User']->CheckPermission($Link[3][0], $Link[3][1])))
    88         if($Link[2] == '') $Link[2] = 'clear.gif';
     89       
    8990        $Result .= '<img alt="'.$Link[0].'" src="images/favicons/'.$Link[2].'" width="16" height="16" /> <a href="'.$Link[1].'">'.$Link[0].'</a><br />';
    9091      }
     
    210211    global $Database, $Config, $User;
    211212
    212         $Output = '';
     213          $Output = '';
    213214    if(array_key_exists('Action', $_GET))
    214215    {
     
    219220      if($_GET['Action'] == 'LoginForm')
    220221      {
    221         $Output .= '<form action="?Action=Login" method="post"><center><fieldset style="width: 500px;"><legend>Přihlašovací údaje</legend>
    222        <table class="hidden">
    223             <tr align="left"><td colspan="2">Jméno:</td></tr>
    224             <tr align="left"><td colspan="2"><input type="text" name="Username" size="40" maxlength="16" /></td></tr>
    225             <tr align="left"><td colspan="2">Heslo:</td></tr>
    226             <tr align="left"><td colspan="2"><input type="password" name="Password" size="40" maxlength="16" /></td></tr>
    227             <tr><td colspan="2">&nbsp;</td></tr>
    228             <tr align="left">'.
    229                 //<td><input type="checkbox" name="remember" value="1" checked="checked" /> Trvalé přihlášení</td>
    230                 '<td align="center" colspan="2"><input type="submit" value="Přihlásit" /></td>
    231         </tr>
    232         <tr align="left">
    233                 <td><a href="?Action=UserRegister">Registrovat se</a></td>
    234                 <td><a href="?Action=PasswordRecovery">Obnova zapomenutého hesla</a></td>
    235         </tr>
    236        </table>
    237        </fieldset></center>
    238        </form>';
     222        $Output .= '<form action="?Action=Login" method="post"><center><fieldset style="width: 500px;"><legend>Přihlašovací údaje</legend>'.
     223        '<table class="hidden">'.
     224        '<tr align="left"><td colspan="2">Jméno:</td></tr>'.
     225        '<tr align="left"><td colspan="2"><input type="text" name="Username" size="40" maxlength="16" /></td></tr>'.
     226              '<tr align="left"><td colspan="2">Heslo:</td></tr>'.
     227              '<tr align="left"><td colspan="2"><input type="password" name="Password" size="40" maxlength="16" /></td></tr>'.
     228              '<tr><td colspan="2">&nbsp;</td></tr>'.
     229              '<tr align="left">'.
     230                  //<td><input type="checkbox" name="remember" value="1" checked="checked" /> Trvalé přihlášení</td>
     231                    '<td align="center" colspan="2"><input type="submit" value="Přihlásit" /></td>'.
     232              '</tr>'.
     233        '<tr align="left">'.
     234                    '<td><a href="?Action=UserRegister">Registrovat se</a></td>'.
     235                    '<td><a href="?Action=PasswordRecovery">Obnova zapomenutého hesla</a></td>'.
     236              '</tr>'.
     237        '</table>'.
     238        '</fieldset></center>'.
     239        '</form>';
    239240//        $Output .= $this->SystemMessage('Test', $Output);
    240241      } else
  • www/sql/updates/156.sql

    r156 r168  
    66CHANGE `time_due` `TimeDue` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00';
    77
    8 RENAME TABLE `is`.`finance_bills`  TO `is`.`FinanceBills` ;
     8RENAME TABLE `finance_bills`  TO `is`.`FinanceBills` ;
    99
    10 RENAME TABLE `is`.`finance_bills_items`  TO `is`.`FinanceBillsItems` ;
     10RENAME TABLE `finance_bills_items`  TO `FinanceBillsItems` ;
    1111
    1212ALTER TABLE `FinanceBillsItems` CHANGE `id` `Id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
  • www/sql/updates/163.sql

    r165 r168  
    1 RENAME TABLE `is`.`users`  TO `is`.`users_old` ;
     1RENAME TABLE `users`  TO `users_old` ;
    22
    33CREATE TABLE IF NOT EXISTS `MemberPayment` (
  • www/sql/updates/167.sql

    r167 r168  
    2323ALTER TABLE `FinanceOperation` CHANGE `DestinationSubject` `Cash` INT NOT NULL DEFAULT '0';
    2424ALTER TABLE `FinanceOperation` CHANGE `SourceSubject` `Subject` INT NOT NULL DEFAULT '0';
    25 ALTER TABLE `FinanceClaimsLiabilities` ADD `BillCode` VARCHAR( 255 ) NOT NULL
    2625
     26RENAME TABLE `is`.`FinanceClaimsLiabilities_old`  TO `is`.`FinanceClaimsLiabilities` ;
     27ALTER TABLE `FinanceClaimsLiabilities` ADD `BillCode` VARCHAR( 255 ) NOT NULL;
     28
     29ALTER TABLE `User` ADD `InitPassword` VARCHAR( 255 ) NOT NULL ;
  • www/system/generate.php

    r161 r168  
    11<?php
    2 include_once('/a/www/centrala/global.php');
     2
     3include('../global.php');
    34
    45$Period = 60; // seconds
     
    78//echo("Generating settings...\n");
    89$Now = time();
    9 $DbResult = $Database->select('services_restart', '*', '(last_time < FROM_UNIXTIME('.($Now-$Period).')) AND (changed=1)');
     10$DbResult = $Database->select('services_restart', '*', '(last_time < FROM_UNIXTIME('.($Now - $Period).')) AND (changed=1)');
    1011while($Service = $DbResult->fetch_array())
    1112{
  • www/system/generators/dhcp_routerboard.php

    r167 r168  
    11<?php
    22
    3 $SessionDisable = true;
    43include_once('../../global.php');
    54
  • www/system/generators/netwatch.php

    r167 r168  
    11<?php
    22
    3 $SessionDisable = true;
    43include_once('../../global.php');
    54
  • www/system/netwatch_import.php

    r167 r168  
    11<?php
    2 $SessionDisable = true;
    32include_once('../global.php');
    43
  • www/user.php

    r167 r168  
    4343      // Refresh time of last access
    4444      $this->Database->update('UserOnline', 'SessionId="'.$SID.'"', array('ActivityTime' => 'NOW()'));
    45     } else $this->Database->insert('UserOnline', array('SessionId' => $SID, 'User' => $this->AnonymousUserId, 'LoginTime' => 'NOW()', 'ActivityTime' => 'NOW()', 'IpAddress' => GetRemoteAddress(), 'HostName' => gethostbyaddr(GetRemoteAddress())));
     45    } else $this->Database->insert('UserOnline', array('SessionId' => $SID, 'User' => $this->AnonymousUserId, 'LoginTime' => 'NOW()', 'ActivityTime' => 'NOW()', 'IpAddress' => GetRemoteAddress(), 'HostName' => gethostbyaddr(GetRemoteAddress()), 'ScriptName' => $_SERVER['PHP_SELF']));
    4646    //echo($this->Database->LastQuery);
    4747
Note: See TracChangeset for help on using the changeset viewer.