Ejemplo n.º 1
0
 public function actionOnline()
 {
     $i = 0;
     $onlineArray = MEMBSTAT::model()->findAll(array('select' => 'memb___id', 'condition' => 'ConnectStat=:ConnectStat', 'params' => array(':ConnectStat' => '1')));
     $model = new Character();
     $this->pageTitle = Yii::t('' . Yii::app()->request->cookies['language']->value . '', 'Total online') . ' / ' . $this->getFConfig('serverName');
     $this->breadcrumbs = array(Yii::t('' . Yii::app()->request->cookies['language']->value . '', 'Total online'));
     $this->pageH1 = Yii::t('' . Yii::app()->request->cookies['language']->value . '', 'Total online');
     Yii::app()->clientScript->registerMetaTag($this->getFConfig('metaDescDown'), 'description');
     Yii::app()->clientScript->registerMetaTag($this->getFConfig('metaKeyDown'), 'keywords');
     $this->render('online', array('onlineArray' => $onlineArray, 'i' => $i, 'model' => $model));
 }
Ejemplo n.º 2
0
 public function getOInfo($acc, $char)
 {
     $online = MEMBSTAT::model()->find(array('select' => 'ConnectStat', 'condition' => 'memb___id=:memb___id', 'params' => array(':memb___id' => $acc)));
     $model = AccountCharacter::model()->find(array('select' => 'GameIDC', 'condition' => 'Id=:Id', 'params' => array(':Id' => $acc)));
     if ($model->GameIDC == $char && $online->ConnectStat == 1) {
         return 1;
     } else {
         if ($model->GameIDC == $char && $online->ConnectStat == 0) {
             return 0;
         } else {
             return 0;
         }
     }
 }
Ejemplo n.º 3
0
 private function checkOnline()
 {
     $model = MEMBSTAT::model()->find(array('select' => 'ConnectStat', 'condition' => 'memb___id=:memb___id', 'params' => array(':memb___id' => Yii::app()->user->username)));
     return $model->ConnectStat;
 }