diff --git a/common/models/Menu.php b/common/models/Menu.php index ccebd9c..7586f4b 100644 --- a/common/models/Menu.php +++ b/common/models/Menu.php @@ -31,7 +31,7 @@ class Menu extends \yii\db\ActiveRecord INNER JOIN `termin` ON `termin`.termin_id = `menu`.termin_id INNER JOIN `termin_lang` ON `termin_lang`.termin_id = `menu`.termin_id AND `termin_lang`.lang_id = '.yii::$app->lang_id.' - INNER JOIN `template` ON `template`.template_id = `termin`.template_id + INNER JOIN `template` ON `template`.template_id = `termin_lang`.template_id ORDER BY `menu`.level ASC, `menu`.sortorder ASC ')->queryAll(); /* diff --git a/common/models/Page.php b/common/models/Page.php index bb68bbf..0e1a676 100644 --- a/common/models/Page.php +++ b/common/models/Page.php @@ -107,15 +107,15 @@ class Page extends \yii\db\ActiveRecord { return yii::$app->db->createCommand(' SELECT - `termin`.show, `termin`.termin_id, `termin`.page_id, - `controller`.controller_name, + `termin`.termin_id, `termin`.page_id, + `page`.show, `template`.template_file - FROM `termin` + FROM `termin` INNER JOIN `termin_lang` ON `termin_lang`.termin_id = `termin`.termin_id AND `termin_lang`.lang_id = '.yii::$app->lang_id.' AND `termin_lang`.termin_alias = "'.$url.'" - INNER JOIN `template` ON `template`.template_id = `termin`.template_id - INNER JOIN `controller` ON `controller`.controller_id = `template`.controller_id + INNER JOIN `page` ON `page`.page_id = `termin`.page_id + INNER JOIN `template` ON `template`.template_id = `termin_lang`.template_id ')->queryOne(); } diff --git a/db-migration/artbox_db.sql b/db-migration/artbox_db.sql index ef85b34..f4c52f5 100644 --- a/db-migration/artbox_db.sql +++ b/db-migration/artbox_db.sql @@ -3,7 +3,7 @@ -- http://www.phpmyadmin.net -- -- Хост: 127.0.0.1:3306 --- Час створення: Лис 12 2015 р., 13:59 +-- Час створення: Лис 12 2015 р., 22:57 -- Версія сервера: 5.5.45 -- Версія PHP: 5.6.12 @@ -23,54 +23,6 @@ SET time_zone = "+00:00"; -- -------------------------------------------------------- -- --- Структура таблиці `controller` --- - -CREATE TABLE IF NOT EXISTS `controller` ( - `controller_id` int(3) NOT NULL AUTO_INCREMENT, - `controller_name` varchar(50) NOT NULL, - PRIMARY KEY (`controller_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ; - --- --- Дамп даних таблиці `controller` --- - -INSERT INTO `controller` (`controller_id`, `controller_name`) VALUES -(1, 'Page'), -(2, 'Home'), -(3, 'Catlog'), -(4, 'News'), -(5, 'Filter'); - --- -------------------------------------------------------- - --- --- Структура таблиці `feature` --- - -CREATE TABLE IF NOT EXISTS `feature` ( - `feature_id` int(6) NOT NULL AUTO_INCREMENT, - `feature_pid` int(6) NOT NULL DEFAULT '0', - PRIMARY KEY (`feature_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - --- -------------------------------------------------------- - --- --- Структура таблиці `feature_lang` --- - -CREATE TABLE IF NOT EXISTS `feature_lang` ( - `feature_id` int(6) NOT NULL, - `feature_title` varchar(256) DEFAULT NULL, - `feature_lang` int(2) NOT NULL, - PRIMARY KEY (`feature_id`,`feature_lang`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - --- -- Структура таблиці `image` -- @@ -135,8 +87,11 @@ CREATE TABLE IF NOT EXISTS `menu` ( `level` int(6) NOT NULL, `termin_id` int(6) NOT NULL, `show` tinyint(1) NOT NULL, + `is_open` tinyint(1) NOT NULL, `menu_location_id` int(6) NOT NULL, `sortorder` int(6) NOT NULL, + `name` varchar(50) DEFAULT NULL, + `url` varchar(256) DEFAULT NULL, PRIMARY KEY (`menu_id`), KEY `show` (`show`), KEY `sortorder` (`sortorder`), @@ -147,19 +102,19 @@ CREATE TABLE IF NOT EXISTS `menu` ( -- Дамп даних таблиці `menu` -- -INSERT INTO `menu` (`menu_id`, `menu_pid`, `level`, `termin_id`, `show`, `menu_location_id`, `sortorder`) VALUES -(1, 0, 0, 2, 1, 1, 12), -(2, 1, 1, 3, 1, 1, 1), -(3, 1, 1, 4, 1, 1, 1), -(4, 0, 0, 5, 1, 1, 1), -(5, 1, 1, 6, 1, 1, 1), -(6, 1, 1, 7, 1, 1, 1), -(7, 0, 0, 8, 1, 1, 1), -(8, 0, 0, 9, 1, 1, 1), -(9, 0, 0, 10, 1, 1, 1), -(10, 0, 0, 11, 1, 1, 1), -(11, 0, 0, 12, 1, 1, 1), -(12, 0, 0, 13, 1, 1, 1); +INSERT INTO `menu` (`menu_id`, `menu_pid`, `level`, `termin_id`, `show`, `is_open`, `menu_location_id`, `sortorder`, `name`, `url`) VALUES +(1, 0, 0, 2, 1, 0, 1, 12, NULL, NULL), +(2, 1, 1, 3, 1, 0, 1, 1, NULL, NULL), +(3, 1, 1, 4, 1, 0, 1, 1, NULL, NULL), +(4, 0, 0, 5, 1, 0, 1, 1, NULL, NULL), +(5, 1, 1, 6, 1, 0, 1, 1, NULL, NULL), +(6, 1, 1, 7, 1, 0, 1, 1, NULL, NULL), +(7, 0, 0, 8, 1, 0, 1, 1, NULL, NULL), +(8, 0, 0, 9, 1, 0, 1, 1, NULL, NULL), +(9, 0, 0, 10, 1, 0, 1, 1, NULL, NULL), +(10, 0, 0, 11, 1, 0, 1, 1, NULL, NULL), +(11, 0, 0, 12, 1, 0, 1, 1, NULL, NULL), +(12, 0, 0, 13, 1, 0, 1, 1, NULL, NULL); -- -------------------------------------------------------- @@ -228,6 +183,85 @@ INSERT INTO `migration` (`version`, `apply_time`) VALUES -- -------------------------------------------------------- -- +-- Структура таблиці `module` +-- + +CREATE TABLE IF NOT EXISTS `module` ( + `module_id` int(6) NOT NULL AUTO_INCREMENT, + `module_name` varchar(50) DEFAULT NULL, + `module_version` varchar(10) DEFAULT NULL, + PRIMARY KEY (`module_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ; + +-- +-- Дамп даних таблиці `module` +-- + +INSERT INTO `module` (`module_id`, `module_name`, `module_version`) VALUES +(1, 'Menu', '1.0'); + +-- -------------------------------------------------------- + +-- +-- Структура таблиці `module_function` +-- + +CREATE TABLE IF NOT EXISTS `module_function` ( + `module_function_id` int(6) NOT NULL AUTO_INCREMENT, + `module_function_name` varchar(50) DEFAULT NULL, + PRIMARY KEY (`module_function_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ; + +-- +-- Дамп даних таблиці `module_function` +-- + +INSERT INTO `module_function` (`module_function_id`, `module_function_name`) VALUES +(1, 'display'); + +-- -------------------------------------------------------- + +-- +-- Структура таблиці `module_function_lang` +-- + +CREATE TABLE IF NOT EXISTS `module_function_lang` ( + `module_function_id` int(6) NOT NULL, + `module_function_title` varchar(50) NOT NULL, + `lang_id` int(2) NOT NULL, + PRIMARY KEY (`module_function_id`,`lang_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- +-- Дамп даних таблиці `module_function_lang` +-- + +INSERT INTO `module_function_lang` (`module_function_id`, `module_function_title`, `lang_id`) VALUES +(1, 'Показать меню', 2); + +-- -------------------------------------------------------- + +-- +-- Структура таблиці `module_lang` +-- + +CREATE TABLE IF NOT EXISTS `module_lang` ( + `module_id` int(6) NOT NULL, + `module_title` varchar(50) NOT NULL, + `lang_id` int(1) NOT NULL, + PRIMARY KEY (`module_id`,`lang_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- +-- Дамп даних таблиці `module_lang` +-- + +INSERT INTO `module_lang` (`module_id`, `module_title`, `lang_id`) VALUES +(1, 'Меню', 1); + +-- -------------------------------------------------------- + +-- -- Структура таблиці `page` -- @@ -294,52 +328,12 @@ INSERT INTO `page_lang` (`page_id`, `meta_title`, `meta_description`, `text`, `l -- -------------------------------------------------------- -- --- Структура таблиці `product` --- - -CREATE TABLE IF NOT EXISTS `product` ( - `product_id` int(6) NOT NULL AUTO_INCREMENT, - `termin_id` int(6) NOT NULL, - `curency_id` int(6) NOT NULL, - `price` decimal(10,3) NOT NULL, - `show` tinyint(1) NOT NULL, - PRIMARY KEY (`product_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - --- -------------------------------------------------------- - --- --- Структура таблиці `product_category` --- - -CREATE TABLE IF NOT EXISTS `product_category` ( - `product_id` int(6) NOT NULL, - `termin_id` int(6) NOT NULL, - PRIMARY KEY (`product_id`,`termin_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - --- --- Структура таблиці `product_tag` --- - -CREATE TABLE IF NOT EXISTS `product_tag` ( - `product_id` int(6) NOT NULL, - `temin_id` int(6) NOT NULL, - PRIMARY KEY (`product_id`,`temin_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - --- -- Структура таблиці `template` -- CREATE TABLE IF NOT EXISTS `template` ( `template_id` int(3) NOT NULL AUTO_INCREMENT, - `controller_id` int(3) NOT NULL, - `template_name` varchar(50) NOT NULL, + `template_alias` varchar(50) NOT NULL, `template_file` varchar(50) NOT NULL, PRIMARY KEY (`template_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ; @@ -348,12 +342,12 @@ CREATE TABLE IF NOT EXISTS `template` ( -- Дамп даних таблиці `template` -- -INSERT INTO `template` (`template_id`, `controller_id`, `template_name`, `template_file`) VALUES -(1, 1, 'page', 'page/page'), -(2, 2, 'home', 'page/home'), -(3, 3, 'catalog', 'shop/catalog'), -(4, 5, 'filter', 'shop/filter'), -(5, 4, 'news', 'news/all'); +INSERT INTO `template` (`template_id`, `template_alias`, `template_file`) VALUES +(1, 'page', 'page/page'), +(2, 'home', 'page/home'), +(3, 'catalog', 'shop/catalog'), +(4, 'filter', 'shop/filter'), +(5, 'news', 'news/all'); -- -------------------------------------------------------- @@ -387,33 +381,36 @@ INSERT INTO `template_lang` (`template_id`, `template_title`, `lang_id`) VALUES CREATE TABLE IF NOT EXISTS `termin` ( `termin_id` int(6) NOT NULL AUTO_INCREMENT, - `template_id` int(6) NOT NULL, + `termin_pid` int(11) NOT NULL, + `is_default` int(1) NOT NULL, `page_id` int(6) NOT NULL, - `show` tinyint(1) NOT NULL, PRIMARY KEY (`termin_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=17 ; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=20 ; -- -- Дамп даних таблиці `termin` -- -INSERT INTO `termin` (`termin_id`, `template_id`, `page_id`, `show`) VALUES -(1, 2, 1, 1), -(2, 1, 2, 1), -(3, 1, 3, 1), -(4, 1, 4, 1), -(5, 1, 5, 1), -(6, 1, 6, 1), -(7, 1, 7, 1), -(8, 1, 8, 1), -(9, 1, 9, 1), -(10, 1, 10, 1), -(11, 1, 11, 1), -(12, 1, 12, 1), -(13, 1, 13, 1), -(14, 1, 14, 1), -(15, 1, 15, 1), -(16, 1, 16, 1); +INSERT INTO `termin` (`termin_id`, `termin_pid`, `is_default`, `page_id`) VALUES +(1, 0, 0, 1), +(2, 0, 0, 2), +(3, 0, 0, 3), +(4, 0, 0, 4), +(5, 0, 0, 5), +(6, 0, 0, 6), +(7, 0, 0, 7), +(8, 0, 0, 8), +(9, 0, 0, 9), +(10, 0, 0, 10), +(11, 0, 0, 11), +(12, 0, 0, 12), +(13, 0, 0, 13), +(14, 0, 0, 14), +(15, 0, 0, 15), +(16, 0, 0, 16), +(17, 0, 0, 0), +(18, 0, 0, 0), +(19, 0, 0, 0); -- -------------------------------------------------------- @@ -423,33 +420,38 @@ INSERT INTO `termin` (`termin_id`, `template_id`, `page_id`, `show`) VALUES CREATE TABLE IF NOT EXISTS `termin_lang` ( `termin_id` int(6) NOT NULL, + `template_id` int(6) NOT NULL, `termin_alias` varchar(50) NOT NULL, `termin_title` varchar(256) DEFAULT NULL, `lang_id` int(2) NOT NULL, - PRIMARY KEY (`termin_id`,`lang_id`) + PRIMARY KEY (`termin_id`,`lang_id`), + UNIQUE KEY `termin_id` (`termin_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Дамп даних таблиці `termin_lang` -- -INSERT INTO `termin_lang` (`termin_id`, `termin_alias`, `termin_title`, `lang_id`) VALUES -(1, '/', 'Главная страница', 2), -(2, 'about', 'О компании', 2), -(3, 'use', 'Условия использования', 2), -(4, 'corporation', 'Условия сотрудничества', 2), -(5, 'contacts', 'Контакты', 2), -(6, 'shops', 'Магазины', 2), -(7, 'vendors', 'Поставщики', 2), -(8, 'catalog', 'Каталог товаров', 2), -(9, 'payment', 'Оплата', 2), -(10, 'delivery', 'Доставка', 2), -(11, 'warranty', 'Гарантия', 2), -(12, 'promotion', 'Акции ', 2), -(13, 'news', 'Материалы/блог', 2), -(14, 'arbuz', 'Арбуз', 2), -(15, 'artishok', 'Артишок', 2), -(16, 'baklazhan', 'Баклажан', 2); +INSERT INTO `termin_lang` (`termin_id`, `template_id`, `termin_alias`, `termin_title`, `lang_id`) VALUES +(1, 2, '/', 'Главная страница', 2), +(2, 1, 'about', 'О компании', 2), +(3, 1, 'use', 'Условия использования', 2), +(4, 1, 'corporation', 'Условия сотрудничества', 2), +(5, 1, 'contacts', 'Контакты', 2), +(6, 1, 'shops', 'Магазины', 2), +(7, 1, 'vendors', 'Поставщики', 2), +(8, 1, 'catalog', 'Каталог товаров', 2), +(9, 1, 'payment', 'Оплата', 2), +(10, 1, 'delivery', 'Доставка', 2), +(11, 1, 'warranty', 'Гарантия', 2), +(12, 1, 'promotion', 'Акции ', 2), +(13, 1, 'news', 'Материалы/блог', 2), +(14, 1, 'arbuz', 'Арбуз', 2), +(15, 1, 'artishok', 'Артишок', 2), +(16, 1, 'baklazhan', 'Баклажан', 2), +(17, 1, 'login', 'Авторизация', 2), +(18, 1, 'logout', 'Выход', 2), +(19, 1, 'signup', 'Регистрация', 2); -- -------------------------------------------------------- @@ -460,8 +462,6 @@ INSERT INTO `termin_lang` (`termin_id`, `termin_alias`, `termin_title`, `lang_id CREATE TABLE IF NOT EXISTS `termin_relation` ( `termin_id_1` int(6) NOT NULL, `termin_id_2` int(6) NOT NULL, - `parent` int(6) NOT NULL, - `is_default` tinyint(1) NOT NULL, PRIMARY KEY (`termin_id_1`,`termin_id_2`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; @@ -469,23 +469,23 @@ CREATE TABLE IF NOT EXISTS `termin_relation` ( -- Дамп даних таблиці `termin_relation` -- -INSERT INTO `termin_relation` (`termin_id_1`, `termin_id_2`, `parent`, `is_default`) VALUES -(1, 0, 0, 0), -(2, 0, 0, 0), -(3, 0, 0, 0), -(4, 0, 0, 0), -(5, 0, 0, 0), -(6, 0, 0, 0), -(7, 0, 0, 0), -(8, 0, 0, 0), -(9, 0, 0, 0), -(10, 0, 0, 0), -(11, 0, 0, 0), -(12, 0, 0, 0), -(13, 0, 0, 0), -(14, 0, 0, 0), -(15, 0, 0, 0), -(16, 0, 0, 0); +INSERT INTO `termin_relation` (`termin_id_1`, `termin_id_2`) VALUES +(1, 0), +(2, 0), +(3, 0), +(4, 0), +(5, 0), +(6, 0), +(7, 0), +(8, 0), +(9, 0), +(10, 0), +(11, 0), +(12, 0), +(13, 0), +(14, 0), +(15, 0), +(16, 0); -- -------------------------------------------------------- @@ -542,27 +542,42 @@ INSERT INTO `termin_type_lang` (`termin_type_id`, `termin_type_title`, `lang_id` -- -------------------------------------------------------- -- --- Структура таблиці `translate` +-- Структура таблиці `translation` -- -CREATE TABLE IF NOT EXISTS `translate` ( - `translate_id` int(6) NOT NULL AUTO_INCREMENT, - `translate_key` varchar(20) NOT NULL, - PRIMARY KEY (`translate_id`), - UNIQUE KEY `translate_key` (`translate_key`) +CREATE TABLE IF NOT EXISTS `translation` ( + `translation_id` int(6) NOT NULL AUTO_INCREMENT, + `translation_pid` int(6) DEFAULT NULL, + `translation_key` varchar(200) NOT NULL, + `is_translation` tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`translation_id`), + KEY `Индекс 2` (`translation_pid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- --- Структура таблиці `translate_lang` +-- Структура таблиці `translation_option` -- -CREATE TABLE IF NOT EXISTS `translate_lang` ( - `translate_id` int(6) NOT NULL, - `translate_value` varchar(3000) NOT NULL, - `lang_id` int(2) NOT NULL, - PRIMARY KEY (`translate_id`,`lang_id`) +CREATE TABLE IF NOT EXISTS `translation_option` ( + `translation_value_id` int(6) NOT NULL AUTO_INCREMENT, + `translation_id` int(6) NOT NULL, + PRIMARY KEY (`translation_value_id`), + KEY `Индекс 2` (`translation_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- Структура таблиці `translation_value` +-- + +CREATE TABLE IF NOT EXISTS `translation_value` ( + `translation_value_id` int(6) NOT NULL, + `translation_value` text NOT NULL, + `lang_id` int(2) NOT NULL DEFAULT '0', + PRIMARY KEY (`translation_value_id`,`lang_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- @@ -597,6 +612,22 @@ CREATE TABLE IF NOT EXISTS `user` ( INSERT INTO `user` (`id`, `username`, `lastname`, `firstname`, `middlename`, `auth_key`, `password_hash`, `password_reset_token`, `email`, `status`, `created_at`, `updated_at`) VALUES (1, 'zlodeyev', 'Андреев', 'Владимир', 'Сергійович', 'VgTs2skfY1Uf3YERn1OR3E2V_Hm0KZwF', '$2y$13$jOtOdIQUU2.ZyEkxN9TJjuhfS7Q3p2K/KqGWNyBab07OaQUsJ5nSi', NULL, 'volodymyr.andryeyev@gmail.com', 10, 1446046164, 1446538181); +-- +-- Обмеження зовнішнього ключа збережених таблиць +-- + +-- +-- Обмеження зовнішнього ключа таблиці `translation_option` +-- +ALTER TABLE `translation_option` + ADD CONSTRAINT `translation_id` FOREIGN KEY (`translation_id`) REFERENCES `translation` (`translation_id`); + +-- +-- Обмеження зовнішнього ключа таблиці `translation_value` +-- +ALTER TABLE `translation_value` + ADD CONSTRAINT `translation_value_id` FOREIGN KEY (`translation_value_id`) REFERENCES `translation_option` (`translation_value_id`); + /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; diff --git a/frontend/controllers/PageController.php b/frontend/controllers/PageController.php index 7e6193d..da9aa35 100644 --- a/frontend/controllers/PageController.php +++ b/frontend/controllers/PageController.php @@ -18,16 +18,22 @@ class PageController extends Controller public function actionPage($controller_name, $page_id, $template_file) { // страница - $page = Page::getPageById ($page_id); - - // meta_title - Yii::$app->view->title = $page['meta_title']; + if ($page = Page::getPageById ($page_id)) + { + // meta_title + Yii::$app->view->title = $page['meta_title']; - // meta_desc - Yii::$app->view->registerMetaTag([ - 'name' => 'description', - 'content' => $page['meta_description'], - ]); + // meta_desc + Yii::$app->view->registerMetaTag([ + 'name' => 'description', + 'content' => $page['meta_description'], + ]); + } + else + { + echo '404'; + die; + } return $this->render($controller_name, $page); } diff --git a/frontend/controllers/SiteController.php b/frontend/controllers/SiteController.php index 786c8da..25127d4 100644 --- a/frontend/controllers/SiteController.php +++ b/frontend/controllers/SiteController.php @@ -94,9 +94,12 @@ class SiteController extends Controller 'maгаз' => 'shop/categoty', ]; */ + + list ($controller) = explode ('/', $page['template_file']); + // подключаем return Yii::$app->runAction($page['template_file'], [ - 'controller_name' => $page['controller_name'], + 'controller_name' => $controller, 'page_id' => $page['page_id'], 'template_file' => $page['template_file'], ]); @@ -105,13 +108,18 @@ class SiteController extends Controller return $this->render('index'); } + + /** + * =================== + * ==== BASIC YII ==== + * =================== + */ /** * Logs in a user. * * @return mixed */ -/* public function actionLogin() { if (!\Yii::$app->user->isGuest) { @@ -127,26 +135,24 @@ class SiteController extends Controller ]); } } -*/ + /** * Logs out the current user. * * @return mixed */ -/* public function actionLogout() { Yii::$app->user->logout(); return $this->goHome(); } -*/ + /** * Displays contact page. * * @return mixed */ -/* public function actionContact() { $model = new ContactForm(); @@ -164,14 +170,12 @@ class SiteController extends Controller ]); } } -*/ /** * Signs user up. * * @return mixed */ -/* public function actionSignup() { $model = new SignupForm(); @@ -187,14 +191,12 @@ class SiteController extends Controller 'model' => $model, ]); } -*/ /** * Requests password reset. * * @return mixed - */ -/* + */ public function actionRequestPasswordReset() { $model = new PasswordResetRequestForm(); @@ -212,7 +214,6 @@ class SiteController extends Controller 'model' => $model, ]); } -*/ /** * Resets password. @@ -221,7 +222,6 @@ class SiteController extends Controller * @return mixed * @throws BadRequestHttpException */ -/* public function actionResetPassword($token) { try { @@ -240,5 +240,4 @@ class SiteController extends Controller 'model' => $model, ]); } -*/ } diff --git a/frontend/views/site-del/about.php b/frontend/views/site-del/about.php deleted file mode 100644 index 8eb0764..0000000 --- a/frontend/views/site-del/about.php +++ /dev/null @@ -1,16 +0,0 @@ -title = 'About'; -$this->params['breadcrumbs'][] = $this->title; -?> -
-

title) ?>

- -

This is the About page. You may modify the following file to customize its content:

- - -
diff --git a/frontend/views/site-del/contact.php b/frontend/views/site-del/contact.php deleted file mode 100644 index 16ebdb2..0000000 --- a/frontend/views/site-del/contact.php +++ /dev/null @@ -1,45 +0,0 @@ -title = 'Contact'; -$this->params['breadcrumbs'][] = $this->title; -?> -
-

title) ?>

- -

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

- -
-
- 'contact-form']); ?> - - field($model, 'name') ?> - - field($model, 'email') ?> - - field($model, 'subject') ?> - - field($model, 'body')->textArea(['rows' => 6]) ?> - - field($model, 'verifyCode')->widget(Captcha::className(), [ - 'template' => '
{image}
{input}
', - ]) ?> - -
- 'btn btn-primary', 'name' => 'contact-button']) ?> -
- - -
-
- -
diff --git a/frontend/views/site-del/error.php b/frontend/views/site-del/error.php deleted file mode 100644 index 0ba2574..0000000 --- a/frontend/views/site-del/error.php +++ /dev/null @@ -1,27 +0,0 @@ -title = $name; -?> -
- -

title) ?>

- -
- -
- -

- The above error occurred while the Web server was processing your request. -

-

- Please contact us if you think this is a server error. Thank you. -

- -
diff --git a/frontend/views/site-del/index.php b/frontend/views/site-del/index.php deleted file mode 100644 index f780610..0000000 --- a/frontend/views/site-del/index.php +++ /dev/null @@ -1,53 +0,0 @@ -title = 'My Yii Application'; -?> -
- -
-

Congratulations!

- -

You have successfully created your Yii-powered application.

- -

Get started with Yii

-
- -
- -
-
-

Heading

- -

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et - dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip - ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu - fugiat nulla pariatur.

- -

Yii Documentation »

-
-
-

Heading

- -

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et - dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip - ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu - fugiat nulla pariatur.

- -

Yii Forum »

-
-
-

Heading

- -

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et - dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip - ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu - fugiat nulla pariatur.

- -

Yii Extensions »

-
-
- -
-
diff --git a/frontend/views/site-del/login.php b/frontend/views/site-del/login.php deleted file mode 100644 index fe67ee0..0000000 --- a/frontend/views/site-del/login.php +++ /dev/null @@ -1,39 +0,0 @@ -title = 'Login'; -$this->params['breadcrumbs'][] = $this->title; -?> -
-

title) ?>

- -

Please fill out the following fields to login:

- -
-
- 'login-form']); ?> - - field($model, 'username') ?> - - field($model, 'password')->passwordInput() ?> - - field($model, 'rememberMe')->checkbox() ?> - -
- If you forgot your password you can . -
- -
- 'btn btn-primary', 'name' => 'login-button']) ?> -
- - -
-
-
diff --git a/frontend/views/site-del/requestPasswordResetToken.php b/frontend/views/site-del/requestPasswordResetToken.php deleted file mode 100644 index 494ddb3..0000000 --- a/frontend/views/site-del/requestPasswordResetToken.php +++ /dev/null @@ -1,31 +0,0 @@ -title = 'Request password reset'; -$this->params['breadcrumbs'][] = $this->title; -?> -
-

title) ?>

- -

Please fill out your email. A link to reset password will be sent there.

- -
-
- 'request-password-reset-form']); ?> - - field($model, 'email') ?> - -
- 'btn btn-primary']) ?> -
- - -
-
-
diff --git a/frontend/views/site-del/resetPassword.php b/frontend/views/site-del/resetPassword.php deleted file mode 100644 index 8e6d93f..0000000 --- a/frontend/views/site-del/resetPassword.php +++ /dev/null @@ -1,31 +0,0 @@ -title = 'Reset password'; -$this->params['breadcrumbs'][] = $this->title; -?> -
-

title) ?>

- -

Please choose your new password:

- -
-
- 'reset-password-form']); ?> - - field($model, 'password')->passwordInput() ?> - -
- 'btn btn-primary']) ?> -
- - -
-
-
diff --git a/frontend/views/site-del/signup.php b/frontend/views/site-del/signup.php deleted file mode 100644 index 58ccd8e..0000000 --- a/frontend/views/site-del/signup.php +++ /dev/null @@ -1,35 +0,0 @@ -title = 'Signup'; -$this->params['breadcrumbs'][] = $this->title; -?> -
-

title) ?>

- -

Please fill out the following fields to signup:

- -
-
- 'form-signup']); ?> - - field($model, 'username') ?> - - field($model, 'email') ?> - - field($model, 'password')->passwordInput() ?> - -
- 'btn btn-primary', 'name' => 'signup-button']) ?> -
- - -
-
-
diff --git a/frontend/views/site/about.php b/frontend/views/site/about.php new file mode 100644 index 0000000..8eb0764 --- /dev/null +++ b/frontend/views/site/about.php @@ -0,0 +1,16 @@ +title = 'About'; +$this->params['breadcrumbs'][] = $this->title; +?> +
+

title) ?>

+ +

This is the About page. You may modify the following file to customize its content:

+ + +
diff --git a/frontend/views/site/contact.php b/frontend/views/site/contact.php new file mode 100644 index 0000000..16ebdb2 --- /dev/null +++ b/frontend/views/site/contact.php @@ -0,0 +1,45 @@ +title = 'Contact'; +$this->params['breadcrumbs'][] = $this->title; +?> +
+

title) ?>

+ +

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

+ +
+
+ 'contact-form']); ?> + + field($model, 'name') ?> + + field($model, 'email') ?> + + field($model, 'subject') ?> + + field($model, 'body')->textArea(['rows' => 6]) ?> + + field($model, 'verifyCode')->widget(Captcha::className(), [ + 'template' => '
{image}
{input}
', + ]) ?> + +
+ 'btn btn-primary', 'name' => 'contact-button']) ?> +
+ + +
+
+ +
diff --git a/frontend/views/site/login.php b/frontend/views/site/login.php new file mode 100644 index 0000000..fe67ee0 --- /dev/null +++ b/frontend/views/site/login.php @@ -0,0 +1,39 @@ +title = 'Login'; +$this->params['breadcrumbs'][] = $this->title; +?> +
+

title) ?>

+ +

Please fill out the following fields to login:

+ +
+
+ 'login-form']); ?> + + field($model, 'username') ?> + + field($model, 'password')->passwordInput() ?> + + field($model, 'rememberMe')->checkbox() ?> + +
+ If you forgot your password you can . +
+ +
+ 'btn btn-primary', 'name' => 'login-button']) ?> +
+ + +
+
+
diff --git a/frontend/views/site/requestPasswordResetToken.php b/frontend/views/site/requestPasswordResetToken.php new file mode 100644 index 0000000..494ddb3 --- /dev/null +++ b/frontend/views/site/requestPasswordResetToken.php @@ -0,0 +1,31 @@ +title = 'Request password reset'; +$this->params['breadcrumbs'][] = $this->title; +?> +
+

title) ?>

+ +

Please fill out your email. A link to reset password will be sent there.

+ +
+
+ 'request-password-reset-form']); ?> + + field($model, 'email') ?> + +
+ 'btn btn-primary']) ?> +
+ + +
+
+
diff --git a/frontend/views/site/resetPassword.php b/frontend/views/site/resetPassword.php new file mode 100644 index 0000000..8e6d93f --- /dev/null +++ b/frontend/views/site/resetPassword.php @@ -0,0 +1,31 @@ +title = 'Reset password'; +$this->params['breadcrumbs'][] = $this->title; +?> +
+

title) ?>

+ +

Please choose your new password:

+ +
+
+ 'reset-password-form']); ?> + + field($model, 'password')->passwordInput() ?> + +
+ 'btn btn-primary']) ?> +
+ + +
+
+
diff --git a/frontend/views/site/signup.php b/frontend/views/site/signup.php new file mode 100644 index 0000000..58ccd8e --- /dev/null +++ b/frontend/views/site/signup.php @@ -0,0 +1,35 @@ +title = 'Signup'; +$this->params['breadcrumbs'][] = $this->title; +?> +
+

title) ?>

+ +

Please fill out the following fields to signup:

+ +
+
+ 'form-signup']); ?> + + field($model, 'username') ?> + + field($model, 'email') ?> + + field($model, 'password')->passwordInput() ?> + +
+ 'btn btn-primary', 'name' => 'signup-button']) ?> +
+ + +
+
+
-- libgit2 0.21.4