This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace app\models; | |
| /** | |
| * Description of ContactInfo | |
| * | |
| * @author Misbahul D Munir <[email protected]> | |
| * @since 1.0 | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| use yii\db\Migration; | |
| class m160414_015201_contact_info extends Migration | |
| { | |
| public function up() | |
| { | |
| $tableOptions = null; | |
| if ($this->db->driverName === 'mysql') { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {{ register_asset_bundle('app/assets/AppAsset') }} | |
| {{ void(this.beginPage()) }} | |
| <!DOCTYPE html> | |
| <html lang="{{ app.language }}"> | |
| <head> | |
| <meta charset="{{ app.charset }}"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title>{{ html.encode(this.title) }}</title> | |
| {{ html.csrfMetaTags | raw }} | |
| {{ void(this.head()) }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace app\controllers; | |
| use Yii; | |
| use yii\web\Controller; | |
| /** | |
| * Site controller | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| return [ | |
| 'vendorPath' => dirname(dirname(__DIR__)) . '/vendor', | |
| 'basePath' => dirname(__DIR__), | |
| 'components' => [ | |
| 'cache' => [ | |
| 'class' => 'yii\caching\FileCache', | |
| ], | |
| ], | |
| ]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "demo/my-yii2-app", | |
| "minimum-stability": "dev", | |
| "require": { | |
| "php": ">=5.4.0", | |
| "yiisoft/yii2": "~2.0" | |
| }, | |
| "config": { | |
| "process-timeout": 1800 | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $queryGM = (new Query()) | |
| ->select(['gmd.product_id', 'total' => 'sum(gmd.qty)']) | |
| ->from(['gm' => '{{%goods_movement}}']) | |
| ->innerJoin(['gmd' => '{{%goods_movement_dtl}}'], '[[gmd.movement_id]]=[[gm.id]]') | |
| ->where(['gm.status' => 20, 'gm.reff_type' => self::REFF_SELF, 'gm.reff_id' => $this->id]) | |
| ->groupBy(['gmd.product_id']); | |
| $queryItem = (new Query()) | |
| ->select(['md.product_id', 'md.cogs', 'md.qty', 'md.uom_id', 'g.total']) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Contact extends Model | |
| { | |
| public function rules() | |
| { | |
| return [ | |
| // name, email, subject and body are required | |
| [['name', 'email', 'subject', 'body'], 'required'], | |
| // email has to be a valid email address | |
| ['email', 'email'], | |
| // verifyCode needs to be entered correctly |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title><?= get('title') ?></title> | |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
| <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet"> | |
| <script type="text/javascript" src="//code.jquery.com/jquery-2.1.1.min.js"></script> | |
| </head> | |
| <body> | |
| <div class="wrap"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| define('APP_PATH', __DIR__); | |
| define('SYS_GLOBAL_VAR', '_d326_fw'); | |
| session_start(); | |
| function set($name, $value) | |
| { | |
| $GLOBALS[SYS_GLOBAL_VAR][$name] = $value; | |
| } |