Ignore:
Timestamp:
Aug 23, 2009, 6:14:01 PM (15 years ago)
Author:
george
Message:
  • Upraveno: Znovu zprovozněny třídy HomePage, Server a User.
File:
1 edited

Legend:

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

    r69 r71  
    4949  );
    5050 
    51   function LoginForm()
     51  function Login()
    5252  {
    5353    global $Config;
    5454   
    55     $Form = new Form($this->LoginFormClass);
    56     $Form->OnSubmit = '?Action=Login';
     55    $Form = new Form($this->System, $this->LoginFormClass);
     56    $Form->OnSubmit = '?Module=User&Action=LoginFinish';
    5757    $Output = $Form->ShowEditForm();
    5858    $Output .= '<div class="Centred">';
    5959    if($Config['Web']['UserRegistrationEnabled'])
    60       $Output .= '<a href="?Action=UserRegister">Registrovat se</a> ';
    61     $Output .= '<a href="?Action=PasswordRecovery">Obnova zapomenutého hesla</a></div>';
     60      $Output .= '<a href="?Module=User&amp;Action=Register">Registrovat se</a> ';
     61    $Output .= '<a href="?Module=User&amp;Action=PasswordRecovery">Obnova zapomenutého hesla</a></div>';
    6262    return($Output);
    6363  }
    6464 
    65   function LoginResult()
     65  function LoginFinish()
    6666  {
    67     $Form = new Form($this->LoginFormClass);
    68     $Form->OnSubmit = '?Action=Login';
     67    $Form = new Form($this->System, $this->LoginFormClass);
     68    $Form->OnSubmit = '?Module=User&amp;Action=LoginFinish';
    6969    $Form->LoadValuesFromForm();
    7070    $Result = $this->System->Modules['User']->Login($Form->Values['Username'], $Form->Values['Password']);
     
    7474      $Form->Values['Password'] = '';
    7575      $Output .= $Form->ShowEditForm();
    76       $Output .= '<div class="Centred"><a href="?Action=UserRegister">Registrovat se</a> '.
    77         '<a href="?Action=PasswordRecovery">Obnova zapomenutého hesla</a></div>';
     76      $Output .= '<div class="Centred"><a href="?Module=User&amp;Action=UserRegister">Registrovat se</a> '.
     77        '<a href="?Module=User&amp;Action=PasswordRecovery">Obnova zapomenutého hesla</a></div>';
    7878    }
    7979    return($Output);
     
    8686    if($Config['Web']['UserRegistrationEnabled'])
    8787    {
    88       $Form = new Form($this->RegisterFormClass, array());
     88      $Form = new Form($this->System, $this->RegisterFormClass, array());
    8989      $Form->LoadValuesFromForm();
    9090      $Result = $this->System->Modules['User']->Register($Form->Values['Login'], $Form->Values['Password'], $Form->Values['Password2'], $Form->Values['Email'], $Form->Values['Name']);
     
    9292      if($Result <> USER_REGISTRATED)
    9393      {
    94         $Form->OnSubmit = '?Action=UserRegisterSave';
     94        $Form->OnSubmit = '?Module=User&amp;Action=UserRegisterSave';
    9595        $Output = $Form->ShowEditForm();
    9696      }
     
    108108  function PasswordRecoveryFinish()
    109109  {
    110     $Form = new Form($this->PasswordRecoveryFormClass);
     110    $Form = new Form($this->System, $this->PasswordRecoveryFormClass);
    111111    $Form->LoadValuesFromForm();
    112112    $Result = $this->System->Modules['User']->PasswordRecoveryRequest($Form->Values['Name'], $Form->Values['Email']);
     
    121121  function PasswordRecovery()
    122122  {
    123     $Form = new Form($this->PasswordRecoveryFormClass);
    124     $Form->OnSubmit = '?Action=PasswordRecovery2';
     123    $Form = new Form($this->System, $this->PasswordRecoveryFormClass);
     124    $Form->OnSubmit = '?Module=User&amp;Action=PasswordRecovery2';
    125125    $Output = $Form->ShowEditForm();
    126126    return($Output);
     
    130130  {
    131131    $Output = $this->System->SystemMessage('Odhlášení', $this->System->Modules['User']->Logout());
    132     $Output .= $this->LoginForm();
     132    $Output .= $this->Login();
    133133    return($Output);
    134134  }
     
    136136  function Options()
    137137  {
    138     $UserOptions = new Form($this->OptionsFormClass);
     138    $UserOptions = new Form($this->System, $this->OptionsFormClass);
    139139    $UserOptions->LoadValuesFromDatabase($this->System->Modules['User']->User['Id']);
    140     $UserOptions->OnSubmit = '?Action=UserOptionsSave';
     140    $UserOptions->OnSubmit = '?Module=User&amp;Action=UserOptionsSave';
    141141    $Output = $UserOptions->ShowEditForm();
    142142    return($Output);
     
    145145  function OptionsSave()
    146146  {
    147     $UserOptions = new Form($this->OptionsFormClass, array());
     147    $UserOptions = new Form($this->System, $this->OptionsFormClass, array());
    148148    $UserOptions->LoadValuesFromForm();
    149149    $UserOptions->SaveValuesToDatabase($this->System->Modules['User']->User['Id']);
     
    151151    $this->System->Modules['Log']->NewRecord('User', 'Nastavení uživatele změněno', $UserOptions->Values['Name']);
    152152    $UserOptions->LoadValuesFromDatabase($this->System->Modules['User']->User['Id']);
    153     $UserOptions->OnSubmit = '?Action=UserOptionsSave';
     153    $UserOptions->OnSubmit = '?Module=User&amp;Action=UserOptionsSave';
    154154    $Output .= $UserOptions->ShowEditForm();
    155155    return($Output);
     
    162162    if($Config['Web']['UserRegistrationEnabled'])
    163163    {
    164       $Form = new Form($this->RegisterFormClass);
     164      $Form = new Form($this->System, $this->RegisterFormClass);
    165165      $Form->LoadValuesFromForm();
    166       $Form->OnSubmit = '?Action=UserRegisterSave';
     166      $Form->OnSubmit = '?Module=User&amp;Action=UserRegisterSave';
    167167      $Output = 'Vyplňte správně požadované údaje. Na zadaný email vám bude zaslán aktivační email.';
    168168      $Output .= $Form->ShowEditForm();
Note: See TracChangeset for help on using the changeset viewer.