Esempio n. 1
0
 public function saveorders($name, $tel, $mail, $order)
 {
     $sth = $this->db->prepare("INSERT INTO saveorders(name, tel, mail, orders) VALUES (:name, :tel, :mail, :orders) ");
     $sth->execute(array(":name" => $name, ":tel" => $tel, ":mail" => $mail, ":orders" => $order));
     Cookie::del('basket');
     header("Location: " . URL . "basket?order={$order}");
 }
 static function login_out()
 {
     Session::set('tokey', null);
     Session::set('uname', null);
     Session::set('uauth', null);
     Cookie::del('uname');
     Cookie::del('tokey');
 }
 public function destroy()
 {
     $this->parent->parent->debug($this::name_space . ': Destroying session...');
     $token = Cookie::get('ltkn');
     $update_query = $this->mySQL_w->prepare("DELETE FROM `core_sessions` WHERE `token`=?");
     $update_query->bind_param('s', $token);
     $update_query->execute();
     Cookie::del('ltkn');
 }
Esempio n. 4
0
 /**
  * Очистка и выход
  */
 public function logout()
 {
     if (static::is_login()) {
         Cookie::del('zzz', '/', null, false, true);
         Session::destroy();
         $this->is_login = false;
         $this->user_data = array();
     }
 }