From 830b830358cef5da63045438977450a995829a7d Mon Sep 17 00:00:00 2001 From: Vladislav Khorev Date: Wed, 26 Nov 2014 20:18:59 +0000 Subject: [PATCH] Added dictionary search --- yii/protected/config/main.php | 2 +- yii/protected/controllers/SiteController.php | 25 ++ yii/protected/messages/cn/app.php | 6 + yii/protected/messages/en/app.php | 38 ++ yii/protected/messages/en/dict.php | 24 ++ yii/protected/messages/ru/app.php | 3 + yii/protected/messages/ru/dict.php | 24 ++ yii/protected/models/DictionaryForm.php | 69 ++++ yii/protected/runtime/application.log | 382 ++++++++++++++++++ yii/protected/runtime/state.bin | 1 + yii/protected/views/layouts/main.php | 1 + .../views/site/_dictionaryResultView.php | 25 ++ yii/protected/views/site/dictionary.php | 30 ++ yii/protected/views/site/dictionaryResult.php | 32 ++ 14 files changed, 661 insertions(+), 1 deletion(-) create mode 100644 yii/protected/messages/en/app.php create mode 100644 yii/protected/messages/en/dict.php create mode 100644 yii/protected/messages/ru/dict.php create mode 100644 yii/protected/models/DictionaryForm.php create mode 100644 yii/protected/runtime/state.bin create mode 100644 yii/protected/views/site/_dictionaryResultView.php create mode 100644 yii/protected/views/site/dictionary.php create mode 100644 yii/protected/views/site/dictionaryResult.php diff --git a/yii/protected/config/main.php b/yii/protected/config/main.php index 48249d6..9c4788b 100644 --- a/yii/protected/config/main.php +++ b/yii/protected/config/main.php @@ -8,7 +8,7 @@ return array( 'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..', 'name'=>'Hello China!', - 'sourceLanguage'=>'en', + 'sourceLanguage'=>'00', 'language'=>'en', 'timeZone' => 'Europe/Moscow', 'behaviors' => array('ApplicationConfigBehavior'), diff --git a/yii/protected/controllers/SiteController.php b/yii/protected/controllers/SiteController.php index 63c06a3..d8a2410 100644 --- a/yii/protected/controllers/SiteController.php +++ b/yii/protected/controllers/SiteController.php @@ -49,6 +49,31 @@ class SiteController extends Controller )); } + + /** + * This is the action to handle external exceptions. + */ + public function actionDictionary() + { + $model = new DictionaryForm; + + // collect user input data + if(isset($_POST['DictionaryForm'])) + { + $model->attributes=$_POST['DictionaryForm']; + + $model->getResponse(); + + if ($model->serverIsWorking) + { + $this->render('dictionaryResult',array('model'=>$model)); + + return; + } + } + + $this->render('dictionary',array('model'=>$model)); + } /** * This is the action to handle external exceptions. diff --git a/yii/protected/messages/cn/app.php b/yii/protected/messages/cn/app.php index f9f6451..bf6b9b5 100644 --- a/yii/protected/messages/cn/app.php +++ b/yii/protected/messages/cn/app.php @@ -31,5 +31,11 @@ return array( 'Posted by: ' => '作者: ', 'Published at: ' => '发表于: ', 'Hello China!' => '你好,中国!', + + 'Dictionary' => '词典', + 'Please enter request:' => '请输入要求:', + 'Search' => '搜索', + + ); ?> \ No newline at end of file diff --git a/yii/protected/messages/en/app.php b/yii/protected/messages/en/app.php new file mode 100644 index 0000000..400c339 --- /dev/null +++ b/yii/protected/messages/en/app.php @@ -0,0 +1,38 @@ + 'Main', + 'About journal' => 'About journal', + 'Add post' => 'Add post', + 'Login' => 'Login', + 'Register' => 'Register', + 'Logout' => 'Logout', + 'All rights reserved.' => 'All rights reserved.', + 'New posts' => 'New posts', + 'Fields with {*} are required.' => 'Fields with {*} are required.', + 'Please, fix following errors:' => 'Please, fix following errors:', + 'Please fill out the following form with your login credentials:' => 'Please fill out the following form with your login credentials:', + 'Field should not be blank' => 'Field should not be blank', + 'Line is too long' => 'Line is too long', + 'Login or password is incorrect' => 'Login or password is incorrect', + 'Username:' => 'Username:', + 'Password:' => 'Password:', + 'Remember me' => 'Remember me', + 'Please fill out the registation form' => 'Please fill out the registation form', + 'Email address is not correct' => 'Email address is not correct', + 'Confirmation code is not correct' => 'Confirmation code is not correct', + 'User {attribute} is already registered in system' => 'User {attribute} is already registered in system', + 'Email:' => 'Email:', + 'Confirmation code:' => 'Confirmation code:', + 'Image must be jpg, gif or png, and its size should not exceed 8 megabytes' => 'Image must be jpg, gif or png, and its size should not exceed 8 megabytes', + 'Title:' => 'Title:', + 'Text:' => 'Text:', + 'Image:' => 'Image:', + 'Send' => 'Send', + 'Posted by: ' => 'Posted by: ', + 'Published at: ' => 'Published at: ', + 'Hello China!' => 'Hello China!', + 'Dictionary' => 'Dictionary', + 'Please enter request:' => 'Please enter request:', + 'Search' => 'Search', + ); +?> \ No newline at end of file diff --git a/yii/protected/messages/en/dict.php b/yii/protected/messages/en/dict.php new file mode 100644 index 0000000..3b2095d --- /dev/null +++ b/yii/protected/messages/en/dict.php @@ -0,0 +1,24 @@ + 'Most likely, original word is {nounNominative}', + + 'Nominative case' => 'This word is in nominative case. I am {noun}', + + 'Genitive case' => 'This word is in genitive case. I am near {noun}', + + 'Dative case' => 'This word is in dative case. I give gift to {noun}', + + 'Accusative case' => 'This word is in accusative case. I don\'t disturb {noun}', + + 'Instrumental case' => 'This word is in instrumental case. I am with {noun}', + + 'Prepositional case' => 'This word is in prepositional case. I talk about {noun}', + + + 'Singular form' => 'This word is in singular form. One ', + + 'Plural form' => 'This word is in plural form. Many ', + + '{n} records found.' => '{n} records found.', + ); +?> \ No newline at end of file diff --git a/yii/protected/messages/ru/app.php b/yii/protected/messages/ru/app.php index 6fd004c..3d6b655 100644 --- a/yii/protected/messages/ru/app.php +++ b/yii/protected/messages/ru/app.php @@ -31,5 +31,8 @@ return array( 'Posted by: ' => 'Автор поста: ', 'Published at: ' => 'Опубликовано: ', 'Hello China!' => 'Привет, Китай!', + 'Dictionary' => 'Словарь', + 'Please enter request:' => 'Пожалуйста, введите запрос:', + 'Search' => 'Поиск', ); ?> \ No newline at end of file diff --git a/yii/protected/messages/ru/dict.php b/yii/protected/messages/ru/dict.php new file mode 100644 index 0000000..301837f --- /dev/null +++ b/yii/protected/messages/ru/dict.php @@ -0,0 +1,24 @@ +{nounNominative}' => 'Скорее всего, это слово {nounNominative}', + + 'Nominative case' => 'Это слово в именительном падеже. Я - {noun}', + + 'Genitive case' => 'Это слово в родительном падеже. Я возле {noun}', + + 'Dative case' => 'Это слово в дательном падеже. Я дарю подарок {noun}', + + 'Accusative case' => 'Это слово в винительном падеже. Я не трогаю {noun}', + + 'Instrumental case' => 'Это слово в творительном падеже. Я с {noun}', + + 'Prepositional case' => 'Это слово в предложном падеже. Я разговариваю о {noun}', + + 'Singular form' => 'Это слово в единственном числе.', + + 'Plural form' => 'Это слово в множественном числе.', + + '{n} records found.' => 'Найдено: {n} записей.', + + ); +?> \ No newline at end of file diff --git a/yii/protected/models/DictionaryForm.php b/yii/protected/models/DictionaryForm.php new file mode 100644 index 0000000..de2719a --- /dev/null +++ b/yii/protected/models/DictionaryForm.php @@ -0,0 +1,69 @@ +'{attribute} ' . Yii::t('app', 'Field should not be blank')), + + ); + } + + function attributeLabels(){ + return array( + 'request' => Yii::t('app', 'Please enter request:'), + ); + } + + public function getResponse() + { + $this->serverIsWorking = false; + $this->response = false; + + try + { + set_error_handler(function() { /* ignore errors */ }); + $this->jsonString = file_get_contents('http://localhost:8843/' . $this->request); + $this->response = json_decode($this->jsonString, true); + restore_error_handler(); + + if ($this->jsonString) + { + $this->serverIsWorking = true; + } + } + catch(Exception $ex) + { + $this->serverIsWorking = false; + } + + $this->serverIsWorking = true; + } + + public function resultCount() + { + return count($this->response['nouns']); + } + + public function getDataProvider() + { + $dataProvider=new CArrayDataProvider($this->response['nouns'], array( + 'id'=>'dictionaryResultDataProvider', + 'pagination'=>array( + 'pageSize'=>10, + ), + )); + + return $dataProvider; + } +} diff --git a/yii/protected/runtime/application.log b/yii/protected/runtime/application.log index 31b5686..0938f96 100644 --- a/yii/protected/runtime/application.log +++ b/yii/protected/runtime/application.log @@ -661,3 +661,385 @@ Stack trace: #4 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() #5 C:\Workplace\Apache2.4\htdocs\cj\index.php(19): CWebApplication->run() REQUEST_URI=/cj/index.php?r=site/index +2014/11/26 19:09:51 [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(346): CUrlManager->createPathInfo() +#1 C:\Workplace\yii1.1.15\framework\web\CUrlManager.php(310): CUrlManager->createUrlDefault() +#2 C:\Workplace\yii1.1.15\framework\base\CApplication.php(543): CUrlManager->createUrl() +#3 C:\Workplace\yii1.1.15\framework\web\CController.php(967): CWebApplication->createUrl() +#4 C:\Workplace\yii1.1.15\framework\web\CController.php(1028): SiteController->createUrl() +#5 C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php(69): SiteController->redirect() +#6 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): SiteController->actionDictionary() +#7 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams() +#8 C:\Workplace\yii1.1.15\framework\web\CController.php(286): SiteController->runAction() +#9 C:\Workplace\yii1.1.15\framework\web\CController.php(265): SiteController->runActionWithFilters() +#10 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): SiteController->run() +#11 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(141): CWebApplication->runController() +#12 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() +#13 C:\Workplace\Apache2.4\htdocs\cj\index.php(25): CWebApplication->run() +REQUEST_URI=/cj/index.php?r=site/dictionary +2014/11/26 19:11:03 [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(346): CUrlManager->createPathInfo() +#1 C:\Workplace\yii1.1.15\framework\web\CUrlManager.php(310): CUrlManager->createUrlDefault() +#2 C:\Workplace\yii1.1.15\framework\base\CApplication.php(543): CUrlManager->createUrl() +#3 C:\Workplace\yii1.1.15\framework\web\CController.php(967): CWebApplication->createUrl() +#4 C:\Workplace\yii1.1.15\framework\web\CController.php(1028): SiteController->createUrl() +#5 C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php(69): SiteController->redirect() +#6 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): SiteController->actionDictionary() +#7 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams() +#8 C:\Workplace\yii1.1.15\framework\web\CController.php(286): SiteController->runAction() +#9 C:\Workplace\yii1.1.15\framework\web\CController.php(265): SiteController->runActionWithFilters() +#10 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): SiteController->run() +#11 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(141): CWebApplication->runController() +#12 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() +#13 C:\Workplace\Apache2.4\htdocs\cj\index.php(25): CWebApplication->run() +REQUEST_URI=/cj/index.php?r=site/dictionary +2014/11/26 19:16:10 [error] [php] file_get_contents(http://localhost:8843/бараны): failed to open stream: HTTP request failed! HTTP/1.0 500 Internal Server Error + (C:\Workplace\Apache2.4\htdocs\cj\protected\models\DictionaryForm.php:37) +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): SiteController->actionDictionary() +#1 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams() +#2 C:\Workplace\yii1.1.15\framework\web\CController.php(286): SiteController->runAction() +#3 C:\Workplace\yii1.1.15\framework\web\CController.php(265): SiteController->runActionWithFilters() +#4 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): SiteController->run() +#5 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(141): CWebApplication->runController() +#6 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() +#7 C:\Workplace\Apache2.4\htdocs\cj\index.php(25): CWebApplication->run() +REQUEST_URI=/cj/index.php?r=site/dictionary +2014/11/26 19:16:42 [error] [php] file_get_contents(http://localhost:8843/бараны): failed to open stream: HTTP request failed! HTTP/1.0 500 Internal Server Error + (C:\Workplace\Apache2.4\htdocs\cj\protected\models\DictionaryForm.php:37) +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): SiteController->actionDictionary() +#1 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams() +#2 C:\Workplace\yii1.1.15\framework\web\CController.php(286): SiteController->runAction() +#3 C:\Workplace\yii1.1.15\framework\web\CController.php(265): SiteController->runActionWithFilters() +#4 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): SiteController->run() +#5 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(141): CWebApplication->runController() +#6 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() +#7 C:\Workplace\Apache2.4\htdocs\cj\index.php(25): CWebApplication->run() +REQUEST_URI=/cj/index.php?r=site/dictionary +2014/11/26 19:17:56 [error] [php] file_get_contents(http://localhost:8843/бараны): failed to open stream: HTTP request failed! HTTP/1.0 500 Internal Server Error + (C:\Workplace\Apache2.4\htdocs\cj\protected\models\DictionaryForm.php:37) +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): SiteController->actionDictionary() +#1 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams() +#2 C:\Workplace\yii1.1.15\framework\web\CController.php(286): SiteController->runAction() +#3 C:\Workplace\yii1.1.15\framework\web\CController.php(265): SiteController->runActionWithFilters() +#4 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): SiteController->run() +#5 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(141): CWebApplication->runController() +#6 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() +#7 C:\Workplace\Apache2.4\htdocs\cj\index.php(25): CWebApplication->run() +REQUEST_URI=/cj/index.php?r=site/dictionary +2014/11/26 19:18:20 [error] [php] file_get_contents(http://localhost:8843/бараны): failed to open stream: HTTP request failed! HTTP/1.0 500 Internal Server Error + (C:\Workplace\Apache2.4\htdocs\cj\protected\models\DictionaryForm.php:37) +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): SiteController->actionDictionary() +#1 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams() +#2 C:\Workplace\yii1.1.15\framework\web\CController.php(286): SiteController->runAction() +#3 C:\Workplace\yii1.1.15\framework\web\CController.php(265): SiteController->runActionWithFilters() +#4 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): SiteController->run() +#5 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(141): CWebApplication->runController() +#6 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() +#7 C:\Workplace\Apache2.4\htdocs\cj\index.php(25): CWebApplication->run() +REQUEST_URI=/cj/index.php?r=site/dictionary +2014/11/26 19:22:11 [error] [php] Array to string conversion (C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\dictionaryResult.php:20) +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\web\CController.php(869): SiteController->renderFile() +#1 C:\Workplace\yii1.1.15\framework\web\CController.php(782): SiteController->renderPartial() +#2 C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php(69): SiteController->render() +#3 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): SiteController->actionDictionary() +#4 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams() +#5 C:\Workplace\yii1.1.15\framework\web\CController.php(286): SiteController->runAction() +#6 C:\Workplace\yii1.1.15\framework\web\CController.php(265): SiteController->runActionWithFilters() +#7 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): SiteController->run() +#8 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(141): CWebApplication->runController() +#9 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() +#10 C:\Workplace\Apache2.4\htdocs\cj\index.php(25): CWebApplication->run() +REQUEST_URI=/cj/index.php?r=site/dictionary +2014/11/26 19:22:39 [error] [php] Undefined index: noun (C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\_dictionaryResultView.php:9) +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\zii\widgets\CListView.php(291): SiteController->renderFile() +#1 C:\Workplace\yii1.1.15\framework\zii\widgets\CBaseListView.php(167): CListView->renderItems() +#2 unknown(0): CListView->renderSection() +#3 C:\Workplace\yii1.1.15\framework\zii\widgets\CBaseListView.php(150): preg_replace_callback() +#4 C:\Workplace\yii1.1.15\framework\zii\widgets\CBaseListView.php(135): CListView->renderContent() +#5 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(173): CListView->run() +#6 C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\dictionaryResult.php(17): SiteController->widget() +#7 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(126): require() +#8 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(95): SiteController->renderInternal() +#9 C:\Workplace\yii1.1.15\framework\web\CController.php(869): SiteController->renderFile() +#10 C:\Workplace\yii1.1.15\framework\web\CController.php(782): SiteController->renderPartial() +#11 C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php(69): SiteController->render() +#12 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): SiteController->actionDictionary() +#13 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams() +#14 C:\Workplace\yii1.1.15\framework\web\CController.php(286): SiteController->runAction() +#15 C:\Workplace\yii1.1.15\framework\web\CController.php(265): SiteController->runActionWithFilters() +#16 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): SiteController->run() +#17 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(141): CWebApplication->runController() +#18 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() +#19 C:\Workplace\Apache2.4\htdocs\cj\index.php(25): CWebApplication->run() +REQUEST_URI=/cj/index.php?r=site/dictionary +2014/11/26 19:23:30 [error] [php] Undefined index: id (C:\Workplace\yii1.1.15\framework\web\CArrayDataProvider.php:111) +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\zii\widgets\CBaseListView.php(136): CListView->renderKeys() +#1 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(173): CListView->run() +#2 C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\dictionaryResult.php(17): SiteController->widget() +#3 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(126): require() +#4 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(95): SiteController->renderInternal() +#5 C:\Workplace\yii1.1.15\framework\web\CController.php(869): SiteController->renderFile() +#6 C:\Workplace\yii1.1.15\framework\web\CController.php(782): SiteController->renderPartial() +#7 C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php(69): SiteController->render() +#8 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): SiteController->actionDictionary() +#9 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams() +#10 C:\Workplace\yii1.1.15\framework\web\CController.php(286): SiteController->runAction() +#11 C:\Workplace\yii1.1.15\framework\web\CController.php(265): SiteController->runActionWithFilters() +#12 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): SiteController->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\cj\index.php(25): CWebApplication->run() +REQUEST_URI=/cj/index.php?r=site/dictionary +2014/11/26 19:24:22 [error] [php] Undefined index: id (C:\Workplace\yii1.1.15\framework\web\CArrayDataProvider.php:111) +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\zii\widgets\CBaseListView.php(136): CListView->renderKeys() +#1 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(173): CListView->run() +#2 C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\dictionaryResult.php(17): SiteController->widget() +#3 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(126): require() +#4 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(95): SiteController->renderInternal() +#5 C:\Workplace\yii1.1.15\framework\web\CController.php(869): SiteController->renderFile() +#6 C:\Workplace\yii1.1.15\framework\web\CController.php(782): SiteController->renderPartial() +#7 C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php(69): SiteController->render() +#8 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): SiteController->actionDictionary() +#9 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams() +#10 C:\Workplace\yii1.1.15\framework\web\CController.php(286): SiteController->runAction() +#11 C:\Workplace\yii1.1.15\framework\web\CController.php(265): SiteController->runActionWithFilters() +#12 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): SiteController->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\cj\index.php(25): CWebApplication->run() +REQUEST_URI=/cj/index.php?r=site/dictionary +2014/11/26 19:24:44 [error] [php] Undefined index: id (C:\Workplace\yii1.1.15\framework\web\CArrayDataProvider.php:111) +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\zii\widgets\CBaseListView.php(136): CListView->renderKeys() +#1 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(173): CListView->run() +#2 C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\dictionaryResult.php(19): SiteController->widget() +#3 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(126): require() +#4 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(95): SiteController->renderInternal() +#5 C:\Workplace\yii1.1.15\framework\web\CController.php(869): SiteController->renderFile() +#6 C:\Workplace\yii1.1.15\framework\web\CController.php(782): SiteController->renderPartial() +#7 C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php(69): SiteController->render() +#8 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): SiteController->actionDictionary() +#9 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams() +#10 C:\Workplace\yii1.1.15\framework\web\CController.php(286): SiteController->runAction() +#11 C:\Workplace\yii1.1.15\framework\web\CController.php(265): SiteController->runActionWithFilters() +#12 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): SiteController->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\cj\index.php(25): CWebApplication->run() +REQUEST_URI=/cj/index.php?r=site/dictionary +2014/11/26 19:26:32 [error] [php] Undefined index: id (C:\Workplace\yii1.1.15\framework\web\CArrayDataProvider.php:111) +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\zii\widgets\CBaseListView.php(136): CListView->renderKeys() +#1 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(173): CListView->run() +#2 C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\dictionaryResult.php(20): SiteController->widget() +#3 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(126): require() +#4 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(95): SiteController->renderInternal() +#5 C:\Workplace\yii1.1.15\framework\web\CController.php(869): SiteController->renderFile() +#6 C:\Workplace\yii1.1.15\framework\web\CController.php(782): SiteController->renderPartial() +#7 C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php(69): SiteController->render() +#8 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): SiteController->actionDictionary() +#9 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams() +#10 C:\Workplace\yii1.1.15\framework\web\CController.php(286): SiteController->runAction() +#11 C:\Workplace\yii1.1.15\framework\web\CController.php(265): SiteController->runActionWithFilters() +#12 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): SiteController->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\cj\index.php(25): CWebApplication->run() +REQUEST_URI=/cj/index.php?r=site/dictionary +2014/11/26 19:28:53 [error] [php] Undefined index: id (C:\Workplace\yii1.1.15\framework\web\CArrayDataProvider.php:111) +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\zii\widgets\CBaseListView.php(136): CListView->renderKeys() +#1 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(173): CListView->run() +#2 C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\dictionaryResult.php(20): SiteController->widget() +#3 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(126): require() +#4 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(95): SiteController->renderInternal() +#5 C:\Workplace\yii1.1.15\framework\web\CController.php(869): SiteController->renderFile() +#6 C:\Workplace\yii1.1.15\framework\web\CController.php(782): SiteController->renderPartial() +#7 C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php(69): SiteController->render() +#8 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): SiteController->actionDictionary() +#9 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams() +#10 C:\Workplace\yii1.1.15\framework\web\CController.php(286): SiteController->runAction() +#11 C:\Workplace\yii1.1.15\framework\web\CController.php(265): SiteController->runActionWithFilters() +#12 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): SiteController->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\cj\index.php(25): CWebApplication->run() +REQUEST_URI=/cj/index.php?r=site/dictionary +2014/11/26 19:41:11 [error] [php] array_slice() expects parameter 1 to be array, null given (C:\Workplace\yii1.1.15\framework\web\CArrayDataProvider.php:95) +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\zii\widgets\CBaseListView.php(111): CArrayDataProvider->getData() +#1 C:\Workplace\yii1.1.15\framework\zii\widgets\CListView.php(211): CListView->init() +#2 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(147): CListView->init() +#3 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(172): SiteController->createWidget() +#4 C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\dictionaryResult.php(20): SiteController->widget() +#5 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(126): require() +#6 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(95): SiteController->renderInternal() +#7 C:\Workplace\yii1.1.15\framework\web\CController.php(869): SiteController->renderFile() +#8 C:\Workplace\yii1.1.15\framework\web\CController.php(782): SiteController->renderPartial() +#9 C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php(69): SiteController->render() +#10 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): SiteController->actionDictionary() +#11 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams() +#12 C:\Workplace\yii1.1.15\framework\web\CController.php(286): SiteController->runAction() +#13 C:\Workplace\yii1.1.15\framework\web\CController.php(265): SiteController->runActionWithFilters() +#14 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): SiteController->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\cj\index.php(25): CWebApplication->run() +REQUEST_URI=/cj/index.php?r=site/dictionary +2014/11/26 22:20:02 [error] [php] Undefined variable: model (C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\_dictionaryResultView.php:17) +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\zii\widgets\CListView.php(291): SiteController->renderFile() +#1 C:\Workplace\yii1.1.15\framework\zii\widgets\CBaseListView.php(167): CListView->renderItems() +#2 unknown(0): CListView->renderSection() +#3 C:\Workplace\yii1.1.15\framework\zii\widgets\CBaseListView.php(150): preg_replace_callback() +#4 C:\Workplace\yii1.1.15\framework\zii\widgets\CBaseListView.php(135): CListView->renderContent() +#5 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(173): CListView->run() +#6 C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\dictionaryResult.php(20): SiteController->widget() +#7 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(126): require() +#8 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(95): SiteController->renderInternal() +#9 C:\Workplace\yii1.1.15\framework\web\CController.php(869): SiteController->renderFile() +#10 C:\Workplace\yii1.1.15\framework\web\CController.php(782): SiteController->renderPartial() +#11 C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php(69): SiteController->render() +#12 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): SiteController->actionDictionary() +#13 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams() +#14 C:\Workplace\yii1.1.15\framework\web\CController.php(286): SiteController->runAction() +#15 C:\Workplace\yii1.1.15\framework\web\CController.php(265): SiteController->runActionWithFilters() +#16 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): SiteController->run() +#17 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(141): CWebApplication->runController() +#18 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() +#19 C:\Workplace\Apache2.4\htdocs\cj\index.php(25): CWebApplication->run() +REQUEST_URI=/cj/index.php?r=site/dictionary +2014/11/26 22:23:30 [error] [php] Undefined variable: viewData (C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\_dictionaryResultView.php:17) +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\zii\widgets\CListView.php(291): SiteController->renderFile() +#1 C:\Workplace\yii1.1.15\framework\zii\widgets\CBaseListView.php(167): CListView->renderItems() +#2 unknown(0): CListView->renderSection() +#3 C:\Workplace\yii1.1.15\framework\zii\widgets\CBaseListView.php(150): preg_replace_callback() +#4 C:\Workplace\yii1.1.15\framework\zii\widgets\CBaseListView.php(135): CListView->renderContent() +#5 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(173): CListView->run() +#6 C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\dictionaryResult.php(17): SiteController->widget() +#7 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(126): require() +#8 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(95): SiteController->renderInternal() +#9 C:\Workplace\yii1.1.15\framework\web\CController.php(869): SiteController->renderFile() +#10 C:\Workplace\yii1.1.15\framework\web\CController.php(782): SiteController->renderPartial() +#11 C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php(69): SiteController->render() +#12 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): SiteController->actionDictionary() +#13 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams() +#14 C:\Workplace\yii1.1.15\framework\web\CController.php(286): SiteController->runAction() +#15 C:\Workplace\yii1.1.15\framework\web\CController.php(265): SiteController->runActionWithFilters() +#16 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): SiteController->run() +#17 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(141): CWebApplication->runController() +#18 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() +#19 C:\Workplace\Apache2.4\htdocs\cj\index.php(25): CWebApplication->run() +REQUEST_URI=/cj/index.php?r=site/dictionary +2014/11/26 22:26:10 [error] [exception.CException] exception 'CException' with message 'Не определено свойство "CArrayDataProvider.viewData".' in C:\Workplace\yii1.1.15\framework\base\CComponent.php:173 +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\web\CArrayDataProvider.php(80): CComponent->__set('viewData', Array) +#1 C:\Workplace\Apache2.4\htdocs\cj\protected\models\DictionaryForm.php(62): CArrayDataProvider->__construct(Array, Array) +#2 C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\dictionaryResult.php(14): DictionaryForm->getDataProvider() +#3 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(126): require('C:\\Workplace\\Ap...') +#4 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(95): CBaseController->renderInternal('C:\\Workplace\\Ap...', Array, true) +#5 C:\Workplace\yii1.1.15\framework\web\CController.php(869): CBaseController->renderFile('C:\\Workplace\\Ap...', Array, true) +#6 C:\Workplace\yii1.1.15\framework\web\CController.php(782): CController->renderPartial('dictionaryResul...', Array, true) +#7 C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php(69): CController->render('dictionaryResul...', Array) +#8 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): SiteController->actionDictionary() +#9 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams(Array) +#10 C:\Workplace\yii1.1.15\framework\web\CController.php(286): CController->runAction(Object(CInlineAction)) +#11 C:\Workplace\yii1.1.15\framework\web\CController.php(265): CController->runActionWithFilters(Object(CInlineAction), Array) +#12 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): CController->run('dictionary') +#13 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(141): CWebApplication->runController('site/dictionary') +#14 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() +#15 C:\Workplace\Apache2.4\htdocs\cj\index.php(25): CApplication->run() +#16 {main} +REQUEST_URI=/cj/index.php?r=site/dictionary +HTTP_REFERER=http://localhost/cj/index.php?r=site/dictionary +--- +2014/11/26 22:30:52 [error] [php] Undefined index: nouns (C:\Workplace\Apache2.4\htdocs\cj\protected\models\DictionaryForm.php:56) +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(95): SiteController->renderInternal() +#1 C:\Workplace\yii1.1.15\framework\web\CController.php(869): SiteController->renderFile() +#2 C:\Workplace\yii1.1.15\framework\web\CController.php(782): SiteController->renderPartial() +#3 C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php(69): SiteController->render() +#4 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): SiteController->actionDictionary() +#5 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams() +#6 C:\Workplace\yii1.1.15\framework\web\CController.php(286): SiteController->runAction() +#7 C:\Workplace\yii1.1.15\framework\web\CController.php(265): SiteController->runActionWithFilters() +#8 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): SiteController->run() +#9 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(141): CWebApplication->runController() +#10 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() +#11 C:\Workplace\Apache2.4\htdocs\cj\index.php(25): CWebApplication->run() +REQUEST_URI=/cj/index.php?r=site/dictionary +2014/11/26 22:44:18 [error] [php] Illegal string offset 'nominative' (C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\_dictionaryResultView.php:13) +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\zii\widgets\CListView.php(291): SiteController->renderFile() +#1 C:\Workplace\yii1.1.15\framework\zii\widgets\CBaseListView.php(167): CListView->renderItems() +#2 unknown(0): CListView->renderSection() +#3 C:\Workplace\yii1.1.15\framework\zii\widgets\CBaseListView.php(150): preg_replace_callback() +#4 C:\Workplace\yii1.1.15\framework\zii\widgets\CBaseListView.php(135): CListView->renderContent() +#5 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(173): CListView->run() +#6 C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\dictionaryResult.php(20): SiteController->widget() +#7 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(126): require() +#8 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(95): SiteController->renderInternal() +#9 C:\Workplace\yii1.1.15\framework\web\CController.php(869): SiteController->renderFile() +#10 C:\Workplace\yii1.1.15\framework\web\CController.php(782): SiteController->renderPartial() +#11 C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php(69): SiteController->render() +#12 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): SiteController->actionDictionary() +#13 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams() +#14 C:\Workplace\yii1.1.15\framework\web\CController.php(286): SiteController->runAction() +#15 C:\Workplace\yii1.1.15\framework\web\CController.php(265): SiteController->runActionWithFilters() +#16 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): SiteController->run() +#17 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(141): CWebApplication->runController() +#18 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() +#19 C:\Workplace\Apache2.4\htdocs\cj\index.php(25): CWebApplication->run() +REQUEST_URI=/cj/index.php?r=site/dictionary +2014/11/26 23:02:33 [error] [php] array_slice() expects parameter 1 to be array, null given (C:\Workplace\yii1.1.15\framework\web\CArrayDataProvider.php:95) +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\zii\widgets\CBaseListView.php(111): CArrayDataProvider->getData() +#1 C:\Workplace\yii1.1.15\framework\zii\widgets\CListView.php(211): CListView->init() +#2 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(147): CListView->init() +#3 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(172): SiteController->createWidget() +#4 C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\dictionaryResult.php(18): SiteController->widget() +#5 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(126): require() +#6 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(95): SiteController->renderInternal() +#7 C:\Workplace\yii1.1.15\framework\web\CController.php(869): SiteController->renderFile() +#8 C:\Workplace\yii1.1.15\framework\web\CController.php(782): SiteController->renderPartial() +#9 C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php(69): SiteController->render() +#10 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): SiteController->actionDictionary() +#11 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams() +#12 C:\Workplace\yii1.1.15\framework\web\CController.php(286): SiteController->runAction() +#13 C:\Workplace\yii1.1.15\framework\web\CController.php(265): SiteController->runActionWithFilters() +#14 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): SiteController->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\cj\index.php(25): CWebApplication->run() +REQUEST_URI=/cj/index.php?r=site/dictionary +2014/11/26 23:06:16 [error] [exception.CException] exception 'CException' with message 'Не определено свойство "DictionaryForm.resultCount".' in C:\Workplace\yii1.1.15\framework\base\CComponent.php:130 +Stack trace: +#0 C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\dictionaryResult.php(14): CComponent->__get('resultCount') +#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('dictionaryResul...', Array, true) +#5 C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php(69): CController->render('dictionaryResul...', Array) +#6 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): SiteController->actionDictionary() +#7 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams(Array) +#8 C:\Workplace\yii1.1.15\framework\web\CController.php(286): CController->runAction(Object(CInlineAction)) +#9 C:\Workplace\yii1.1.15\framework\web\CController.php(265): CController->runActionWithFilters(Object(CInlineAction), Array) +#10 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): CController->run('dictionary') +#11 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(141): CWebApplication->runController('site/dictionary') +#12 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() +#13 C:\Workplace\Apache2.4\htdocs\cj\index.php(25): CApplication->run() +#14 {main} +REQUEST_URI=/cj/index.php?r=site/dictionary +HTTP_REFERER=http://localhost/cj/index.php?r=site/dictionary +--- diff --git a/yii/protected/runtime/state.bin b/yii/protected/runtime/state.bin new file mode 100644 index 0000000..24fa62f --- /dev/null +++ b/yii/protected/runtime/state.bin @@ -0,0 +1 @@ +a:1:{s:34:"Yii.CSecurityManager.validationkey";s:32:"Axk2SUDdHr371rxeh1FZKe~cv~p7~Kq1";} \ No newline at end of file diff --git a/yii/protected/views/layouts/main.php b/yii/protected/views/layouts/main.php index 9ed4931..5f3ec89 100644 --- a/yii/protected/views/layouts/main.php +++ b/yii/protected/views/layouts/main.php @@ -36,6 +36,7 @@ widget('zii.widgets.CMenu',array( 'items'=>array( array('label'=>Yii::t('app', 'Main'), 'url'=>array('/site/index')), + array('label'=>Yii::t('app', 'Dictionary'), 'url'=>array('/site/dictionary')), array('label'=>Yii::t('app', 'About journal'), 'url'=>array('/site/page', 'view'=>'about')), array('label'=>Yii::t('app', 'Add post'), 'url'=>array('/site/addPost'), 'visible'=>!Yii::app()->user->isGuest), array('label'=>Yii::t('app', 'Login'), 'url'=>array('/site/login'), 'visible'=>Yii::app()->user->isGuest), diff --git a/yii/protected/views/site/_dictionaryResultView.php b/yii/protected/views/site/_dictionaryResultView.php new file mode 100644 index 0000000..338f904 --- /dev/null +++ b/yii/protected/views/site/_dictionaryResultView.php @@ -0,0 +1,25 @@ +pageTitle=Yii::t('app', Yii::app()->name); + + + +?> + +
+ +

+{nounNominative}'))?> +

+ +

+ +

+ +

+ +

+ + + diff --git a/yii/protected/views/site/dictionary.php b/yii/protected/views/site/dictionary.php new file mode 100644 index 0000000..a6df89a --- /dev/null +++ b/yii/protected/views/site/dictionary.php @@ -0,0 +1,30 @@ +pageTitle=Yii::t('app', Yii::app()->name) . ' - ' . Yii::t('app', 'Dictionary'); + +?> + +

+ +

+ +
+beginWidget('CActiveForm', array( + 'id'=>'login-form', + 'enableClientValidation'=>true, + 'clientOptions'=>array( + 'validateOnSubmit'=>true, + ), +)); ?> + +
+ textField($model,'request'); ?> + error($model,'request'); ?> +
+ +
+ +
+ +endWidget(); ?> +
diff --git a/yii/protected/views/site/dictionaryResult.php b/yii/protected/views/site/dictionaryResult.php new file mode 100644 index 0000000..a69d32d --- /dev/null +++ b/yii/protected/views/site/dictionaryResult.php @@ -0,0 +1,32 @@ +pageTitle=Yii::t('app', Yii::app()->name) . ' - ' . Yii::t('app', 'Dictionary'); + +?> + +

+ +

+ +resultCount(), Yii::t('app', '{n} records found.')); + +echo '
'; + +if ($model->resultCount() !== 0) +{ +$this->widget('zii.widgets.CListView', array( + 'dataProvider'=>$model->getDataProvider(), + 'itemView'=>'_dictionaryResultView', + 'template'=>"{items}\n{pager}", + 'viewData'=>array( 'request' => $model->request ), +)); +} + + + +?> + +