public function actionView()
 {
     $radioId = Yii::app()->request->getParam("id", 0);
     $radioName = WapRadioModel::model()->findByPk($radioId)->name;
     $albumId = WapRadioModel::model()->getAlbumByRadio($radioId, "c2.id");
     $radioAvatar = RadioModel::model()->getAvatarUrl($radioId, 's1');
     $album = WapAlbumModel::model()->published()->findByPk($albumId);
     if (!$album) {
         $this->forward("/site/error", true);
     }
     $songsOfAlbum = WapSongModel::model()->getSongsOfAlbum($albumId);
     $artists = AlbumArtistModel::model()->getArtistsByAlbum($albumId);
     $phone = yii::app()->user->getState('msisdn');
     $errorCode = 'success';
     $errorDescription = '';
     $registerText = WapAlbumModel::model()->getCustomMetaData('REG_TEXT');
     ///meta tag
     $AlbumDetail = AlbumModel::model()->findByPk($albumId);
     $artistId = !empty($artists) ? $artists[0]->artist_id : $AlbumDetail->artist_id;
     $ArtistInfo = ArtistModel::model()->findByPk($artistId);
     $this->itemName = $AlbumDetail->name;
     $this->artist = $ArtistInfo->name;
     $this->thumb = AlbumModel::model()->getAvatarUrl($albumId, 's1');
     $this->url = URLHelper::buildFriendlyURL("album", $albumId, Common::makeFriendlyUrl($ArtistInfo->name));
     $this->description = strip_tags($AlbumDetail->description);
     //get other radio
     $parent_id = Yii::app()->params['horoscope']['parent_id'];
     $radioListOther = WapRadioModel::model()->getHoroscopes($parent_id);
     $this->render('detail', array('album' => $album, 'songsOfAlbum' => $songsOfAlbum, 'errorCode' => $errorCode, 'errorDescription' => $errorDescription, 'registerText' => $registerText, 'radioListOther' => $radioListOther, 'radioAvatar' => $radioAvatar));
 }
Example #2
0
?>
</h3>
	<?php 
echo Yii::app()->params['horoscope']['full'];
?>
</div>
</div>
<div class="h_body">
<div class="wr2">
<?php 
if ($radioList) {
    $i = 0;
    foreach ($radioList as $value) {
        $avatar = RadioModel::model()->getAvatarUrl($value['id'], 's1');
        $link = Yii::app()->createUrl('/horoscopes/view', array('id' => $value['id'], 'url_key' => Common::url_friendly($value['name'])));
        $albumName = WapRadioModel::model()->getAlbumByRadio($value['id']);
        if ($i % 4 == 0) {
            ?>
<div class="h_row"><?php 
        }
        ?>
<div class="h_item">
	<a href="<?php 
        echo $link;
        ?>
">
	<div class="wrr-item-detail">
		<img width="100%" src="<?php 
        echo $avatar;
        ?>
" />
Example #3
0
        $ra = (int) $ra;
        for ($i = 0; $i < $ra; $i++) {
            $rate[] = $banner;
        }
    }
}
shuffle($rate);
$item = rand(0, count($rate) - 1);
if (isset($rate[$item]) && $rate[$item]) {
    $ban = $rate[$item];
    echo $ban['content'];
}
?>
</div>
<?php 
$horoscopes = WapRadioModel::model()->getHoroscopes(Yii::app()->params['horoscope']['parent_id'], 4);
if ($horoscopes) {
    ?>
<div class=" clb">
    <div class="bl_title fontB"><a href="<?php 
    echo Yii::app()->createUrl('/horoscopes/index');
    ?>
">ÂM NHẠC 12 CÁ TÍNH</a></div>
    <div class="bl_item">
        <?php 
    $this->widget('application.widgets.wap.radio.RadioList', array('radios' => $horoscopes, 'type' => 'home_page'));
    ?>
    </div>
</div>
<?php 
}