Ejemplo n.º 1
0
 public function actionIndex()
 {
     $games = Games::model()->findByAttributes(array('id' => 1));
     $gamesServerId = unserialize($games->server_id);
     $gamesAlias = $games->alias;
     $this->render('index', array('gamesServerId' => $gamesServerId, 'gamesAlias' => $gamesAlias));
 }
Ejemplo n.º 2
0
 public function run()
 {
     //определяем название контроллера и метода (action)
     $controller = Yii::app()->controller->id;
     $action = Yii::app()->controller->action->id;
     //проверяем нужно ли показывать виджет
     if (!in_array($controller . '/' . $action, $this->showOn)) {
         return;
     }
     //проверяем, нужно ли выводить игры только данного жанра
     if (isset($_GET['type_id'])) {
         $id = $_GET['type_id'];
         $params = array('limit' => $this->count, 'order' => 'g_rate DESC', 'condition' => 't_id=:id', 'params' => array(':id' => $id));
         //ищем игры
         $games = Games::model()->getTopGames($params)->published()->with('ygs_types')->findAll();
     } else {
         $params = array('limit' => $this->count, 'order' => 'g_rate DESC');
         //ищем игры
         $games = Games::model()->getTopGames($params)->published()->findAll();
     }
     //заполняем массивы с жанрами игр для каждой найденной игры
     //для этого раскодируем поле g_type
     foreach ($games as $key => $game) {
         $games[$key]->g_types = Yii::app()->controller->_decodeTypes($game->g_type);
     }
     //показываем виджет
     $this->render('topGames', array('title' => $this->title, 'games' => $games));
 }
 /**
  * Updates a particular model.
  * If update is successful, the browser will be redirected to the 'view' page.
  * @param integer $id the ID of the model to be updated
  */
 public function actionUpdate($id)
 {
     $model = $this->loadModel($id);
     $this->_operate($model, 'update');
     $listGames = Games::model()->findAll();
     $listService = Service::model()->findAll();
     $this->render('update', array('model' => $model, 'listGames' => $listGames, 'listService' => $listService));
 }
Ejemplo n.º 4
0
 public function actionIndex()
 {
     $this->active_link = 'dashboard';
     //count users
     $users = User::model()->count('status != ' . User::STATUS_DELETED);
     $games = Games::model()->count();
     $zakaz = Zakaz::model()->active()->count();
     $this->render('dashboard', array('users' => $users, 'games' => $games, 'zakaz' => $zakaz));
 }
Ejemplo n.º 5
0
 public function actionIndex()
 {
     $serverId = $_GET['serverid'];
     $gamesName = $_GET['gametype'];
     if ($serverId && $gamesName && $_GET['gid']) {
         /*
          * 魔神战纪的接口
          */
         if ($gamesName == 'mszj') {
             $gamesServerId = Games::model()->findByAttributes(array('id' => $_GET['gid']));
             $gamesApi = GamesApi::model()->findByAttributes(array('gid' => $_GET['gid']));
             $gamesServerId = unserialize($gamesServerId->server_id);
             $mid = Yii::app()->user->id;
             if ($gamesServerId) {
                 $this->memberGames($mid, $_GET['gid'], $gamesServerId[--$serverId]);
                 header("Location:http://res1.mszj.wowan365.com/bin/WebLaucher.html?userid=" . $gamesApi->userid . "&username="******"&time=" . time() . "&flag=8920bf1232e4f0d50fae4a494a2f8dab&cm=1&server_id=" . $gamesServerId[--$serverId] . "&country=%E5%8C%97%E4%BA%AC%E5%B8%82");
             }
         }
     }
 }
Ejemplo n.º 6
0
echo $form->error($model, 'imgurl');
echo $form->error($model, 'content');
echo $form->error($model, 'display');
?>
<table width="900" border="0"  class="table_b">
  <tr>
    <th>文章标题:</th>
    <td><?php 
echo $form->textField($model, 'tilte', array('class' => 'text', 'maxlength' => 255));
?>
</td>
  </tr>
    <tr>
    <th>游戏:</th>
    <td><?php 
echo $form->dropDownList($model, 'gid', Games::model()->getGamesAllShow(), array('class' => 'select'));
?>
</td>
  </tr>
  <tr>
    <th>栏目:</th>
    <td><?php 
echo $form->dropDownList($model, 'tid', ArticleType::model()->getArticleType(), array('class' => 'select'));
?>
</td>
  </tr>
  <tr>
    <th>关键字:</th>
    <td><?php 
echo $form->textField($model, 'keywords', array('size' => 50, 'maxlength' => 50, 'class' => 'text'));
?>
Ejemplo n.º 7
0
    ?>
/member/idcard" style="color:red;text-decoration:none;">立即认证&gt&gt&gt</a>
  <?php 
}
?>
  <form>
  </form>
  </div>
  <div class="mr_game">
  <h1>玩过的游戏</h1>
  <ul>
  <?php 
$memberGamesarr = MemberGames::model()->getMemberGames(Yii::app()->user->id);
if ($memberGamesarr) {
    foreach ($memberGamesarr as $value) {
        $value = unserialize($value);
        $memberGamesname = Games::model()->getGamesName($value['gid']);
        if ($memberGamesname) {
            $memberGamesimages = Games::model()->getGamesImage($value['gid']);
            $GetGamesServerId = Games::model()->getGamesServerValue($value['gid'], $value['serveridvalue']);
            echo "<li><a target='_blanck' href='" . Yii::app()->request->baseUrl . "/gameslogin/index?gametype=" . $memberGamesname[1] . "&serverid=" . $GetGamesServerId . "'><img alt='" . $memberGamesname[0] . "-" . $GetGamesServerId . "区' title='" . $memberGamesname[0] . "-" . $GetGamesServerId . "区' height='64px' width='64px' src='http://918s-game.stor.sinaapp.com/" . $memberGamesimages[1] . "'/><p>" . $memberGamesname[0] . "</p></a></li>";
        }
    }
} else {
    echo '暂时没有玩过任何游戏!';
}
?>

  </ul>

  </div>
Ejemplo n.º 8
0
 /**
  * Импортирует игры из xml фида партнерки в базу данных
  * @return страница с результатами
  */
 public function actionImport()
 {
     //получаем список всех жанров
     $types = Types::model()->findAll();
     //ищем все сохраненные игры (их id)
     $existingIds = Games::model()->getExistingIds();
     $errors = array();
     $results = '';
     //обработка команды
     if (isset($_POST['import'])) {
         libxml_use_internal_errors(true);
         //загружаем xml фид
         $xml = simplexml_load_file(Yii::app()->user->xml);
         if (!$xml) {
             $errors = libxml_get_errors();
         } else {
             $i = 0;
             //парсинг фида
             foreach ($xml->result->ITEM as $game) {
                 //если эта игра уже сохранена...
                 if (in_array($game->ID, $existingIds)) {
                     //...переходим к следующей
                     continue;
                 }
                 //создаем новую игру
                 $newGame = new Games();
                 //заполняем атрибуты
                 $newGame->g_id = $game->ID;
                 $newGame->g_rate = $game->RATE;
                 $newGame->g_name_url = $game->NAME_URL;
                 $newGame->g_type = $game->TYPE;
                 $newGame->g_added = $game->ADDED;
                 $newGame->g_size = $game->SIZE;
                 $newGame->g_name = $game->NAME;
                 $newGame->g_medium_pic = $game->MEDIUM_PIC;
                 $newGame->g_small_pic = $game->SMALL_PIC;
                 $newGame->g_download_link = $game->DOWNLOAD_LINK;
                 $newGame->g_shortdescr = $game->SHORTDESCR;
                 $newGame->g_fulldescr = $game->FULLDESCR;
                 $newGame->g_publish_date = date('Y-m-d', time());
                 $newGame->g_state = Games::PUBLISHED;
                 //записываем массив со скриншотами
                 foreach ($game->SCREENSHOT as $sh) {
                     $newGame->g_screenshots[] = $sh;
                 }
                 //разбираем поле с жанрами
                 foreach ($types as $type) {
                     if ($newGame->g_type & $type['t_id']) {
                         $newGame->g_types[] = $type['t_id'];
                     }
                 }
                 //сохраняем игру в БД
                 //сохранение скриншотов и жанров выполняетя в Games::afterSave()
                 if (!$newGame->save()) {
                     $errors[] = 'Не могу сохранить игру id = ' . $newGame->g_id;
                 } else {
                     $i++;
                 }
             }
             $results = 'Сохранено новых игр ' . $i;
         }
     }
     //показываем форму
     $this->render('import', array('xml' => Yii::app()->user->xml, 'errors' => $errors, 'results' => $results));
 }
Ejemplo n.º 9
0

<?php 
foreach ($model as $model) {
    ?>
 <tr>
<td><?php 
    echo $model->order_number;
    ?>
</td><td><?php 
    $gamesname = Games::model()->getGamesName($model->gid);
    echo $gamesname[0];
    ?>
 <?php 
    if ($model->gid_server_id) {
        $gamesserverid = Games::model()->getGamesServerValue($model->gid, $model->gid_server_id);
        if ($gamesserverid < 10) {
            echo "00" . $gamesserverid;
        } elseif ($gamesserverid > 9 && $gamesserverid < 100) {
            echo "0" . $gamesserverid;
        } else {
            echo $gamesserverid;
        }
    }
    ?>
区</td><td><?php 
    echo $model->price;
    ?>
元</td><td><?php 
    echo date('Y-m-d H:i', $model->pay_time);
    ?>
Ejemplo n.º 10
0
<?php

$sid_option = Service::model()->findAll();
$gid_option = Games::model()->findAll();
?>
<div id="content-header">
    <div id="breadcrumb">
        <a href="index.php" class="tip-bottom"><i class="icon-home"></i>首页</a>
        <a href="index.php?r=servers" class="current"><i></i>游戏区服管理</a>
        <a href="#" class="current">建立新服务器</a>
    </div>
</div>
<div class="container-fluid">
    <div class="widget-box">
        <div class="widget-title">
            <span class="icon">
                <i class="icon-th"></i>
            </span>
            <h5>建立新服务器</h5>
        </div>
        <div class="widget-content nopadding">
            <form id="add_servers" action="index.php?r=servers/create" method="post" class="form-horizontal">
                <div class="control-group">
                    <label class="control-label">选择联运商 :</label>
                    <div class="controls">
                        <?php 
echo CHtml::dropDownList("Servers[sid]", null, CHtml::listData($sid_option, "id", "name"));
?>
                    </div>
                </div>
                <div class="control-group">
Ejemplo n.º 11
0
<style>
<!--
#side_right input{
	width:40px;
}
#side_right select{
	width:60px;
}
-->
</style>
<div id="side_right">
<h2><strong>订单管理</strong></h2>
<h3><span class="title">编辑订单</span><span class="manage"><a href="javascript:void(0)"><img src="<?php 
echo Yii::app()->request->baseUrl;
?>
/system/images/delete.jpg" /></a></span></h3>

<?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'user-grid', 'dataProvider' => $model->search(), 'selectableRows' => 2, 'filter' => $model, 'template' => '{items}{pager}', 'cssFile' => false, 'pager' => array('class' => 'CLinkPager', 'cssFile' => false, 'header' => '', 'pageSize' => 3), 'columns' => array(array('class' => 'CCheckBoxColumn', 'name' => 'id'), array('name' => 'id', 'htmlOptions' => array('style' => 'width:20px;')), array('name' => 'order_number', 'header' => '订单编号', 'type' => 'raw', 'value' => 'CHtml::link($data->order_number,array(update,id=>$data->id))'), array('name' => 'mname', 'header' => '会员名'), array('name' => 'gid', 'header' => '游戏', 'value' => '$data->gameName->gname', 'filter' => CHtml::listData(Games::model()->findAll(), 'id', 'gname')), array('name' => 'gid_server_id', 'header' => '分区', 'value' => 'Games::model()->getGamesServerValue($data->gid,$data->gid_server_id)'), array('name' => 'price'), array('name' => 'pay_type', 'header' => '支付方式', 'filter' => CHtml::listData(OrderType::model()->findAll(), 'id', 'name'), 'value' => '$data->orderType->name'), array('name' => 'pay_time', 'header' => '支付时间', 'value' => 'Order::model()->getTime($data->pay_time)'), array('name' => 'pay', 'header' => '是否付款', 'filter' => Yii::app()->params["pay"], 'value' => 'Order::model()->getPayName($data->pay)'), array('header' => '编辑', 'class' => 'CButtonColumn'))));
?>
</div>
<!---------------side_right end---------------->
<?php 
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$.fn.yiiGridView.update('user-grid', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
?>
<div class="search-form" style="display:none">
</div><!-- search-form -->
Ejemplo n.º 12
0
 /**
  * Displays a particular model.
  * @param integer $id the ID of the model to be displayed
  */
 public function actionIndex()
 {
     header("Content-Type: text/html; charset=utf-8");
     //echo Yii::app()->getBaseUrl();exit;
     require dirname(Yii::app()->BasePath) . "/alipays/alipay.config.php";
     require dirname(Yii::app()->BasePath) . "/alipays/lib/alipay_submit.class.php";
     /**************************请求参数**************************/
     //支付类型
     $payment_type = "1";
     //必填,不能修改
     //服务器异步通知页面路径
     //$notify_url = Yii::app()->params['returnHost']."alipay/notify_url.html";
     $notify_url = Yii::app()->params['returnHost'] . "alipay/notify_url/";
     //需http://格式的完整路径,不允许加?id=123这类自定义参数
     //页面跳转同步通知页面路径
     $return_url = Yii::app()->params['returnHost'] . "alipay/return_url/";
     //需http://格式的完整路径,不允许加?id=123这类自定义参数
     //卖家支付宝帐户
     //$seller_email = $_POST['WIDseller_email'];
     $seller_email = '*****@*****.**';
     //必填
     //商户订单号
     $out_trade_no = intval($_POST['pay_number']);
     //$out_trade_no = "123222";
     //商户网站订单系统中唯一订单号,必填
     //订单名称
     $gameName = Games::model()->getGamesName($_POST['pay_game']);
     $subject = $gameName[0] . $_POST['pay_server'];
     //必填
     //付款金额
     $total_fee = $_POST['price'];
     //必填
     //订单描述
     $body = '918游戏充值 用户名:' . Yii::app()->user->name . '为' . $gameName[0] . $_POST['pay_server'] . '充值' . $_POST['price'] . "元";
     //商品展示地址
     $show_url = $_POST['WIDshow_url'];
     //需以http://开头的完整路径,例如:http://www.xxx.com/myorder.html
     //防钓鱼时间戳
     $anti_phishing_key = "";
     //若要使用请调用类文件submit中的query_timestamp函数
     //客户端的IP地址
     //$exter_invoke_ip = $_POST['WIDexter_invoke_ip'];
     $exter_invoke_ip = Yii::app()->request->userHostAddress;
     //非局域网的外网IP地址,如:221.0.0.1
     /*echo $out_trade_no."订单<br>";
     		echo $subject."游戏名称<br>";
     		echo $total_fee."钱<br>";
     		echo $body."<br>";
     		echo $show_url."<br>";
     		echo $anti_phishing_key."<br>";
     		echo $exter_invoke_ip."<br>";
     		echo $_POST['pay_server_value'];
     		//exit;*/
     /************************************************************/
     //构造要请求的参数数组,无需改动
     $parameter = array("service" => "create_direct_pay_by_user", "partner" => trim($alipay_config['partner']), "payment_type" => $payment_type, "notify_url" => $notify_url, "return_url" => $return_url, "seller_email" => $seller_email, "out_trade_no" => $out_trade_no, "subject" => $subject, "total_fee" => $total_fee, "body" => $body, "show_url" => $show_url, "anti_phishing_key" => $anti_phishing_key, "exter_invoke_ip" => $exter_invoke_ip, "_input_charset" => trim(strtolower($alipay_config['input_charset'])));
     //建立请求
     $alipaySubmit = new AlipaySubmit($alipay_config);
     $html_text = $alipaySubmit->buildRequestForm($parameter, "get", "确认");
     echo $html_text;
     $gameServerTrue = Games::model()->getGamesServerTrue($_POST['pay_game'], $_POST['pay_server_value']);
     if ($gameServerTrue) {
         $order = new Order();
         $order->order_number = $out_trade_no;
         $order->mid = Yii::app()->user->id;
         $order->gid = $_POST['pay_game'];
         $order->gid_server_id = $_POST['pay_server_value'];
         $order->price = $total_fee;
         $order->pay_type = $_POST['pay_type'];
         $order->pay_time = time();
         $order->pay_ip = Yii::app()->request->userHostAddress;
         $order->save(false);
     }
 }
Ejemplo n.º 13
0
<style>
<!--
#side_right input{
	width:40px;
}
#side_right select{
	width:60px;
}
-->
</style>
<div id="side_right">
<h2><strong>游戏API管理</strong></h2>
<h3><span class="title">编辑API</span><span class="manage"><a href="javascript:void(0)"><img src="<?php 
echo Yii::app()->request->baseUrl;
?>
/system/images/delete.jpg" /></a></span></h3>

<?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'user-grid', 'dataProvider' => $model->search(), 'selectableRows' => 2, 'filter' => $model, 'template' => '{items}{pager}', 'cssFile' => false, 'pager' => array('class' => 'CLinkPager', 'cssFile' => false, 'header' => ''), 'columns' => array(array('class' => 'CCheckBoxColumn', 'name' => 'id'), 'id', array('name' => 'gid', 'type' => 'raw', 'filter' => Games::model()->getGamesAll(), 'value' => 'CHtml::link($data->gameName->gname,array(update,id=>$data->id))'), 'userid', 'username', 'password', array('header' => '编辑', 'class' => 'CButtonColumn', 'htmlOptions' => array('style' => 'width:200px;')))));
?>
</div>
<!---------------side_right end---------------->
<?php 
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$.fn.yiiGridView.update('user-grid', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
Ejemplo n.º 14
0
					$.post(url, { gid : gid},
						function(data){
							if(data){
								$("#Order_gid_server_id").html(data);
							}else{
								$("#Order_gid_server_id").html('<option value="">请选择其他游戏</potion>');
							}
							
						});
						
				}
			}
</script>
<select name="Order[gid_server_id]" id="Order_gid_server_id">
 <?php 
$getGamesValue = Games::model()->getGamesServerId("1");
$i = 1;
if ($getGamesValue) {
    foreach ($getGamesValue as $value) {
        echo '<option value="' . $value . '">918双线' . $i . '区</option>';
        $i++;
    }
} else {
    echo '<option value="">请选择其他游戏</potion>';
}
?>
</select>

<h2>选择充值金额:</h2>
<div id="right_01">
<ul>
Ejemplo n.º 15
0
 /**
  * 比赛结束,计算总分和名次,处理比赛状态。
  */
 public static function end_tournament($id)
 {
     $tournament = Tournament::model()->findByPk($id);
     if (!$tournament) {
         return false;
     }
     $total_game = $tournament->player_joined * ($tournament->player_joined - 1);
     if ($tournament->t_kind == 'single') {
         $total_game = $total_game / 2;
     }
     $tour_games = Games::model()->findAll("`status` in ('黑胜','白胜','和棋') and tid={$id}");
     //如果所有比赛都结束了,则处理比赛结束的逻辑。
     if ($total_game == count($tour_games)) {
         $tj = Tournament_join::model()->findAll("tid={$id}");
         $users_score = array();
         foreach ($tj as $v) {
             $users_score[$v->uid] = array('score' => 0, 'win' => 0);
         }
         //遍历game,算分和胜。
         foreach ($tour_games as $g) {
             switch ($g->status) {
                 case '黑胜':
                     $users_score[$g->black_id]['score']++;
                     $users_score[$g->black_id]['win']++;
                     break;
                 case '白胜':
                     $users_score[$g->white_id]['score']++;
                     $users_score[$g->white_id]['win']++;
                     break;
                 case '和棋':
                     $users_score[$g->black_id]['score'] += 0.5;
                     $users_score[$g->white_id]['score'] += 0.5;
                     break;
             }
         }
         foreach ($tj as $v) {
             $v->t_score = $users_score[$v->uid]['score'];
             $v->win_game = $users_score[$v->uid]['win'];
             $v->save();
         }
         //这里就直接按照积分和胜局排顺序了,不考虑直胜问题。
         $tj = Tournament_join::model()->findAll("tid={$id} order by t_score desc,win_game desc");
         foreach ($tj as $k => $v) {
             $v->rating = $k + 1;
             $v->save();
         }
         $tournament->status = 'ended';
         $tournament->save();
     }
     Yii::app()->cache->delete(self::CACHE_PREFIX . $tournament->id);
 }
Ejemplo n.º 16
0
$form = $this->beginWidget('CActiveForm', array('id' => 'order-form', 'enableAjaxValidation' => false));
?>
<table width="900" border="0" class="table_b">
  <tr>
    <th>订单编号:</th>
    <td><?php 
echo $form->textField($model, 'order_number');
?>
</td>
  </tr>

  <tr>
    <th>充值游戏:</th>
    <td><?php 
echo $form->dropDownList($model, 'gid', CHtml::listData(Games::model()->findAll(), 'id', 'gname'), array('class' => 'select'));
?>
</td>
  </tr>
    <tr>
    <th>充值大区:</th>
    <td><?php 
echo $form->textField($model, 'gid_server_id', array('size' => 6, 'maxlength' => 6));
?>
</td>
  </tr>
  <tr>
    <th>充值金额:</th>
    <td><?php 
echo $form->textField($model, 'price', array('size' => 11, 'maxlength' => 11));
?>
Ejemplo n.º 17
0
<!--
#side_right input{
	width:40px;
}
#side_right select{
	width:60px;
}
-->
</style>
<div id="side_right">
<h2><strong>文章管理</strong></h2>
<h3><span class="title">管理文章</span><span class="manage"><a href="javascript:void(0)"><img src="<?php 
echo Yii::app()->request->baseUrl;
?>
/system/images/delete.jpg" /></a></span></h3>

<?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'user-grid', 'dataProvider' => $model->search(), 'selectableRows' => 2, 'filter' => $model, 'template' => '{items}{pager}', 'cssFile' => false, 'pager' => array('class' => 'CLinkPager', 'cssFile' => false, 'header' => ''), 'columns' => array(array('class' => 'CCheckBoxColumn', 'name' => 'id'), 'id', array('name' => 'tilte', 'type' => 'raw', 'value' => 'CHtml::link($data->tilte,array(update,id=>$data->id))'), array('name' => 'gid', 'filter' => CHtml::listData(Games::model()->findAll(), 'id', 'gname'), 'value' => '$data->gameName->gname'), array('name' => 'tid', 'filter' => CHtml::listData(ArticleType::model()->findAll(), 'id', 'typename'), 'value' => '$data->articleType->typename'), array('name' => 'create_time', 'value' => 'date("Y-m-d",$data->create_time)'), array('name' => 'up_time', 'value' => 'date("Y-m-d",$data->up_time)'), array('name' => 'display', 'filter' => Yii::app()->params['display'], 'value' => 'Article::model()->getArticleDisplay($data->display)'), array('header' => '编辑', 'class' => 'CButtonColumn', 'htmlOptions' => array()))));
?>

<?php 
$this->widget('CLinkPager', array('pages' => $pages, 'header' => '', 'firstPageLabel' => '首页', 'lastPageLabel' => '末页', 'prevPageLabel' => '上一页', 'nextPageLabel' => '下一页', 'cssFile' => false, 'footer' => ''));
?>
</div>
<!---------------side_right end---------------->
<?php 
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$.fn.yiiGridView.update('user-grid', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
?>
</div><!-- search-form -->

Ejemplo n.º 18
0
 /**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer $id the ID of the model to be loaded
  * @return Games the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = Games::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Ejemplo n.º 19
0
?>
</strong>元</td><th>  成交总额</th><td><strong><?php 
if ($model['ordertotalprice']) {
    echo $model['ordertotalprice'];
} else {
    echo 0;
}
?>
</strong>元</td>
</tr>
<tr class="ever"><th>
今日
<select id="gamespay" onchange="gamepay()">

<?php 
$game = Games::model()->getGamesAllShow();
print_r($game);
foreach ($game as $key => $value) {
    if ($_GET['game'] == $key) {
        echo '<option value="' . $key . '" selected="selected">' . $value . '</option>';
    } else {
        echo '<option value="' . $key . '">' . $value . '</option>';
    }
}
?>
</select>
成交订单</th><td><strong><?php 
if ($model['dayordergame']) {
    echo $model['dayordergame'];
} else {
    echo 0;
Ejemplo n.º 20
0
 public function getGamesServerTrue($gid, $gidvalue)
 {
     $gamesServerId = Games::model()->getGamesServerId($gid);
     $returnValue = in_array($gidvalue, $gamesServerId);
     return $returnValue;
 }
Ejemplo n.º 21
0
 public function actionGameupd()
 {
     $id = intval(Yii::app()->request->getParam('id'));
     $game = Games::model()->findByPk($id);
     $this->json_return(true, $game ? $game->movetime : '');
 }
Ejemplo n.º 22
0
</div>

<!--end-->
<div id="container">
<?php 
include "_login.php";
?>

<div id="list">
<div id="list_left">
      <h1>
      	<?php 
echo CHtml::link('918首页>>', array('site/index'));
?>
      	<?php 
$getGamesName = Games::model()->getGamesName($_GET['id']);
echo CHtml::link($getGamesName[0] . '>>', array('article/index', 'id' => $_GET['id']));
?>
      	<div style="color:#FC8D03;"><?php 
echo ArticleType::model()->getArticleTypeName($_GET['tid']);
?>
</div>
      </h1>
      <style>
      	#list_left h1{
      		padding-left:20px;
			margin:0;
			line-height:47px;
		}
		#list_left h1 a{
			padding:0 ;
Ejemplo n.º 23
0
首页</a>>><a href="../../list/<?php 
echo $model->gid;
?>
"><?php 
echo ArticleType::model()->getArticleTypeName($model->tid);
?>
-></a><b class="cl"><?php 
echo $model->tilte;
?>
</b></h1>-->
      <h1>
      	<?php 
echo CHtml::link('918首页>>', array('site/index'));
?>
      	<?php 
$getGamesName = Games::model()->getGamesName($model->gid);
echo CHtml::link($getGamesName[0] . '>>', array('article/index', 'id' => $model->gid));
?>
      	<?php 
echo CHtml::link(ArticleType::model()->getArticleTypeName($model->tid) . '>>', array('article/list', 'id' => $model->gid, 'tid' => $model->tid));
?>
      	<div style="color:#FC8D03;"><?php 
echo $model->tilte;
?>
</div>
      </h1>
      <style>
      	#meirong h1{
      		padding:0;
			margin:0;
			line-height:47px;
Ejemplo n.º 24
0
<tr class="ood">
    <td><?php 
echo CHtml::link(CHtml::encode($data->id), array('view', 'id' => $data->id));
?>
</td>
    <td><?php 
echo CHtml::link(CHtml::encode($data->order_number), array('view', 'id' => $data->id));
?>
</td>
    <td><?php 
echo CHtml::encode($data->memberName->mname);
?>
</td>
    <td><?php 
echo CHtml::encode($data->gameName->gname);
?>
</td>
    <td><?php 
echo CHtml::encode(Games::model()->getGamesServerValue($data->gid, $data->gid_server_id));
?>
区</td>
    <td><?php 
echo CHtml::encode($data->price);
?>
</td>
    <td><?php 
echo CHtml::encode($data->orderType->name);
?>
</td>