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


PHP Info::lvl方法代码示例

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


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

示例1: actionIndex

 public function actionIndex()
 {
     if (Yii::app()->user->isGuest) {
         $this->redirect(Yii::app()->homeUrl);
     }
     $this->pageTitle = Yii::t('title', 'Userbar creation');
     $image = null;
     $model = new UserbarForm();
     if (isset($_POST['UserbarForm'])) {
         $model->attributes = $_POST['UserbarForm'];
         if ($model->validate()) {
             $criteria = new CDbCriteria();
             $criteria->select = 'id, name, exp, gender, race, player_class';
             $player = Players::model()->with('abyssRank', 'lifeStats')->findByPK($model->player_id);
             $criteria = new CDbCriteria();
             $criteria->select = 'name';
             $legion = Legions::model()->with(array('legionMembers' => array('joinType' => 'INNER JOIN', 'condition' => 'player_id = ' . $model->player_id)))->find();
             if ($legion == NULL) {
                 $legion->name = null;
             }
             Yii::app()->ih->load($_SERVER['DOCUMENT_ROOT'] . Yii::app()->baseUrl . '/images/userbars/ub' . $model->fon . '.png')->text($player->name, Yii::app()->basePath . '/fonts/romic.ttf', 14, $this->rgb($model->shadow), CImageHandler::CORNER_LEFT_TOP, 8, 8)->text($player->name, Yii::app()->basePath . '/fonts/romic.ttf', 14, $this->rgb($model->name), CImageHandler::CORNER_LEFT_TOP, 8, 7)->text($legion->name, Yii::app()->basePath . '/fonts/monaco.ttf', 10, $this->rgb($model->shadow), CImageHandler::CORNER_LEFT_TOP, 8, 36)->text($legion->name, Yii::app()->basePath . '/fonts/monaco.ttf', 10, $this->rgb($model->legion), CImageHandler::CORNER_LEFT_TOP, 8, 35)->text(Info::class_text($player->player_class) . ', ' . $this->genderRace($player->gender, $player->race), Yii::app()->basePath . '/fonts/verdana.ttf', 8, $this->rgb($model->shadow), CImageHandler::CORNER_LEFT_BOTTOM, 8, 9)->text(Info::class_text($player->player_class) . ', ' . $this->genderRace($player->gender, $player->race), Yii::app()->basePath . '/fonts/verdana.ttf', 8, $this->rgb($model->class_race), CImageHandler::CORNER_LEFT_BOTTOM, 8, 10)->text(Info::lvl($player->exp) . ' Level', Yii::app()->basePath . '/fonts/romic.ttf', 14, $this->rgb($model->shadow), CImageHandler::CORNER_RIGHT_TOP, 8, 6)->text(Info::lvl($player->exp) . ' Level', Yii::app()->basePath . '/fonts/romic.ttf', 14, $this->rgb($model->level), CImageHandler::CORNER_RIGHT_TOP, 8, 5)->text($player->abyssRank->all_kill . '/' . $player->abyssRank->weekly_kill . ' Kills', Yii::app()->basePath . '/fonts/monaco.ttf', 10, $this->rgb($model->shadow), CImageHandler::CORNER_RIGHT_TOP, 8, 34)->text($player->abyssRank->all_kill . '/' . $player->abyssRank->weekly_kill . ' Kills', Yii::app()->basePath . '/fonts/monaco.ttf', 10, $this->rgb($model->kills), CImageHandler::CORNER_RIGHT_TOP, 8, 33)->text($player->lifeStats->hp . ' HP, ' . $player->lifeStats->mp . ' MP', Yii::app()->basePath . '/fonts/verdana.ttf', 8, $this->rgb($model->shadow), CImageHandler::CORNER_RIGHT_BOTTOM, 8, 9)->text($player->lifeStats->hp . ' HP, ' . $player->lifeStats->mp . ' MP', Yii::app()->basePath . '/fonts/verdana.ttf', 8, $this->rgb($model->stats), CImageHandler::CORNER_RIGHT_BOTTOM, 8, 10)->save($_SERVER['DOCUMENT_ROOT'] . Yii::app()->baseUrl . '/userbars/' . $model->player_id . '.png');
             $image = Yii::app()->homeUrl . 'userbars/' . $model->player_id . '.png';
         }
     }
     $this->render('/userbar', array('model' => $model, 'players' => Players::getPlayers(), 'image' => $image));
 }
开发者ID:noiary,项目名称:Aion-Core-v4.7.5,代码行数:26,代码来源:UserbarController.php

示例2: actionIndex

 public function actionIndex()
 {
     if (Yii::app()->user->isGuest) {
         $this->redirect(Yii::app()->homeUrl);
     }
     $this->pageTitle = Yii::t('title', 'Character list');
     $criteria = new CDbCriteria();
     $criteria->select = 'name, account_id, account_name, exp, race, player_class, creation_date';
     $criteria->join = 'INNER JOIN ' . Config::db('db') . '.log_referals ON (log_referals.slave_id = t.account_id AND log_referals.master_id = "' . Yii::app()->user->id . '" AND status = "unpaid")';
     $referals = Players::model()->findAll($criteria);
     $form = new LogReferals();
     if (isset($_POST['LogReferals'])) {
         $form->attributes = $_POST['LogReferals'];
         $check_isset = LogReferals::model()->count('master_id = ' . Yii::app()->user->id . ' AND slave_id = ' . $form->slave_id . ' AND status = "unpaid"');
         if ($check_isset != 1) {
             Yii::app()->user->setFlash('message', '<div class="flash_error">' . Yii::t('pers', 'You have no referrаls.') . '</div>');
             $this->refresh();
         }
         $master = AccountData::model()->find('id = ' . Yii::app()->user->id);
         $check_ip = AccountData::model()->count('id = ' . $form->slave_id . ' AND last_ip = "' . $master->last_ip . '"');
         if ($check_ip != 0) {
             $log = LogReferals::model()->find('master_id = ' . Yii::app()->user->id . ' AND slave_id = ' . $form->slave_id . ' AND status = "unpaid"');
             $log->status = 'blocked';
             $log->update(false);
             Yii::app()->user->setFlash('message', '<div class="flash_error">' . Yii::t('pers', 'You have no referrаls.') . '</div>');
             $this->refresh();
         }
         $criteria = new CDbCriteria();
         $criteria->select = 'exp';
         $criteria->condition = 'account_id = ' . $form->slave_id;
         $criteria->order = 'exp DESC';
         $criteria->limit = 1;
         $check_lvl = Players::model()->find($criteria);
         if (Info::lvl($check_lvl->exp) < Config::get('referal_level')) {
             Yii::app()->user->setFlash('message', '<div class="flash_error">' . Yii::t('pers', 'Less than the minimum level.') . '</div>');
             $this->refresh();
         }
         $criteria = new CDbCriteria();
         $criteria->condition = 'id = ' . Yii::app()->user->id;
         $money = AccountData::model()->find($criteria);
         $money[Yii::app()->params->money] = $money[Yii::app()->params->money] + Config::get('referal_bonus');
         $money->save();
         $criteria = new CDbCriteria();
         $criteria->condition = 'id = ' . $form->slave_id;
         $money = AccountData::model()->find($criteria);
         $money[Yii::app()->params->money] = $money[Yii::app()->params->money] + Config::get('referal_bonus_ref');
         $money->save();
         $log = LogReferals::model()->find('master_id = ' . Yii::app()->user->id . ' AND slave_id = ' . $form->slave_id . ' AND status = "unpaid"');
         $log->status = 'complete';
         $log->update(false);
         Yii::app()->user->setFlash('message', '<div class="flash_success">' . Yii::t('pers', 'Bonus credit applied!') . '</div>');
         $this->refresh();
     }
     $this->render('/pers', array('model' => Players::getPlayers(), 'referals' => $referals));
 }
开发者ID:noiary,项目名称:Aion-Core-v4.7.5,代码行数:55,代码来源:PersController.php

示例3: foreach

				<th width="95px">Class</th>
				<th width="95px">Status</th>
			</tr>
			<?php 
foreach ($players as $player) {
    ?>
			<tr class="center">
				<td><a href="<?php 
    echo Yii::app()->homeUrl . 'player/' . $player->name;
    ?>
"><?php 
    echo $player->name;
    ?>
</a></td>
				<td><?php 
    echo Info::lvl($player->exp);
    ?>
</td>
				<td><?php 
    echo number_format($player->abyssRank->ap, 0, ' ', ' ');
    ?>
</td>
				<td><?php 
    echo Info::race($player->race);
    ?>
</td>
				<td><?php 
    echo Info::player_class($player->player_class);
    ?>
</td>
				<td><?php 
开发者ID:noiary,项目名称:Aion-Core-v4.7.5,代码行数:31,代码来源:top.php

示例4: foreach

foreach ($players->legionMembers as $player) {
    ?>
			<tr class="center">
				<td><a href="<?php 
    echo Yii::app()->homeUrl . 'player/' . $player['players']['name'];
    ?>
"><?php 
    echo $player['players']['name'];
    ?>
</a></td>
				<td><?php 
    echo Info::legion_rank($player['rank']);
    ?>
</td>
				<td><?php 
    echo Info::lvl($player->players['exp']);
    ?>
</td>
				<td><?php 
    echo Info::player_class($player['players']['player_class']);
    ?>
</td>
				<td><?php 
    echo Info::online($player['players']['online']);
    ?>
</td>
			</tr>
			<?php 
}
?>
		</table>
开发者ID:noiary,项目名称:Aion-Core-v4.7.5,代码行数:31,代码来源:legion.php

示例5: foreach

				<th width="80px">Inventory</th>
				<th width="80px">Location</th>
			</tr>
		<?php 
foreach ($form2 as $data) {
    ?>
			<tr class="center">
				<td><a href="<?php 
    echo Yii::app()->homeUrl . 'player/' . $data->name;
    ?>
"><?php 
    echo $data->name;
    ?>
</a></td>
				<td><?php 
    echo Info::lvl($data->exp);
    ?>
</td>
				<td><?php 
    echo Info::race($data->race);
    ?>
</td>
				<td><?php 
    echo Info::player_class($data->player_class);
    ?>
</td>
				
				<td>
					<?php 
    if ($data->show_inventory == 1) {
        ?>
开发者ID:noiary,项目名称:Aion-Core-v4.7.5,代码行数:31,代码来源:settings.php

示例6: foreach

				<th width="95px">Class</td>
				<th width="95px">Status</td>
			</tr>
			<?php 
    foreach ($model as $model) {
        ?>
			<tr class="center">
				<td><a href="<?php 
        echo Yii::app()->homeUrl . 'player/' . $model->name;
        ?>
"><?php 
        echo $model->name;
        ?>
</a></td>
				<td><?php 
        echo Info::lvl($model->exp);
        ?>
</td>
				<td><?php 
        echo number_format($model->abyssRank->ap, 0, ' ', ' ');
        ?>
</td>
				<td><?php 
        echo Info::race($model->race);
        ?>
</td>
				<td><?php 
        echo Info::player_class($model->player_class);
        ?>
</td>
				<td><?php 
开发者ID:noiary,项目名称:Aion-Core-v4.7.5,代码行数:31,代码来源:player_search.php

示例7:

        ?>
</td>
				<td><?php 
        echo Info::race($referal->race);
        ?>
</td>
				<td><?php 
        echo Info::player_class($referal->player_class);
        ?>
</td>
				<td><?php 
        echo Yii::app()->dateFormatter->format('dd.M.y, HH:mm:ss', $referal->creation_date);
        ?>
</td>
				<td><?php 
        if (Info::lvl($referal->exp) >= 50) {
            ?>
<input type="radio" id="LogReferals_slave_id" name="LogReferals[slave_id]" value="<?php 
            echo $referal->account_id;
            ?>
" /><?php 
        }
        ?>
</td>
			</tr>
		<?php 
    }
    ?>
			<tr class="center">
				<td colspan="6"><input type="submit" name="yt0" value="Получить бонус" class="button"></td>
			</tr>
开发者ID:noiary,项目名称:Aion-Core-v4.7.5,代码行数:31,代码来源:pers.php


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