Пример #1
0
 private function addMovieImages($arr_infos)
 {
     foreach ($arr_infos as $key => $value) {
         $value = $value['image'];
         $img = new MovieImages();
         $img->width = $value['width'];
         $img->height = $value['height'];
         $img->size = $value['size'];
         $img->type = $value['type'];
         $img->url = $value['url'];
         $img->movie_id = $this->id;
         $img->save();
     }
 }
Пример #2
0
?>
>

<div class="container" id="page">
  <?php 
if (!Yii::app()->user->isGuest) {
    ?>
    <div id="header">
      <div id="logo">
        <?php 
    echo CHtml::link(CHtml::image('/images/logo.png'), '/');
    ?>
        <div id="rand-images">
          <ul class="carousel jcarousel-skin-custom">
            <?php 
    foreach (MovieImages::model()->randomThumbs()->with(array('movie'))->findAll() as $image) {
        ?>
              <li><?php 
        echo CHtml::link(CHtml::image($image->url), array('movie/view', 'url_key' => $image->movie->url_key));
        ?>
</li>
            <?php 
    }
    ?>
          </ul>
        </div>
      </div>
      <div class="clear"></div>
    </div><!-- header -->

    <div id="mainmenu">
Пример #3
0
 public function actionWallpaper()
 {
     $this->render('wallpaper', array('images' => MovieImages::model()->randomWallpaper()->byMovie(CHttpRequest::getQuery('url_key'))->findAll()));
 }