/** * 新建更新历史数据 */ public function actionDeletedesktop($id) { if (Yii::app()->user->name == "admin") { $modelDesktopSetting = DesktopSetting::model()->findByPk($id); $modelDesktopSetting->delete(); } }
?> <?php } else { ?> <div class="alert alert-info"><?php echo Sys::model()->find()->site_desc; ?> </div> <?php $this->widget('bootstrap.widgets.TbMenu', array('type' => 'list', 'htmlOptions' => array('style' => 'padding-left:0;padding-right:0;margin-bottom:10px;'), 'encodeLabel' => false, 'items' => array('--', array('label' => '所有问题', 'url' => array('allquestion'), 'icon' => 'icon-question', 'active' => isset($_GET['type']) && $_GET['type'] == "question" ? true : false), array('label' => '话题广场', 'url' => array('alltopic'), 'icon' => 'icon-grid-5', 'active' => isset($_GET['type']) && $_GET['type'] == "topic" ? true : false)))); ?> <?php } ?> <?php foreach (DesktopSetting::getArray(r) as $key => $value) { ?> <div class="panel panel-default"> <div class="panel-heading">最新<?php echo $value->app_name; ?> <a class="pull-right" title="全部<?php echo $value->app_name; ?> " href="<?php echo $value->app_id == "user" ? $this->createUrl("query", array("q" => "", "type" => "user")) : $this->createUrl("all" . $value->app_id); ?> ">全部<?php echo $value->app_name; ?> </a></div>