Пример #1
0
 function __construct($args = null)
 {
     parent::__construct($args);
     //Connect tables 'orders' and ('order_time', 'order_cost', 'order_prev_info', 'order_users') as one-to-one
     $this->order_time = dataBase::getElement('order_time', array('order_id' => $this->rowid));
     $this->order_cost = dataBase::getElement('order_cost', array('order_id' => $this->rowid));
     $this->order_prev_info = dataBase::getElement('order_prev_info', array('order_id' => $this->rowid));
     $this->order_users = dataBase::getElement('order_users', array('order_id' => $this->rowid));
 }
Пример #2
0
 function checkUserAuth()
 {
     if (isset($_POST['auth'])) {
         if ($_POST['login'] != '' && $_POST['pass'] != '') {
             $user_auth = dataBase::getElement('auth', array('login' => $_POST['login'], 'password' => $_POST['pass']));
             if ($user_auth->get('rowid')) {
                 foreach ($user_auth->get('user')->getAll() as $param => $value) {
                     $_SESSION[$param] = $value;
                 }
                 return TRUE;
             }
         }
     }
     return FALSE;
 }
Пример #3
0
 function __construct($args = null)
 {
     parent::__construct($args);
     //Connect tables 'partners' and 'partner_info' as one-to-many
     $this->partner_info = dataBase::getElement('partner_info', array('partner_id' => $this->rowid));
 }
Пример #4
0
 function __construct($args = null)
 {
     parent::__construct($args);
     //Connect tables 'clients' and 'partner_info' as one-to-one
     $this->client = dataBase::getElement('clients', array('rowid' => $this->client_id));
 }
Пример #5
0
 function __construct($args = null)
 {
     parent::__construct($args);
     //Connect tables 'order_users' and 'users' as one-to-one
     $this->user = dataBase::getElement('users', array('rowid' => $this->user_id));
 }