当前位置: 首页>>代码示例>>PHP>>正文


PHP Character::getRCount方法代码示例

本文整理汇总了PHP中Character::getRCount方法的典型用法代码示例。如果您正苦于以下问题:PHP Character::getRCount方法的具体用法?PHP Character::getRCount怎么用?PHP Character::getRCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Character的用法示例。


在下文中一共展示了Character::getRCount方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getVoteCheck

 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');
     }
 }
开发者ID:smokeelow,项目名称:faicore,代码行数:39,代码来源:CpController.php

示例2: array

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>
开发者ID:smokeelow,项目名称:faicore,代码行数:30,代码来源:reset.php


注:本文中的Character::getRCount方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。