PATH:
home
/
letacommog
/
letaweb
/
protected
/
modules
/
admin
/
controllers
<?php class DashboardController extends PController { public $layout = 'admin_column'; public function actionIndex() { $today_site_count = Site::model()->count('date_added >= :start_date and date_added >= :end_date', array(':end_date' => date('Y-m-d 24:00:00'), ':start_date' => date('Y-m-d 00:00:00'))); $total_site_count = Site::model()->count(); $today_user_count = User::model()->count('date_added >= :start_date and date_added >= :end_date', array(':end_date' => date('Y-m-d 24:00:00'), ':start_date' => date('Y-m-d 00:00:00'))); $total_user_count = User::model()->count(); $siteModel = new Site('search'); $userModel = new User('search'); $today_profit = Yii::app()->db->createCommand() ->select('sum(amount) as cnt') ->from(Purchase::model()->tableSchema->name) ->where('date_added >= :start_date and date_added >= :end_date', array(':end_date' => date('Y-m-d 24:00:00'), ':start_date' => date('Y-m-d 00:00:00'))) ->queryScalar(); if (!isset($today_profit)) { $today_profit = 0; } $total_profit = Yii::app()->db->createCommand() ->select('sum(amount) as cnt') ->from(Purchase::model()->tableSchema->name) ->queryScalar(); if (!isset($total_profit)) { $total_profit = 0; } $this->render('index', array( 'today_site_count' => $today_site_count, 'total_site_count' => $total_site_count, 'today_user_count' => $today_user_count, 'total_user_count' => $total_user_count, 'today_profit' => $today_profit, 'total_profit' => $total_profit, 'siteModel' => $siteModel, 'userModel' => $userModel, )); } public function checkUserPermission($user_id, $action) { return true; } }
[+]
..
[-] TemplateController.php
[edit]
[-] PlanController.php
[edit]
[-] DomainController.php
[edit]
[-] WebsiteController.php
[edit]
[-] ConfigController.php
[edit]
[-] TransactionController.php
[edit]
[-] MailtemplateController.php
[edit]
[-] DefaultController.php
[edit]
[-] CategoryController.php
[edit]
[-] DashboardController.php
[edit]
[-] UserController.php
[edit]
[-] LanguageController.php
[edit]
[-] ModuleController.php
[edit]
[-] ModulecategoryController.php
[edit]
[-] PlanDescriptionController.php
[edit]
[-] TermController.php
[edit]
[-] SubscriptionController.php
[edit]
[-] InterfaceController.php
[edit]
[-] ColorController.php
[edit]
[-] ShareButtonController.php
[edit]
[-] SkinpresetController.php
[edit]
[-] ContentController.php
[edit]
[-] LogController.php
[edit]
[-] ProfileController.php
[edit]