示例#1
0
 function Context($db_dsn, $guardian_key, $flickr_key, $visitor_id)
 {
     $this->dbh =& DB::connect($db_dsn);
     $this->guardian_key = $guardian_key;
     $this->flickr_key = $flickr_key;
     $this->dbh->query('START TRANSACTION');
     $visitor = get_visitor($this, $visitor_id);
     if (!$visitor) {
         $visitor = add_visitor($this);
     }
     $this->dbh->query('COMMIT');
     $this->visitor_id = $visitor['id'];
 }
示例#2
0
文件: Main.php 项目: rodino25/tsv2
 public function __construct()
 {
     parent::__construct();
     add_visitor();
 }