diff --git a/web/nbproject/private/private.xml b/web/nbproject/private/private.xml index daed626..35a569b 100644 --- a/web/nbproject/private/private.xml +++ b/web/nbproject/private/private.xml @@ -3,8 +3,9 @@ - file:/C:/Workplace/Apache2.4/htdocs/bashgid/protected/controllers/PhotoController.php - file:/C:/Workplace/Apache2.4/htdocs/bashgid/protected/controllers/PhotoAlbumRelationController.php + file:/C:/Workplace/Apache2.4/htdocs/bashgid/protected/controllers/ArticleController.php + file:/C:/Workplace/Apache2.4/htdocs/bashgid/protected/models/Translation.php + file:/C:/Workplace/Apache2.4/htdocs/bashgid/protected/controllers/TranslationController.php diff --git a/web/protected/config/main.php b/web/protected/config/main.php index cdfa722..9e7bf28 100644 --- a/web/protected/config/main.php +++ b/web/protected/config/main.php @@ -7,7 +7,7 @@ // CWebApplication properties can be configured here. return array( 'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..', - 'name'=>'My Web Application', + 'name'=>'BASHGID Database', // preloading 'log' component 'preload'=>array('log'), diff --git a/web/protected/controllers/ArticleController.php b/web/protected/controllers/ArticleController.php index 0b5bad6..e813ef0 100644 --- a/web/protected/controllers/ArticleController.php +++ b/web/protected/controllers/ArticleController.php @@ -28,7 +28,7 @@ class ArticleController extends Controller { { return array( array('allow', - 'actions' => array('index', 'view', 'create', 'update', 'admin', 'delete'), + 'actions' => array('index', 'view', 'create', 'update', 'admin', 'delete', 'addMax', 'editMax', 'editAlbumsMax'), 'users' => array('@'), ), array('allow', @@ -62,6 +62,9 @@ class ArticleController extends Controller { $model->geoLat = 0; $model->geoLon = 0; + $model->address = ''; + $model->phone = ''; + $model->externalLinkText = ''; // Uncomment the following line if AJAX validation is needed // $this->performAjaxValidation($model); @@ -147,6 +150,23 @@ class ArticleController extends Controller { public function actionJson() { $dataArray = Article::model()->findAll(); + + foreach ($dataArray as &$data) + { + + if ($data->address === null) + { + $data->address = ''; + } + if ($data->phone === null) + { + $data->phone = ''; + } + if ($data->externalLinkText === null) + { + $data->externalLinkText = ''; + } + } $this->layout = false; header('Content-type: application/json'); @@ -154,6 +174,91 @@ class ArticleController extends Controller { Yii::app()->end(); } + public function actionAddMax() + { + $model = new ArticleMaxForm; + + if (isset($_POST['ArticleMaxForm'])) + { + + $model->attributes = $_POST['ArticleMaxForm']; + + if ($this->saveArticleForm($model)) + { + $this->redirect(array('editAlbumsMax')); + } else + { + $this->redirect(array('editMax')); + } + return; + } + + $this->render('addMax', array( + 'model' => $model, + )); + } + + public function actionEditMax($id) + { + $model = new ArticleMaxForm; + + if (isset($_POST['ArticleMaxForm'])) + { + + $model->attributes = $_POST['ArticleMaxForm']; + + + if ($this->saveArticleForm($model)) + { + $this->redirect(array('editAlbumsMax')); + } else + { + $this->redirect(array('editMax')); + } + return; + } + + $currentArticle = Article::model()->findByPk($id); + + + if ($currentArticle) + { + $titleTranslationModel = Translation::model()->find('name=:name', array(':name' => $currentArticle->title)); + if ($titleTranslationModel) + { + $model->titleRu = $titleTranslationModel->textRu; + $model->titleEn = $titleTranslationModel->textEn; + $model->titleZh = $titleTranslationModel->textZh; + } + + $descriptionTranslationModel = Translation::model()->find('name=:name', array(':name' => $currentArticle->content)); + if ($descriptionTranslationModel) + { + $model->contentRu = $descriptionTranslationModel->textRu; + $model->contentEn = $descriptionTranslationModel->textEn; + $model->contentZh = $descriptionTranslationModel->textZh; + } + + $model->geoLat = $currentArticle->geoLat; + $model->geoLon = $currentArticle->geoLon; + $model->externalLink = $currentArticle->externalLink; + + $model->name = $currentArticle->name; + } + + $this->render('editMax', array( + 'model' => $model, + )); + } + + public function actionEditAlbumsMax() + { + $model = new ArticleMaxForm; + $this->render('editPhotosMax', array( + 'model' => $model, + )); + } + /** * Returns the data model based on the primary key given in the GET variable. * If the data model is not found, an HTTP exception will be raised. @@ -182,4 +287,92 @@ class ArticleController extends Controller { } } + protected function saveArticleForm($model) + { + if (empty($model->titleEn)) + { + $model->titleEn = 'NEED_TRANSLATION'; + } + if (empty($model->titleZh)) + { + $model->titleZh = 'NEED_TRANSLATION'; + } + if (empty($model->contentEn)) + { + $model->contentEn = 'NEED_TRANSLATION'; + } + if (empty($model->contentZh)) + { + $model->contentZh = 'NEED_TRANSLATION'; + } + + $article = Article::model()->find('name=:name', array(':name' => $model->name)); + + if (!$article) + { + $article = new Article; + $article->name = Yii::app()->user->name . '_article_' . ArticleJournalRelation::model()->count('journalName=:journalName', array(':journalName' => Yii::app()->user->name . '_journal')); + } + + $article->title = $article->name . '_title'; + $article->content = $article->name . '_content'; + + $article->geoLat = 0; + $article->geoLon = 0; + + $article->externalLink = $model->externalLink; + + $article->type = 0; + + date_default_timezone_set("UTC"); + $article->dateTime = date('Y-m-d H:i:s'); + + $titleTranslationModel = Translation::model()->find('name=:name', array(':name' => $article->title)); + if ($titleTranslationModel === null) + { + $titleTranslationModel = new Translation; + } + + $titleTranslationModel->name = $article->title; + $titleTranslationModel->textRu = $model->titleRu; + $titleTranslationModel->textEn = $model->titleEn; + $titleTranslationModel->textZh = $model->titleZh; + $titleTranslationModel->save(); + + + $contentTranslationModel = Translation::model()->find('name=:name', array(':name' => $article->content)); + if ($contentTranslationModel === null) + { + $contentTranslationModel = new Translation; + } + + $contentTranslationModel->name = $article->content; + $contentTranslationModel->textRu = $model->contentRu; + $contentTranslationModel->textEn = $model->contentEn; + $contentTranslationModel->textZh = $model->contentZh; + $contentTranslationModel->save(); + + if ($article->save()) + { + $articleJournalRelation = ArticleJournalRelation::model()->find('journalName=:journalName AND articleName=:articleName', array( + ':journalName' => Yii::app()->user->name . '_journal', + ':articleName' => $article->name, + )); + + if (!$articleJournalRelation) + { + $articleJournalRelation = new ArticleJournalRelation; + $articleJournalRelation->articleName = $article->name; + $articleJournalRelation->journalName = Yii::app()->user->name . '_journal'; + return $articleJournalRelation->save(); + } else + { + return true; + } + //ArticleJournalRelation::model() + } + + return false; + } + } diff --git a/web/protected/controllers/JournalController.php b/web/protected/controllers/JournalController.php index d0f5b4e..256fcc3 100644 --- a/web/protected/controllers/JournalController.php +++ b/web/protected/controllers/JournalController.php @@ -28,7 +28,7 @@ class JournalController extends Controller { { return array( array('allow', - 'actions' => array('index', 'view', 'create', 'update', 'admin', 'delete'), + 'actions' => array('index', 'view', 'create', 'update', 'admin', 'delete', 'addMax', 'editMax', 'editArticlesMax'), 'users' => array('@'), ), array('allow', @@ -149,6 +149,100 @@ class JournalController extends Controller { Yii::app()->end(); } + public function actionAddMax() + { + $model = new JournalMaxForm; + + // Uncomment the following line if AJAX validation is needed + // $this->performAjaxValidation($model); + + if (isset($_POST['JournalMaxForm'])) + { + + $model->attributes = $_POST['JournalMaxForm']; + + + + if ($this->saveJournalForm($model)) + { + $this->redirect(array('editArticlesMax')); + } else + { + $this->redirect(array('editMax')); + } + return; + } + + $this->render('addMax', array( + 'model' => $model, + )); + } + + public function actionEditMax() + { + + $model = new JournalMaxForm; + + if (isset($_POST['JournalMaxForm'])) + { + $model->attributes = $_POST['JournalMaxForm']; + + if ($this->saveJournalForm($model)) + { + $this->redirect(array('editArticlesMax')); + } else + { + $this->redirect(array('editMax')); + } + return; + } + + + $currentJournal = Journal::getCurrentUserJournal(); + if ($currentJournal) + { + $titleTranslationModel = Translation::model()->find('name=:name', array(':name' => Yii::app()->user->name . '_journal_title_translation')); + if ($titleTranslationModel) + { + $model->titleRu = $titleTranslationModel->textRu; + $model->titleEn = $titleTranslationModel->textEn; + $model->titleZh = $titleTranslationModel->textZh; + } + + $descriptionTranslationModel = Translation::model()->find('name=:name', array(':name' => Yii::app()->user->name . '_journal_description_translation')); + if ($descriptionTranslationModel) + { + $model->descriptionRu = $descriptionTranslationModel->textRu; + $model->descriptionEn = $descriptionTranslationModel->textEn; + $model->descriptionZh = $descriptionTranslationModel->textZh; + } + } + + $this->render('editMax', array( + 'model' => $model, + )); + } + + public function actionEditArticlesMax() + { + + $articleNameArr = ArticleJournalRelation::model()->findAll('journalName=:journalName', array(':journalName' => Yii::app()->user->name . '_journal')); + + + $articleArr = array(); + foreach ($articleNameArr as $articleRelation) + { + $article = Article::model()->find('name=:name', array(':name' => $articleRelation->articleName)); + $article->title = Translation::model()->find('name=:name', array(':name' => $article->title))->textRu; + + $articleArr[] = $article; + } + + $this->render('editArticlesMax', array( + 'articleArr' => $articleArr, + )); + } + /** * Returns the data model based on the primary key given in the GET variable. * If the data model is not found, an HTTP exception will be raised. @@ -177,4 +271,67 @@ class JournalController extends Controller { } } + protected function saveJournalForm($model) + { + + if (empty($model->titleEn)) + { + $model->titleEn = 'NEED_TRANSLATION'; + } + if (empty($model->titleZh)) + { + $model->titleZh = 'NEED_TRANSLATION'; + } + if (empty($model->descriptionEn)) + { + $model->descriptionEn = 'NEED_TRANSLATION'; + } + if (empty($model->descriptionZh)) + { + $model->descriptionZh = 'NEED_TRANSLATION'; + } + + $journalModel = Journal::getCurrentUserJournal(); + + if (!Journal::getCurrentUserJournal()) + { + + $journalModel = new Journal; + } + + $journalModel->name = Yii::app()->user->name . '_journal'; + $journalModel->title = Yii::app()->user->name . '_journal_title_translation'; + $journalModel->description = Yii::app()->user->name . '_journal_description_translation'; + + + $titleTranslationModel = Translation::model()->find('name=:name', array(':name' => Yii::app()->user->name . '_journal_title_translation')); + if ($titleTranslationModel === null) + { + $titleTranslationModel = new Translation; + } + + $titleTranslationModel->name = Yii::app()->user->name . '_journal_title_translation'; + $titleTranslationModel->textRu = $model->titleRu; + $titleTranslationModel->textEn = $model->titleEn; + $titleTranslationModel->textZh = $model->titleZh; + $titleTranslationModel->save(); + + + $descriptionTranslationModel = Translation::model()->find('name=:name', array(':name' => Yii::app()->user->name . '_journal_description_translation')); + if ($descriptionTranslationModel === null) + { + $descriptionTranslationModel = new Translation; + } + + + $descriptionTranslationModel->name = Yii::app()->user->name . '_journal_description_translation'; + $descriptionTranslationModel->textRu = $model->descriptionRu; + $descriptionTranslationModel->textEn = $model->descriptionEn; + $descriptionTranslationModel->textZh = $model->descriptionZh; + $descriptionTranslationModel->save(); + + + return $journalModel->save(); + } + } diff --git a/web/protected/controllers/SiteController.php b/web/protected/controllers/SiteController.php index 6fc251e..866a246 100644 --- a/web/protected/controllers/SiteController.php +++ b/web/protected/controllers/SiteController.php @@ -51,24 +51,6 @@ class SiteController extends Controller */ public function actionContact() { - $model=new ContactForm; - if(isset($_POST['ContactForm'])) - { - $model->attributes=$_POST['ContactForm']; - if($model->validate()) - { - $name='=?UTF-8?B?'.base64_encode($model->name).'?='; - $subject='=?UTF-8?B?'.base64_encode($model->subject).'?='; - $headers="From: $name <{$model->email}>\r\n". - "Reply-To: {$model->email}\r\n". - "MIME-Version: 1.0\r\n". - "Content-Type: text/plain; charset=UTF-8"; - - mail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers); - Yii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.'); - $this->refresh(); - } - } $this->render('contact',array('model'=>$model)); } diff --git a/web/protected/controllers/TranslationController.php b/web/protected/controllers/TranslationController.php index d16829a..e27ae66 100644 --- a/web/protected/controllers/TranslationController.php +++ b/web/protected/controllers/TranslationController.php @@ -66,6 +66,12 @@ class TranslationController extends Controller if(isset($_POST['Translation'])) { $model->attributes=$_POST['Translation']; + + $model->textEnUp = mb_strtoupper($model->textEn, 'UTF-8'); + $model->textRuUp = mb_strtoupper($model->textRu, 'UTF-8'); + $model->textZhUp = mb_strtoupper($model->textZh, 'UTF-8'); + + if($model->save()) $this->redirect(array('view','id'=>$model->id)); } @@ -90,6 +96,11 @@ class TranslationController extends Controller if(isset($_POST['Translation'])) { $model->attributes=$_POST['Translation']; + + $model->textEnUp = mb_strtoupper($model->textEn, 'UTF-8'); + $model->textRuUp = mb_strtoupper($model->textRu, 'UTF-8'); + $model->textZhUp = mb_strtoupper($model->textZh, 'UTF-8'); + if($model->save()) $this->redirect(array('view','id'=>$model->id)); } @@ -141,7 +152,29 @@ class TranslationController extends Controller public function actionJson() { + $dataArray = Translation::model()->findAll(); + /* + foreach ($dataArray as &$data) + { + if (empty($data->textEnUp)) + { + $data->textEnUp = mb_strtoupper($data->textEn, 'UTF-8'); + } + + if (empty($data->textRuUp)) + { + $data->textRuUp = mb_strtoupper($data->textRu, 'UTF-8'); + } + + if (empty($data->textZhUp)) + { + $data->textZhUp = mb_strtoupper($data->textZh, 'UTF-8'); + } + + + $data->save(); + }*/ $this->layout = false; header('Content-type: application/json'); diff --git a/web/protected/models/Album.php b/web/protected/models/Album.php index cb585f2..dde9da5 100644 --- a/web/protected/models/Album.php +++ b/web/protected/models/Album.php @@ -29,9 +29,10 @@ class Album extends CActiveRecord return array( array('name', 'required'), array('title, description', 'safe'), + array('hidden', 'numerical', 'integerOnly'=>true), // The following rule is used by search(). // @todo Please remove those attributes that should not be searched. - array('id, name, title, description', 'safe', 'on'=>'search'), + array('id, name, title, description, hidden', 'safe', 'on'=>'search'), ); } diff --git a/web/protected/models/Article.php b/web/protected/models/Article.php index 749b419..f98b964 100644 --- a/web/protected/models/Article.php +++ b/web/protected/models/Article.php @@ -14,104 +14,108 @@ * @property string $externalLink * @property string $dateTime */ -class Article extends CActiveRecord -{ - /** - * @return string the associated database table name - */ - public function tableName() - { - return 'table_article'; - } +class Article extends CActiveRecord { - /** - * @return array validation rules for model attributes. - */ - public function rules() - { - // NOTE: you should only define rules for those attributes that - // will receive user inputs. - return array( - array('name, type, geoLat, geoLon', 'required'), - array('type', 'numerical', 'integerOnly'=>true), - array('geoLat, geoLon', 'numerical'), - array('title, content, externalLink, dateTime', 'safe'), - // The following rule is used by search(). - // @todo Please remove those attributes that should not be searched. - array('id, name, type, title, content, geoLat, geoLon, externalLink, dateTime', 'safe', 'on'=>'search'), - ); - } + /** + * @return string the associated database table name + */ + public function tableName() + { + return 'table_article'; + } - /** - * @return array relational rules. - */ - public function relations() - { - // NOTE: you may need to adjust the relation name and the related - // class name for the relations automatically generated below. - return array( - ); - } + /** + * @return array validation rules for model attributes. + */ + public function rules() + { + // NOTE: you should only define rules for those attributes that + // will receive user inputs. + return array( + array('name, type, geoLat, geoLon', 'required'), + array('type, hidden', 'numerical', 'integerOnly' => true), + array('geoLat, geoLon', 'numerical'), + array('title, content, address, phone, externalLink, externalLinkText, dateTime', 'safe'), + // The following rule is used by search(). + // @todo Please remove those attributes that should not be searched. + array('id, name, type, title, content, geoLat, geoLon, address, phone, externalLink, externalLinkText, dateTime, hidden', 'safe', 'on' => 'search'), + ); + } - /** - * @return array customized attribute labels (name=>label) - */ - public function attributeLabels() - { - return array( - 'id' => 'ID', - 'name' => 'Name', - 'type' => 'Type', - 'title' => 'Title', - 'content' => 'Content', - 'geoLat' => 'Geo Lat', - 'geoLon' => 'Geo Lon', - 'externalLink' => 'External Link', - 'dateTime' => 'Date Time', - ); - } + /** + * @return array relational rules. + */ + public function relations() + { + // NOTE: you may need to adjust the relation name and the related + // class name for the relations automatically generated below. + return array( + ); + } - /** - * Retrieves a list of models based on the current search/filter conditions. - * - * Typical usecase: - * - Initialize the model fields with values from filter form. - * - Execute this method to get CActiveDataProvider instance which will filter - * models according to data in model fields. - * - Pass data provider to CGridView, CListView or any similar widget. - * - * @return CActiveDataProvider the data provider that can return the models - * based on the search/filter conditions. - */ - public function search() - { - // @todo Please modify the following code to remove attributes that should not be searched. + /** + * @return array customized attribute labels (name=>label) + */ + public function attributeLabels() + { + return array( + 'id' => 'ID', + 'name' => 'Name', + 'type' => 'Type', + 'title' => 'Title', + 'content' => 'Content', + 'geoLat' => 'Geo Lat', + 'geoLon' => 'Geo Lon', + 'address' => 'Address', + 'phone' => 'Phone', + 'externalLink' => 'External Link', + 'externalLink' => 'External Link Text', + 'dateTime' => 'Date Time', + ); + } - $criteria=new CDbCriteria; + /** + * Retrieves a list of models based on the current search/filter conditions. + * + * Typical usecase: + * - Initialize the model fields with values from filter form. + * - Execute this method to get CActiveDataProvider instance which will filter + * models according to data in model fields. + * - Pass data provider to CGridView, CListView or any similar widget. + * + * @return CActiveDataProvider the data provider that can return the models + * based on the search/filter conditions. + */ + public function search() + { + // @todo Please modify the following code to remove attributes that should not be searched. - $criteria->compare('id',$this->id); - $criteria->compare('name',$this->name,true); - $criteria->compare('type',$this->type); - $criteria->compare('title',$this->title,true); - $criteria->compare('content',$this->content,true); - $criteria->compare('geoLat',$this->geoLat); - $criteria->compare('geoLon',$this->geoLon); - $criteria->compare('externalLink',$this->externalLink,true); - $criteria->compare('dateTime',$this->dateTime,true); + $criteria = new CDbCriteria; - return new CActiveDataProvider($this, array( - 'criteria'=>$criteria, - )); - } + $criteria->compare('id', $this->id); + $criteria->compare('name', $this->name, true); + $criteria->compare('type', $this->type); + $criteria->compare('title', $this->title, true); + $criteria->compare('content', $this->content, true); + $criteria->compare('geoLat', $this->geoLat); + $criteria->compare('geoLon', $this->geoLon); + $criteria->compare('externalLink', $this->externalLink, true); + $criteria->compare('dateTime', $this->dateTime, true); + + return new CActiveDataProvider($this, array( + 'criteria' => $criteria, + )); + } + + /** + * Returns the static model of the specified AR class. + * Please note that you should have this exact method in all your CActiveRecord descendants! + * @param string $className active record class name. + * @return Article the static model class + */ + public static function model($className = __CLASS__) + { + return parent::model($className); + } - /** - * Returns the static model of the specified AR class. - * Please note that you should have this exact method in all your CActiveRecord descendants! - * @param string $className active record class name. - * @return Article the static model class - */ - public static function model($className=__CLASS__) - { - return parent::model($className); - } } diff --git a/web/protected/models/ArticleMaxForm.php b/web/protected/models/ArticleMaxForm.php new file mode 100644 index 0000000..3ebb38f --- /dev/null +++ b/web/protected/models/ArticleMaxForm.php @@ -0,0 +1,42 @@ +'Remember me next time', + ); + } +} diff --git a/web/protected/models/Channel.php b/web/protected/models/Channel.php index 11a0cc1..42169e8 100644 --- a/web/protected/models/Channel.php +++ b/web/protected/models/Channel.php @@ -29,9 +29,10 @@ class Channel extends CActiveRecord return array( array('name', 'required'), array('title, description', 'safe'), + array('hidden', 'numerical', 'integerOnly'=>true), // The following rule is used by search(). // @todo Please remove those attributes that should not be searched. - array('id, name, title, description', 'safe', 'on'=>'search'), + array('id, name, title, description, hidden', 'safe', 'on'=>'search'), ); } diff --git a/web/protected/models/Journal.php b/web/protected/models/Journal.php index fc38754..e5cd9db 100644 --- a/web/protected/models/Journal.php +++ b/web/protected/models/Journal.php @@ -29,9 +29,10 @@ class Journal extends CActiveRecord return array( array('name', 'required'), array('title, description', 'safe'), + array('hidden, geoCategory, main', 'numerical', 'integerOnly'=>true), // The following rule is used by search(). // @todo Please remove those attributes that should not be searched. - array('id, name, title, description', 'safe', 'on'=>'search'), + array('id, name, title, description, hidden, geoCategory, main', 'safe', 'on'=>'search'), ); } @@ -87,6 +88,12 @@ class Journal extends CActiveRecord )); } + public static function getCurrentUserJournal() + { + return Journal::model()->find('name=:name', array(':name' => Yii::app()->user->name . '_journal')); + + } + /** * Returns the static model of the specified AR class. * Please note that you should have this exact method in all your CActiveRecord descendants! diff --git a/web/protected/models/JournalMaxForm.php b/web/protected/models/JournalMaxForm.php new file mode 100644 index 0000000..f56b716 --- /dev/null +++ b/web/protected/models/JournalMaxForm.php @@ -0,0 +1,37 @@ +'Remember me next time', + ); + } + +} diff --git a/web/protected/models/Translation.php b/web/protected/models/Translation.php index 69c7d99..69371bf 100644 --- a/web/protected/models/Translation.php +++ b/web/protected/models/Translation.php @@ -10,93 +10,94 @@ * @property string $textRu * @property string $textZh */ -class Translation extends CActiveRecord -{ - /** - * @return string the associated database table name - */ - public function tableName() - { - return 'table_translation'; - } +class Translation extends CActiveRecord { - /** - * @return array validation rules for model attributes. - */ - public function rules() - { - // NOTE: you should only define rules for those attributes that - // will receive user inputs. - return array( - array('name, textEn, textRu, textZh', 'required'), - // The following rule is used by search(). - // @todo Please remove those attributes that should not be searched. - array('id, name, textEn, textRu, textZh', 'safe', 'on'=>'search'), - ); - } + /** + * @return string the associated database table name + */ + public function tableName() + { + return 'table_translation'; + } - /** - * @return array relational rules. - */ - public function relations() - { - // NOTE: you may need to adjust the relation name and the related - // class name for the relations automatically generated below. - return array( - ); - } + /** + * @return array validation rules for model attributes. + */ + public function rules() + { + // NOTE: you should only define rules for those attributes that + // will receive user inputs. + return array( + array('name, textEn, textRu, textZh', 'required'), + // The following rule is used by search(). + // @todo Please remove those attributes that should not be searched. + array('id, name, textEn, textRu, textZh', 'safe', 'on' => 'search'), + ); + } - /** - * @return array customized attribute labels (name=>label) - */ - public function attributeLabels() - { - return array( - 'id' => 'ID', - 'name' => 'Name', - 'textEn' => 'Text En', - 'textRu' => 'Text Ru', - 'textZh' => 'Text Zh', - ); - } + /** + * @return array relational rules. + */ + public function relations() + { + // NOTE: you may need to adjust the relation name and the related + // class name for the relations automatically generated below. + return array( + ); + } - /** - * Retrieves a list of models based on the current search/filter conditions. - * - * Typical usecase: - * - Initialize the model fields with values from filter form. - * - Execute this method to get CActiveDataProvider instance which will filter - * models according to data in model fields. - * - Pass data provider to CGridView, CListView or any similar widget. - * - * @return CActiveDataProvider the data provider that can return the models - * based on the search/filter conditions. - */ - public function search() - { - // @todo Please modify the following code to remove attributes that should not be searched. + /** + * @return array customized attribute labels (name=>label) + */ + public function attributeLabels() + { + return array( + 'id' => 'ID', + 'name' => 'Name', + 'textEn' => 'Text En', + 'textRu' => 'Text Ru', + 'textZh' => 'Text Zh', + ); + } - $criteria=new CDbCriteria; + /** + * Retrieves a list of models based on the current search/filter conditions. + * + * Typical usecase: + * - Initialize the model fields with values from filter form. + * - Execute this method to get CActiveDataProvider instance which will filter + * models according to data in model fields. + * - Pass data provider to CGridView, CListView or any similar widget. + * + * @return CActiveDataProvider the data provider that can return the models + * based on the search/filter conditions. + */ + public function search() + { + // @todo Please modify the following code to remove attributes that should not be searched. - $criteria->compare('id',$this->id); - $criteria->compare('name',$this->name,true); - $criteria->compare('textEn',$this->textEn,true); - $criteria->compare('textRu',$this->textRu,true); - $criteria->compare('textZh',$this->textZh,true); + $criteria = new CDbCriteria; - return new CActiveDataProvider($this, array( - 'criteria'=>$criteria, - )); - } + $criteria->compare('id', $this->id); + $criteria->compare('name', $this->name, true); + $criteria->compare('textEn', $this->textEn, true); + $criteria->compare('textRu', $this->textRu, true); + $criteria->compare('textZh', $this->textZh, true); + + return new CActiveDataProvider($this, array( + 'criteria' => $criteria, + )); + } + + /** + * Returns the static model of the specified AR class. + * Please note that you should have this exact method in all your CActiveRecord descendants! + * @param string $className active record class name. + * @return Translation the static model class + */ + public static function model($className = __CLASS__) + { + return parent::model($className); + } - /** - * Returns the static model of the specified AR class. - * Please note that you should have this exact method in all your CActiveRecord descendants! - * @param string $className active record class name. - * @return Translation the static model class - */ - public static function model($className=__CLASS__) - { - return parent::model($className); - } } diff --git a/web/protected/models/VideoChannelRelation.php b/web/protected/models/VideoChannelRelation.php index 8603318..2920f7c 100644 --- a/web/protected/models/VideoChannelRelation.php +++ b/web/protected/models/VideoChannelRelation.php @@ -26,8 +26,7 @@ class VideoChannelRelation extends CActiveRecord // NOTE: you should only define rules for those attributes that // will receive user inputs. return array( - array('id, videoUrl, name', 'required'), - array('id', 'numerical', 'integerOnly'=>true), + array('videoUrl, name', 'required'), // The following rule is used by search(). // @todo Please remove those attributes that should not be searched. array('id, videoUrl, name', 'safe', 'on'=>'search'), diff --git a/web/protected/runtime/application.log b/web/protected/runtime/application.log index 7df82b0..344b95b 100644 --- a/web/protected/runtime/application.log +++ b/web/protected/runtime/application.log @@ -136,3 +136,568 @@ Stack trace: #5 {main} REQUEST_URI=/bashgid/index.php?r=article/%D0%BE%D1%8B%D1%89%D1%82 --- +2015/06/30 10:30:05 [error] [exception.CException] exception 'CException' with message 'Property "JournalAddMaxForm.title" is not defined.' in C:\Workplace\yii1.1.15\framework\base\CComponent.php:130 +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\web\helpers\CHtml.php(2529): CComponent->__get('title') +#1 C:\Workplace\yii1.1.15\framework\web\helpers\CHtml.php(1654): CHtml::resolveValue(Object(JournalAddMaxForm), 'title') +#2 C:\Workplace\yii1.1.15\framework\web\widgets\CActiveForm.php(786): CHtml::activeTextArea(Object(JournalAddMaxForm), 'title', Array) +#3 C:\Workplace\Apache2.4\htdocs\bashgid\protected\views\journal\addMax.php(31): CActiveForm->textArea(Object(JournalAddMaxForm), 'title', Array) +#4 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(126): require('C:\\Workplace\\Ap...') +#5 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(95): CBaseController->renderInternal('C:\\Workplace\\Ap...', Array, true) +#6 C:\Workplace\yii1.1.15\framework\web\CController.php(869): CBaseController->renderFile('C:\\Workplace\\Ap...', Array, true) +#7 C:\Workplace\yii1.1.15\framework\web\CController.php(782): CController->renderPartial('addMax', Array, true) +#8 C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php(169): CController->render('addMax', Array) +#9 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): JournalController->actionAddMax() +#10 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams(Array) +#11 C:\Workplace\yii1.1.15\framework\web\filters\CFilterChain.php(133): CController->runAction(Object(CInlineAction)) +#12 C:\Workplace\yii1.1.15\framework\web\filters\CFilter.php(40): CFilterChain->run() +#13 C:\Workplace\yii1.1.15\framework\web\CController.php(1145): CFilter->filter(Object(CFilterChain)) +#14 C:\Workplace\yii1.1.15\framework\web\filters\CInlineFilter.php(58): CController->filterAccessControl(Object(CFilterChain)) +#15 C:\Workplace\yii1.1.15\framework\web\filters\CFilterChain.php(130): CInlineFilter->filter(Object(CFilterChain)) +#16 C:\Workplace\yii1.1.15\framework\web\CController.php(291): CFilterChain->run() +#17 C:\Workplace\yii1.1.15\framework\web\CController.php(265): CController->runActionWithFilters(Object(CInlineAction), Array) +#18 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): CController->run('addMax') +#19 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(141): CWebApplication->runController('journal/addMax') +#20 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() +#21 C:\Workplace\Apache2.4\htdocs\bashgid\index.php(21): CApplication->run() +#22 {main} +REQUEST_URI=/bashgid/index.php?r=journal/addMax +HTTP_REFERER=http://localhost/bashgid/index.php?r=site/index +--- +2015/06/30 10:32:39 [error] [exception.CException] exception 'CException' with message 'Property "JournalAddMaxForm.isNewRecord" is not defined.' in C:\Workplace\yii1.1.15\framework\base\CComponent.php:130 +Stack trace: +#0 C:\Workplace\Apache2.4\htdocs\bashgid\protected\views\journal\addMax.php(62): CComponent->__get('isNewRecord') +#1 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(126): require('C:\\Workplace\\Ap...') +#2 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(95): CBaseController->renderInternal('C:\\Workplace\\Ap...', Array, true) +#3 C:\Workplace\yii1.1.15\framework\web\CController.php(869): CBaseController->renderFile('C:\\Workplace\\Ap...', Array, true) +#4 C:\Workplace\yii1.1.15\framework\web\CController.php(782): CController->renderPartial('addMax', Array, true) +#5 C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php(169): CController->render('addMax', Array) +#6 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): JournalController->actionAddMax() +#7 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams(Array) +#8 C:\Workplace\yii1.1.15\framework\web\filters\CFilterChain.php(133): CController->runAction(Object(CInlineAction)) +#9 C:\Workplace\yii1.1.15\framework\web\filters\CFilter.php(40): CFilterChain->run() +#10 C:\Workplace\yii1.1.15\framework\web\CController.php(1145): CFilter->filter(Object(CFilterChain)) +#11 C:\Workplace\yii1.1.15\framework\web\filters\CInlineFilter.php(58): CController->filterAccessControl(Object(CFilterChain)) +#12 C:\Workplace\yii1.1.15\framework\web\filters\CFilterChain.php(130): CInlineFilter->filter(Object(CFilterChain)) +#13 C:\Workplace\yii1.1.15\framework\web\CController.php(291): CFilterChain->run() +#14 C:\Workplace\yii1.1.15\framework\web\CController.php(265): CController->runActionWithFilters(Object(CInlineAction), Array) +#15 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): CController->run('addMax') +#16 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(141): CWebApplication->runController('journal/addMax') +#17 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() +#18 C:\Workplace\Apache2.4\htdocs\bashgid\index.php(21): CApplication->run() +#19 {main} +REQUEST_URI=/bashgid/index.php?r=journal/addMax +--- +2015/06/30 10:54:40 [warning] [application] Failed to set unsafe attribute "titleEn" of "JournalAddMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (161) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 10:54:40 [warning] [application] Failed to set unsafe attribute "titleZh" of "JournalAddMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (161) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 10:54:40 [warning] [application] Failed to set unsafe attribute "descriptionEn" of "JournalAddMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (161) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 10:54:40 [warning] [application] Failed to set unsafe attribute "descriptionZh" of "JournalAddMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (161) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:13:30 [warning] [application] Failed to set unsafe attribute "titleEn" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (161) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:13:30 [warning] [application] Failed to set unsafe attribute "titleZh" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (161) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:13:30 [warning] [application] Failed to set unsafe attribute "descriptionEn" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (161) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:13:30 [warning] [application] Failed to set unsafe attribute "descriptionZh" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (161) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:13:42 [warning] [application] Failed to set unsafe attribute "titleEn" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (204) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:13:42 [warning] [application] Failed to set unsafe attribute "titleZh" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (204) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:13:42 [warning] [application] Failed to set unsafe attribute "descriptionEn" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (204) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:13:42 [warning] [application] Failed to set unsafe attribute "descriptionZh" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (204) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:19:33 [warning] [application] Failed to set unsafe attribute "titleEn" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (204) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:19:33 [warning] [application] Failed to set unsafe attribute "titleZh" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (204) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:19:33 [warning] [application] Failed to set unsafe attribute "descriptionEn" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (204) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:19:33 [warning] [application] Failed to set unsafe attribute "descriptionZh" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (204) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:19:44 [warning] [application] Failed to set unsafe attribute "titleEn" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (204) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:19:44 [warning] [application] Failed to set unsafe attribute "titleZh" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (204) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:19:44 [warning] [application] Failed to set unsafe attribute "descriptionEn" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (204) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:19:44 [warning] [application] Failed to set unsafe attribute "descriptionZh" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (204) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:19:52 [warning] [application] Failed to set unsafe attribute "titleEn" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (204) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:19:52 [warning] [application] Failed to set unsafe attribute "titleZh" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (204) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:19:52 [warning] [application] Failed to set unsafe attribute "descriptionEn" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (204) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:19:52 [warning] [application] Failed to set unsafe attribute "descriptionZh" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (204) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:36:37 [warning] [application] Failed to set unsafe attribute "titleEn" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (161) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:36:37 [warning] [application] Failed to set unsafe attribute "titleZh" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (161) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:36:37 [warning] [application] Failed to set unsafe attribute "descriptionEn" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (161) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:36:37 [warning] [application] Failed to set unsafe attribute "descriptionZh" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (161) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:36:52 [warning] [application] Failed to set unsafe attribute "titleEn" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (206) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:36:52 [warning] [application] Failed to set unsafe attribute "titleZh" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (206) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:36:52 [warning] [application] Failed to set unsafe attribute "descriptionEn" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (206) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:36:52 [warning] [application] Failed to set unsafe attribute "descriptionZh" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (206) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:39:18 [warning] [application] Failed to set unsafe attribute "titleEn" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (161) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:39:18 [warning] [application] Failed to set unsafe attribute "titleZh" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (161) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:39:18 [warning] [application] Failed to set unsafe attribute "descriptionEn" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (161) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:39:18 [warning] [application] Failed to set unsafe attribute "descriptionZh" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (161) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:39:37 [warning] [application] Failed to set unsafe attribute "titleEn" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (206) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:39:37 [warning] [application] Failed to set unsafe attribute "titleZh" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (206) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:39:37 [warning] [application] Failed to set unsafe attribute "descriptionEn" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (206) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:39:37 [warning] [application] Failed to set unsafe attribute "descriptionZh" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (206) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:42:33 [warning] [application] Failed to set unsafe attribute "titleEn" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (161) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:42:33 [warning] [application] Failed to set unsafe attribute "titleZh" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (161) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:42:33 [warning] [application] Failed to set unsafe attribute "descriptionEn" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (161) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:42:33 [warning] [application] Failed to set unsafe attribute "descriptionZh" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (161) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:43:33 [warning] [application] Failed to set unsafe attribute "titleEn" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (206) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:43:33 [warning] [application] Failed to set unsafe attribute "titleZh" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (206) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:43:33 [warning] [application] Failed to set unsafe attribute "descriptionEn" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (206) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:43:33 [warning] [application] Failed to set unsafe attribute "descriptionZh" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (206) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:44:00 [warning] [application] Failed to set unsafe attribute "titleEn" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (206) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:44:00 [warning] [application] Failed to set unsafe attribute "titleZh" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (206) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:44:00 [warning] [application] Failed to set unsafe attribute "descriptionEn" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (206) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:44:00 [warning] [application] Failed to set unsafe attribute "descriptionZh" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (206) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:45:52 [warning] [application] Failed to set unsafe attribute "titleEn" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (161) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:45:52 [warning] [application] Failed to set unsafe attribute "titleZh" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (161) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:45:52 [warning] [application] Failed to set unsafe attribute "descriptionEn" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (161) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:45:52 [warning] [application] Failed to set unsafe attribute "descriptionZh" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (161) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:49:52 [warning] [application] Failed to set unsafe attribute "titleEn" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (162) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:49:52 [warning] [application] Failed to set unsafe attribute "titleZh" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (162) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:49:52 [warning] [application] Failed to set unsafe attribute "descriptionEn" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (162) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:49:52 [warning] [application] Failed to set unsafe attribute "descriptionZh" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (162) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:49:53 [error] [php] Undefined variable: vvv (C:\Workplace\Apache2.4\htdocs\bashgid\protected\views\journal\editArticlesMax.php:14) +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\web\CController.php(869): JournalController->renderFile() +#1 C:\Workplace\yii1.1.15\framework\web\CController.php(782): JournalController->renderPartial() +#2 C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php(231): JournalController->render() +#3 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): JournalController->actionEditArticlesMax() +#4 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams() +#5 C:\Workplace\yii1.1.15\framework\web\filters\CFilterChain.php(133): JournalController->runAction() +#6 C:\Workplace\yii1.1.15\framework\web\filters\CFilter.php(40): CFilterChain->run() +#7 C:\Workplace\yii1.1.15\framework\web\CController.php(1145): CAccessControlFilter->filter() +#8 C:\Workplace\yii1.1.15\framework\web\filters\CInlineFilter.php(58): JournalController->filterAccessControl() +#9 C:\Workplace\yii1.1.15\framework\web\filters\CFilterChain.php(130): CInlineFilter->filter() +#10 C:\Workplace\yii1.1.15\framework\web\CController.php(291): CFilterChain->run() +#11 C:\Workplace\yii1.1.15\framework\web\CController.php(265): JournalController->runActionWithFilters() +#12 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): JournalController->run() +#13 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(141): CWebApplication->runController() +#14 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() +#15 C:\Workplace\Apache2.4\htdocs\bashgid\index.php(21): CWebApplication->run() +REQUEST_URI=/bashgid/index.php?r=journal/editArticlesMax&vvv%5BtitleRu%5D=%D1%89%D1%89%D1%89&vvv%5BtitleEn%5D=%D1%88%D1%88%D1%88&vvv%5BtitleZh%5D=%D1%80%D1%80%D1%80&vvv%5BdescriptionRu%5D=%D0%B8%D0%B8%D0%B8&vvv%5BdescriptionEn%5D=%D1%82%D1%82%D1%82&vvv%5BdescriptionZh%5D=%D1%8C%D1%8C%D1%8C +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\views\journal\editArticlesMax.php (14) +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (231) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:56:02 [warning] [application] Failed to set unsafe attribute "titleEn" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (162) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:56:02 [warning] [application] Failed to set unsafe attribute "titleZh" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (162) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:56:02 [warning] [application] Failed to set unsafe attribute "descriptionEn" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (162) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:56:02 [warning] [application] Failed to set unsafe attribute "descriptionZh" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (162) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 11:56:02 [error] [php] Undefined variable: vvv (C:\Workplace\Apache2.4\htdocs\bashgid\protected\views\journal\editArticlesMax.php:14) +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\web\CController.php(869): JournalController->renderFile() +#1 C:\Workplace\yii1.1.15\framework\web\CController.php(782): JournalController->renderPartial() +#2 C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php(231): JournalController->render() +#3 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): JournalController->actionEditArticlesMax() +#4 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams() +#5 C:\Workplace\yii1.1.15\framework\web\filters\CFilterChain.php(133): JournalController->runAction() +#6 C:\Workplace\yii1.1.15\framework\web\filters\CFilter.php(40): CFilterChain->run() +#7 C:\Workplace\yii1.1.15\framework\web\CController.php(1145): CAccessControlFilter->filter() +#8 C:\Workplace\yii1.1.15\framework\web\filters\CInlineFilter.php(58): JournalController->filterAccessControl() +#9 C:\Workplace\yii1.1.15\framework\web\filters\CFilterChain.php(130): CInlineFilter->filter() +#10 C:\Workplace\yii1.1.15\framework\web\CController.php(291): CFilterChain->run() +#11 C:\Workplace\yii1.1.15\framework\web\CController.php(265): JournalController->runActionWithFilters() +#12 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): JournalController->run() +#13 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(141): CWebApplication->runController() +#14 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() +#15 C:\Workplace\Apache2.4\htdocs\bashgid\index.php(21): CWebApplication->run() +REQUEST_URI=/bashgid/index.php?r=journal/editArticlesMax +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\views\journal\editArticlesMax.php (14) +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (231) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 12:04:05 [warning] [application] Failed to set unsafe attribute "titleEn" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (162) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 12:04:05 [warning] [application] Failed to set unsafe attribute "titleZh" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (162) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 12:04:05 [warning] [application] Failed to set unsafe attribute "descriptionEn" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (162) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 12:04:05 [warning] [application] Failed to set unsafe attribute "descriptionZh" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (162) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 12:07:10 [warning] [application] Failed to set unsafe attribute "titleEn" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (186) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 12:07:10 [warning] [application] Failed to set unsafe attribute "titleZh" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (186) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 12:07:10 [warning] [application] Failed to set unsafe attribute "descriptionEn" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (186) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 12:07:10 [warning] [application] Failed to set unsafe attribute "descriptionZh" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (186) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 12:09:06 [warning] [application] Failed to set unsafe attribute "titleEn" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (188) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 12:09:06 [warning] [application] Failed to set unsafe attribute "titleZh" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (188) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 12:09:06 [warning] [application] Failed to set unsafe attribute "descriptionEn" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (188) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 12:09:06 [warning] [application] Failed to set unsafe attribute "descriptionZh" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (188) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 12:09:06 [error] [php] urlencode() expects parameter 1 to be string, object given (C:\Workplace\yii1.1.15\framework\web\CUrlManager.php:440) +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\web\CUrlManager.php(310): CUrlManager->createUrlDefault() +#1 C:\Workplace\yii1.1.15\framework\base\CApplication.php(543): CUrlManager->createUrl() +#2 C:\Workplace\yii1.1.15\framework\web\CController.php(967): CWebApplication->createUrl() +#3 C:\Workplace\yii1.1.15\framework\web\CController.php(1028): JournalController->createUrl() +#4 C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php(192): JournalController->redirect() +#5 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): JournalController->actionEditMax() +#6 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams() +#7 C:\Workplace\yii1.1.15\framework\web\filters\CFilterChain.php(133): JournalController->runAction() +#8 C:\Workplace\yii1.1.15\framework\web\filters\CFilter.php(40): CFilterChain->run() +#9 C:\Workplace\yii1.1.15\framework\web\CController.php(1145): CAccessControlFilter->filter() +#10 C:\Workplace\yii1.1.15\framework\web\filters\CInlineFilter.php(58): JournalController->filterAccessControl() +#11 C:\Workplace\yii1.1.15\framework\web\filters\CFilterChain.php(130): CInlineFilter->filter() +#12 C:\Workplace\yii1.1.15\framework\web\CController.php(291): CFilterChain->run() +#13 C:\Workplace\yii1.1.15\framework\web\CController.php(265): JournalController->runActionWithFilters() +#14 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): JournalController->run() +#15 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(141): CWebApplication->runController() +#16 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() +#17 C:\Workplace\Apache2.4\htdocs\bashgid\index.php(21): CWebApplication->run() +REQUEST_URI=/bashgid/index.php?r=journal/editMax +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (192) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 12:09:21 [warning] [application] Failed to set unsafe attribute "titleEn" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (188) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 12:09:21 [warning] [application] Failed to set unsafe attribute "titleZh" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (188) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 12:09:21 [warning] [application] Failed to set unsafe attribute "descriptionEn" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (188) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 12:09:21 [warning] [application] Failed to set unsafe attribute "descriptionZh" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (188) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 12:09:47 [warning] [application] Failed to set unsafe attribute "titleEn" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (188) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 12:09:47 [warning] [application] Failed to set unsafe attribute "titleZh" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (188) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 12:09:47 [warning] [application] Failed to set unsafe attribute "descriptionEn" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (188) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 12:09:47 [warning] [application] Failed to set unsafe attribute "descriptionZh" of "JournalMaxForm". +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (188) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 13:29:48 [error] [php] Undefined variable: articleArr (C:\Workplace\Apache2.4\htdocs\bashgid\protected\views\journal\editArticlesMax.php:17) +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\web\CController.php(869): JournalController->renderFile() +#1 C:\Workplace\yii1.1.15\framework\web\CController.php(782): JournalController->renderPartial() +#2 C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php(232): JournalController->render() +#3 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): JournalController->actionEditArticlesMax() +#4 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams() +#5 C:\Workplace\yii1.1.15\framework\web\filters\CFilterChain.php(133): JournalController->runAction() +#6 C:\Workplace\yii1.1.15\framework\web\filters\CFilter.php(40): CFilterChain->run() +#7 C:\Workplace\yii1.1.15\framework\web\CController.php(1145): CAccessControlFilter->filter() +#8 C:\Workplace\yii1.1.15\framework\web\filters\CInlineFilter.php(58): JournalController->filterAccessControl() +#9 C:\Workplace\yii1.1.15\framework\web\filters\CFilterChain.php(130): CInlineFilter->filter() +#10 C:\Workplace\yii1.1.15\framework\web\CController.php(291): CFilterChain->run() +#11 C:\Workplace\yii1.1.15\framework\web\CController.php(265): JournalController->runActionWithFilters() +#12 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): JournalController->run() +#13 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(141): CWebApplication->runController() +#14 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() +#15 C:\Workplace\Apache2.4\htdocs\bashgid\index.php(21): CWebApplication->run() +REQUEST_URI=/bashgid/index.php?r=journal/editArticlesMax +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\views\journal\editArticlesMax.php (17) +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php (232) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 13:54:38 [error] [exception.CException] exception 'CException' with message 'Property "ArticleMaxForm.externalLink" is not defined.' in C:\Workplace\yii1.1.15\framework\base\CComponent.php:130 +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\web\helpers\CHtml.php(2529): CComponent->__get('externalLink') +#1 C:\Workplace\yii1.1.15\framework\web\helpers\CHtml.php(1654): CHtml::resolveValue(Object(ArticleMaxForm), 'externalLink') +#2 C:\Workplace\yii1.1.15\framework\web\widgets\CActiveForm.php(786): CHtml::activeTextArea(Object(ArticleMaxForm), 'externalLink', Array) +#3 C:\Workplace\Apache2.4\htdocs\bashgid\protected\views\article\addMax.php(66): CActiveForm->textArea(Object(ArticleMaxForm), 'externalLink', Array) +#4 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(126): require('C:\\Workplace\\Ap...') +#5 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(95): CBaseController->renderInternal('C:\\Workplace\\Ap...', Array, true) +#6 C:\Workplace\yii1.1.15\framework\web\CController.php(869): CBaseController->renderFile('C:\\Workplace\\Ap...', Array, true) +#7 C:\Workplace\yii1.1.15\framework\web\CController.php(782): CController->renderPartial('addMax', Array, true) +#8 C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\ArticleController.php(178): CController->render('addMax', Array) +#9 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): ArticleController->actionAddMax() +#10 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams(Array) +#11 C:\Workplace\yii1.1.15\framework\web\filters\CFilterChain.php(133): CController->runAction(Object(CInlineAction)) +#12 C:\Workplace\yii1.1.15\framework\web\filters\CFilter.php(40): CFilterChain->run() +#13 C:\Workplace\yii1.1.15\framework\web\CController.php(1145): CFilter->filter(Object(CFilterChain)) +#14 C:\Workplace\yii1.1.15\framework\web\filters\CInlineFilter.php(58): CController->filterAccessControl(Object(CFilterChain)) +#15 C:\Workplace\yii1.1.15\framework\web\filters\CFilterChain.php(130): CInlineFilter->filter(Object(CFilterChain)) +#16 C:\Workplace\yii1.1.15\framework\web\CController.php(291): CFilterChain->run() +#17 C:\Workplace\yii1.1.15\framework\web\CController.php(265): CController->runActionWithFilters(Object(CInlineAction), Array) +#18 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): CController->run('addMax') +#19 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(141): CWebApplication->runController('article/addMax') +#20 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() +#21 C:\Workplace\Apache2.4\htdocs\bashgid\index.php(21): CApplication->run() +#22 {main} +REQUEST_URI=/bashgid/index.php?r=article/addMax +--- +2015/06/30 14:03:59 [error] [system.db.CDbCommand] CDbCommand::fetchColumn() failed: SQLSTATE[HY093]: Invalid parameter number: parameter was not defined. The SQL statement executed was: SELECT COUNT(*) FROM `table_article_journal_relation` `t` WHERE journalName=:journalName. +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\ArticleController.php (250) +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\ArticleController.php (166) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 14:03:59 [error] [exception.CDbException] exception 'CDbException' with message 'CDbCommand failed to execute the SQL statement: SQLSTATE[HY093]: Invalid parameter number: parameter was not defined. The SQL statement executed was: SELECT COUNT(*) FROM `table_article_journal_relation` `t` WHERE journalName=:journalName' in C:\Workplace\yii1.1.15\framework\db\CDbCommand.php:543 +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\db\CDbCommand.php(433): CDbCommand->queryInternal('fetchColumn', 0, Array) +#1 C:\Workplace\yii1.1.15\framework\db\ar\CActiveRecord.php(1601): CDbCommand->queryScalar() +#2 C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\ArticleController.php(250): CActiveRecord->count('journalName=:jo...', Array) +#3 C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\ArticleController.php(166): ArticleController->saveArticleForm(Object(ArticleMaxForm)) +#4 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): ArticleController->actionAddMax() +#5 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams(Array) +#6 C:\Workplace\yii1.1.15\framework\web\filters\CFilterChain.php(133): CController->runAction(Object(CInlineAction)) +#7 C:\Workplace\yii1.1.15\framework\web\filters\CFilter.php(40): CFilterChain->run() +#8 C:\Workplace\yii1.1.15\framework\web\CController.php(1145): CFilter->filter(Object(CFilterChain)) +#9 C:\Workplace\yii1.1.15\framework\web\filters\CInlineFilter.php(58): CController->filterAccessControl(Object(CFilterChain)) +#10 C:\Workplace\yii1.1.15\framework\web\filters\CFilterChain.php(130): CInlineFilter->filter(Object(CFilterChain)) +#11 C:\Workplace\yii1.1.15\framework\web\CController.php(291): CFilterChain->run() +#12 C:\Workplace\yii1.1.15\framework\web\CController.php(265): CController->runActionWithFilters(Object(CInlineAction), Array) +#13 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): CController->run('addMax') +#14 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(141): CWebApplication->runController('article/addMax') +#15 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() +#16 C:\Workplace\Apache2.4\htdocs\bashgid\index.php(21): CApplication->run() +#17 {main} +REQUEST_URI=/bashgid/index.php?r=article/addMax +HTTP_REFERER=http://localhost/bashgid/index.php?r=article/addMax +--- +2015/06/30 11:04:39 [error] [php] urlencode() expects parameter 1 to be string, object given (C:\Workplace\yii1.1.15\framework\web\CUrlManager.php:440) +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\web\CUrlManager.php(310): CUrlManager->createUrlDefault() +#1 C:\Workplace\yii1.1.15\framework\base\CApplication.php(543): CUrlManager->createUrl() +#2 C:\Workplace\yii1.1.15\framework\web\CController.php(967): CWebApplication->createUrl() +#3 C:\Workplace\yii1.1.15\framework\web\CController.php(1028): ArticleController->createUrl() +#4 C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\ArticleController.php(168): ArticleController->redirect() +#5 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): ArticleController->actionAddMax() +#6 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams() +#7 C:\Workplace\yii1.1.15\framework\web\filters\CFilterChain.php(133): ArticleController->runAction() +#8 C:\Workplace\yii1.1.15\framework\web\filters\CFilter.php(40): CFilterChain->run() +#9 C:\Workplace\yii1.1.15\framework\web\CController.php(1145): CAccessControlFilter->filter() +#10 C:\Workplace\yii1.1.15\framework\web\filters\CInlineFilter.php(58): ArticleController->filterAccessControl() +#11 C:\Workplace\yii1.1.15\framework\web\filters\CFilterChain.php(130): CInlineFilter->filter() +#12 C:\Workplace\yii1.1.15\framework\web\CController.php(291): CFilterChain->run() +#13 C:\Workplace\yii1.1.15\framework\web\CController.php(265): ArticleController->runActionWithFilters() +#14 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): ArticleController->run() +#15 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(141): CWebApplication->runController() +#16 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() +#17 C:\Workplace\Apache2.4\htdocs\bashgid\index.php(21): CWebApplication->run() +REQUEST_URI=/bashgid/index.php?r=article/addMax +in C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\ArticleController.php (168) +in C:\Workplace\Apache2.4\htdocs\bashgid\index.php (21) +2015/06/30 14:15:06 [error] [exception.CException] exception 'CException' with message 'Property "ArticleJournalRelation.name" is not defined.' in C:\Workplace\yii1.1.15\framework\base\CComponent.php:130 +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\db\ar\CActiveRecord.php(145): CComponent->__get('name') +#1 C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php(235): CActiveRecord->__get('name') +#2 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): JournalController->actionEditArticlesMax() +#3 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams(Array) +#4 C:\Workplace\yii1.1.15\framework\web\filters\CFilterChain.php(133): CController->runAction(Object(CInlineAction)) +#5 C:\Workplace\yii1.1.15\framework\web\filters\CFilter.php(40): CFilterChain->run() +#6 C:\Workplace\yii1.1.15\framework\web\CController.php(1145): CFilter->filter(Object(CFilterChain)) +#7 C:\Workplace\yii1.1.15\framework\web\filters\CInlineFilter.php(58): CController->filterAccessControl(Object(CFilterChain)) +#8 C:\Workplace\yii1.1.15\framework\web\filters\CFilterChain.php(130): CInlineFilter->filter(Object(CFilterChain)) +#9 C:\Workplace\yii1.1.15\framework\web\CController.php(291): CFilterChain->run() +#10 C:\Workplace\yii1.1.15\framework\web\CController.php(265): CController->runActionWithFilters(Object(CInlineAction), Array) +#11 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): CController->run('editArticlesMax') +#12 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(141): CWebApplication->runController('journal/editArt...') +#13 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() +#14 C:\Workplace\Apache2.4\htdocs\bashgid\index.php(21): CApplication->run() +#15 {main} +REQUEST_URI=/bashgid/index.php?r=journal/editArticlesMax +HTTP_REFERER=http://localhost/bashgid/index.php +--- +2015/06/30 14:32:23 [error] [exception.CException] exception 'CException' with message 'Property "ArticleJournalRelation.title" is not defined.' in C:\Workplace\yii1.1.15\framework\base\CComponent.php:130 +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\db\ar\CActiveRecord.php(145): CComponent->__get('title') +#1 C:\Workplace\Apache2.4\htdocs\bashgid\protected\controllers\JournalController.php(236): CActiveRecord->__get('title') +#2 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): JournalController->actionEditArticlesMax() +#3 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams(Array) +#4 C:\Workplace\yii1.1.15\framework\web\filters\CFilterChain.php(133): CController->runAction(Object(CInlineAction)) +#5 C:\Workplace\yii1.1.15\framework\web\filters\CFilter.php(40): CFilterChain->run() +#6 C:\Workplace\yii1.1.15\framework\web\CController.php(1145): CFilter->filter(Object(CFilterChain)) +#7 C:\Workplace\yii1.1.15\framework\web\filters\CInlineFilter.php(58): CController->filterAccessControl(Object(CFilterChain)) +#8 C:\Workplace\yii1.1.15\framework\web\filters\CFilterChain.php(130): CInlineFilter->filter(Object(CFilterChain)) +#9 C:\Workplace\yii1.1.15\framework\web\CController.php(291): CFilterChain->run() +#10 C:\Workplace\yii1.1.15\framework\web\CController.php(265): CController->runActionWithFilters(Object(CInlineAction), Array) +#11 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): CController->run('editArticlesMax') +#12 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(141): CWebApplication->runController('journal/editArt...') +#13 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() +#14 C:\Workplace\Apache2.4\htdocs\bashgid\index.php(21): CApplication->run() +#15 {main} +REQUEST_URI=/bashgid/index.php?r=journal/editArticlesMax +--- +2015/06/30 14:46:45 [error] [exception.CHttpException.400] exception 'CHttpException' with message 'Your request is invalid.' in C:\Workplace\yii1.1.15\framework\web\CController.php:336 +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\web\CController.php(309): CController->invalidActionParams(Object(CInlineAction)) +#1 C:\Workplace\yii1.1.15\framework\web\filters\CFilterChain.php(133): CController->runAction(Object(CInlineAction)) +#2 C:\Workplace\yii1.1.15\framework\web\filters\CFilter.php(40): CFilterChain->run() +#3 C:\Workplace\yii1.1.15\framework\web\CController.php(1145): CFilter->filter(Object(CFilterChain)) +#4 C:\Workplace\yii1.1.15\framework\web\filters\CInlineFilter.php(58): CController->filterAccessControl(Object(CFilterChain)) +#5 C:\Workplace\yii1.1.15\framework\web\filters\CFilterChain.php(130): CInlineFilter->filter(Object(CFilterChain)) +#6 C:\Workplace\yii1.1.15\framework\web\CController.php(291): CFilterChain->run() +#7 C:\Workplace\yii1.1.15\framework\web\CController.php(265): CController->runActionWithFilters(Object(CInlineAction), Array) +#8 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): CController->run('editMax') +#9 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(141): CWebApplication->runController('article/editMax') +#10 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() +#11 C:\Workplace\Apache2.4\htdocs\bashgid\index.php(21): CApplication->run() +#12 {main} +REQUEST_URI=/bashgid/index.php?r=article/editMax +HTTP_REFERER=http://localhost/bashgid/index.php?r=journal/editArticlesMax +--- +2015/06/30 14:59:15 [error] [exception.CHttpException.400] exception 'CHttpException' with message 'Your request is invalid.' in C:\Workplace\yii1.1.15\framework\web\CController.php:336 +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\web\CController.php(309): CController->invalidActionParams(Object(CInlineAction)) +#1 C:\Workplace\yii1.1.15\framework\web\filters\CFilterChain.php(133): CController->runAction(Object(CInlineAction)) +#2 C:\Workplace\yii1.1.15\framework\web\filters\CFilter.php(40): CFilterChain->run() +#3 C:\Workplace\yii1.1.15\framework\web\CController.php(1145): CFilter->filter(Object(CFilterChain)) +#4 C:\Workplace\yii1.1.15\framework\web\filters\CInlineFilter.php(58): CController->filterAccessControl(Object(CFilterChain)) +#5 C:\Workplace\yii1.1.15\framework\web\filters\CFilterChain.php(130): CInlineFilter->filter(Object(CFilterChain)) +#6 C:\Workplace\yii1.1.15\framework\web\CController.php(291): CFilterChain->run() +#7 C:\Workplace\yii1.1.15\framework\web\CController.php(265): CController->runActionWithFilters(Object(CInlineAction), Array) +#8 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): CController->run('editMax') +#9 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(141): CWebApplication->runController('article/editMax') +#10 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() +#11 C:\Workplace\Apache2.4\htdocs\bashgid\index.php(21): CApplication->run() +#12 {main} +REQUEST_URI=/bashgid/index.php?r=article/editMax&n=mc_article_1 +HTTP_REFERER=http://localhost/bashgid/index.php?r=journal/editArticlesMax +--- +2015/06/30 14:59:25 [error] [exception.CHttpException.400] exception 'CHttpException' with message 'Your request is invalid.' in C:\Workplace\yii1.1.15\framework\web\CController.php:336 +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\web\CController.php(309): CController->invalidActionParams(Object(CInlineAction)) +#1 C:\Workplace\yii1.1.15\framework\web\filters\CFilterChain.php(133): CController->runAction(Object(CInlineAction)) +#2 C:\Workplace\yii1.1.15\framework\web\filters\CFilter.php(40): CFilterChain->run() +#3 C:\Workplace\yii1.1.15\framework\web\CController.php(1145): CFilter->filter(Object(CFilterChain)) +#4 C:\Workplace\yii1.1.15\framework\web\filters\CInlineFilter.php(58): CController->filterAccessControl(Object(CFilterChain)) +#5 C:\Workplace\yii1.1.15\framework\web\filters\CFilterChain.php(130): CInlineFilter->filter(Object(CFilterChain)) +#6 C:\Workplace\yii1.1.15\framework\web\CController.php(291): CFilterChain->run() +#7 C:\Workplace\yii1.1.15\framework\web\CController.php(265): CController->runActionWithFilters(Object(CInlineAction), Array) +#8 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): CController->run('editMax') +#9 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(141): CWebApplication->runController('article/editMax') +#10 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() +#11 C:\Workplace\Apache2.4\htdocs\bashgid\index.php(21): CApplication->run() +#12 {main} +REQUEST_URI=/bashgid/index.php?r=article/editMax&n=mc_article_0 +HTTP_REFERER=http://localhost/bashgid/index.php?r=journal/editArticlesMax +--- diff --git a/web/protected/views/album/_form.php b/web/protected/views/album/_form.php index b158efc..b32c3cd 100644 --- a/web/protected/views/album/_form.php +++ b/web/protected/views/album/_form.php @@ -36,6 +36,12 @@ textArea($model,'description',array('rows'=>6, 'cols'=>50)); ?> error($model,'description'); ?> + +
+ labelEx($model,'hidden'); ?> + textField($model,'hidden'); ?> + error($model,'hidden'); ?> +
isNewRecord ? 'Create' : 'Save'); ?> diff --git a/web/protected/views/album/_search.php b/web/protected/views/album/_search.php index feb7e59..cd11848 100644 --- a/web/protected/views/album/_search.php +++ b/web/protected/views/album/_search.php @@ -30,6 +30,11 @@ label($model,'description'); ?> textArea($model,'description',array('rows'=>6, 'cols'=>50)); ?>
+ +
+ label($model,'hidden'); ?> + textField($model,'hidden'); ?> +
diff --git a/web/protected/views/album/_view.php b/web/protected/views/album/_view.php index ef3d2bb..a8dc22b 100644 --- a/web/protected/views/album/_view.php +++ b/web/protected/views/album/_view.php @@ -20,6 +20,9 @@ getAttributeLabel('description')); ?>: description); ?>
+getAttributeLabel('hidden')); ?>: + hidden); ?> +
\ No newline at end of file diff --git a/web/protected/views/album/admin.php b/web/protected/views/album/admin.php index a6ba461..63b78ba 100644 --- a/web/protected/views/album/admin.php +++ b/web/protected/views/album/admin.php @@ -49,6 +49,7 @@ or =) at the beginning of each of your search values to specify how the c 'name', 'title', 'description', + 'hidden', array( 'class'=>'CButtonColumn', ), diff --git a/web/protected/views/album/view.php b/web/protected/views/album/view.php index c9f973e..9c4aec7 100644 --- a/web/protected/views/album/view.php +++ b/web/protected/views/album/view.php @@ -25,5 +25,6 @@ $this->menu=array( 'name', 'title', 'description', + 'hidden', ), )); ?> diff --git a/web/protected/views/article/_form.php b/web/protected/views/article/_form.php index 3d8d344..a00923d 100644 --- a/web/protected/views/article/_form.php +++ b/web/protected/views/article/_form.php @@ -56,10 +56,34 @@
+ labelEx($model,'address'); ?> + textArea($model,'address',array('rows'=>6, 'cols'=>50)); ?> + error($model,'address'); ?> +
+ +
+ labelEx($model,'phone'); ?> + textArea($model,'phone',array('rows'=>6, 'cols'=>50)); ?> + error($model,'phone'); ?> +
+ +
labelEx($model,'externalLink'); ?> textArea($model,'externalLink',array('rows'=>6, 'cols'=>50)); ?> error($model,'externalLink'); ?>
+ +
+ labelEx($model,'externalLinkText'); ?> + textArea($model,'externalLinkText',array('rows'=>6, 'cols'=>50)); ?> + error($model,'externalLinkText'); ?> +
+ +
+ labelEx($model,'hidden'); ?> + textField($model,'hidden'); ?> + error($model,'hidden'); ?> +
isNewRecord ? 'Create' : 'Save'); ?> diff --git a/web/protected/views/article/_search.php b/web/protected/views/article/_search.php index 643b81e..0db3a46 100644 --- a/web/protected/views/article/_search.php +++ b/web/protected/views/article/_search.php @@ -47,14 +47,34 @@
+ label($model,'address'); ?> + textArea($model,'address',array('rows'=>6, 'cols'=>50)); ?> +
+ +
+ label($model,'phone'); ?> + textArea($model,'phone',array('rows'=>6, 'cols'=>50)); ?> +
+ +
label($model,'externalLink'); ?> textArea($model,'externalLink',array('rows'=>6, 'cols'=>50)); ?>
+ +
+ label($model,'externalLinkText'); ?> + textArea($model,'externalLinkText',array('rows'=>6, 'cols'=>50)); ?> +
label($model,'dateTime'); ?> textField($model,'dateTime'); ?>
+ +
+ label($model,'hidden'); ?> + textField($model,'hidden'); ?> +
diff --git a/web/protected/views/article/_view.php b/web/protected/views/article/_view.php index 3b92b4f..8c837bf 100644 --- a/web/protected/views/article/_view.php +++ b/web/protected/views/article/_view.php @@ -33,7 +33,7 @@ geoLon); ?>
- getAttributeLabel('externalLink')); ?>: externalLink); ?>
@@ -41,7 +41,10 @@ getAttributeLabel('dateTime')); ?>: dateTime); ?>
+ + getAttributeLabel('hidden')); ?>: + hidden); ?> +
- */ ?> - +
\ No newline at end of file diff --git a/web/protected/views/article/addMax.php b/web/protected/views/article/addMax.php new file mode 100644 index 0000000..6a0a3ac --- /dev/null +++ b/web/protected/views/article/addMax.php @@ -0,0 +1,74 @@ +breadcrumbs=array( + 'Articles'=>array('index'), + 'Create', +); +?> + +

Добавить статью

+ +
+ +beginWidget('CActiveForm', array( + 'id'=>'article-form', + // Please note: When you enable ajax validation, make sure the corresponding + // controller action is handling ajax validation correctly. + // There is a call to performAjaxValidation() commented in generated controller code. + // See class documentation of CActiveForm for details on this. + 'enableAjaxValidation'=>false, +)); ?> + +

Fields with * are required.

+ + errorSummary($model); ?> + +
+

Введите название вашей статьи на русском языке*

+ textArea($model,'titleRu',array('rows'=>6, 'cols'=>50)); ?> + error($model,'titleRu'); ?> +
+ +
+

Введите название вашей статьи на английском языке. Если вы не можете заполнить это поле, оставьте его пустым.

+ textArea($model,'titleEn',array('rows'=>6, 'cols'=>50)); ?> + error($model,'titleEn'); ?> +
+ +
+

Введите название вашей статьи на китайском языке. Если вы не можете заполнить это поле, оставьте его пустым.

+ textArea($model,'titleZh',array('rows'=>6, 'cols'=>50)); ?> + error($model,'titleZh'); ?> +
+ +
+

Введите текст вашей статьи на русском языке*

+ textArea($model,'contentRu',array('rows'=>6, 'cols'=>50)); ?> + error($model,'contentRu'); ?> +
+ +
+

Введите текст вашей статьи на английском языке. Если вы не можете заполнить это поле, оставьте его пустым.

+ textArea($model,'contentEn',array('rows'=>6, 'cols'=>50)); ?> + error($model,'contentEn'); ?> +
+ +
+

Введите текст вашей статьи на китайском языке. Если вы не можете заполнить это поле, оставьте его пустым.

+ textArea($model,'contentZh',array('rows'=>6, 'cols'=>50)); ?> + error($model,'contentZh'); ?> +
+ +
+

Введите ссылку на вашу веб-страницу.

+ textArea($model,'externalLink',array('rows'=>6, 'cols'=>50)); ?> + error($model,'externalLink'); ?> +
+ +
+ +
+ +endWidget(); ?> \ No newline at end of file diff --git a/web/protected/views/article/editMax.php b/web/protected/views/article/editMax.php new file mode 100644 index 0000000..0505e65 --- /dev/null +++ b/web/protected/views/article/editMax.php @@ -0,0 +1,76 @@ +breadcrumbs=array( + 'Articles'=>array('index'), + 'Create', +); +?> + +

Редактировать статью

+ +
+ +beginWidget('CActiveForm', array( + 'id'=>'article-form', + // Please note: When you enable ajax validation, make sure the corresponding + // controller action is handling ajax validation correctly. + // There is a call to performAjaxValidation() commented in generated controller code. + // See class documentation of CActiveForm for details on this. + 'enableAjaxValidation'=>false, +)); ?> + +

Fields with * are required.

+ + errorSummary($model); ?> + + hiddenField($model,'name'); ?> + +
+

Введите название вашей статьи на русском языке*

+ textArea($model,'titleRu',array('rows'=>6, 'cols'=>50)); ?> + error($model,'titleRu'); ?> +
+ +
+

Введите название вашей статьи на английском языке. Если вы не можете заполнить это поле, оставьте его пустым.

+ textArea($model,'titleEn',array('rows'=>6, 'cols'=>50)); ?> + error($model,'titleEn'); ?> +
+ +
+

Введите название вашей статьи на китайском языке. Если вы не можете заполнить это поле, оставьте его пустым.

+ textArea($model,'titleZh',array('rows'=>6, 'cols'=>50)); ?> + error($model,'titleZh'); ?> +
+ +
+

Введите текст вашей статьи на русском языке*

+ textArea($model,'contentRu',array('rows'=>6, 'cols'=>50)); ?> + error($model,'contentRu'); ?> +
+ +
+

Введите текст вашей статьи на английском языке. Если вы не можете заполнить это поле, оставьте его пустым.

+ textArea($model,'contentEn',array('rows'=>6, 'cols'=>50)); ?> + error($model,'contentEn'); ?> +
+ +
+

Введите текст вашей статьи на китайском языке. Если вы не можете заполнить это поле, оставьте его пустым.

+ textArea($model,'contentZh',array('rows'=>6, 'cols'=>50)); ?> + error($model,'contentZh'); ?> +
+ +
+

Введите ссылку на вашу веб-страницу.

+ textArea($model,'externalLink',array('rows'=>6, 'cols'=>50)); ?> + error($model,'externalLink'); ?> +
+ +
+ +
+ +endWidget(); ?> \ No newline at end of file diff --git a/web/protected/views/article/editPhotosMax.php b/web/protected/views/article/editPhotosMax.php new file mode 100644 index 0000000..9bbfa39 --- /dev/null +++ b/web/protected/views/article/editPhotosMax.php @@ -0,0 +1,12 @@ +breadcrumbs=array( + 'Articles'=>array('index'), + 'Create', +); +?> + +

Редактировать альбомы

+ diff --git a/web/protected/views/article/view.php b/web/protected/views/article/view.php index 111d49f..1577cf6 100644 --- a/web/protected/views/article/view.php +++ b/web/protected/views/article/view.php @@ -2,33 +2,39 @@ /* @var $this ArticleController */ /* @var $model Article */ -$this->breadcrumbs=array( - 'Articles'=>array('index'), - $model->name, +$this->breadcrumbs = array( + 'Articles' => array('index'), + $model->name, ); -$this->menu=array( - array('label'=>'List Article', 'url'=>array('index')), - array('label'=>'Create Article', 'url'=>array('create')), - array('label'=>'Update Article', 'url'=>array('update', 'id'=>$model->id)), - array('label'=>'Delete Article', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->id),'confirm'=>'Are you sure you want to delete this item?')), - array('label'=>'Manage Article', 'url'=>array('admin')), +$this->menu = array( + array('label' => 'List Article', 'url' => array('index')), + array('label' => 'Create Article', 'url' => array('create')), + array('label' => 'Update Article', 'url' => array('update', 'id' => $model->id)), + array('label' => 'Delete Article', 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $model->id), 'confirm' => 'Are you sure you want to delete this item?')), + array('label' => 'Manage Article', 'url' => array('admin')), ); ?>

View Article #id; ?>

-widget('zii.widgets.CDetailView', array( - 'data'=>$model, - 'attributes'=>array( - 'id', - 'name', - 'type', - 'title', - 'content', - 'geoLat', - 'geoLon', - 'externalLink', - 'dateTime', - ), -)); ?> +widget('zii.widgets.CDetailView', array( + 'data' => $model, + 'attributes' => array( + 'id', + 'name', + 'type', + 'title', + 'content', + 'geoLat', + 'geoLon', + 'address', + 'phone', + 'externalLink', + 'externalLinkText', + 'dateTime', + 'hidden', + ), +)); +?> diff --git a/web/protected/views/channel/_form.php b/web/protected/views/channel/_form.php index ff5c916..153d9df 100644 --- a/web/protected/views/channel/_form.php +++ b/web/protected/views/channel/_form.php @@ -36,6 +36,12 @@ textArea($model,'description',array('rows'=>6, 'cols'=>50)); ?> error($model,'description'); ?>
+ +
+ labelEx($model,'hidden'); ?> + textField($model,'hidden'); ?> + error($model,'hidden'); ?> +
isNewRecord ? 'Create' : 'Save'); ?> diff --git a/web/protected/views/channel/_search.php b/web/protected/views/channel/_search.php index 1a522e7..4678d24 100644 --- a/web/protected/views/channel/_search.php +++ b/web/protected/views/channel/_search.php @@ -30,6 +30,12 @@ label($model,'description'); ?> textArea($model,'description',array('rows'=>6, 'cols'=>50)); ?>
+ +
+ label($model,'hidden'); ?> + textField($model,'hidden'); ?> +
+
diff --git a/web/protected/views/channel/_view.php b/web/protected/views/channel/_view.php index d2373f3..d8dfa5c 100644 --- a/web/protected/views/channel/_view.php +++ b/web/protected/views/channel/_view.php @@ -20,6 +20,10 @@ getAttributeLabel('description')); ?>: description); ?>
+ + getAttributeLabel('hidden')); ?>: + hidden); ?> +
\ No newline at end of file diff --git a/web/protected/views/channel/admin.php b/web/protected/views/channel/admin.php index a6caafb..3d991f2 100644 --- a/web/protected/views/channel/admin.php +++ b/web/protected/views/channel/admin.php @@ -49,6 +49,7 @@ or =) at the beginning of each of your search values to specify how the c 'name', 'title', 'description', + 'hidden', array( 'class'=>'CButtonColumn', ), diff --git a/web/protected/views/channel/view.php b/web/protected/views/channel/view.php index db4ad03..7932432 100644 --- a/web/protected/views/channel/view.php +++ b/web/protected/views/channel/view.php @@ -25,5 +25,6 @@ $this->menu=array( 'name', 'title', 'description', + 'hidden', ), )); ?> diff --git a/web/protected/views/journal/_form.php b/web/protected/views/journal/_form.php index 564718c..647695e 100644 --- a/web/protected/views/journal/_form.php +++ b/web/protected/views/journal/_form.php @@ -36,6 +36,24 @@ textArea($model,'description',array('rows'=>6, 'cols'=>50)); ?> error($model,'description'); ?>
+ +
+ labelEx($model,'hidden'); ?> + textField($model,'hidden'); ?> + error($model,'hidden'); ?> +
+ +
+ labelEx($model,'geoCategory'); ?> + textField($model,'geoCategory'); ?> + error($model,'geoCategory'); ?> +
+ +
+ labelEx($model,'main'); ?> + textField($model,'main'); ?> + error($model,'main'); ?> +
isNewRecord ? 'Create' : 'Save'); ?> diff --git a/web/protected/views/journal/_search.php b/web/protected/views/journal/_search.php index 31086b4..c351607 100644 --- a/web/protected/views/journal/_search.php +++ b/web/protected/views/journal/_search.php @@ -30,6 +30,20 @@ label($model,'description'); ?> textArea($model,'description',array('rows'=>6, 'cols'=>50)); ?>
+ +
+ label($model,'hidden'); ?> + textField($model,'hidden'); ?> +
+ +
+ label($model,'geoCategory'); ?> + textField($model,'geoCategory'); ?> +
+
+ label($model,'main'); ?> + textField($model,'main'); ?> +
diff --git a/web/protected/views/journal/_view.php b/web/protected/views/journal/_view.php index cd72fb5..12251bc 100644 --- a/web/protected/views/journal/_view.php +++ b/web/protected/views/journal/_view.php @@ -20,6 +20,19 @@ getAttributeLabel('description')); ?>: description); ?>
+ + + getAttributeLabel('hidden')); ?>: + hidden); ?> +
+ + getAttributeLabel('geoCategory')); ?>: + geoCategory); ?> +
+ getAttributeLabel('main')); ?>: + main); ?> +
+
\ No newline at end of file diff --git a/web/protected/views/journal/addMax.php b/web/protected/views/journal/addMax.php new file mode 100644 index 0000000..68b1d30 --- /dev/null +++ b/web/protected/views/journal/addMax.php @@ -0,0 +1,65 @@ +breadcrumbs=array( + 'Journals'=>array('index'), + 'Create', +); +?> + +

Создать ваш раздел

+ +
+ +beginWidget('CActiveForm', array( + 'id'=>'journalAddMax-form', + // Please note: When you enable ajax validation, make sure the corresponding + // controller action is handling ajax validation correctly. + // There is a call to performAjaxValidation() commented in generated controller code. + // See class documentation of CActiveForm for details on this. + 'enableAjaxValidation'=>false, +)); ?> + +

Поля, отмеченные * обязательны.

+ + errorSummary($model); ?> + + +
+

Введите название вашего раздела на русском языке*

+ textArea($model,'titleRu',array('rows'=>6, 'cols'=>50)); ?> + error($model,'titleRu'); ?> +
+
+

Введите название вашего раздела на английском языке. Если вы не можете заполнить это поле, оставьте его пустым.

+ textArea($model,'titleEn',array('rows'=>6, 'cols'=>50)); ?> + error($model,'titleEn'); ?> +
+
+

Введите название вашего раздела на китайском языке. Если вы не можете заполнить это поле, оставьте его пустым.

+ textArea($model,'titleZh',array('rows'=>6, 'cols'=>50)); ?> + error($model,'titleZh'); ?> +
+ +
+

Введите описание вашего раздела на русском языке. Если не знаете что написать, напишите сюда то же самое, что и в поле "название"*

+ textArea($model,'descriptionRu',array('rows'=>6, 'cols'=>50)); ?> + error($model,'descriptionRu'); ?> +
+
+

Введите описание вашего раздела на английском языке. Если вы не можете заполнить это поле, оставьте его пустым.

+ textArea($model,'descriptionEn',array('rows'=>6, 'cols'=>50)); ?> + error($model,'descriptionEn'); ?> +
+
+

Введите описание вашего раздела на китайском языке. Если вы не можете заполнить это поле, оставьте его пустым.

+ textArea($model,'descriptionZh',array('rows'=>6, 'cols'=>50)); ?> + error($model,'descriptionZh'); ?> +
+ +
+ +
+ +endWidget(); ?> \ No newline at end of file diff --git a/web/protected/views/journal/admin.php b/web/protected/views/journal/admin.php index c138180..9aeb250 100644 --- a/web/protected/views/journal/admin.php +++ b/web/protected/views/journal/admin.php @@ -49,6 +49,10 @@ or =) at the beginning of each of your search values to specify how the c 'name', 'title', 'description', + 'hidden', + + 'geoCategory', + 'main', array( 'class'=>'CButtonColumn', ), diff --git a/web/protected/views/journal/editArticlesMax.php b/web/protected/views/journal/editArticlesMax.php new file mode 100644 index 0000000..c7373c3 --- /dev/null +++ b/web/protected/views/journal/editArticlesMax.php @@ -0,0 +1,20 @@ +breadcrumbs=array( + 'Journals'=>array('index'), + 'Create', +); +?> + +

Статьи в вашем разделе

+ +

'btn_registro')*/); ?>

+ +' . $article->title . ' ' . CHtml::link('Редактировать',array('article/editMax', 'id' => $article->id)) . '

'; +} \ No newline at end of file diff --git a/web/protected/views/journal/editMax.php b/web/protected/views/journal/editMax.php new file mode 100644 index 0000000..707d43d --- /dev/null +++ b/web/protected/views/journal/editMax.php @@ -0,0 +1,65 @@ +breadcrumbs=array( + 'Journals'=>array('index'), + 'Create', +); +?> + +

Редактировать ваш раздел

+ +
+ +beginWidget('CActiveForm', array( + 'id'=>'journalAddMax-form', + // Please note: When you enable ajax validation, make sure the corresponding + // controller action is handling ajax validation correctly. + // There is a call to performAjaxValidation() commented in generated controller code. + // See class documentation of CActiveForm for details on this. + 'enableAjaxValidation'=>false, +)); ?> + +

Поля, отмеченные * обязательны.

+ + errorSummary($model); ?> + + +
+

Введите название вашего раздела на русском языке*

+ textArea($model,'titleRu',array('rows'=>6, 'cols'=>50)); ?> + error($model,'titleRu'); ?> +
+
+

Введите название вашего раздела на английском языке. Если вы не можете заполнить это поле, оставьте его пустым.

+ textArea($model,'titleEn',array('rows'=>6, 'cols'=>50)); ?> + error($model,'titleEn'); ?> +
+
+

Введите название вашего раздела на китайском языке. Если вы не можете заполнить это поле, оставьте его пустым.

+ textArea($model,'titleZh',array('rows'=>6, 'cols'=>50)); ?> + error($model,'titleZh'); ?> +
+ +
+

Введите описание вашего раздела на русском языке. Если не знаете что написать, напишите сюда то же самое, что и в поле "название"*

+ textArea($model,'descriptionRu',array('rows'=>6, 'cols'=>50)); ?> + error($model,'descriptionRu'); ?> +
+
+

Введите описание вашего раздела на английском языке. Если вы не можете заполнить это поле, оставьте его пустым.

+ textArea($model,'descriptionEn',array('rows'=>6, 'cols'=>50)); ?> + error($model,'descriptionEn'); ?> +
+
+

Введите описание вашего раздела на китайском языке. Если вы не можете заполнить это поле, оставьте его пустым.

+ textArea($model,'descriptionZh',array('rows'=>6, 'cols'=>50)); ?> + error($model,'descriptionZh'); ?> +
+ +
+ +
+ +endWidget(); ?> \ No newline at end of file diff --git a/web/protected/views/journal/view.php b/web/protected/views/journal/view.php index f601432..acbea58 100644 --- a/web/protected/views/journal/view.php +++ b/web/protected/views/journal/view.php @@ -25,5 +25,8 @@ $this->menu=array( 'name', 'title', 'description', + 'hidden', + 'geoCategory', + 'main' ), )); ?> diff --git a/web/protected/views/layouts/main.php b/web/protected/views/layouts/main.php index 1e03208..bc45ec6 100644 --- a/web/protected/views/layouts/main.php +++ b/web/protected/views/layouts/main.php @@ -29,12 +29,12 @@ diff --git a/web/protected/views/site/contact.php b/web/protected/views/site/contact.php index baad25e..82a62ae 100644 --- a/web/protected/views/site/contact.php +++ b/web/protected/views/site/contact.php @@ -9,77 +9,10 @@ $this->breadcrumbs=array( ); ?> -

Contact Us

+

Контакты

-user->hasFlash('contact')): ?> -
- user->getFlash('contact'); ?> -
- - - -

-If you have business inquiries or other questions, please fill out the following form to contact us. Thank you. -

- -
- -beginWidget('CActiveForm', array( - 'id'=>'contact-form', - 'enableClientValidation'=>true, - 'clientOptions'=>array( - 'validateOnSubmit'=>true, - ), -)); ?> - -

Fields with * are required.

- - errorSummary($model); ?> - -
- labelEx($model,'name'); ?> - textField($model,'name'); ?> - error($model,'name'); ?> -
- -
- labelEx($model,'email'); ?> - textField($model,'email'); ?> - error($model,'email'); ?> -
- -
- labelEx($model,'subject'); ?> - textField($model,'subject',array('size'=>60,'maxlength'=>128)); ?> - error($model,'subject'); ?> -
- -
- labelEx($model,'body'); ?> - textArea($model,'body',array('rows'=>6, 'cols'=>50)); ?> - error($model,'body'); ?> -
- - -
- labelEx($model,'verifyCode'); ?> -
- widget('CCaptcha'); ?> - textField($model,'verifyCode'); ?> -
-
Please enter the letters as they are shown in the image above. -
Letters are not case-sensitive.
- error($model,'verifyCode'); ?> -
- - -
- -
- -endWidget(); ?> - -
- - \ No newline at end of file +

Владислав Хорев, разработчик

+

+79260492730

+

http://vk.com/id677718

+

slava_rik@mail.ru

diff --git a/web/protected/views/site/index.php b/web/protected/views/site/index.php index 4bbf427..9cd01d8 100644 --- a/web/protected/views/site/index.php +++ b/web/protected/views/site/index.php @@ -2,34 +2,53 @@ /* @var $this SiteController */ $this->pageTitle = Yii::app()->name; - ?> -

Welcome home

- -Управление базой данных +user->isGuest) { -$this->widget('zii.widgets.CMenu',array( - 'items'=>array( - array('label' => 'Photo', 'url' => array('photo/admin')), - array('label' => 'Album', 'url' => array('album/admin')), - array('label' => 'Manage Photo in Album', 'url' => array('photoAlbumRelation/admin')), - array('label' => 'Video', 'url' => array('video/admin')), - array('label' => 'Channel', 'url' => array('channel/admin')), - array('label' => 'Manage Video in Channel', 'url' => array('videoChannelRelation/admin')), - array('label' => 'Article', 'url' => array('article/admin')), - array('label' => 'Manage Album in Article', 'url' => array('albumArticleRelation/admin')), - array('label' => 'Manage Channel in Article', 'url' => array('channelArticleRelation/admin')), - array('label' => 'Journal', 'url' => array('journal/admin')), - array('label' => 'Manage Article in Journal', 'url' => array('articleJournalRelation/admin')), - array('label' => 'Translation', 'url' => array('translation/admin')), - ), - )); - - + $this->widget('zii.widgets.CMenu', array( + 'items' => array( + array('label' => 'Photo', 'url' => array('photo/admin')), + array('label' => 'Album', 'url' => array('album/admin')), + array('label' => 'Manage Photo in Album', 'url' => array('photoAlbumRelation/admin')), + array('label' => 'Video', 'url' => array('video/admin')), + array('label' => 'Channel', 'url' => array('channel/admin')), + array('label' => 'Manage Video in Channel', 'url' => array('videoChannelRelation/admin')), + array('label' => 'Article', 'url' => array('article/admin')), + array('label' => 'Manage Album in Article', 'url' => array('albumArticleRelation/admin')), + array('label' => 'Manage Channel in Article', 'url' => array('channelArticleRelation/admin')), + array('label' => 'Journal', 'url' => array('journal/admin')), + array('label' => 'Manage Article in Journal', 'url' => array('articleJournalRelation/admin')), + array('label' => 'Translation', 'url' => array('translation/admin')), + ), + )); + + + if (Journal::getCurrentUserJournal()) + { + $this->widget('zii.widgets.CMenu', array( + 'items' => array( + array('label' => 'Редактировать ваш раздел', 'url' => array('journal/editMax')), + array('label' => 'Редактировать статьи в разделе', 'url' => array('journal/editArticlesMax')), + ), + )); + } + else + { + + $this->widget('zii.widgets.CMenu', array( + 'items' => array( + array('label' => 'Добавить ваш раздел', 'url' => array('journal/addMax')), + ), + )); + } } - - - ?> + +else +{ + echo "Войдите в систему для управления базой данных."; +} +?> diff --git a/web/protected/views/site/login.php b/web/protected/views/site/login.php index 3c16748..e67f6a7 100644 --- a/web/protected/views/site/login.php +++ b/web/protected/views/site/login.php @@ -9,9 +9,9 @@ $this->breadcrumbs=array( ); ?> -

Login

+

Вход

-

Please fill out the following form with your login credentials:

+

Введите логин и пароль:

beginWidget('CActiveForm', array( @@ -22,7 +22,7 @@ $this->breadcrumbs=array( ), )); ?> -

Fields with * are required.

+

Поля, отмеченные * обязательны.

labelEx($model,'username'); ?> @@ -34,9 +34,6 @@ $this->breadcrumbs=array( labelEx($model,'password'); ?> passwordField($model,'password'); ?> error($model,'password'); ?> -

- Hint: You may login with demo/demo or admin/admin. -

diff --git a/web/protected/views/site/pages/about.php b/web/protected/views/site/pages/about.php index d8aa3c5..711e82a 100644 --- a/web/protected/views/site/pages/about.php +++ b/web/protected/views/site/pages/about.php @@ -6,7 +6,6 @@ $this->breadcrumbs=array( 'About', ); ?> -

About

+

О базе данных

-

This is a "static" page. You may change the content of this page -by updating the file .

+

Это база данных для мобильного приложения BashGID App, которое будет презентовано на саммите ШОС БРИКС.

diff --git a/web/protected/views/site/register.php b/web/protected/views/site/register.php index e01c17e..11a240d 100644 --- a/web/protected/views/site/register.php +++ b/web/protected/views/site/register.php @@ -16,13 +16,13 @@ $this->pageTitle=Yii::t('app', Yii::app()->name) . ' - ' . Yii::t('app', 'Regist // you need to use the performAjaxValidation()-method described there. 'enableAjaxValidation'=>false, )); ?> -

+

Регистрация

-

+

Введите данные для регистрации

-

'*'))?>

+

Поля, отмеченные * обязательны.

- errorSummary($model, Yii::t('app', 'Please, fix following errors:')); ?> + errorSummary($model, 'Исправьте ошибки:'); ?>
labelEx($model,'username'); ?> diff --git a/web/protected/views/translation/_view.php b/web/protected/views/translation/_view.php index 43ef113..ff7249f 100644 --- a/web/protected/views/translation/_view.php +++ b/web/protected/views/translation/_view.php @@ -25,5 +25,16 @@ textZh); ?>
+ getAttributeLabel('textEnUp')); ?>: + textEnUp); ?> +
+ + getAttributeLabel('textRuUp')); ?>: + textRuUp); ?> +
+ + getAttributeLabel('textZhUp')); ?>: + textZhUp); ?> +
\ No newline at end of file diff --git a/web/protected/views/translation/view.php b/web/protected/views/translation/view.php index 17539e8..c55bb54 100644 --- a/web/protected/views/translation/view.php +++ b/web/protected/views/translation/view.php @@ -26,5 +26,8 @@ $this->menu=array( 'textEn', 'textRu', 'textZh', + 'textEnUp', + 'textRuUp', + 'textZhUp', ), )); ?> diff --git a/web/protected/views/videoChannelRelation/_form.php b/web/protected/views/videoChannelRelation/_form.php index 6c10a26..2c27703 100644 --- a/web/protected/views/videoChannelRelation/_form.php +++ b/web/protected/views/videoChannelRelation/_form.php @@ -19,12 +19,6 @@ errorSummary($model); ?> -
- labelEx($model,'id'); ?> - textField($model,'id'); ?> - error($model,'id'); ?> -
-
labelEx($model,'videoUrl'); ?> textArea($model,'videoUrl',array('rows'=>6, 'cols'=>50)); ?> diff --git a/web/protected/views/videoChannelRelation/_search.php b/web/protected/views/videoChannelRelation/_search.php index 66b21c2..5b6e097 100644 --- a/web/protected/views/videoChannelRelation/_search.php +++ b/web/protected/views/videoChannelRelation/_search.php @@ -25,6 +25,7 @@ label($model,'name'); ?> textArea($model,'name',array('rows'=>6, 'cols'=>50)); ?>
+
diff --git a/web/protected/views/videoChannelRelation/_view.php b/web/protected/views/videoChannelRelation/_view.php index 88c440a..d14058d 100644 --- a/web/protected/views/videoChannelRelation/_view.php +++ b/web/protected/views/videoChannelRelation/_view.php @@ -17,5 +17,4 @@ name); ?>
-
\ No newline at end of file