private function getVoteCheck() { $votes = file($this->getFConfig('voteURL')); if (!empty($votes)) { foreach ($votes as $line) { $entity = explode("\t", $line); $getVId = FAIMMOTOP::model()->count(array('condition' => 'vote_id=:vote_id', 'params' => array('vote_id' => $entity['0']))); switch ($entity['4']) { case 1: $award = $this->getFConfig('voteDefAward'); break; case 2: $award = $this->getFConfig('voteSmsAward'); break; } if ($getVId <= 0) { $mmotop = new FAIMMOTOP(); $mmotop->vote_id = $entity['0']; $mmotop->vote_acc = $entity['3']; $mmotop->vote_date = strtotime($entity['1']); $mmotop->vote_ip = $entity['2']; $mmotop->vote_type = $entity['4']; if ($mmotop->save()) { self::voteRmosCheck($entity['3'], $award); } if (strtolower($entity['3']) == strtolower(Yii::app()->user->username)) { $result[] = $award; } } } if (is_array($result) && sizeof($result) > 0) { echo Yii::t('' . Yii::app()->request->cookies['language']->value . '', 'Congratulations! You enrolled') . ' ' . Character::getRCount(array_sum($result), array(Yii::t('' . Yii::app()->request->cookies['language']->value . '', 'credit'), Yii::t('' . Yii::app()->request->cookies['language']->value . '', 'credits '), Yii::t('' . Yii::app()->request->cookies['language']->value . '', 'credits '))); } else { echo Yii::t('' . Yii::app()->request->cookies['language']->value . '', 'List of votes has been successfully updated') . ' ' . Yii::t('' . Yii::app()->request->cookies['language']->value . '', 'but your votes are not found'); } } else { echo Yii::t('' . Yii::app()->request->cookies['language']->value . '', 'Vote list is empty'); } }
echo $this->renderPartial('html/messages'); if ($model->cLevel < $this->getFConfig('resetLevel')) { ?> <div class="tp-msg"> <h3><?php echo Yii::t('' . Yii::app()->request->cookies['language']->value . '', 'Reset is only available from') . " " . $this->getFConfig('resetLevel') . " " . Yii::t('' . Yii::app()->request->cookies['language']->value . '', 'level '); ?> </h3> <div class="status"> <?php echo Yii::t('' . Yii::app()->request->cookies['language']->value . '', 'Need more'); ?> <?php $lvl = $this->getFConfig('resetLevel') - $model->cLevel; echo Character::getRCount($lvl, array(Yii::t('' . Yii::app()->request->cookies['language']->value . '', 'level'), Yii::t('' . Yii::app()->request->cookies['language']->value . '', 'level '), Yii::t('' . Yii::app()->request->cookies['language']->value . '', 'levels'))); ?> </div> </div> <?php } else { ?> <?php echo CHtml::form('', 'post', array('id' => 'action-form')); ?> <div class="a-line"> <div class="p-line"> <span><?php echo Yii::t('' . Yii::app()->request->cookies['language']->value . '', 'Current reset'); ?> :</span>