From 759c303a655b2f6e67eca4528bc03fadea4c8dcd Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Fri, 24 May 2013 10:14:49 -0400 Subject: [PATCH] Renamed apps/bootstrap to apps/basic. --- README.md | 2 +- apps/basic/LICENSE.md | 32 +++++++++ apps/basic/README.md | 61 +++++++++++++++++ apps/basic/assets/.gitignore | 1 + apps/basic/commands/HelloController.php | 29 ++++++++ apps/basic/composer.json | 38 +++++++++++ apps/basic/config/assets.php | 18 +++++ apps/basic/config/console.php | 26 ++++++++ apps/basic/config/main.php | 38 +++++++++++ apps/basic/config/params.php | 5 ++ apps/basic/controllers/SiteController.php | 61 +++++++++++++++++ apps/basic/models/ContactForm.php | 63 ++++++++++++++++++ apps/basic/models/LoginForm.php | 58 ++++++++++++++++ apps/basic/models/User.php | 61 +++++++++++++++++ apps/basic/requirements.php | 96 +++++++++++++++++++++++++++ apps/basic/runtime/.gitignore | 1 + apps/basic/vendor/.gitignore | 1 + apps/basic/views/layouts/main.php | 66 ++++++++++++++++++ apps/basic/views/site/about.php | 16 +++++ apps/basic/views/site/contact.php | 46 +++++++++++++ apps/basic/views/site/index.php | 47 +++++++++++++ apps/basic/views/site/login.php | 24 +++++++ apps/basic/www/assets/.gitignore | 1 + apps/basic/www/css/site.css | 78 ++++++++++++++++++++++ apps/basic/www/index.php | 12 ++++ apps/basic/yii | 22 ++++++ apps/basic/yii.bat | 20 ++++++ apps/bootstrap/LICENSE.md | 32 --------- apps/bootstrap/README.md | 61 ----------------- apps/bootstrap/assets/.gitignore | 1 - apps/bootstrap/commands/HelloController.php | 29 -------- apps/bootstrap/composer.json | 38 ----------- apps/bootstrap/config/assets.php | 18 ----- apps/bootstrap/config/console.php | 26 -------- apps/bootstrap/config/main.php | 38 ----------- apps/bootstrap/config/params.php | 5 -- apps/bootstrap/controllers/SiteController.php | 61 ----------------- apps/bootstrap/models/ContactForm.php | 63 ------------------ apps/bootstrap/models/LoginForm.php | 58 ---------------- apps/bootstrap/models/User.php | 61 ----------------- apps/bootstrap/requirements.php | 96 --------------------------- apps/bootstrap/runtime/.gitignore | 1 - apps/bootstrap/vendor/.gitignore | 1 - apps/bootstrap/views/layouts/main.php | 66 ------------------ apps/bootstrap/views/site/about.php | 16 ----- apps/bootstrap/views/site/contact.php | 46 ------------- apps/bootstrap/views/site/index.php | 47 ------------- apps/bootstrap/views/site/login.php | 24 ------- apps/bootstrap/www/assets/.gitignore | 1 - apps/bootstrap/www/css/site.css | 78 ---------------------- apps/bootstrap/www/index.php | 12 ---- apps/bootstrap/yii | 22 ------ apps/bootstrap/yii.bat | 20 ------ 53 files changed, 922 insertions(+), 922 deletions(-) create mode 100644 apps/basic/LICENSE.md create mode 100644 apps/basic/README.md create mode 100644 apps/basic/assets/.gitignore create mode 100644 apps/basic/commands/HelloController.php create mode 100644 apps/basic/composer.json create mode 100644 apps/basic/config/assets.php create mode 100644 apps/basic/config/console.php create mode 100644 apps/basic/config/main.php create mode 100644 apps/basic/config/params.php create mode 100644 apps/basic/controllers/SiteController.php create mode 100644 apps/basic/models/ContactForm.php create mode 100644 apps/basic/models/LoginForm.php create mode 100644 apps/basic/models/User.php create mode 100644 apps/basic/requirements.php create mode 100644 apps/basic/runtime/.gitignore create mode 100644 apps/basic/vendor/.gitignore create mode 100644 apps/basic/views/layouts/main.php create mode 100644 apps/basic/views/site/about.php create mode 100644 apps/basic/views/site/contact.php create mode 100644 apps/basic/views/site/index.php create mode 100644 apps/basic/views/site/login.php create mode 100644 apps/basic/www/assets/.gitignore create mode 100644 apps/basic/www/css/site.css create mode 100644 apps/basic/www/index.php create mode 100755 apps/basic/yii create mode 100644 apps/basic/yii.bat delete mode 100644 apps/bootstrap/LICENSE.md delete mode 100644 apps/bootstrap/README.md delete mode 100644 apps/bootstrap/assets/.gitignore delete mode 100644 apps/bootstrap/commands/HelloController.php delete mode 100644 apps/bootstrap/composer.json delete mode 100644 apps/bootstrap/config/assets.php delete mode 100644 apps/bootstrap/config/console.php delete mode 100644 apps/bootstrap/config/main.php delete mode 100644 apps/bootstrap/config/params.php delete mode 100644 apps/bootstrap/controllers/SiteController.php delete mode 100644 apps/bootstrap/models/ContactForm.php delete mode 100644 apps/bootstrap/models/LoginForm.php delete mode 100644 apps/bootstrap/models/User.php delete mode 100644 apps/bootstrap/requirements.php delete mode 100644 apps/bootstrap/runtime/.gitignore delete mode 100644 apps/bootstrap/vendor/.gitignore delete mode 100644 apps/bootstrap/views/layouts/main.php delete mode 100644 apps/bootstrap/views/site/about.php delete mode 100644 apps/bootstrap/views/site/contact.php delete mode 100644 apps/bootstrap/views/site/index.php delete mode 100644 apps/bootstrap/views/site/login.php delete mode 100644 apps/bootstrap/www/assets/.gitignore delete mode 100644 apps/bootstrap/www/css/site.css delete mode 100644 apps/bootstrap/www/index.php delete mode 100755 apps/bootstrap/yii delete mode 100644 apps/bootstrap/yii.bat diff --git a/README.md b/README.md index 54bd499..9bd6480 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ DIRECTORY STRUCTURE ------------------- apps/ ready-to-use Web apps built on Yii 2 - bootstrap/ a simple app supporting user login and contact page + basic/ a simple app supporting user login and contact page build/ internally used build tools docs/ documentation yii/ framework source files diff --git a/apps/basic/LICENSE.md b/apps/basic/LICENSE.md new file mode 100644 index 0000000..6edcc4f --- /dev/null +++ b/apps/basic/LICENSE.md @@ -0,0 +1,32 @@ +The Yii framework is free software. It is released under the terms of +the following BSD License. + +Copyright © 2008-2013 by Yii Software LLC (http://www.yiisoft.com) +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + * Neither the name of Yii Software LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/apps/basic/README.md b/apps/basic/README.md new file mode 100644 index 0000000..47e5ca6 --- /dev/null +++ b/apps/basic/README.md @@ -0,0 +1,61 @@ +Yii 2 Basic Application Template +================================ + +**NOTE** Yii 2 and the relevant applications and extensions are still under heavy +development. We may make significant changes without prior notices. Please do not +use them for production. Please consider using [Yii v1.1](https://github.com/yiisoft/yii) +if you have a project to be deployed for production soon. + + +Thank you for using Yii 2 Basic Application Template - an application template +that works out-of-box and can be easily customized to fit for your needs. + +Yii 2 Basic Application Template is best suitable for small Websites which mainly contain +a few informational pages. + + +DIRECTORY STRUCTURE +------------------- + + commands/ contains console commands (controllers) + config/ contains application configurations + controllers/ contains Web controller classes + models/ contains model classes + runtime/ contains files generated during runtime + vendor/ contains dependent 3rd-party packages + views/ contains view files for the Web application + www/ contains the entry script and Web resources + + + +REQUIREMENTS +------------ + +The minimum requirement by Yii is that your Web server supports PHP 5.3.?. + + +INSTALLATION +------------ + +### Install via Composer + +If you do not have [Composer](http://getcomposer.org/), you may download it from +[http://getcomposer.org/](http://getcomposer.org/) or run the following command on Linux/Unix/MacOS: + +~~~ +curl -s http://getcomposer.org/installer | php +~~~ + +You can then install the Bootstrap Application using the following command: + +~~~ +php composer.phar create-project --stability=dev yiisoft/yii2-app-basic yii-basic +~~~ + +Now you should be able to access the Bootstrap Application using the URL `http://localhost/yii-basic/www/`, +assuming `yii-basic` is directly under the document root of your Web server. + + +### Install from an Archive File + +This is not currently available. We will provide it when Yii 2 is formally released. diff --git a/apps/basic/assets/.gitignore b/apps/basic/assets/.gitignore new file mode 100644 index 0000000..72e8ffc --- /dev/null +++ b/apps/basic/assets/.gitignore @@ -0,0 +1 @@ +* diff --git a/apps/basic/commands/HelloController.php b/apps/basic/commands/HelloController.php new file mode 100644 index 0000000..b5ecac2 --- /dev/null +++ b/apps/basic/commands/HelloController.php @@ -0,0 +1,29 @@ + + * @since 2.0 + */ +class HelloController extends Controller +{ + /** + * This command echos what you have entered as the message. + * @param string $message the message to be echoed. + */ + public function actionIndex($message = 'hello world') + { + echo $message."\n"; + } +} \ No newline at end of file diff --git a/apps/basic/composer.json b/apps/basic/composer.json new file mode 100644 index 0000000..29b05d1 --- /dev/null +++ b/apps/basic/composer.json @@ -0,0 +1,38 @@ +{ + "name": "yiisoft/yii2-app-basic", + "description": "Yii 2 Basic Application Template", + "keywords": ["yii", "framework", "basic", "application template"], + "homepage": "http://www.yiiframework.com/", + "type": "project", + "license": "BSD-3-Clause", + "support": { + "issues": "https://github.com/yiisoft/yii2/issues?state=open", + "forum": "http://www.yiiframework.com/forum/", + "wiki": "http://www.yiiframework.com/wiki/", + "irc": "irc://irc.freenode.net/yii", + "source": "https://github.com/yiisoft/yii2" + }, + "minimum-stability": "dev", + "require": { + "php": ">=5.3.0", + "yiisoft/yii2": "dev-master", + "yiisoft/yii2-composer": "dev-master" + }, + "scripts": { + "post-install-cmd": [ + "yii\\composer\\InstallHandler::setPermissions" + ], + "post-update-cmd": [ + "yii\\composer\\InstallHandler::setPermissions" + ] + }, + "extra": { + "yii-install-writable": [ + "runtime", + "www/assets" + ], + "yii-install-executable": [ + "yii" + ] + } +} diff --git a/apps/basic/config/assets.php b/apps/basic/config/assets.php new file mode 100644 index 0000000..ee0d610 --- /dev/null +++ b/apps/basic/config/assets.php @@ -0,0 +1,18 @@ + array( + 'basePath' => '@wwwroot', + 'baseUrl' => '@www', + 'css' => array( + 'css/site.css', + ), + 'js' => array( + + ), + 'depends' => array( + 'yii', + 'yii/bootstrap/responsive', + ), + ), +); diff --git a/apps/basic/config/console.php b/apps/basic/config/console.php new file mode 100644 index 0000000..df96023 --- /dev/null +++ b/apps/basic/config/console.php @@ -0,0 +1,26 @@ + 'bootstrap-console', + 'basePath' => dirname(__DIR__), + 'preload' => array('log'), + 'controllerPath' => dirname(__DIR__) . '/commands', + 'controllerNamespace' => 'app\commands', + 'modules' => array( + ), + 'components' => array( + 'cache' => array( + 'class' => 'yii\caching\FileCache', + ), + 'log' => array( + 'class' => 'yii\logging\Router', + 'targets' => array( + array( + 'class' => 'yii\logging\FileTarget', + 'levels' => array('error', 'warning'), + ), + ), + ), + ), + 'params' => require(__DIR__ . '/params.php'), +); diff --git a/apps/basic/config/main.php b/apps/basic/config/main.php new file mode 100644 index 0000000..b5980da --- /dev/null +++ b/apps/basic/config/main.php @@ -0,0 +1,38 @@ + 'bootstrap', + 'basePath' => dirname(__DIR__), + 'preload' => array('log'), + 'controllerNamespace' => 'app\controllers', + 'modules' => array( +// 'debug' => array( +// 'class' => 'yii\debug\Module', +// ) + ), + 'components' => array( + 'cache' => array( + 'class' => 'yii\caching\FileCache', + ), + 'user' => array( + 'class' => 'yii\web\User', + 'identityClass' => 'app\models\User', + ), + 'assetManager' => array( + 'bundles' => require(__DIR__ . '/assets.php'), + ), + 'log' => array( + 'class' => 'yii\logging\Router', + 'targets' => array( + array( + 'class' => 'yii\logging\FileTarget', + 'levels' => array('error', 'warning'), + ), +// array( +// 'class' => 'yii\logging\DebugTarget', +// ) + ), + ), + ), + 'params' => require(__DIR__ . '/params.php'), +); diff --git a/apps/basic/config/params.php b/apps/basic/config/params.php new file mode 100644 index 0000000..1e197d0 --- /dev/null +++ b/apps/basic/config/params.php @@ -0,0 +1,5 @@ + 'admin@example.com', +); \ No newline at end of file diff --git a/apps/basic/controllers/SiteController.php b/apps/basic/controllers/SiteController.php new file mode 100644 index 0000000..ff3b8b4 --- /dev/null +++ b/apps/basic/controllers/SiteController.php @@ -0,0 +1,61 @@ + array( + 'class' => 'yii\web\CaptchaAction', + ), + ); + } + + public function actionIndex() + { + echo $this->render('index'); + } + + public function actionLogin() + { + $model = new LoginForm(); + if ($this->populate($_POST, $model) && $model->login()) { + Yii::$app->response->redirect(array('site/index')); + } else { + echo $this->render('login', array( + 'model' => $model, + )); + } + } + + public function actionLogout() + { + Yii::$app->getUser()->logout(); + Yii::$app->getResponse()->redirect(array('site/index')); + } + + public function actionContact() + { + $model = new ContactForm; + if ($this->populate($_POST, $model) && $model->contact(Yii::$app->params['adminEmail'])) { + Yii::$app->session->setFlash('contactFormSubmitted'); + Yii::$app->response->refresh(); + } else { + echo $this->render('contact', array( + 'model' => $model, + )); + } + } + + public function actionAbout() + { + echo $this->render('about'); + } +} diff --git a/apps/basic/models/ContactForm.php b/apps/basic/models/ContactForm.php new file mode 100644 index 0000000..7b713a1 --- /dev/null +++ b/apps/basic/models/ContactForm.php @@ -0,0 +1,63 @@ + 'Verification Code', + ); + } + + /** + * Sends an email to the specified email address using the information collected by this model. + * @param string $email the target email address + * @return boolean whether the model passes validation + */ + public function contact($email) + { + if ($this->validate()) { + $name = '=?UTF-8?B?' . base64_encode($this->name) . '?='; + $subject = '=?UTF-8?B?' . base64_encode($this->subject) . '?='; + $headers = "From: $name <{$this->email}>\r\n" . + "Reply-To: {$this->email}\r\n" . + "MIME-Version: 1.0\r\n" . + "Content-type: text/plain; charset=UTF-8"; + mail($email, $subject, $this->body, $headers); + return true; + } else { + return false; + } + } +} diff --git a/apps/basic/models/LoginForm.php b/apps/basic/models/LoginForm.php new file mode 100644 index 0000000..5ba1dc6 --- /dev/null +++ b/apps/basic/models/LoginForm.php @@ -0,0 +1,58 @@ +username); + if (!$user || !$user->validatePassword($this->password)) { + $this->addError('password', 'Incorrect username or password.'); + } + } + + /** + * Logs in a user using the provided username and password. + * @return boolean whether the user is logged in successfully + */ + public function login() + { + if ($this->validate()) { + $user = User::findByUsername($this->username); + Yii::$app->user->login($user, $this->rememberMe ? 3600*24*30 : 0); + return true; + } else { + return false; + } + } +} diff --git a/apps/basic/models/User.php b/apps/basic/models/User.php new file mode 100644 index 0000000..afbf9f8 --- /dev/null +++ b/apps/basic/models/User.php @@ -0,0 +1,61 @@ + array( + 'id' => '100', + 'username' => 'admin', + 'password' => 'admin', + 'authKey' => 'test100key', + ), + '101' => array( + 'id' => '101', + 'username' => 'demo', + 'password' => 'demo', + 'authKey' => 'test101key', + ), + ); + + public static function findIdentity($id) + { + return isset(self::$users[$id]) ? new self(self::$users[$id]) : null; + } + + public static function findByUsername($username) + { + foreach (self::$users as $user) { + if (strcasecmp($user['username'], $username) === 0) { + return new self($user); + } + } + return null; + } + + public function getId() + { + return $this->id; + } + + public function getAuthKey() + { + return $this->authKey; + } + + public function validateAuthKey($authKey) + { + return $this->authKey === $authKey; + } + + public function validatePassword($password) + { + return $this->password === $password; + } +} diff --git a/apps/basic/requirements.php b/apps/basic/requirements.php new file mode 100644 index 0000000..5a2d910 --- /dev/null +++ b/apps/basic/requirements.php @@ -0,0 +1,96 @@ + 'PDO extension', + 'mandatory' => true, + 'condition' => extension_loaded('pdo'), + 'by' => 'All DB-related classes', + ), + array( + 'name' => 'PDO SQLite extension', + 'mandatory' => false, + 'condition' => extension_loaded('pdo_sqlite'), + 'by' => 'All DB-related classes', + 'memo' => 'Required for SQLite database.', + ), + array( + 'name' => 'PDO MySQL extension', + 'mandatory' => false, + 'condition' => extension_loaded('pdo_mysql'), + 'by' => 'All DB-related classes', + 'memo' => 'Required for MySQL database.', + ), + // Cache : + array( + 'name' => 'Memcache extension', + 'mandatory' => false, + 'condition' => extension_loaded('memcache') || extension_loaded('memcached'), + 'by' => 'CMemCache', + 'memo' => extension_loaded('memcached') ? 'To use memcached set CMemCache::useMemcached to true.' : '' + ), + array( + 'name' => 'APC extension', + 'mandatory' => false, + 'condition' => extension_loaded('apc') || extension_loaded('apc'), + 'by' => 'CApcCache', + ), + // Additional PHP extensions : + array( + 'name' => 'Mcrypt extension', + 'mandatory' => false, + 'condition' => extension_loaded('mcrypt'), + 'by' => 'CSecurityManager', + 'memo' => 'Required by encrypt and decrypt methods.' + ), + // PHP ini : + 'phpSafeMode' => array( + 'name' => 'PHP safe mode', + 'mandatory' => false, + 'condition' => $requirementsChecker->checkPhpIniOff("safe_mode"), + 'by' => 'File uploading and console command execution', + 'memo' => '"safe_mode" should be disabled at php.ini', + ), + 'phpExposePhp' => array( + 'name' => 'Expose PHP', + 'mandatory' => false, + 'condition' => $requirementsChecker->checkPhpIniOff("expose_php"), + 'by' => 'Security reasons', + 'memo' => '"expose_php" should be disabled at php.ini', + ), + 'phpAllowUrlInclude' => array( + 'name' => 'PHP allow url include', + 'mandatory' => false, + 'condition' => $requirementsChecker->checkPhpIniOff("allow_url_include"), + 'by' => 'Security reasons', + 'memo' => '"allow_url_include" should be disabled at php.ini', + ), + 'phpSmtp' => array( + 'name' => 'PHP mail SMTP', + 'mandatory' => false, + 'condition' => strlen(ini_get('SMTP'))>0, + 'by' => 'Email sending', + 'memo' => 'PHP mail SMTP server required', + ), +); +$requirementsChecker->checkYii()->check($requirements)->render(); diff --git a/apps/basic/runtime/.gitignore b/apps/basic/runtime/.gitignore new file mode 100644 index 0000000..72e8ffc --- /dev/null +++ b/apps/basic/runtime/.gitignore @@ -0,0 +1 @@ +* diff --git a/apps/basic/vendor/.gitignore b/apps/basic/vendor/.gitignore new file mode 100644 index 0000000..72e8ffc --- /dev/null +++ b/apps/basic/vendor/.gitignore @@ -0,0 +1 @@ +* diff --git a/apps/basic/views/layouts/main.php b/apps/basic/views/layouts/main.php new file mode 100644 index 0000000..635e118 --- /dev/null +++ b/apps/basic/views/layouts/main.php @@ -0,0 +1,66 @@ +registerAssetBundle('app'); +?> +beginPage(); ?> + + + + + <?php echo Html::encode($this->title); ?> + head(); ?> + + +
+ beginBody(); ?> +
+

My Company

+ + + +
+ + isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : array(), + )); ?> + + +
+ + + endBody(); ?> +
+ + + +endPage(); ?> diff --git a/apps/basic/views/site/about.php b/apps/basic/views/site/about.php new file mode 100644 index 0000000..86e19e1 --- /dev/null +++ b/apps/basic/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/apps/basic/views/site/contact.php b/apps/basic/views/site/contact.php new file mode 100644 index 0000000..e740d0f --- /dev/null +++ b/apps/basic/views/site/contact.php @@ -0,0 +1,46 @@ +title = 'Contact'; +$this->params['breadcrumbs'][] = $this->title; +?> +

title); ?>

+ +session->hasFlash('contactFormSubmitted')): ?> +
+ Thank you for contacting us. We will respond to you as soon as possible. +
+ + +

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

+ + array('class' => 'form-horizontal'), + 'fieldConfig' => array('inputOptions' => array('class' => 'input-xlarge')), +)); ?> + field($model, 'name')->textInput(); ?> + field($model, 'email')->textInput(); ?> + field($model, 'subject')->textInput(); ?> + field($model, 'body')->textArea(array('rows' => 6)); ?> + field($model, 'verifyCode'); + echo $field->begin() + . $field->label() + . Captcha::widget() + . Html::activeTextInput($model, 'verifyCode', array('class' => 'input-medium')) + . $field->error() + . $field->end(); + ?> +
+ 'btn btn-primary')); ?> +
+ diff --git a/apps/basic/views/site/index.php b/apps/basic/views/site/index.php new file mode 100644 index 0000000..158b61c --- /dev/null +++ b/apps/basic/views/site/index.php @@ -0,0 +1,47 @@ +title = 'Welcome'; +?> +
+

Welcome!

+ +

Cras justo odio, dapibus ac facilisis in, egestas eget quam. Fusce dapibus, tellus ac cursus + commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.

+ Get started with Yii +
+ +
+ + +
+
+

Heading

+ +

Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris + condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. + Donec sed odio dui.

+ +

View details »

+
+
+

Heading

+ +

Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris + condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. + Donec sed odio dui.

+ +

View details »

+
+
+

Heading

+ +

Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta + felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum + massa.

+ +

View details »

+
+
+ diff --git a/apps/basic/views/site/login.php b/apps/basic/views/site/login.php new file mode 100644 index 0000000..f676b98 --- /dev/null +++ b/apps/basic/views/site/login.php @@ -0,0 +1,24 @@ +title = 'Login'; +$this->params['breadcrumbs'][] = $this->title; +?> +

title); ?>

+ +

Please fill out the following fields to login:

+ + array('class' => 'form-horizontal'))); ?> + field($model, 'username')->textInput(); ?> + field($model, 'password')->passwordInput(); ?> + field($model, 'rememberMe')->checkbox(); ?> +
+ 'btn btn-primary')); ?> +
+ diff --git a/apps/basic/www/assets/.gitignore b/apps/basic/www/assets/.gitignore new file mode 100644 index 0000000..72e8ffc --- /dev/null +++ b/apps/basic/www/assets/.gitignore @@ -0,0 +1 @@ +* diff --git a/apps/basic/www/css/site.css b/apps/basic/www/css/site.css new file mode 100644 index 0000000..890a953 --- /dev/null +++ b/apps/basic/www/css/site.css @@ -0,0 +1,78 @@ +body { + padding-top: 20px; + padding-bottom: 60px; +} + +/* Custom container */ +.container { + margin: 0 auto; + max-width: 1000px; +} + +.container > hr { + margin: 60px 0; +} + +/* Main marketing message and sign up button */ +.jumbotron { + margin: 80px 0; + text-align: center; +} + +.jumbotron h1 { + font-size: 100px; + line-height: 1; +} + +.jumbotron .lead { + font-size: 24px; + line-height: 1.25; +} + +.jumbotron .btn { + font-size: 21px; + padding: 14px 24px; +} + +/* Supporting marketing content */ +.marketing { + margin: 60px 0; +} + +.marketing p + h4 { + margin-top: 28px; +} + +/* Customize the navbar links to be fill the entire space of the .navbar */ +.navbar .navbar-inner { + padding: 0; +} + +.navbar .nav { + margin: 0; + display: table; + width: 100%; +} + +.navbar .nav li { + display: table-cell; + width: 1%; + float: none; +} + +.navbar .nav li a { + font-weight: bold; + text-align: center; + border-left: 1px solid rgba(255, 255, 255, .75); + border-right: 1px solid rgba(0, 0, 0, .1); +} + +.navbar .nav li:first-child a { + border-left: 0; + border-radius: 3px 0 0 3px; +} + +.navbar .nav li:last-child a { + border-right: 0; + border-radius: 0 3px 3px 0; +} diff --git a/apps/basic/www/index.php b/apps/basic/www/index.php new file mode 100644 index 0000000..3b7b2fc --- /dev/null +++ b/apps/basic/www/index.php @@ -0,0 +1,12 @@ +run(); diff --git a/apps/basic/yii b/apps/basic/yii new file mode 100755 index 0000000..0793523 --- /dev/null +++ b/apps/basic/yii @@ -0,0 +1,22 @@ +#!/usr/bin/env php +run(); diff --git a/apps/basic/yii.bat b/apps/basic/yii.bat new file mode 100644 index 0000000..5e21e2e --- /dev/null +++ b/apps/basic/yii.bat @@ -0,0 +1,20 @@ +@echo off + +rem ------------------------------------------------------------- +rem Yii command line bootstrap script for Windows. +rem +rem @author Qiang Xue +rem @link http://www.yiiframework.com/ +rem @copyright Copyright © 2012 Yii Software LLC +rem @license http://www.yiiframework.com/license/ +rem ------------------------------------------------------------- + +@setlocal + +set YII_PATH=%~dp0 + +if "%PHP_COMMAND%" == "" set PHP_COMMAND=php.exe + +"%PHP_COMMAND%" "%YII_PATH%yii" %* + +@endlocal diff --git a/apps/bootstrap/LICENSE.md b/apps/bootstrap/LICENSE.md deleted file mode 100644 index 6edcc4f..0000000 --- a/apps/bootstrap/LICENSE.md +++ /dev/null @@ -1,32 +0,0 @@ -The Yii framework is free software. It is released under the terms of -the following BSD License. - -Copyright © 2008-2013 by Yii Software LLC (http://www.yiisoft.com) -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - * Neither the name of Yii Software LLC nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/apps/bootstrap/README.md b/apps/bootstrap/README.md deleted file mode 100644 index a1376ba..0000000 --- a/apps/bootstrap/README.md +++ /dev/null @@ -1,61 +0,0 @@ -Yii 2 Bootstrap Application -=========================== - -**NOTE** Yii 2 and the relevant applications and extensions are still under heavy -development. We may make significant changes without prior notices. Please do not -use them for production. Please consider using [Yii v1.1](https://github.com/yiisoft/yii) -if you have a project to be deployed for production soon. - - -Thank you for choosing Yii 2 - the new generation of high-performance PHP framework. - -The Yii 2 Bootstrap Application is a Web application template that you can easily customize -to fit for your needs. It is particularly suitable for small Websites which mainly contain -a few informational pages. - - -DIRECTORY STRUCTURE -------------------- - - commands/ contains console commands (controllers) - config/ contains application configurations - controllers/ contains Web controller classes - models/ contains model classes - runtime/ contains files generated during runtime - vendor/ contains dependent 3rd-party packages - views/ contains view files for the Web application - www/ contains the entry script and Web resources - - - -REQUIREMENTS ------------- - -The minimum requirement by Yii is that your Web server supports PHP 5.3.?. - - -INSTALLATION ------------- - -### Install via Composer - -If you do not have [Composer](http://getcomposer.org/), you may download it from -[http://getcomposer.org/](http://getcomposer.org/) or run the following command on Linux/Unix/MacOS: - -~~~ -curl -s http://getcomposer.org/installer | php -~~~ - -You can then install the Bootstrap Application using the following command: - -~~~ -php composer.phar create-project --stability=dev yiisoft/yii2-bootstrap bootstrap -~~~ - -Now you should be able to access the Bootstrap Application using the URL `http://localhost/bootstrap/www/`, -assuming `bootstrap` is directly under the document root of your Web server. - - -### Install from an Archive File - -This is not currently available. We will provide it when Yii 2 is formally released. diff --git a/apps/bootstrap/assets/.gitignore b/apps/bootstrap/assets/.gitignore deleted file mode 100644 index 72e8ffc..0000000 --- a/apps/bootstrap/assets/.gitignore +++ /dev/null @@ -1 +0,0 @@ -* diff --git a/apps/bootstrap/commands/HelloController.php b/apps/bootstrap/commands/HelloController.php deleted file mode 100644 index b5ecac2..0000000 --- a/apps/bootstrap/commands/HelloController.php +++ /dev/null @@ -1,29 +0,0 @@ - - * @since 2.0 - */ -class HelloController extends Controller -{ - /** - * This command echos what you have entered as the message. - * @param string $message the message to be echoed. - */ - public function actionIndex($message = 'hello world') - { - echo $message."\n"; - } -} \ No newline at end of file diff --git a/apps/bootstrap/composer.json b/apps/bootstrap/composer.json deleted file mode 100644 index d44e35a..0000000 --- a/apps/bootstrap/composer.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "yiisoft/yii2-bootstrap", - "description": "Yii 2 Bootstrap Application", - "keywords": ["yii", "framework", "bootstrap"], - "homepage": "http://www.yiiframework.com/", - "type": "project", - "license": "BSD-3-Clause", - "support": { - "issues": "https://github.com/yiisoft/yii2/issues?state=open", - "forum": "http://www.yiiframework.com/forum/", - "wiki": "http://www.yiiframework.com/wiki/", - "irc": "irc://irc.freenode.net/yii", - "source": "https://github.com/yiisoft/yii2" - }, - "minimum-stability": "dev", - "require": { - "php": ">=5.3.0", - "yiisoft/yii2": "dev-master", - "yiisoft/yii2-composer": "dev-master" - }, - "scripts": { - "post-install-cmd": [ - "yii\\composer\\InstallHandler::setPermissions" - ], - "post-update-cmd": [ - "yii\\composer\\InstallHandler::setPermissions" - ] - }, - "extra": { - "yii-install-writable": [ - "runtime", - "www/assets" - ], - "yii-install-executable": [ - "yii" - ] - } -} diff --git a/apps/bootstrap/config/assets.php b/apps/bootstrap/config/assets.php deleted file mode 100644 index ee0d610..0000000 --- a/apps/bootstrap/config/assets.php +++ /dev/null @@ -1,18 +0,0 @@ - array( - 'basePath' => '@wwwroot', - 'baseUrl' => '@www', - 'css' => array( - 'css/site.css', - ), - 'js' => array( - - ), - 'depends' => array( - 'yii', - 'yii/bootstrap/responsive', - ), - ), -); diff --git a/apps/bootstrap/config/console.php b/apps/bootstrap/config/console.php deleted file mode 100644 index df96023..0000000 --- a/apps/bootstrap/config/console.php +++ /dev/null @@ -1,26 +0,0 @@ - 'bootstrap-console', - 'basePath' => dirname(__DIR__), - 'preload' => array('log'), - 'controllerPath' => dirname(__DIR__) . '/commands', - 'controllerNamespace' => 'app\commands', - 'modules' => array( - ), - 'components' => array( - 'cache' => array( - 'class' => 'yii\caching\FileCache', - ), - 'log' => array( - 'class' => 'yii\logging\Router', - 'targets' => array( - array( - 'class' => 'yii\logging\FileTarget', - 'levels' => array('error', 'warning'), - ), - ), - ), - ), - 'params' => require(__DIR__ . '/params.php'), -); diff --git a/apps/bootstrap/config/main.php b/apps/bootstrap/config/main.php deleted file mode 100644 index b5980da..0000000 --- a/apps/bootstrap/config/main.php +++ /dev/null @@ -1,38 +0,0 @@ - 'bootstrap', - 'basePath' => dirname(__DIR__), - 'preload' => array('log'), - 'controllerNamespace' => 'app\controllers', - 'modules' => array( -// 'debug' => array( -// 'class' => 'yii\debug\Module', -// ) - ), - 'components' => array( - 'cache' => array( - 'class' => 'yii\caching\FileCache', - ), - 'user' => array( - 'class' => 'yii\web\User', - 'identityClass' => 'app\models\User', - ), - 'assetManager' => array( - 'bundles' => require(__DIR__ . '/assets.php'), - ), - 'log' => array( - 'class' => 'yii\logging\Router', - 'targets' => array( - array( - 'class' => 'yii\logging\FileTarget', - 'levels' => array('error', 'warning'), - ), -// array( -// 'class' => 'yii\logging\DebugTarget', -// ) - ), - ), - ), - 'params' => require(__DIR__ . '/params.php'), -); diff --git a/apps/bootstrap/config/params.php b/apps/bootstrap/config/params.php deleted file mode 100644 index 1e197d0..0000000 --- a/apps/bootstrap/config/params.php +++ /dev/null @@ -1,5 +0,0 @@ - 'admin@example.com', -); \ No newline at end of file diff --git a/apps/bootstrap/controllers/SiteController.php b/apps/bootstrap/controllers/SiteController.php deleted file mode 100644 index ff3b8b4..0000000 --- a/apps/bootstrap/controllers/SiteController.php +++ /dev/null @@ -1,61 +0,0 @@ - array( - 'class' => 'yii\web\CaptchaAction', - ), - ); - } - - public function actionIndex() - { - echo $this->render('index'); - } - - public function actionLogin() - { - $model = new LoginForm(); - if ($this->populate($_POST, $model) && $model->login()) { - Yii::$app->response->redirect(array('site/index')); - } else { - echo $this->render('login', array( - 'model' => $model, - )); - } - } - - public function actionLogout() - { - Yii::$app->getUser()->logout(); - Yii::$app->getResponse()->redirect(array('site/index')); - } - - public function actionContact() - { - $model = new ContactForm; - if ($this->populate($_POST, $model) && $model->contact(Yii::$app->params['adminEmail'])) { - Yii::$app->session->setFlash('contactFormSubmitted'); - Yii::$app->response->refresh(); - } else { - echo $this->render('contact', array( - 'model' => $model, - )); - } - } - - public function actionAbout() - { - echo $this->render('about'); - } -} diff --git a/apps/bootstrap/models/ContactForm.php b/apps/bootstrap/models/ContactForm.php deleted file mode 100644 index 7b713a1..0000000 --- a/apps/bootstrap/models/ContactForm.php +++ /dev/null @@ -1,63 +0,0 @@ - 'Verification Code', - ); - } - - /** - * Sends an email to the specified email address using the information collected by this model. - * @param string $email the target email address - * @return boolean whether the model passes validation - */ - public function contact($email) - { - if ($this->validate()) { - $name = '=?UTF-8?B?' . base64_encode($this->name) . '?='; - $subject = '=?UTF-8?B?' . base64_encode($this->subject) . '?='; - $headers = "From: $name <{$this->email}>\r\n" . - "Reply-To: {$this->email}\r\n" . - "MIME-Version: 1.0\r\n" . - "Content-type: text/plain; charset=UTF-8"; - mail($email, $subject, $this->body, $headers); - return true; - } else { - return false; - } - } -} diff --git a/apps/bootstrap/models/LoginForm.php b/apps/bootstrap/models/LoginForm.php deleted file mode 100644 index 5ba1dc6..0000000 --- a/apps/bootstrap/models/LoginForm.php +++ /dev/null @@ -1,58 +0,0 @@ -username); - if (!$user || !$user->validatePassword($this->password)) { - $this->addError('password', 'Incorrect username or password.'); - } - } - - /** - * Logs in a user using the provided username and password. - * @return boolean whether the user is logged in successfully - */ - public function login() - { - if ($this->validate()) { - $user = User::findByUsername($this->username); - Yii::$app->user->login($user, $this->rememberMe ? 3600*24*30 : 0); - return true; - } else { - return false; - } - } -} diff --git a/apps/bootstrap/models/User.php b/apps/bootstrap/models/User.php deleted file mode 100644 index afbf9f8..0000000 --- a/apps/bootstrap/models/User.php +++ /dev/null @@ -1,61 +0,0 @@ - array( - 'id' => '100', - 'username' => 'admin', - 'password' => 'admin', - 'authKey' => 'test100key', - ), - '101' => array( - 'id' => '101', - 'username' => 'demo', - 'password' => 'demo', - 'authKey' => 'test101key', - ), - ); - - public static function findIdentity($id) - { - return isset(self::$users[$id]) ? new self(self::$users[$id]) : null; - } - - public static function findByUsername($username) - { - foreach (self::$users as $user) { - if (strcasecmp($user['username'], $username) === 0) { - return new self($user); - } - } - return null; - } - - public function getId() - { - return $this->id; - } - - public function getAuthKey() - { - return $this->authKey; - } - - public function validateAuthKey($authKey) - { - return $this->authKey === $authKey; - } - - public function validatePassword($password) - { - return $this->password === $password; - } -} diff --git a/apps/bootstrap/requirements.php b/apps/bootstrap/requirements.php deleted file mode 100644 index 5a2d910..0000000 --- a/apps/bootstrap/requirements.php +++ /dev/null @@ -1,96 +0,0 @@ - 'PDO extension', - 'mandatory' => true, - 'condition' => extension_loaded('pdo'), - 'by' => 'All DB-related classes', - ), - array( - 'name' => 'PDO SQLite extension', - 'mandatory' => false, - 'condition' => extension_loaded('pdo_sqlite'), - 'by' => 'All DB-related classes', - 'memo' => 'Required for SQLite database.', - ), - array( - 'name' => 'PDO MySQL extension', - 'mandatory' => false, - 'condition' => extension_loaded('pdo_mysql'), - 'by' => 'All DB-related classes', - 'memo' => 'Required for MySQL database.', - ), - // Cache : - array( - 'name' => 'Memcache extension', - 'mandatory' => false, - 'condition' => extension_loaded('memcache') || extension_loaded('memcached'), - 'by' => 'CMemCache', - 'memo' => extension_loaded('memcached') ? 'To use memcached set CMemCache::useMemcached to true.' : '' - ), - array( - 'name' => 'APC extension', - 'mandatory' => false, - 'condition' => extension_loaded('apc') || extension_loaded('apc'), - 'by' => 'CApcCache', - ), - // Additional PHP extensions : - array( - 'name' => 'Mcrypt extension', - 'mandatory' => false, - 'condition' => extension_loaded('mcrypt'), - 'by' => 'CSecurityManager', - 'memo' => 'Required by encrypt and decrypt methods.' - ), - // PHP ini : - 'phpSafeMode' => array( - 'name' => 'PHP safe mode', - 'mandatory' => false, - 'condition' => $requirementsChecker->checkPhpIniOff("safe_mode"), - 'by' => 'File uploading and console command execution', - 'memo' => '"safe_mode" should be disabled at php.ini', - ), - 'phpExposePhp' => array( - 'name' => 'Expose PHP', - 'mandatory' => false, - 'condition' => $requirementsChecker->checkPhpIniOff("expose_php"), - 'by' => 'Security reasons', - 'memo' => '"expose_php" should be disabled at php.ini', - ), - 'phpAllowUrlInclude' => array( - 'name' => 'PHP allow url include', - 'mandatory' => false, - 'condition' => $requirementsChecker->checkPhpIniOff("allow_url_include"), - 'by' => 'Security reasons', - 'memo' => '"allow_url_include" should be disabled at php.ini', - ), - 'phpSmtp' => array( - 'name' => 'PHP mail SMTP', - 'mandatory' => false, - 'condition' => strlen(ini_get('SMTP'))>0, - 'by' => 'Email sending', - 'memo' => 'PHP mail SMTP server required', - ), -); -$requirementsChecker->checkYii()->check($requirements)->render(); diff --git a/apps/bootstrap/runtime/.gitignore b/apps/bootstrap/runtime/.gitignore deleted file mode 100644 index 72e8ffc..0000000 --- a/apps/bootstrap/runtime/.gitignore +++ /dev/null @@ -1 +0,0 @@ -* diff --git a/apps/bootstrap/vendor/.gitignore b/apps/bootstrap/vendor/.gitignore deleted file mode 100644 index 72e8ffc..0000000 --- a/apps/bootstrap/vendor/.gitignore +++ /dev/null @@ -1 +0,0 @@ -* diff --git a/apps/bootstrap/views/layouts/main.php b/apps/bootstrap/views/layouts/main.php deleted file mode 100644 index 635e118..0000000 --- a/apps/bootstrap/views/layouts/main.php +++ /dev/null @@ -1,66 +0,0 @@ -registerAssetBundle('app'); -?> -beginPage(); ?> - - - - - <?php echo Html::encode($this->title); ?> - head(); ?> - - -
- beginBody(); ?> -
-

My Company

- - - -
- - isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : array(), - )); ?> - - -
- - - endBody(); ?> -
- - - -endPage(); ?> diff --git a/apps/bootstrap/views/site/about.php b/apps/bootstrap/views/site/about.php deleted file mode 100644 index 86e19e1..0000000 --- a/apps/bootstrap/views/site/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/apps/bootstrap/views/site/contact.php b/apps/bootstrap/views/site/contact.php deleted file mode 100644 index e740d0f..0000000 --- a/apps/bootstrap/views/site/contact.php +++ /dev/null @@ -1,46 +0,0 @@ -title = 'Contact'; -$this->params['breadcrumbs'][] = $this->title; -?> -

title); ?>

- -session->hasFlash('contactFormSubmitted')): ?> -
- Thank you for contacting us. We will respond to you as soon as possible. -
- - -

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

- - array('class' => 'form-horizontal'), - 'fieldConfig' => array('inputOptions' => array('class' => 'input-xlarge')), -)); ?> - field($model, 'name')->textInput(); ?> - field($model, 'email')->textInput(); ?> - field($model, 'subject')->textInput(); ?> - field($model, 'body')->textArea(array('rows' => 6)); ?> - field($model, 'verifyCode'); - echo $field->begin() - . $field->label() - . Captcha::widget() - . Html::activeTextInput($model, 'verifyCode', array('class' => 'input-medium')) - . $field->error() - . $field->end(); - ?> -
- 'btn btn-primary')); ?> -
- diff --git a/apps/bootstrap/views/site/index.php b/apps/bootstrap/views/site/index.php deleted file mode 100644 index 158b61c..0000000 --- a/apps/bootstrap/views/site/index.php +++ /dev/null @@ -1,47 +0,0 @@ -title = 'Welcome'; -?> -
-

Welcome!

- -

Cras justo odio, dapibus ac facilisis in, egestas eget quam. Fusce dapibus, tellus ac cursus - commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.

- Get started with Yii -
- -
- - -
-
-

Heading

- -

Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris - condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. - Donec sed odio dui.

- -

View details »

-
-
-

Heading

- -

Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris - condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. - Donec sed odio dui.

- -

View details »

-
-
-

Heading

- -

Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta - felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum - massa.

- -

View details »

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

title); ?>

- -

Please fill out the following fields to login:

- - array('class' => 'form-horizontal'))); ?> - field($model, 'username')->textInput(); ?> - field($model, 'password')->passwordInput(); ?> - field($model, 'rememberMe')->checkbox(); ?> -
- 'btn btn-primary')); ?> -
- diff --git a/apps/bootstrap/www/assets/.gitignore b/apps/bootstrap/www/assets/.gitignore deleted file mode 100644 index 72e8ffc..0000000 --- a/apps/bootstrap/www/assets/.gitignore +++ /dev/null @@ -1 +0,0 @@ -* diff --git a/apps/bootstrap/www/css/site.css b/apps/bootstrap/www/css/site.css deleted file mode 100644 index 890a953..0000000 --- a/apps/bootstrap/www/css/site.css +++ /dev/null @@ -1,78 +0,0 @@ -body { - padding-top: 20px; - padding-bottom: 60px; -} - -/* Custom container */ -.container { - margin: 0 auto; - max-width: 1000px; -} - -.container > hr { - margin: 60px 0; -} - -/* Main marketing message and sign up button */ -.jumbotron { - margin: 80px 0; - text-align: center; -} - -.jumbotron h1 { - font-size: 100px; - line-height: 1; -} - -.jumbotron .lead { - font-size: 24px; - line-height: 1.25; -} - -.jumbotron .btn { - font-size: 21px; - padding: 14px 24px; -} - -/* Supporting marketing content */ -.marketing { - margin: 60px 0; -} - -.marketing p + h4 { - margin-top: 28px; -} - -/* Customize the navbar links to be fill the entire space of the .navbar */ -.navbar .navbar-inner { - padding: 0; -} - -.navbar .nav { - margin: 0; - display: table; - width: 100%; -} - -.navbar .nav li { - display: table-cell; - width: 1%; - float: none; -} - -.navbar .nav li a { - font-weight: bold; - text-align: center; - border-left: 1px solid rgba(255, 255, 255, .75); - border-right: 1px solid rgba(0, 0, 0, .1); -} - -.navbar .nav li:first-child a { - border-left: 0; - border-radius: 3px 0 0 3px; -} - -.navbar .nav li:last-child a { - border-right: 0; - border-radius: 0 3px 3px 0; -} diff --git a/apps/bootstrap/www/index.php b/apps/bootstrap/www/index.php deleted file mode 100644 index 3b7b2fc..0000000 --- a/apps/bootstrap/www/index.php +++ /dev/null @@ -1,12 +0,0 @@ -run(); diff --git a/apps/bootstrap/yii b/apps/bootstrap/yii deleted file mode 100755 index 0793523..0000000 --- a/apps/bootstrap/yii +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env php -run(); diff --git a/apps/bootstrap/yii.bat b/apps/bootstrap/yii.bat deleted file mode 100644 index 5e21e2e..0000000 --- a/apps/bootstrap/yii.bat +++ /dev/null @@ -1,20 +0,0 @@ -@echo off - -rem ------------------------------------------------------------- -rem Yii command line bootstrap script for Windows. -rem -rem @author Qiang Xue -rem @link http://www.yiiframework.com/ -rem @copyright Copyright © 2012 Yii Software LLC -rem @license http://www.yiiframework.com/license/ -rem ------------------------------------------------------------- - -@setlocal - -set YII_PATH=%~dp0 - -if "%PHP_COMMAND%" == "" set PHP_COMMAND=php.exe - -"%PHP_COMMAND%" "%YII_PATH%yii" %* - -@endlocal