LogInToSession
By: fruffl | Date: Nov 15 2009 17:06 | Format: PHP | Expires: never | Size: 2.08 KB | Hits: 973
- <?php
- class FRUFFL_SESSION
- {
- const vc = 1000;
- const cn = "fruffl_session";
- protected $ip = null;
- protected $agent = null;
- protected $location = null;
- protected $lockey = null;
- protected $loc = null;
- protected $token = null;
- public static function
- class_info
- ()
- {
- }
- public function
- __CONSTRUCT
- ()
- {
- $this->ip = $_SERVER['REMOTE_ADDR'];
- $this->agent = $_SERVER['HTTP_USER_AGENT'];
- $this->location = __LOCATION__;
- $this->save_token();
- }
- public function
- save_token
- ()
- {
- $_SESSION['TOKEN'][$this->loc] = $this->token;
- }
- public function
- get_token
- ()
- {
- return $_SESSION['TOKEN'][$this->loc];
- }
- public function
- compare_token
- ($t)
- {
- if($t == $_SESSION['TOKEN'][$this->loc]) return true;
- }
- public function
- log_in($user_id)
- {
- {
- $DB_BRIDGE = new DB_BRIDGE;
- if($user = $DB_BRIDGE->loadData('_authors', $user_id))
- }
- else
- {
- return false;
- }
- }
- ?>
Latest pastes
18 hours ago
1 days ago
1 days ago
1 days ago
2 days ago