Changeset 12 for trunk


Ignore:
Timestamp:
Jun 19, 2012, 10:32:05 AM (12 years ago)
Author:
maron
Message:

zachytávání zpráv-přidání parametrů

Location:
trunk/class
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/class/Message.php

    r11 r12  
    33// message class
    44// Date: 2012-06-19
     5//this class regist function to message
    56
    67class Message
     
    910  protected $method_name;
    1011  protected $obj;
    11   protected $par0;
    12   protected $par1;
    13   protected $par2;
    14   protected $par3;
     12  protected $par0 = -1;
     13  protected $par1 = -1;
     14  protected $par2 = -1;
     15  protected $par3 = -1;
    1516  protected $method;
    1617  protected $key;
     
    2223          $this->method = $method;
    2324          $this->key = $key;
    24           $this->par0 = $par0;
    25           $this->par1 = $par1;
    26           $this->par2 = $par2;
    27           $this->par3 = $par3;
     25
     26          if ($this->method == 'post') {
     27                $arraytest = $_POST;
     28          } else $arraytest = $_GET;
     29       
     30          if (isset($arraytest[$par0])) $this->par0 = $arraytest[$par0];
     31          if (isset($arraytest[$par1])) $this->par1 = $arraytest[$par1];
     32          if (isset($arraytest[$par2])) $this->par2 = $arraytest[$par2];
     33          if (isset($arraytest[$par3])) $this->par3 = $arraytest[$par3];
    2834         
    2935          $this->Activate();
  • trunk/class/Messages.php

    r11 r12  
    3333//registe messages and send data to obj 
    3434  public function RegMess($User) {
    35           $Login = new Message('post','LoginUser',$User,'Login','','');
     35          $Login = new Message('post','LoginUser',$User,'Login','LoginUser','LoginPass');
    3636         
    3737  }
Note: See TracChangeset for help on using the changeset viewer.