Ignore:
Timestamp:
Aug 15, 2013, 11:17:26 PM (11 years ago)
Author:
chronos
Message:
  • Fixed: System variable as parameter to constructors of descendents of Module class.
  • Removed: End PHP mark "?>" from all files.
Location:
trunk/www/Application/View
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/Application/View/Backup.php

    r92 r93  
    2222  function ItemList()
    2323  {
    24     global $Config;
    25    
    2624    $ServerId = $_GET['Id'];
    2725    if($this->System->Modules['User']->User['Role'] >= USER_ROLE_USER)
    2826    {
    29       $Server = new Server($this->Database, $_GET['Id']);
     27      $Server = new Server($this->System, $_GET['Id']);
    3028      if(($this->System->Modules['User']->User['Id'] == $Server->Server['User']) or ($this->System->Modules['User']->User['Role'] >= USER_ROLE_ADMINISTRATOR))
    3129      {
     
    6159    else if($this->System->Modules['User']->User['Role'] >= USER_ROLE_USER)
    6260    {
    63       $Backup = new Backup($this->Database, $_GET['Id']);
    64       $Server = new Server($this->Database, $Backup->Backup['Server']);
     61      $Backup = new Backup($this->System, $_GET['Id']);
     62      $Server = new Server($this->System, $Backup->Backup['Server']);
    6563      if(($this->System->Modules['User']->User['Id'] == $Server->Server['User']) or ($this->System->Modules['User']->User['Role'] >= USER_ROLE_ADMINISTRATOR))
    6664      {
     
    7977    else if($this->System->Modules['User']->User['Role'] >= USER_ROLE_USER)
    8078    {
    81       $Backup = new Backup($this->Database, $_GET['Id']);
    82       $Server = new Server($this->Database, $Backup->Backup['Server']);
     79      $Backup = new Backup($this->System, $_GET['Id']);
     80      $Server = new Server($this->System, $Backup->Backup['Server']);
    8381      if(($this->System->Modules['User']->User['Id'] == $Server->Server['User']) or ($this->System->Modules['User']->User['Role'] >= USER_ROLE_ADMINISTRATOR))
    8482      {
     
    9593    else if($this->System->Modules['User']->User['Role'] >= USER_ROLE_USER)
    9694    {
    97       $Server = new Server($this->Database, $_GET['Id']);
     95      $Server = new Server($this->System, $_GET['Id']);
    9896      if(($this->System->Modules['User']->User['Id'] == $Server->Server['User']) or ($this->System->Modules['User']->User['Role'] >= USER_ROLE_ADMINISTRATOR))
    9997      {
    100         $Backup = new Backup($this->Database, 0);
     98        $Backup = new Backup($this->System, 0);
    10199        $Output = $this->SystemMessage('Ruční zálohování', $Backup->Create($Server->Id));
    102100        $Output .= $this->ShowTaskList();
     
    106104  }
    107105}
    108 
    109 ?>
  • trunk/www/Application/View/Client.php

    r92 r93  
    2626  function ItemList()
    2727  {
    28     global $Config;
    29    
    3028    $Output = '<h4>Verze herního klienta</h4>';
    3129    $Table = new Table($this->ItemListFormClass, $this->System);
     
    3634  }
    3735}
    38 
    39 ?>
  • trunk/www/Application/View/Cluster.php

    r81 r93  
    3737  }
    3838}
    39 
    40 ?>
  • trunk/www/Application/View/Database.php

    r78 r93  
    1010    if($this->System->Modules['User']->User['Role'] >= USER_ROLE_USER)
    1111    {
    12       $Server = new Server($this->Database, $_GET['Id']);
     12      $Server = new Server($this->System, $_GET['Id']);
    1313      if(($this->System->Modules['User']->User['Id'] == $Server->Server['User']) or ($this->System->Modules['User']->User['Role'] >= USER_ROLE_ADMINISTRATOR))
    1414      {
     
    2121  }
    2222}
    23 
    24 ?>
  • trunk/www/Application/View/Debug.php

    r92 r93  
    3737  function ItemList()
    3838  {
    39     global $Config;
    40    
    4139    if($this->System->Modules['User']->User['Role'] >= USER_ROLE_USER)
    4240    {
    43       $Realm = new Realm($this->Database, $_GET['Id']);
     41      $Realm = new Realm($this->System, $_GET['Id']);
    4442      if(($this->System->Modules['User']->User['Id'] == $Realm->GetUser()) or ($this->System->Modules['User']->User['Role'] >= USER_ROLE_ADMINISTRATOR))
    4543      {
     
    6159  function Item()
    6260  {
    63     global $System;
    64 
    6561    if($this->System->Modules['User']->User['Role'] >= USER_ROLE_USER)
    6662    {
    67       $Realm = new Realm($this->Database, $_GET['Id']);
     63      $Realm = new Realm($this->System, $_GET['Id']);
    6864      if(($this->System->Modules['User']->User['Id'] == $Realm->GetUser()) or ($this->System->Modules['User']->User['Role'] >= USER_ROLE_ADMINISTRATOR))
    6965      {
    7066        $Output = '<div>Ladící informace serveru</div>';
    7167   
    72     $MangosDebug = new MangosDebug($this->Database, $this->System);
     68    $MangosDebug = new MangosDebug($this->System, $this->System);
    7369    $Form = new Form($this->System, $this->ItemFormClass);
    7470    if($Form->LoadValuesFromDatabase($_GET['Id']))
     
    127123  }
    128124}
    129 
    130 ?>
  • trunk/www/Application/View/Emulator.php

    r92 r93  
    3636  function ItemList()
    3737  {
    38     global $Config;
    39    
    4038    $Output = '<h4>Seznam verzí emulátoru</h4>';
    4139    $Table = new Table($this->ItemListFormClass, $this->System);
     
    5957  {
    6058    $Id = $_GET['Id'];
    61     //$Server = new Server($this->Database, $Id);
     59    //$Server = new Server($this->System, $Id);
    6260    $Output = '<h4>Podrobnosti emulátoru</h4>';
    6361    $Form = new Form($this->System, $this->ItemFormClass);
     
    6563    $Output .= $Form->ShowTable();
    6664    $Output .= '<div style="text-align: center">';
    67     $Emulator = new Emulator($this->Database, $Id);
     65    $Emulator = new Emulator($this->System, $Id);
    6866    if($this->System->Modules['Permission']->Check('Emulator', 'Download', $Emulator->Id))
    6967    {
     
    106104    if(array_key_exists('Id', $_GET))
    107105    {
    108       $Emulator = new Emulator($this->Database, $_GET['Id']);
     106      $Emulator = new Emulator($this->System, $_GET['Id']);
    109107      if($this->System->Modules['Permission']->Check('Emulator', 'Download', $Emulator->Id))
    110108      {
     
    122120    if(array_key_exists('Id', $_GET))
    123121    {
    124       $Emulator = new Emulator($this->Database, $_GET['Id']);
     122      $Emulator = new Emulator($this->System, $_GET['Id']);
    125123      if($this->System->Modules['Permission']->Check('Emulator', 'Download', $Emulator->Id))
    126124      {
     
    134132  }
    135133}
    136 
    137 ?>
  • trunk/www/Application/View/HomePage.php

    r78 r93  
    4747  function State()
    4848  {
    49     $Platform = new Platform($this->Database);
     49    $Platform = new Platform($this->System);
    5050    $State = $Platform->State();
    5151    $Output = '<h4>Stav systému</h4>'.
     
    6464  }
    6565}
    66 
    67 ?>
  • trunk/www/Application/View/News.php

    r78 r93  
    5151  }
    5252}
    53 
    54 ?>
  • trunk/www/Application/View/Page.php

    r78 r93  
    102102  function GetOutput($Content)
    103103  {
    104     global $Config;
    105    
    106104    $Output = $this->ShowHeader($this->FullTitle, $this->ShortTitle).
    107105      $this->CenterPanel($Content);
    108106    $Output .= $this->ShowFooter();
    109     if($Config['Web']['FormatHTML'] == true) echo($this->FormatOutput($Output));
     107    if($this->Config['Web']['FormatHTML'] == true) echo($this->FormatOutput($Output));
    110108    else echo($Output);
    111109  }
     
    123121  }
    124122}
    125 
    126 ?>
  • trunk/www/Application/View/Realm.php

    r92 r93  
    105105  function ItemList()
    106106  {
    107     global $Config;
    108    
    109107    if(array_key_exists('Id', $_GET)) $ServerId = $_GET['Id'];
    110108   
    111     $Realm = new Realm($this->Database, 0);
     109    $Realm = new Realm($this->System, 0);
    112110    //$Realm->UpdateServerList();
    113111    $Output = '<h4>Seznam světů</h4>';
     
    131129      //$DbResult = $this->Database->query('SELECT COUNT(*) FROM Realm WHERE Server='.$this->System->Modules['User']->User['Id']);
    132130      //$DbRow = $DbResult->fetch_row();
    133       if(($RealmCount < $Config['MaxRealmPerServerCount']))
     131      if(($RealmCount < $this->Config['MaxRealmPerServerCount']))
    134132        $Output .= '<br /><div style="text-align: center;"><a href="?Module=Realm&amp;Action=Add">Vytvořit nový svět</a></dev>';     
    135133    }
     
    139137  function Item()
    140138  {
    141     global $Config;
    142    
    143139    $Id = $_GET['Id'];
    144     $Realm = new Realm($this->Database, $Id);
     140    $Realm = new Realm($this->System, $Id);
    145141    //if(isset($Server->Server))
    146142    //{
     
    179175  function Add()
    180176  {
    181     global $Config;
    182    
    183177    if(array_key_exists('Id', $_GET))
    184178    {
     
    190184      $DbRow = $DbResult->fetch_row();
    191185      $RealmCount = $DbRow[0];
    192       if($RealmCount < $Config['MaxRealmCount'])
    193       {
    194         if($this->System->Modules['User']->RealmCount() >= $Config['MaxServerCountPerUser']) $Output .= $this->System->SystemMessage('Nový svět', 'Na jeden účet lze vytvořit maximálně '.$Config['MaxServerCountPerUser'].' světů');
     186      if($RealmCount < $this->Config['MaxRealmCount'])
     187      {
     188        if($this->System->Modules['User']->RealmCount() >= $this->Config['MaxServerCountPerUser'])
     189                $Output .= $this->System->SystemMessage('Nový svět', 'Na jeden účet lze vytvořit maximálně '.
     190                        $this->Config['MaxServerCountPerUser'].' světů');
    195191        else
    196192        {
     
    209205  function Create()
    210206  {
    211     global $Config;   
    212      
    213207    if(array_key_exists('Id', $_GET))
    214208    {
     
    216210    if($this->System->Modules['Permission']->Check('Realm', 'Add'))
    217211    {
    218       if($this->System->Modules['User']->RealmCount() >= $Config['MaxServerCountPerUser']) $Output = $this->System->SystemMessage('Nový svět', 'Na jeden účet lze vytvořit maximálně '.$Config['MaxServerCountPerUser'].' světů');
     212      if($this->System->Modules['User']->RealmCount() >= $this->Config['MaxServerCountPerUser'])
     213        $Output = $this->System->SystemMessage('Nový svět', 'Na jeden účet lze vytvořit maximálně '.
     214        $this->Config['MaxServerCountPerUser'].' světů');
    219215      else
    220216      {
     
    223219        $DbRow = $DbResult->fetch_row();
    224220        $NewPortWorldd = $DbRow[0] + 1;
    225         if($NewPortWorldd < $Config['BaseNetworkPortWorldd']) $NewPortWorldd = $Config['BaseNetworkPortWorldd'];
     221        if($NewPortWorldd < $this->Config['BaseNetworkPortWorldd']) $NewPortWorldd = $this->Config['BaseNetworkPortWorldd'];
    226222           
    227223        $Form = new Form($this->System, $this->CreateFormClass, array());
     
    229225        $this->Database->insert('Realm', array('Name' => $Form->Values['Name'], 'Description' => $Form->Values['Description'], 'Server' => $ServerId, 'Motd' => $Form->Values['Motd'], 'Homepage' => $Form->Values['Homepage'], 'Type' => $Form->Values['Type'], 'Database' => $Form->Values['Database'], 'NetworkPortWorldd' => $NewPortWorldd, 'Lock' => 1, 'TimeCreate' => 'NOW()'));
    230226        $LastInsertId = $this->Database->insert_id;
    231         $Realm = new Realm($this->Database, $LastInsertId);
     227        $Realm = new Realm($this->System, $LastInsertId);
    232228        $Realm->CreateDatabase();           
    233229        $Output = $this->System->SystemMessage('Vytvoření světu', $Realm->ImportDatabase(true));
     
    246242  {
    247243    $Output = '';
    248     $Realm = new Realm($this->Database, $_POST['RealmId']);
     244    $Realm = new Realm($this->System, $_POST['RealmId']);
    249245    if($this->System->Modules['Permission']->Check('Realm', 'Save', $Realm->Id))
    250246    {
     
    257253      $Form->OnSubmit = '?Module=Realm&amp;Action=Save';
    258254       
    259       $Realm = new Realm($this->Database, $_POST['RealmId']);
     255      $Realm = new Realm($this->System, $_POST['RealmId']);
    260256      $Realm->SaveConfiguration();
    261257      $Form->Values['RealmId'] = $RealmId;
     
    268264  {
    269265    $Output = '';
    270     $Realm = new Realm($this->Database, $_GET['Id']);
     266    $Realm = new Realm($this->System, $_GET['Id']);
    271267    if($this->System->Modules['Permission']->Check('Realm', 'Edit', $Realm->Id))
    272268    {
     
    283279  {
    284280    $Output = '';
    285     $Realm = new Realm($this->Database, $_GET['Id']);
     281    $Realm = new Realm($this->System, $_GET['Id']);
    286282    if($this->System->Modules['Permission']->Check('Realm', 'EditDetailed', $Realm->Id))
    287283    {
    288284      $Form = new Form($this->System, $this->SettingDetailedFormClass);
    289       $EmulatorConfig = new MangosConfigurationFile($this->Database);
     285      $EmulatorConfig = new MangosConfigurationFile($this->System);
    290286      $EmulatorConfig->Load('../realm/'.$Realm->Id.'/etc/mangosd.conf');
    291287      $Form->Values = array();
     
    302298  {
    303299    $Output = '';
    304     $Realm = new Realm($this->Database, $_POST['RealmId']);
     300    $Realm = new Realm($this->System, $_POST['RealmId']);
    305301    if($this->System->Modules['Permission']->Check('Realm', 'SaveDetailed', $Realm->Id))
    306302    {
    307303      $Form = new Form($this->System, $this->SettingDetailedFormClass, array());
    308304      $Form->LoadValuesFromForm();
    309       $EmulatorConfig = new MangosConfigurationFile($this->Database);
     305      $EmulatorConfig = new MangosConfigurationFile($this->System);
    310306      $EmulatorConfig->Load('../realm/'.$Realm->Id.'/etc/mangosd.conf');
    311307      foreach($Form->Definition['Items'] as $Index => $Item)
     
    322318      $Form->OnSubmit = '?Module=Realm&amp;Action=SaveDetailed';
    323319       
    324       $Realm = new Realm($this->Database, $_POST['RealmId']);
     320      $Realm = new Realm($this->System, $_POST['RealmId']);
    325321      $Realm->SaveConfiguration();
    326322      $Form->Values['RealmId'] = $RealmId;
     
    333329  {
    334330    $Output = '';
    335     $Realm = new Realm($this->Database, $_GET['Id']);
     331    $Realm = new Realm($this->System, $_GET['Id']);
    336332    if($this->System->Modules['Permission']->Check('Realm', 'Start', $Realm->Id))
    337333    {
     
    346342  {
    347343    $Output = '';
    348     $Realm = new Realm($this->Database, $_GET['Id']);
     344    $Realm = new Realm($this->System, $_GET['Id']);
    349345    if($this->System->Modules['Permission']->Check('Realm', 'Stop', $Realm->Id))
    350346    {
     
    358354  function InitDatabase()
    359355  {
    360     global $Config;   
    361      
    362356    if(array_key_exists('Id', $_GET))
    363357    {
    364358      $RealmId = $_GET['Id'];
    365       $Realm = new Realm($this->Database, $RealmId);
     359      $Realm = new Realm($this->System, $RealmId);
    366360      if($this->System->Modules['Permission']->Check('Realm', 'InitDatabase', $Realm->Id))
    367361      {
     
    377371  }
    378372}
    379 
    380 ?>
  • trunk/www/Application/View/Server.php

    r81 r93  
    8484  function ItemList()
    8585  {
    86     global $Config;
    87    
    8886    $Output = '<h4>Seznam serverů</h4>';
    8987    $Table = new Table($this->ItemListFormClass, $this->System);
     
    110108      $DbResult = $this->Database->query('SELECT COUNT(*) FROM Server WHERE User='.$this->System->Modules['User']->Data['Id']);
    111109      $DbRow = $DbResult->fetch_row();
    112       if(($ServerCount < $Config['MaxServerCount']) and ($DbRow[0] < $Config['MaxServerCountPerUser']))
     110      if(($ServerCount < $this->Config['MaxServerCount']) and ($DbRow[0] < $this->Config['MaxServerCountPerUser']))
    113111        $Output .= '<br /><div style="text-align: center;"><a href="?Module=Server&amp;Action=Add">Vytvořit nový server</a></div>';     
    114112    }
     
    118116  function Item()
    119117  {
    120     global $Config;
    121    
    122118    $Id = $_GET['Id'];
    123     $Server = new Server($this->Database, $Id);
     119    $Server = new Server($this->System, $Id);
    124120    if(isset($Server->Server))
    125121    {
     
    132128    $Form->Definition['Items']['AccountCount'] = array('Type' => 'String', 'Caption' => 'Počet účtů', 'Default' => '');   
    133129    $ServerStatus = $Server->GetState();
    134     $Form->Values['Realmlist'] = $Config['Web']['Host'].':'.$Form->Values['NetworkPortRealmd'];
     130    $Form->Values['Realmlist'] = $this->Config['Web']['Host'].':'.$Form->Values['NetworkPortRealmd'];
    135131    unset($Form->Definition['Items']['NetworkPortRealmd']);
    136132    $Form->Values['Uptime'] = $this->System->AddPrefixMultipliers($ServerStatus['Uptime'], '', 4, 'Time');
     
    167163  function Add()
    168164  {
    169     global $Config;
    170    
    171165    $Output = '';
    172166    if($this->System->Modules['User']->Data['Role'] >= USER_ROLE_USER)
     
    175169      $DbRow = $DbResult->fetch_row();
    176170      $ServerCount = $DbRow[0];
    177       if($ServerCount < $Config['MaxServerCount'])
     171      if($ServerCount < $this->Config['MaxServerCount'])
    178172      {
    179173        $DbResult = $this->Database->query('SELECT COUNT(*) FROM Server WHERE User='.$this->System->Modules['User']->Data['Id']);
    180174        $DbRow = $DbResult->fetch_row();
    181         if($DbRow[0] >= $Config['MaxServerCountPerUser']) $Output .= $this->System->SystemMessage('Nový server', 'Na jeden účet lze vytvořit maximálně '.$Config['MaxServerCountPerUser'].' serverů');
     175        if($DbRow[0] >= $this->Config['MaxServerCountPerUser'])
     176                $Output .= $this->System->SystemMessage('Nový server', 'Na jeden účet lze vytvořit maximálně '.
     177                  $this->Config['MaxServerCountPerUser'].' serverů');
    182178        else
    183179        {
     
    195191  function Create()
    196192  {
    197     global $Config;
    198    
    199193    $Output = '';
    200194    if($this->System->Modules['User']->Data['Role'] >= USER_ROLE_USER)
     
    202196      $DbResult = $this->Database->query('SELECT COUNT(*) FROM Server WHERE User='.$this->System->Modules['User']->Data['Id']);
    203197      $DbRow = $DbResult->fetch_row();
    204       if($DbRow[0] >= $Config['MaxServerCountPerUser']) $Output .= $this->System->SystemMessage('Nový server', 'Na jeden účet lze vytvořit maximálně '.$Config['MaxServerCountPerUser'].' serverů');
     198      if($DbRow[0] >= $this->Config['MaxServerCountPerUser'])
     199        $Output .= $this->System->SystemMessage('Nový server', 'Na jeden účet lze vytvořit maximálně '.
     200                $this->Config['MaxServerCountPerUser'].' serverů');
    205201      else
    206202      {
     
    208204        $DbRow = $DbResult->fetch_row();
    209205        $NewPortRealmd = $DbRow[0] + 1;
    210         if($NewPortRealmd < $Config['BaseNetworkPortRealmd']) $NewPortRealmd = $Config['BaseNetworkPortRealmd'];
     206        if($NewPortRealmd < $this->Config['BaseNetworkPortRealmd']) $NewPortRealmd = $this->Config['BaseNetworkPortRealmd'];
    211207           
    212208        $Form = new Form($this->System, $this->CreateFormClass, array());
     
    214210        $this->Database->insert('Server', array('Name' => $Form->Values['Name'], 'Description' => $Form->Values['Description'], 'User' => $this->System->Modules['User']->Data['Id'], 'Homepage' => $Form->Values['Homepage'], 'Database' => $Form->Values['Database'], 'NetworkPortRealmd' => $NewPortRealmd, 'Lock' => 1, 'TimeCreate' => 'NOW()'));
    215211        $LastInsertId = $this->Database->insert_id;
    216         $Server = new Server($this->Database, $LastInsertId);
     212        $Server = new Server($this->System, $LastInsertId);
    217213        $Server->CreateDatabase();           
    218214        $Output .= $this->System->SystemMessage('Vytvoření serveru', $Server->ImportDatabase(true));
     
    230226  {
    231227    $Output = '';
    232     $Server = new Server($this->Database, $_POST['ServerId']);
     228    $Server = new Server($this->System, $_POST['ServerId']);
    233229    if(($this->System->Modules['User']->Data['Id'] == $Server->Server['User']) or ($this->System->Modules['User']->Data['Role'] >= USER_ROLE_ADMINISTRATOR))
    234230    {
     
    241237      $Form->OnSubmit = '?Action=ServerSave';
    242238       
    243       $Server = new Server($this->Database, $_POST['ServerId']);
     239      $Server = new Server($this->System, $_POST['ServerId']);
    244240      $Server->SaveConfiguration();
    245241      $Form->Values['ServerId'] = $ServerId;
     
    252248  {
    253249    $Output = '';
    254     $Server = new Server($this->Database, $_GET['Id']);
     250    $Server = new Server($this->System, $_GET['Id']);
    255251    if(($this->System->Modules['User']->Data['Id'] == $Server->Server['User']) or ($this->System->Modules['User']->Data['Role'] >= USER_ROLE_ADMINISTRATOR))
    256252    {
     
    269265    if($this->System->Modules['User']->Data['Role'] >= USER_ROLE_USER)
    270266    {
    271       $Server = new Server($this->Database, $_GET['Id']);
     267      $Server = new Server($this->System, $_GET['Id']);
    272268      if(($this->System->Modules['User']->User['Id'] == $Server->Server['User']) or ($this->System->Modules['User']->Data['Role'] >= USER_ROLE_ADMINISTRATOR))
    273269      {
     
    285281    if($this->System->Modules['User']->Data['Role'] >= USER_ROLE_USER)
    286282    {
    287       $Server = new Server($this->Database, $_GET['Id']);
     283      $Server = new Server($this->System, $_GET['Id']);
    288284      if(($this->System->Modules['User']->Data['Id'] == $Server->Server['User']) or ($this->System->Modules['User']->Data['Role'] >= USER_ROLE_ADMINISTRATOR))
    289285      {
     
    310306    $Form = new Form($this->System, $this->GameAccountNewFormClass);
    311307    $Form->LoadValuesFromForm();
    312     $Server = new Server($this->Database, $Form->Values['ServerId']);
     308    $Server = new Server($this->System, $Form->Values['ServerId']);
    313309    $Output = $this->System->SystemMessage('Vytvoření herního účtu', $Server->NewAccount($Form->Values['Name'], $Form->Values['Password'], $Form->Values['Password2'], $Form->Values['Email'], $Form->Values['Expansion']));
    314310    $Output .= '<a href="?Module=Server&amp;Action=GameAccountRegister&amp;Id='.$Form->Values['ServerId'].'">Zpět k zadání údajů</a>';
     
    322318      Header('Content-Type: text/plain');
    323319      Header('Content-Disposition: attachment; filename="realmlist.wtf"');
    324       $Server = new Server($this->Database, $_GET['Id']);
     320      $Server = new Server($this->System, $_GET['Id']);
    325321      $Output = array(
    326322        'set realmlist '.$this->Config['Web']['Host'].':'.$Server->Server['NetworkPortRealmd'],
     
    337333    if(array_key_exists('Id', $_GET))
    338334    {
    339       $Server = new Server($this->Database, $_GET['Id'] * 1);
     335      $Server = new Server($this->System, $_GET['Id'] * 1);
    340336      echo($Server->GetPatchList());
    341337    } else echo('Zadané id serveru nenalezeno.');
     
    371367  } 
    372368}
    373 
    374 ?>
  • trunk/www/Application/View/Task.php

    r92 r93  
    2626  function ItemList()
    2727  {
    28     global $Config;
    29    
    3028    $Output = '<h4>Fronta úloh</h4>';
    3129    $Table = new Table($this->ItemListFormClass, $this->System);
    3230    $Table->OnRow = array($this, 'ShowListOnRow');
    33     $Table->Definition['Table'] = '(SELECT Id, (COALESCE(UNIX_TIMESTAMP(TimeEnd), UNIX_TIMESTAMP(NOW())) - UNIX_TIMESTAMP(TimeStart)) AS Duration, TimeCreate, Title, State FROM Task WHERE User='.$this->System->Modules['User']->User['Id'].' ORDER BY Id DESC)';
     31    $Table->Definition['Table'] = '(SELECT Id, (COALESCE(UNIX_TIMESTAMP(TimeEnd), UNIX_TIMESTAMP(NOW())) - UNIX_TIMESTAMP(TimeStart)) AS Duration, TimeCreate, Title, State FROM Task WHERE User='.
     32      $this->System->Modules['User']->User['Id'].' ORDER BY Id DESC)';
    3433    $Table->Definition['Items']['Id'] = array('Type' => 'Hidden', 'Caption' => '', 'Default' => '');
    3534    $Table->LoadValuesFromDatabase($this->Database);
     
    6564  }
    6665}
    67 
    68 ?>
  • trunk/www/Application/View/Update.php

    r92 r93  
    77  function ItemList()
    88  {
    9     global $Config;
    10    
    119    $ServerId = $_GET['Id'];
    1210    if($this->System->Modules['User']->User['Role'] >= USER_ROLE_USER)
    1311    {
    14       $Server = new Server($this->Database, $_GET['Id']);
     12      $Server = new Server($this->System, $_GET['Id']);
    1513      if(($this->System->Modules['User']->User['Id'] == $Server->Server['User']) or ($this->System->Modules['User']->User['Role'] >= USER_ROLE_ADMINISTRATOR))
    1614      {
    17         $Server = new Server($this->Database, $ServerId);
     15        $Server = new Server($this->System, $ServerId);
    1816        $Output = '<h4>Seznam dostupných aktulizací</h4>';
    1917        $Output .= 'Před provedením aktualizace bude server zastaven a provedena záloha databáze.';
     
    4139    else if($this->System->Modules['User']->User['Role'] >= USER_ROLE_USER)
    4240    {
    43       $Server = new Server($this->Database, $_GET['Server']);
     41      $Server = new Server($this->System, $_GET['Server']);
    4442      if(($this->System->Modules['User']->User['Id'] == $Server->Server['User']) or ($this->System->Modules['User']->User['Role'] >= USER_ROLE_ADMINISTRATOR))
    4543      {
     
    5149  }
    5250}
    53 
    54 ?>
  • trunk/www/Application/View/User.php

    r80 r93  
    5353  function Login()
    5454  {
    55     global $Config;
    56    
    5755    $Form = new Form($this->System, $this->LoginFormClass);
    5856    $Form->OnSubmit = '?Module=User&amp;Action=LoginFinish';
    5957    $Output = $Form->ShowEditForm();
    6058    $Output .= '<div class="Centred">';
    61     if($Config['Web']['UserRegistrationEnabled'])
     59    if($this->Config['Web']['UserRegistrationEnabled'])
    6260      $Output .= '<a href="?Module=User&amp;Action=Register">Registrovat se</a> ';
    6361    $Output .= '<a href="?Module=User&amp;Action=PasswordRecovery">Obnova zapomenutého hesla</a></div>';
     
    8583  function RegisterSave()
    8684  {
    87     global $Config;
    88    
    89     if($Config['Web']['UserRegistrationEnabled'])
     85    if($this->Config['Web']['UserRegistrationEnabled'])
    9086    {
    9187      $Form = new Form($this->System, $this->RegisterFormClass, array());
     
    9692      if($Result <> $this->System->Translate('UserRegistrated'))
    9793      {
    98         $Form->OnSubmit = '?Module=User&amp;Action=UserRegisterSave';
     94        $Form->OnSubmit = '?Module=User&amp;Action=RegisterSave';
    9995        $Output = $Form->ShowEditForm();
    10096      }
     
    166162  function Register()
    167163  {
    168     global $Config;
    169    
    170     if($Config['Web']['UserRegistrationEnabled'])
     164    if($this->Config['Web']['UserRegistrationEnabled'])
    171165    {
    172166      $Form = new Form($this->System, $this->RegisterFormClass);
    173167      $Form->LoadValuesFromForm();
    174       $Form->OnSubmit = '?Module=User&amp;Action=UserRegisterSave';
     168      $Form->OnSubmit = '?Module=User&amp;Action=RegisterSave';
    175169      $Output = 'Vyplňte správně požadované údaje. Na zadaný email vám bude zaslán aktivační email.';
    176170      $Output .= $Form->ShowEditForm();
     
    181175  function RegisterConfirm()
    182176  {
    183     global $Config;
    184    
    185     if($Config['Web']['UserRegistrationEnabled'])
     177    if($this->Config['Web']['UserRegistrationEnabled'])
    186178    {
    187179      $Page = new PageView($this->System);
     
    192184  }
    193185}
    194 
    195 ?>
Note: See TracChangeset for help on using the changeset viewer.