Ejemplo n.º 1
0
 public function __construct()
 {
     parent::__construct();
     // Config Application instance.
     $this->site = array(DOMAIN => 'http://' . $_SERVER['HTTP_HOST'] . '/', ROOT => $_SERVER['DOCUMENT_ROOT'] . '/', STORE => 'file_store', COM => 'facebook/component/', MOD => 'facebook/module/', APP => 'http://apps.facebook.com/hakkomew/', IFRAME => 'http://' . $_SERVER['HTTP_HOST'] . '/facebook/module/iframe/');
     //Set Default Component
     if (!isset($_GET['component'])) {
         $_GET['component'] = 'frontpage';
     }
     //Query ID Position
     foreach (parent::ViewTable('position', 0) as $pos) {
         $this->idPosition[$pos['name']] = $pos['pos_id'];
     }
     //Query ID Component
     $this->idComponent = parent::GetValue('com_id', 'component', 'name', $_GET['component']);
     //Online User
     $user = self::Facebook('/me');
     if ($user['session']) {
         if (!isset($_GET['manga'])) {
             $this->Update('user_online', 'mag_id', 0, 'uid', $user['session']['uid']);
         }
         $delWhere = parent::GetValue('expires', 'user_online', 'uid', $user['session']['uid']) . '<' . $_SERVER['REQUEST_TIME'];
         $this->Delete('user_online', $delWhere);
         if (parent::CountRow('user_online', 'uid', $user['session']['uid']) < 1) {
             $this->Insert('user_online', array('expires', 'uid'), array($user['session']['expires'], $user['session']['uid']));
         }
     } else {
         // Guest User.
         echo '<iframe src="' . $this->site[IFRAME] . 'guest_cookie.php" frameborder="0" style="width:0px; height:0px;"></iframe>';
     }
 }
Ejemplo n.º 2
0
 public function __construct()
 {
     parent::__construct('hakko');
     $this->Domain = $GLOBALS['Domain'];
     $this->Document = $GLOBALS['Document'];
     $this->Request = new RequestPath();
     $this->iconBox = array("file" => "images/ico/file_ico.png", "info" => "images/ico/infor_ico.png", "mov" => "images/ico/movie_ico.png", "pic" => "images/ico/picture_ico.png", "sound" => "images/ico/sound_ico.png", "tag" => "images/ico/tag_ico.png");
 }
Ejemplo n.º 3
0
 public function __construct()
 {
     parent::__construct();
     $userid = ereg_replace('\\.', '', $_SERVER['REMOTE_ADDR']);
     $expires = time() + 1200;
     $table = 'user_online';
     $column = array('expires', 'uid', 'mag_id', 'guest');
     $values = array($expires, $userid, 0, 1);
     if (parent::CountRow($table, 'uid', $userid) < 1) {
         try {
             $sqlString = parent::InsertString($table, $column);
             $statement = $this->isConnect->prepare($sqlString);
             $statement = parent::bindState($statement, $column, $values);
             $statement->execute();
         } catch (PDOException $e) {
             parent::ErrorException('Insert', $e, $sqlString);
         }
     }
 }
Ejemplo n.º 4
0
 public function __construct()
 {
     parent::__construct('selfip');
 }