Ejemplo n.º 1
0
 public function actionCollectionsPageEdit($id)
 {
     $model = CollectionContentModel::model()->where("`id`='{$id}'")->findRow();
     $collections = CollectionsModel::model()->findAll();
     $serials = MoviesModel::model()->where("`type`='2'")->findAll();
     if (isset($_POST['yt0'])) {
         $model->collection_id = $_POST['collection_id'];
         $model->serial_id = $_POST['serial_id'];
         $model->save();
         $this->redirect("/admin/collections/");
     }
     $this->view("admin/collections/editContent", array("model" => $model, "collections" => $collections, "serials" => $serials), false);
 }
Ejemplo n.º 2
0
 public function actionCollectionsShow($seoUrl)
 {
     $Collections = CollectionsModel::model()->where("`seo_url`='{$seoUrl}'")->findRow();
     $content_collections = CollectionContentModel::model()->where("`collection_id` = '{$Collections->id}'")->findAll();
     if (Auth::isLogged()) {
         $this->view("collections/collectionShow", array("content_collections" => $content_collections, "collections" => $Collections), false);
     } else {
         $this->redirect("/");
     }
 }