コード例 #1
0
 public function actionIndex()
 {
     $this->setPageTitle(Yii::t("web", "Guide"));
     $url_key = Yii::app()->request->getParam("url_key", null);
     $page = HtmlModel::model()->findByAttributes(array('url_key' => $url_key));
     $this->render("index", array("content" => $page));
 }
コード例 #2
0
 public function actionGuide()
 {
     $id = yii::app()->request->getParam('id', 0);
     $guide = HtmlModel::model()->findByPk($id);
     if (!$guide) {
         throw new CHttpException(404, 'Not found');
         exit;
     }
     if ($guide->channel == 'api') {
         $this->layout = false;
     }
     $wapGuides = HtmlModel::model()->findAllByAttributes(array('type' => 'guide_wap'));
     $this->render('guide', array('guide' => $guide, 'wapGuides' => $wapGuides));
 }
コード例 #3
0
 public static function model($className = __CLASS__)
 {
     return parent::model($className);
 }
コード例 #4
0
 public function actionIndex()
 {
     $about = HtmlModel::model()->findByPk(1);
     $this->render('index', compact('about'));
 }
コード例 #5
0
ファイル: _text_link.php プロジェクト: giangnh264/mobileplus
<?php

$phone = yii::app()->user->getState('phone');
$list_phone = Yii::app()->params['ctkm']['phone_check'];
if ($this->showPopupCTKM && in_array(Yii::app()->user->phone, $list_phone)) {
    $_SESSION['already_popup_ctkm'] = true;
    $cookie = new CHttpCookie('showPopupCTKm', 1);
    $cookie->expire = time() + 60 * 60 * 24 * $day;
    Yii::app()->request->cookies['showPopupCTKm'] = $cookie;
    $popup_content = HtmlModel::model()->findbyPk(27)->content;
    $link = Yii::app()->createUrl('/promotion/about');
    $shareLink = Yii::app()->request->getHostInfo() . Yii::app()->request->baseUrl . $link;
    ?>
    <script type="text/javascript">
        $(function(){
            html =
            '<?php 
    echo $popup_content;
    ?>
'
            +'<div class="pk-btn" style="text-align: center">'
            +'<a style="margin: 5px;display: inline;" class="button bt-actived" href="<?php 
    echo $link;
    ?>
">Tham gia</a>'
            +'<a style="margin: 5px;display: inline;" class="button bt-actived" href="http://www.facebook.com/sharer.php?u=<?php 
    echo urlencode($shareLink);
    ?>
">Chia sẻ</a>'
            +'</div>';
            Popup.alert(html, 'Khuyến mại', 'popup_ctkm');
コード例 #6
0
 public function actionIndex()
 {
     $content = HtmlModel::model()->findbyPk(2)->content;
     $services = ServicesModel::model()->getByHome();
     $this->render("index", compact('content', 'services'));
 }
コード例 #7
0
 public function actionRules()
 {
     $rules = HtmlModel::model()->findAllByAttributes(array('type' => 'event'));
     $this->render('rules', array('rules' => $rules));
 }