protected function renderContent() { $criteria = new CDbCriteria(); $criteria->addCondition('status=1'); $criteria->order = 'create_time DESC'; $criteria->limit = 20; $hopam = Hopam::model()->findAll($criteria); /*$dataProvider = new CActiveDataProvider('Song', array( 'pagination' => array( 'pageSize' => Yii::app()->params['postsPerPage'], ), 'criteria' => $criteria, )); $this->render('newest_song',array('songs'=>$dataProvider));*/ echo CHtml::openTag("div", array('class' => 'title')); echo "Hợp Âm Mới"; echo CHtml::closeTag("div"); if ($hopam) { echo CHtml::openTag("ul"); foreach ($hopam as $hp) { echo CHtml::openTag('li'); echo CHtml::link($hp->title, array('/hopam/view', 'id' => $hp->id, "title" => Lnt::safeTitle($hp->title))) . " <span style='color:#a7a7a7'>({$hp->view})</span>"; echo CHtml::closeTag('li'); } echo CHtml::closeTag("ul"); } }
public function run() { //$this->user = XfUser::model()->find("username='******'username']."'"); echo CHtml::openTag("div", array('id' => "box_profile")); echo CHtml::image(Lnt::get_picture_href($this->user->user_id), '', array('width' => '70px', 'height' => '70px')); echo CHtml::openTag("p"); echo $this->user->username; echo CHtml::closeTag("p"); echo CHtml::openTag("div", array('class' => 'o_like')); echo CHtml::openTag("p", array('class' => 'like')); echo "5.134"; echo CHtml::closeTag("p"); echo CHtml::closeTag("div"); echo CHtml::openTag("div", array('class' => 'reg_date')); echo "<span style='color:#2DB5DC'>Lưu bút</span><br/>"; echo "Ym:<br/>"; echo "Skype:<br/>"; echo "Email: {$this->user->email} <br/>"; echo "Website:<br/>"; echo "Facebook:<br/>"; echo "Điện thoại:<br/>"; echo "<div style='font-size:11px;color:#797979;'>Ngày đăng ký: " . date("d/m/Y - H:i", $this->user->register_date) . "</div>"; echo "<div style='font-size:11px;color:#797979;'>Đăng nhập cuối: " . date("d/m/Y - H:i", $this->user->last_activity) . "</div>"; echo CHtml::closeTag("div"); echo CHtml::closeTag("div"); }
public function run() { $criteria = new CDbCriteria(); $criteria->addCondition('status=1'); if ($this->catId) { $criteria->addCondition('term_id=' . $this->catId); } if ($this->currentId) { $criteria->addCondition('id<>' . $this->currentId); } $criteria->order = 'create_time DESC'; $criteria->limit = 20; $news = News::model()->findAll($criteria); echo CHtml::openTag("div", array('class' => 'title', 'style' => 'color: #000000;font-size: 18px;')); echo "Tin khác"; echo CHtml::closeTag("div"); if ($news) { echo CHtml::openTag("ul", array('style' => 'border: 1px solid #CCCCCC; border-radius: 4px 4px 4px 4px; margin: 8px 0px 0px 0px; padding: 10px 5px;list-style:none;')); foreach ($news as $n) { echo CHtml::openTag('li'); echo CHtml::link($n->title, array('/news/detail', 'id' => $n->id, 'tid' => $n->term_id, 'title' => Lnt::safeTitle($n->title))) . " <span style='color:#a7a7a7'>({$n->view})</span>"; echo CHtml::closeTag('li'); } echo CHtml::closeTag("ul"); } }
function showTitle($data) { if ($data->end_time > time()) { echo CHtml::link($data->title, Yii::app()->createUrl("/training/class", array("id" => $data->id, "title" => Lnt::safeTitle($data->title)))) . "<br/>"; echo "Đang tuyển sinh"; } else { echo $data->title; } }
function getImgThumb($item) { $path = Yii::getPathOfAlias('webroot') . $item['image']; if (file_exists($path)) { $img = new Image($path); return $img->createThumb(105, 70); } else { return Lnt::getYoutubeImage($item['link_youtube']); } }
public function actionView() { $item = Product::model()->findByPk($_GET['id']); $db = Yii::app()->db; $sql = "SELECT * FROM {{product}} WHERE status <>0 ORDER BY count_buy DESC LIMIT 0,8"; $cmd = $db->createCommand($sql); $dataReader = $cmd->query(); foreach ($dataReader as $ritem) { $ritem['url'] = $this->createUrl('/product/view', array('id' => $ritem['id'], 'title' => Lnt::safeTitle($ritem['title']))); $appItems[] = $ritem; } $this->render('view', array('item' => $item, 'relatedItems' => $appItems)); }
function renderList($items) { if ($items) { echo CHtml::openTag("ul"); foreach ($items as $item) { echo CHtml::openTag("li"); if ($item->end_time > time()) { echo CHtml::link($item->title, Yii::app()->createUrl('/training/class', array('id' => $item->id, 'title' => Lnt::safeTitle($item->title)))); } else { echo $item->title; } echo CHtml::closeTag("li"); } echo CHtml::closeTag("ul"); } }
public function renderContent() { $criteria1 = new CDbCriteria(array('condition' => 'status=1')); $all = (int) Teacher::model()->count($criteria1); if ($all > 5) { $offset = rand(0, $all - 5); } else { $offset = rand(0, $all); } $criteria = new CDbCriteria(array('condition' => 'status=1', 'order' => 'RAND()', 'limit' => '5,' . $offset)); //echo $all; $teachers = Teacher::model()->findAll($criteria); if ($teachers) { echo CHtml::openTag("ul"); foreach ($teachers as $teacher) { $img = ''; if ($teacher->picture) { Yii::import('application.extensions.image.Image'); $thumbImage = new Image(Yii::getPathOfAlias('webroot') . $teacher->picture); $img_url = $thumbImage->createThumb(70, 60); /*$thumbImage->resize(70, 60, Image::WIDTH); $arr = explode("/",$teacher->picture); $file_name = $arr[count($arr)-1]; $thumb = Yii::getPathOfAlias('webroot') . '/resources/images/85x72/' . $file_name; $thumbImage->save($thumb);*/ $img = '<img src="' . $img_url . '" />'; } echo CHtml::openTag("li", array('class' => 'clearfix')); echo CHtml::openTag("div", array('class' => 'avatar')); echo CHtml::link($img, Yii::app()->createUrl('/teacher/view', array('id' => $teacher->id, 'title' => Lnt::safeTitle($teacher->name)))); echo "<div>Giảng viên</div>"; echo CHtml::closeTag("div"); echo CHtml::openTag("div", array('class' => 'title')); echo CHtml::link($teacher->name, Yii::app()->createUrl('/teacher/view', array('id' => $teacher->id, 'title' => Lnt::safeTitle($teacher->name)))); echo CHtml::closeTag("div"); echo CHtml::openTag("div", array('style' => 'margin-top:10px;float:left;width:80px;height:14px;background:#ce1f46;color:#fff;padding:8px 0px;text-align:center')); echo "5.1232"; echo CHtml::closeTag("div"); echo CHtml::openTag("div", array('style' => 'float:right;text-align:left;width:127px;margin-top:10px;font-weight:bold;color:#a8a8a8;')); echo $teacher->videoCount . " bài giảng | " . $teacher->likeTeachersCount . " " . CHtml::ajaxLink(CHtml::image(Yii::app()->baseUrl . '/images/tim_03.jpg', 'Like', array('title' => 'Yêu thích')), Yii::app()->createUrl('/teacher/like', array('id' => $teacher->id)), array('success' => 'js:function(res){alert(res.msg);}'), array('class' => 'teacher_like')); echo CHtml::closeTag("div"); echo CHtml::closeTag("li"); } echo CHtml::closeTag("ul"); } }
public function registerScripts() { // Get the url to the module assets //$assetsUrl1 = Lnt::getAssets('webroot.js.bxSlider', true); $assetsUrl2 = Lnt::getAssets('webroot.js.colorbox', true); $assetsUrl3 = Lnt::getAssets('webroot.js.jcarousel', true); // Register the necessary scripts /** * @var $cs CClientScript; */ $cs = Yii::app()->getClientScript(); $cs->registerCoreScript('jquery'); /*$cs->registerScriptFile($assetsUrl1 . '/jquery.bxSlider.min.js'); $cs->registerCssFile($assetsUrl1 . '/bxslider.css');*/ $cs->registerScriptFile($assetsUrl2 . '/jquery.colorbox-min.js'); $cs->registerCssFile($assetsUrl2 . '/colorbox.css'); $cs->registerScriptFile($assetsUrl3 . '/jquery.jcarousel.min.js'); $cs->registerCssFile($assetsUrl3 . '/skins/tango/skin.css'); $cs->registerScript('slide_', $this->getScriptCode()); }
protected function renderContent() { /*$items = array( array('label' => 'Tất cả', 'url' => array('video/index')), array('label' => 'Mới nhất', 'url' => array('video/list', 'filter' => 'latest')), array('label' => 'Xem nhiều nhất', 'url' => array('video/list', 'filter' => 'top_view')), array('label' => 'Bình chọn nhiều nhất', 'url' => array('video/list', 'filter' => 'top_like')), );*/ $terms = Term::model()->findAll('vid = 2 AND parent = 0'); foreach ($terms as $term) { $item = array('label' => $term->name, 'url' => array('video/catlist', 'catid' => $term->id, 'catname' => Lnt::safeTitle($term->name))); $items[] = $item; $subTerms = Term::model()->findAll('vid = 2 AND parent = ' . $term->id); if ($subTerms) { foreach ($subTerms as $sTerm) { $items[] = array('itemOptions' => array('class' => 'sub'), 'label' => $sTerm->name, 'url' => array('video/catlist', 'catid' => $sTerm->id, 'catname' => Lnt::safeTitle($sTerm->name))); } } } echo "<div style='margin: 10px 0px;color: #000000;\n font-weight: bold;\n text-align: left;\n text-transform: uppercase;'>Danh mục</div>"; $this->widget('zii.widgets.CMenu', array('items' => $items, 'activateItems' => true)); }
public function run() { if ($this->beginCache("slideshow", array('duration' => 0))) { $criteria = new CDbCriteria(); $criteria->addCondition('status=1'); $criteria->order = 'pos DESC'; $criteria->limit = 20; $items = SlideManager::model()->findAll($criteria); $slide = ''; if ($items) { $i = 0; foreach ($items as $item) { //<img src="<?php echo Yii::app()->baseUrl; /images/img_slice_21.jpg" title="Xin chao"/> $imgclass = $i ? "notshow" : ""; $imgUrl = Lnt::createImage($item->image, 528, 272); $slide .= CHtml::image($imgUrl, $item->title, array('title' => CHtml::link($item->title, $item->url), 'width' => 528, 'height' => 272, 'class' => $imgclass)); $i++; } } echo $slide; $this->endCache(); } }
/** * This is the default 'index' action that is invoked * when an action is not explicitly requested by users. */ public function actionIndex() { $appItems = array(); $db = Yii::app()->db; $sql = "SELECT v.id,v.title,v.image,v.link_youtube as youtube,v.view,u.user_id,u.username FROM {{video}} v INNER JOIN xf_user u ON v.user_id = u.user_id WHERE v.status = 1 ORDER BY v.id DESC LIMIT 0,4"; $cmd = $db->createCommand($sql); $dataReader = $cmd->query(); foreach ($dataReader as $item) { $item['url'] = $this->createUrl('/video/view', array('id' => $item['id'], 'title' => Lnt::safeTitle($item['title']))); $appItems[] = $item; } /*$sql2 = "SELECT s.title,s.image,s.id,s.view,s.embed_code as youtube,u.user_id,u.username FROM {{song}} s INNER JOIN xf_user u ON s.user_id = u.user_id WHERE s.status = 1 ORDER BY s.create_time DESC LIMIT 0,2"; $cmd2 = $db->createCommand($sql2); $dataReader2 = $cmd2->query(); foreach($dataReader2 as $item){ $item['url'] = $this->createUrl('/song/view',array('id'=>$item['id'],'title'=>Lnt::safeTitle($item['title']))); $appItems[] = $item; }*/ //var_dump($appItems);die; $sql2 = "SELECT s.title,s.image,s.id,s.view,s.embed_code as youtube,u.user_id,u.username FROM {{hopam}} s INNER JOIN xf_user u ON s.user_id = u.user_id WHERE s.status = 1 ORDER BY s.create_time DESC LIMIT 0,2"; $cmd2 = $db->createCommand($sql2); $dataReader2 = $cmd2->query(); foreach ($dataReader2 as $item) { $item['url'] = $this->createUrl('/hopam/view', array('id' => $item['id'], 'title' => Lnt::safeTitle($item['title']))); $appItems[] = $item; } $sql = "SELECT v.id,v.title,v.image,v.term_id,v.view,u.user_id,u.username FROM {{news}} v INNER JOIN xf_user u ON v.user_id = u.user_id WHERE v.status = 1 ORDER BY v.id DESC LIMIT 0,6"; $cmd = $db->createCommand($sql); $dataReader = $cmd->query(); $newsItems = array(); foreach ($dataReader as $item) { $item['url'] = $this->createUrl('/news/detail', array('id' => $item['id'], 'title' => Lnt::safeTitle($item['title']), 'tid' => $item['term_id'])); $newsItems[] = $item; } $this->render('index', array('appItems' => $appItems, 'newsItems' => $newsItems)); }
} ?> </div> <?php } ?> <?php if (isset($catItems) && $catItems) { ?> <h1 style="margin-top: 20px">Phân loại</h1> <ul class="catbox"> <?php foreach ($catItems as $thItem) { ?> <li> <?php echo CHtml::link($thItem['title'], $this->createUrl('/product/list', array('catid' => $thItem['value'], 'title' => Lnt::safeTitle($thItem['title'])))); ?> </li> <?php } ?> </ul> <?php } ?> </div> <script type="text/javascript"> $('.theloai').find('p').last().css('border', 'none'); </script>
<?php echo CHtml::image(Lnt::createImage($teacher->picture, 400, 300), $teacher->name); ?> </div> <?php } echo CHtml::openTag("div", array('style' => 'text-align:justify')); echo $teacher->body; echo CHtml::closeTag("div"); if ($teacher->teacherPhotos) { echo CHtml::openTag("div", array('id' => 'teacher_photo', 'style' => 'width:670px;clear:both', 'class' => 'jcarousel-skin-tango')); echo CHtml::openTag("ul", array('id' => 'photos')); $dir = Yii::getPathOfAlias('webroot') . '/resources/images/245x158'; if (!is_dir($dir)) { mkdir($dir); chmod($dir, 0755); } foreach ($teacher->teacherPhotos as $photo) { echo CHtml::openTag('li'); echo CHtml::image(Lnt::createImage($photo->photo, 245, 158), $teacher->name, array('class' => 'colorbox1', 'href' => Yii::app()->baseUrl . $photo->photo, 'height' => 158)); echo CHtml::closeTag("li"); } echo CHtml::closeTag("ul"); echo CHtml::closeTag("div"); } if ($teacher->videos) { $videos = new Video('search'); $videos->teacher_id = $teacher->id; $videos->term_id = 10; $this->widget('zii.widgets.CListView', array('dataProvider' => $videos->search(), 'itemView' => '_view', 'id' => 'newest_video', 'enablePagination' => false, 'summaryText' => 'Bài Giảng')); }
$thumbImage->save($thumb); } ?> <div class="item"> <?php if ($data->image) { ?> <div class="img"> <a href="<?php echo $url; ?> "> <img src="<?php echo Yii::app()->baseUrl . '/resources/images/110x70/' . $file_name; ?> "> </a> </div> <?php } ?> <div class="title"><?php echo CHtml::link(Lnt::limitWord(CHtml::encode($data->title), 5), $url); ?> </div> <div class="cview">Lượt xem: <?php echo $data->view; ?> </div> </div>
<?php Yii::import('application.extensions.image.Image'); $i = 1; foreach ($relatedItems as $item) { $class = 'item'; if ($i == 1 | $i % 6 == 1) { $class .= ' first'; } elseif ($i % 6 == 0) { $class .= ' last'; } $i++; //var_dump($item);die; $thumb = new Image(Yii::getPathOfAlias('webroot') . $item['image']); $img_url = $thumb->createThumb(140, 195); echo CHtml::openTag("li", array('class' => $class)); echo CHtml::link(CHtml::image($img_url), $this->createUrl('view', array('id' => $item['id'], 'title' => Lnt::safeTitle($item['title'])))); echo CHtml::openTag("div", array('class' => 'title')); echo CHtml::encode($item['title']); echo CHtml::closeTag("div"); echo CHtml::openTag("div", array('class' => 'price')); echo CHtml::encode(number_format($item['price'], 0, ',', '.') . 'đ'); echo CHtml::closeTag("div"); echo CHtml::openTag("div", array('class' => 'body')); echo Lnt::limitWord($item['body'], 10, ',', '.'); echo CHtml::closeTag("div"); echo CHtml::closeTag("li"); } ?> </ul> </div>
$imageUrl = Lnt::getYoutubeImage($data->link_youtube); } ?> <div class="item"> <?php //if ($data->image): ?> <div class="img"> <a href="<?php echo $url; ?> "> <img src="<?php echo $imageUrl; ?> " width="110" height="70"> </a> </div> <?php //endif; ?> <div class="title"><?php echo CHtml::link(Lnt::limitWord(CHtml::encode($data->title), 5), $url, array('title' => $data->title)); ?> </div> <div class="cview">Lượt xem: <?php echo $data->view; ?> </div> </div>
echo number_format($hopam->view, 0, '.', ','); ?> </div> <div><b><?php echo $hopam->likeCount; ?> </b> yêu thích</div> </div> </div> <div id="share_box" class="view clearfix" style="display: none;"> <ul> <li> <span>Link nhạc:</span> <input value="<?php echo Lnt::WEB . Yii::app()->baseUrl . $this->createUrl('view', array('id' => $hopam->id, 'title' => Lnt::safeTitle($hopam->title))); ?> " class="text"> </li> <li> <span>Nhúng:</span> <textarea class="text" cols="63"><?php echo CHtml::encode($hopam->embed_code); ?> </textarea> </li> </ul> </div> <div class="user_info"> <div>Người
<?php foreach ($comments as $comment) { ?> <div class="comment_item clearfix" id="c<?php echo $comment->id; ?> "> <div id="comment_avatar"> <!-- <img src="--><?php //echo Yii::app()->baseUrl . '/images/avatar.jpg' ?> <!--"/>--> <img width="60" height="60" src="<?php echo Lnt::get_picture_href($comment->user->user_id); ?> "/> </div> <div id="comment_item_content"> <div class="author"> <span style="color: #2db5dc;"><?php echo CHtml::link($comment->user->username, $this->createUrl('user/view', array('username' => $comment->user->username))); ?> </span> <span style="color: #a7a7a7;"><?php echo date('d/m/Y h:i', $comment->create_time); ?> </span> </div> <div class="content" style="color: #000;"> <?php
<?php /** * @var $data Product * @var $image Image */ $thumb = new Image(Yii::getPathOfAlias('webroot') . $data['image']); $img_url = $thumb->createThumb(140, 195); echo CHtml::openTag("li", array('class' => 'item')); echo CHtml::link(CHtml::image($img_url), $this->createUrl('view', array('id' => $data['id'], 'title' => Lnt::safeTitle($data['title'])))); echo CHtml::openTag("div", array('class' => 'title')); echo CHtml::encode($data['title']); echo CHtml::closeTag("div"); echo CHtml::openTag("div", array('class' => 'price')); echo CHtml::encode(number_format($data['price'], 0, ',', '.') . 'đ'); echo CHtml::closeTag("div"); echo CHtml::openTag("div", array('class' => 'body')); echo Lnt::limitWord($data['body'], 10, ',', '.'); echo CHtml::closeTag("div"); echo CHtml::closeTag("li");
/*$thumb = '/upload/images/thumb/product100/'.substr_replace($product->image,'',0,14); if(!is_file(Yii::getPathOfAlias('webroot').$thumb)){ Yii::import('application.extensions.image.Image'); $image = new Image(Yii::getPathOfAlias('webroot').'/'.$product->image); $image->resize(100, 100); if(!is_dir(Yii::getPathOfAlias('webroot').'/upload/images/thumb/product100/')){ mkdir(Yii::getPathOfAlias('webroot').'/upload/images/thumb/product100/'); chmod(Yii::getPathOfAlias('webroot').'/upload/images/thumb/product100/',0777); } $image->save(Yii::getPathOfAlias('webroot').$thumb); }*/ } $i++; $img = new Image(Yii::getPathOfAlias("webroot") . $product->image); $img_url = $img->createThumb(70, 70); echo "<tr><td>{$i}</td><td><div style='float:left;border: 1px solid #CCCCCC;padding:5px;margin-right:5px;'><a href='" . $this->createUrl('product/view', array('id' => $product->id, 'title' => Lnt::safeTitle($product->title))) . "' target='_blank'><img src='" . $img_url . "' /></a></div></td><td><div>{$product->title}</div></td><td><div style='text-align:center;color:#990000;font-weight: bold;'>" . number_format($product->price * $item['count'], 0, ',', '.') . " đ</div></td><td>" . CHtml::listBox('price', $item['count'], array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10), array('size' => 1, 'onchange' => 'updateCart(' . $product->id . ',this);')) . "</td><td>" . CHtml::ajaxLink('Xóa', $this->createUrl('remove', array('id' => $product->id)), array('success' => 'js:function(data){if(data.success){window.location.reload();}}')) . "</td></tr>"; } ?> <tr><td colspan="3" ><?php echo CHtml::link('', $this->createUrl('index'), array('id' => 'btnbackBuy')); ?> <span style="float:right;font-weight: bold;">Tổng tiền:</span></td><td style="text-align:center;color:#990000;font-weight: bold;"><?php echo number_format($total_price, 0, ',', '.'); ?> đ</td><td colspan="2"><?php echo CHtml::link("", $this->createUrl('pay'), array('id' => 'btnPay')); ?> </td></tr> <?php } else {
$u = 1; } else { $u++; } $divClass = 'item'; if ($u == 3) { $divClass .= ' citem'; } else { } if ($i > 3) { $divClass .= ' mtop'; } echo CHtml::openTag("div", array("class" => $divClass)); echo CHtml::image(Lnt::createImage($item['image'], 105, 70)); echo CHtml::openTag("div", array('class' => 'title')); echo CHtml::link(Lnt::limitWord($item['title'], 8), $item['url'], array('title' => $item['title'])); echo CHtml::closeTag("div"); echo CHtml::openTag("div", array('class' => 'author')); echo CHtml::link($item['username'], $this->createUrl('/user/view', array('username' => $item['username']))); echo CHtml::closeTag("div"); echo CHtml::closeTag("div"); $i++; } } /*$this->widget('zii.widgets.CListView', array( 'dataProvider' => $dataProvider, 'itemView' => '_view', 'id' => 'newest_video', 'enablePagination'=>false, 'summaryText'=>'Dịch vụ giải trí', //'template' => "{items}\n{pager}",
} function hideEmail($email) { $tk = substr($email, 0, strpos($email, '@')); $ext = substr($email, strpos($email, '@'), strlen($email)); $len = strlen($tk) / 2; for ($i = $len; $i < strlen($tk); $i++) { $tk[$i] = "*"; } return $tk . $ext; } function hideTel($tel) { $av = strlen($tel) / 2; for ($i = $av; $i < strlen($tel); $i++) { $tel[$i] = "*"; } return $tel; } echo "<h1 class='title'>Mã số lớp: {$classGuitar->sku}</h1>"; echo CHtml::openTag("div", array('style' => 'margin-top:12px;')); echo "<b>" . $classGuitar->title . "</b> phụ trách bởi Giảng viên <b>" . $classGuitar->teacher . "</b>. Thời gian khóa học: <u style='color:#5AC9E7'>" . date('d/m/Y', $classGuitar->start_time) . "</u> đến <u style='color:#5AC9E7'>" . date('d/m/Y', $classGuitar->end_time) . '</u>' . ($classGuitar->end_time > time() ? " ==> " . CHtml::link("Đăng ký ngay", $this->createUrl('register', array('cid' => $classGuitar->id))) : ""); echo CHtml::closeTag("div"); $this->widget('zii.widgets.grid.CGridView', array('id' => 'center-grid', 'dataProvider' => $students, 'emptyText' => 'Chưa có học viên nào', 'summaryText' => '', 'columns' => array(array('name' => "STT", 'value' => '$row+1'), array('name' => 'name', 'value' => '$data->name', 'type' => 'html', 'htmlOptions' => array('class' => 'ctitle')), array('name' => 'birthday', 'value' => '$data->birthday', 'type' => 'html', 'htmlOptions' => array('class' => 'ctitle')), array('name' => 'create_time', 'value' => '$data->create_time', 'type' => 'html', 'htmlOptions' => array('class' => 'ctitle')), array('name' => 'pay_time', 'value' => '$data->pay_time', 'type' => 'html', 'htmlOptions' => array('class' => 'ctitle')), array('name' => 'tel', 'value' => 'hideTel($data->tel)', 'type' => 'html', 'htmlOptions' => array('class' => 'ctitle')), array('name' => 'email', 'value' => 'hideEmail($data->email)', 'type' => 'html', 'htmlOptions' => array('class' => 'ctitle'))))); if (isset($relatedClass) && $relatedClass) { echo "<h1 class='title'>Danh sách lớp học lưu</h1>"; $this->widget('zii.widgets.grid.CGridView', array('id' => 'center-grid', 'dataProvider' => $relatedClass, 'emptyText' => 'Không có lớp học nào', 'summaryText' => '', 'columns' => array(array('name' => "STT", 'value' => '$data->id'), array('name' => 'sku', 'value' => '$data->sku', 'type' => 'html', 'htmlOptions' => array('class' => 'ctitle')), array('name' => 'title', 'value' => 'showTitle($data)', 'type' => 'html'), array('name' => 'Lịch học', 'value' => 'calendar($data->classCalendars)'), 'teacher', array('name' => CHtml::encode('Đã đăng ký'), 'value' => '$data->studentCount')))); } echo "<h1 class='title'>Địa điểm học</h1>"; echo "<p>Các lớp học khác của trung tâm xem " . CHtml::link("tại đây", $this->createUrl("center", array("id" => $classGuitar->c->id, 'title' => Lnt::safeTitle($classGuitar->c->title)))) . "</p>"; echo $classGuitar->c->body;
<div class="comment_box form clearfix"> <div class="title">Bình luận</div> <div id="comment_avatar"> <?php if (Yii::app()->user->isGuest) { ?> <img src="<?php echo Yii::app()->baseUrl . '/images/avatar.jpg'; ?> "/> <?php } else { ?> <img src="<?php echo Lnt::get_picture_href(Yii::app()->user->id); ?> " width="60" height="60"/> <?php } ?> </div> <div id="comment_left"> <div id="comment_center"> <div id="comment_right"> <?php $form = $this->beginWidget('CActiveForm', array('id' => 'comment-form', 'enableAjaxValidation' => false)); ?> <?php echo $form->textArea($comment, 'contents', array('disabled' => Yii::app()->user->isGuest)); ?> <!-- --><?php