Example #1
0
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;
		}
		#meirong h1 a{
			padding:0 ;
			margin:0;
Example #2
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 -->

Example #3
0
    <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'));
?>
</td>
  </tr>
    <tr>
    <th>描述:</th>
    <td><?php 
echo $form->textArea($model, 'description', array('class' => 'textarea'));
?>
Example #4
0
    <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', CHtml::listData(ArticleType::model()->findAll(), 'id', 'typename'), array('class' => 'select'));
?>
</td>
  </tr>
  <tr>
    <th>关键字:</th>
    <td><?php 
echo $form->textField($model, 'keywords', array('size' => 50, 'maxlength' => 50, 'class' => 'text'));
?>
</td>
  </tr>
    <tr>
    <th>描述:</th>
    <td><?php 
echo $form->textArea($model, 'description', array('class' => 'textarea'));
?>
Example #5
0
 public function getArticleTypeName($id)
 {
     $ArticleTypeName = ArticleType::model()->findByAttributes(array('id' => $id));
     return $ArticleTypeName->typename;
 }
 /**
  * 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 the ID of the model to be loaded
  */
 public function loadModel($id)
 {
     $model = ArticleType::model()->findByPk((int) $id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Example #7
0
<?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 ;
			margin:0;
			float:left;
		}
      </style>
Example #8
0
<tr class="ood">
    <td><?php 
echo CHtml::encode($data->id);
?>
</td>
    <td><?php 
echo CHtml::link(CHtml::encode($data->typename), array('view', 'id' => $data->id));
?>
</td>
    <td><?php 
echo ArticleType::model()->getParentArticleType(CHtml::encode($data->tid));
?>
</td>
    <td><?php 
echo CHtml::encode($data->create_author->username);
?>
</td>
    <td><?php 
echo CHtml::encode($data->up_author->username);
?>
</td>
    <td><?php 
echo CHtml::encode(date('Y-m-d H:i:s', $data->create_time));
?>
</td>
    <td><?php 
echo CHtml::encode(date('Y-m-d H:i:s', $data->up_time));
?>
</td>
  </tr>