From 3130062f90707e81ebbc83383cf06c84cedffa73 Mon Sep 17 00:00:00 2001
From: undefinedor <1012023498@qq.com>
Date: Fri, 4 Jun 2021 00:30:51 +0800
Subject: [PATCH] Remove unused import.
---
app/appadmin/modules/AppadminController.php | 13 +--
.../modules/Catalog/CatalogController.php | 3 +-
.../Catalog/block/categoryupload/Manager.php | 48 +++-----
.../Catalog/block/productattr/Manager.php | 11 +-
.../block/productattrgroup/Manager.php | 5 +-
.../Catalog/block/productbrand/Manager.php | 23 ++--
.../block/productbrandcategory/Manager.php | 16 ++-
.../Catalog/block/productupload/Manager.php | 70 ++++++------
app/appadmin/modules/Cms/CmsController.php | 5 +-
.../modules/Config/ConfigController.php | 5 +-
.../Config/block/appfrontstore/Manager.php | 7 +-
.../Config/block/apphtml5store/Manager.php | 7 +-
.../block/appserverstorelang/Manager.php | 42 ++++---
.../Config/block/categorysort/Manager.php | 40 +++----
.../modules/Config/block/currency/Manager.php | 42 ++++---
.../Config/block/mutillang/Manager.php | 44 ++++----
.../controllers/AppfrontstoreController.php | 3 +-
.../controllers/Apphtml5storeController.php | 3 +-
.../modules/Customer/CustomerController.php | 5 +-
.../modules/Fecadmin/block/log/Index.php | 33 +++---
.../modules/Fecadmin/block/logtj/Index.php | 55 +++++----
.../Fecadmin/block/myaccount/Index.php | 10 +-
.../controllers/AccountController.php | 25 ++---
.../Fecadmin/controllers/CacheController.php | 10 +-
.../Fecadmin/controllers/ConfigController.php | 19 ++--
.../Fecadmin/controllers/ErrorController.php | 12 +-
.../Fecadmin/controllers/IndexController.php | 16 ++-
.../Fecadmin/controllers/LogController.php | 9 +-
.../Fecadmin/controllers/LoginController.php | 20 ++--
.../Fecadmin/controllers/LogoutController.php | 16 +--
.../Fecadmin/controllers/LogtjController.php | 7 +-
.../controllers/MyaccountController.php | 7 +-
.../controllers/ResourceController.php | 5 +-
.../Fecadmin/controllers/RoleController.php | 3 -
.../controllers/SystemlogController.php | 13 +--
.../modules/Sales/SalesController.php | 3 +-
.../Sales/block/orderinfo/Manageredit.php | 47 ++++----
.../modules/System/SystemController.php | 5 +-
.../System/block/adminurlkey/Manager.php | 14 +--
.../System/block/error/Manageredit.php | 10 +-
.../System/block/extensiongii/Manager.php | 14 +--
.../System/block/extensionmarket/Login.php | 16 +--
.../System/block/extensionmarket/Manager.php | 62 +++++-----
.../ExtensioninstalledController.php | 15 ++-
.../catalog/productattr/manageredit.php | 44 ++++----
.../catalog/productattrgroup/manageredit.php | 38 +++----
.../catalog/productbrand/manageredit.php | 17 ++-
.../productbrandcategory/manageredit.php | 14 +--
.../catalog/productinfo/managerbatchedit.php | 106 +++++++++---------
.../catalog/productinfo/manageredit.php | 72 ++++++------
.../catalog/productreview/manageredit.php | 34 +++---
.../base/default/cms/article/manageredit.php | 12 +-
.../default/cms/staticblock/manageredit.php | 16 +--
.../config/appfrontaccount/manager.php | 18 +--
.../default/config/appfrontbase/manager.php | 18 +--
.../default/config/appfrontcache/manager.php | 18 +--
.../config/appfrontcatalog/manager.php | 18 +--
.../default/config/appfronthome/manager.php | 18 +--
.../config/appfrontpayment/manager.php | 18 +--
.../config/appfrontstore/manageredit.php | 50 ++++-----
.../config/apphtml5account/manager.php | 18 +--
.../default/config/apphtml5base/manager.php | 18 +--
.../default/config/apphtml5cache/manager.php | 18 +--
.../config/apphtml5catalog/manager.php | 18 +--
.../default/config/apphtml5home/manager.php | 18 +--
.../config/apphtml5payment/manager.php | 18 +--
.../config/apphtml5store/manageredit.php | 48 ++++----
.../config/appserveraccount/manager.php | 18 +--
.../default/config/appserverbase/manager.php | 18 +--
.../default/config/appservercache/manager.php | 18 +--
.../config/appservercatalog/manager.php | 18 +--
.../default/config/appserverhome/manager.php | 18 +--
.../config/appserverpayment/manager.php | 18 +--
.../default/config/appserverstore/manager.php | 18 +--
.../config/appserverstorelang/manager.php | 60 +++++-----
.../base/default/config/base/manager.php | 20 ++--
.../base/default/config/cart/manager.php | 18 +--
.../default/config/categorysort/manager.php | 44 ++++----
.../base/default/config/currency/manager.php | 38 +++----
.../base/default/config/email/manager.php | 18 +--
.../theme/base/default/config/fa/manager.php | 20 ++--
.../base/default/config/mutillang/manager.php | 60 +++++-----
.../base/default/config/order/manager.php | 18 +--
.../default/config/paymentalipay/manager.php | 18 +--
.../default/config/paymentpaypal/manager.php | 18 +--
.../default/config/paymentwxpay/manager.php | 18 +--
.../base/default/config/product/manager.php | 18 +--
.../base/default/config/search/manager.php | 18 +--
.../theme/base/default/config/service/db.php | 18 +--
.../default/customer/account/manageredit.php | 18 +--
.../default/customer/contacts/manageredit.php | 20 ++--
.../default/fecadmin/account/manageredit.php | 26 ++---
.../default/fecadmin/config/manageredit.php | 16 +--
.../default/fecadmin/resource/manageredit.php | 4 +-
.../default/fecadmin/role/manageredit.php | 5 +-
.../theme/base/default/layouts/dashboard.php | 57 +++++-----
.../theme/base/default/layouts/login.php | 26 ++---
.../base/default/sales/coupon/manageredit.php | 18 +--
.../default/sales/orderinfo/manageredit.php | 105 +++++++++--------
.../default/system/adminurlkey/manager.php | 24 ++--
.../base/default/system/error/manageredit.php | 19 ++--
.../default/system/extensiongii/manager.php | 38 +++----
.../system/extensioninstalled/manageredit.php | 14 +--
.../system/extensioninstalled/managerview.php | 16 +--
.../default/system/extensionmarket/login.php | 18 +--
app/appapi/modules/AppapiController.php | 9 +-
app/appapi/modules/AppapiTokenController.php | 66 +++++------
app/appapi/modules/V1/Module.php | 3 +-
.../modules/V1/controllers/HomeController.php | 7 +-
.../modules/Cms/block/article/Index.php | 5 +-
.../Customer/controllers/TestController.php | 59 +++++-----
.../theme/base/front/site/helper/error.php | 4 +-
.../base/html5/catalog/category/index.php | 38 +++----
.../base/html5/catalog/reviewproduct/add.php | 46 ++++----
.../base/html5/catalogsearch/index/index.php | 34 +++---
.../html5/customer/productfavorite/index.php | 17 ++-
.../html5/customer/productreview/index.php | 18 ++-
.../theme/base/html5/site/helper/error.php | 4 +-
.../Database/controllers/ConfigController.php | 105 +++++++++--------
.../Database/controllers/ErrorController.php | 2 -
.../Database/views/config/migratesuccess.php | 13 +--
.../modules/Database/views/config/readme.php | 47 ++++----
.../modules/Database/views/error/index.php | 4 +-
.../modules/AppserverTokenController.php | 89 +++++++--------
.../controllers/ReviewproductController.php | 53 +++++----
.../Checkout/controllers/CartController.php | 2 +-
.../Wx/controllers/HelperController.php | 15 ++-
.../Amqp/controllers/TestController.php | 15 ++-
app/console/modules/ConsoleController.php | 93 ++++++++-------
app/console/modules/ConsoleModule.php | 37 +++---
.../Product/controllers/IndexController.php | 1 -
131 files changed, 1540 insertions(+), 1705 deletions(-)
diff --git a/app/appadmin/modules/AppadminController.php b/app/appadmin/modules/AppadminController.php
index 1a0728bed..00c97e674 100644
--- a/app/appadmin/modules/AppadminController.php
+++ b/app/appadmin/modules/AppadminController.php
@@ -9,7 +9,6 @@
namespace fecshop\app\appadmin\modules;
-use fec\controllers\FecController;
use fec\helpers\CConfig;
use Yii;
use yii\base\InvalidValueException;
@@ -23,7 +22,7 @@ class AppadminController extends Controller
{
public $blockNamespace;
public $enableCsrfValidation = true;
-
+
/**
* init theme component property : $fecshopThemeDir and $layoutFile
* $fecshopThemeDir is appfront base theme directory.
@@ -82,7 +81,7 @@ public function beforeAction($action)
return false;
}
-
+
/**
* @param $view|string , (only) view file name ,by this module id, this controller id , generate view relative path.
@@ -117,7 +116,7 @@ public function findLayoutFile($view)
}
throw new InvalidValueException('layout file is not exist!');
}
-
+
public function getFecadminBlock($blockname=''){
$_currentNameSpace = \fec\helpers\CModule::param("_currentNameSpace");
//echo $_currentNameSpace;exit;
@@ -136,16 +135,16 @@ public function getFecadminBlock($blockname=''){
}else{
$url_key_arr[count($url_key_arr)-1] = ucfirst($url_key_arr[count($url_key_arr)-1]);
}
-
+
$block_space = implode("\\",$url_key_arr);
$blockFile = $modulesDir.$block_space;
//查找是否在rewriteMap中存在重写
//$relativeFile = Yii::mapGetName($relativeFile);
$blockFile = Yii::mapGetName($blockFile);
//echo $blockFile;exit;
-
+
return new $blockFile;
-
+
}
public function getBlock($blockName = ''){
diff --git a/app/appadmin/modules/Catalog/CatalogController.php b/app/appadmin/modules/Catalog/CatalogController.php
index f0498065a..07bdc470e 100644
--- a/app/appadmin/modules/Catalog/CatalogController.php
+++ b/app/appadmin/modules/Catalog/CatalogController.php
@@ -13,8 +13,7 @@
* @author Terry Zhao <2358269014@qq.com>
* @since 1.0
*/
-use fecadmin\FecadminbaseController;
-use Yii;
+
use fecshop\app\appadmin\modules\AppadminController;
class CatalogController extends AppadminController
diff --git a/app/appadmin/modules/Catalog/block/categoryupload/Manager.php b/app/appadmin/modules/Catalog/block/categoryupload/Manager.php
index 583a8bcc8..3ab10f0cf 100644
--- a/app/appadmin/modules/Catalog/block/categoryupload/Manager.php
+++ b/app/appadmin/modules/Catalog/block/categoryupload/Manager.php
@@ -9,8 +9,6 @@
namespace fecshop\app\appadmin\modules\Catalog\block\categoryupload;
-use fecshop\app\appadmin\interfaces\base\AppadminbaseBlockInterface;
-use fecshop\app\appadmin\modules\AppadminbaseBlock;
use Yii;
use yii\base\BaseObject;
@@ -21,7 +19,7 @@
*/
class Manager extends BaseObject
{
-
+
public $_fileFullDir;
/**
* init param function ,execute in construct.
@@ -39,14 +37,14 @@ public function getLastData()
return [
];
}
-
-
+
+
public function uploadCategory()
{
$fileFullDir = Yii::getAlias('@appadmin/runtime/upload/');
if ($this->saveUploadExcelFile($fileFullDir)) {
//echo $this->_fileFullDir;
-
+
$arr = \fec\helpers\CExcel::getExcelContent($this->_fileFullDir);
$i = 0;
if (is_array($arr) && !empty($arr)) {
@@ -71,9 +69,9 @@ public function uploadCategory()
]);
exit;
}
-
+
}
-
+
public function saveCategory($one)
{
// 从excel中获取数据。
@@ -93,14 +91,14 @@ public function saveCategory($one)
$meta_description = $one['K'];
$image = $one['L'];
$thumbnail_image = $one['M'];
-
-
+
+
$nameLang = Yii::$service->fecshoplang->getLangAttrName('name',$language_code);
$titleLang = Yii::$service->fecshoplang->getLangAttrName('title',$language_code);
$metaKeywordsLang = Yii::$service->fecshoplang->getLangAttrName('meta_keywords',$language_code);
$metaDescriptionLang = Yii::$service->fecshoplang->getLangAttrName('meta_description',$language_code);
$descriptionLang = Yii::$service->fecshoplang->getLangAttrName('description',$language_code);
-
+
$categoryPrimaryKey = Yii::$service->category->getPrimaryKey();
//$categoryMode = Yii::$service->category->getByPrimarykey($category_id);
//$categoryPrimaryKey = Yii::$service->category->getPrimaryKey();
@@ -108,7 +106,7 @@ public function saveCategory($one)
//if ($categoryMode && isset($categoryMode[$categoryPrimaryKey]) && $categoryMode[$categoryPrimaryKey]) {
// $category_id = $categoryMode[$categoryPrimaryKey];
//}
-
+
$categoryArr[$categoryPrimaryKey] = $category_id;
$categoryArr['parent_id'] = $parent_id;
$categoryArr['name'][$nameLang] = $category_name;
@@ -121,37 +119,23 @@ public function saveCategory($one)
$categoryArr['meta_description'][$metaDescriptionLang] = $meta_description;
$categoryArr['image'] = $image;
$categoryArr['thumbnail_image'] = $thumbnail_image;
-
+
return Yii::$service->category->excelSave($categoryArr);
}
-
+
# 1.保存前台上传的文件。
public function saveUploadExcelFile($fileFullDir){
-
+
$name = $_FILES["file"]["name"];
$fileFullDir .= 'category_'.time().'_'.rand(1000,9999);
if(strstr($name,'.xlsx')){
$fileFullDir .='.xlsx';
} else if (strstr($name,'.xls')){
$fileFullDir .='.xls';
- }
- $this->_fileFullDir = $fileFullDir;
+ }
+ $this->_fileFullDir = $fileFullDir;
$result = @move_uploaded_file($_FILES["file"]["tmp_name"],$fileFullDir);
-
+
return $result;
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
}
diff --git a/app/appadmin/modules/Catalog/block/productattr/Manager.php b/app/appadmin/modules/Catalog/block/productattr/Manager.php
index e001e9ea6..3f54ddf38 100644
--- a/app/appadmin/modules/Catalog/block/productattr/Manager.php
+++ b/app/appadmin/modules/Catalog/block/productattr/Manager.php
@@ -10,7 +10,6 @@
namespace fecshop\app\appadmin\modules\Catalog\block\productattr;
use fec\helpers\CUrl;
-use fec\helpers\CRequest;
use fecshop\app\appadmin\interfaces\base\AppadminbaseBlockInterface;
use fecshop\app\appadmin\modules\AppadminbaseBlock;
use Yii;
@@ -81,7 +80,7 @@ public function getSearchArr()
2 => Yii::$service->page->translate->__('Disable'),
],
],
-
+
];
return $data;
@@ -112,7 +111,7 @@ public function getTableFieldArr()
'width' => '110',
'align' => 'left',
],
-
+
[
'orderField' => 'status',
'label' => Yii::$service->page->translate->__('Status'),
@@ -123,14 +122,14 @@ public function getTableFieldArr()
2 => Yii::$service->page->translate->__('Disable'),
],
],
-
+
[
'orderField' => 'db_type',
'label' => Yii::$service->page->translate->__('Db Type'),
'width' => '110',
'align' => 'center',
],
-
+
[
'orderField' => 'show_as_img',
'label' => Yii::$service->page->translate->__('Show As Img'),
@@ -141,7 +140,7 @@ public function getTableFieldArr()
2 => Yii::$service->page->translate->__('No'),
],
],
-
+
[
'orderField' => 'display_type',
'label' => Yii::$service->page->translate->__('Display Type'),
diff --git a/app/appadmin/modules/Catalog/block/productattrgroup/Manager.php b/app/appadmin/modules/Catalog/block/productattrgroup/Manager.php
index ff0c493d0..c8e5f19b6 100644
--- a/app/appadmin/modules/Catalog/block/productattrgroup/Manager.php
+++ b/app/appadmin/modules/Catalog/block/productattrgroup/Manager.php
@@ -10,7 +10,6 @@
namespace fecshop\app\appadmin\modules\Catalog\block\productattrgroup;
use fec\helpers\CUrl;
-use fec\helpers\CRequest;
use fecshop\app\appadmin\interfaces\base\AppadminbaseBlockInterface;
use fecshop\app\appadmin\modules\AppadminbaseBlock;
use Yii;
@@ -81,7 +80,7 @@ public function getSearchArr()
2 => Yii::$service->page->translate->__('Disable'),
],
],
-
+
];
return $data;
@@ -115,7 +114,7 @@ public function getTableFieldArr()
2 => Yii::$service->page->translate->__('Disable'),
],
],
-
+
[
'orderField' => 'created_at',
'label' => Yii::$service->page->translate->__('Created At'),
diff --git a/app/appadmin/modules/Catalog/block/productbrand/Manager.php b/app/appadmin/modules/Catalog/block/productbrand/Manager.php
index 81c17d9fc..3c1a51d3c 100644
--- a/app/appadmin/modules/Catalog/block/productbrand/Manager.php
+++ b/app/appadmin/modules/Catalog/block/productbrand/Manager.php
@@ -9,7 +9,6 @@
namespace fecshop\app\appadmin\modules\Catalog\block\productbrand;
-use fec\helpers\CUrl;
use fec\helpers\CRequest;
use fecshop\app\appadmin\interfaces\base\AppadminbaseBlockInterface;
use fecshop\app\appadmin\modules\AppadminbaseBlock;
@@ -82,7 +81,7 @@ public function getSearchArr()
2 => Yii::$service->page->translate->__('Disable'),
],
],
-
+
[ // 时间区间类型搜索
'type' => 'inputdatefilter',
'name' => 'created_at',
@@ -102,9 +101,9 @@ public function getSearchArr()
*/
public function getTableFieldArr()
{
- $brandCategorys = Yii::$service->product->brandcategory->getBrandCategoryIdAndNames();
+ $brandCategorys = Yii::$service->product->brandcategory->getBrandCategoryIdAndNames();
$brandStatus = Yii::$service->product->brandcategory->getStatusArr();
-
+
$table_th_bar = [
[
'orderField' => $this->_primaryKey,
@@ -140,7 +139,7 @@ public function getTableFieldArr()
'width' => '110',
'align' => 'center',
],
-
+
[
'orderField' => 'status',
'label' => Yii::$service->page->translate->__('Status'),
@@ -148,8 +147,8 @@ public function getTableFieldArr()
'align' => 'center',
'display' => $brandStatus,
],
-
-
+
+
[
'orderField' => 'created_at',
'label' => Yii::$service->page->translate->__('Created At'),
@@ -168,9 +167,9 @@ public function getTableFieldArr()
return $table_th_bar;
}
-
-
-
+
+
+
public function getTableTbodyHtml($data)
{
$fields = $this->getTableFieldArr();
@@ -250,6 +249,6 @@ public function getTableTbodyHtml($data)
return $str;
}
-
-
+
+
}
diff --git a/app/appadmin/modules/Catalog/block/productbrandcategory/Manager.php b/app/appadmin/modules/Catalog/block/productbrandcategory/Manager.php
index d9169d76a..a8292ffda 100644
--- a/app/appadmin/modules/Catalog/block/productbrandcategory/Manager.php
+++ b/app/appadmin/modules/Catalog/block/productbrandcategory/Manager.php
@@ -9,8 +9,6 @@
namespace fecshop\app\appadmin\modules\Catalog\block\productbrandcategory;
-use fec\helpers\CUrl;
-use fec\helpers\CRequest;
use fecshop\app\appadmin\interfaces\base\AppadminbaseBlockInterface;
use fecshop\app\appadmin\modules\AppadminbaseBlock;
use Yii;
@@ -82,7 +80,7 @@ public function getSearchArr()
2 => Yii::$service->page->translate->__('Disable'),
],
],
-
+
[ // 时间区间类型搜索
'type' => 'inputdatefilter',
'name' => 'created_at',
@@ -102,9 +100,9 @@ public function getSearchArr()
*/
public function getTableFieldArr()
{
- $brandCategorys = Yii::$service->product->brandcategory->getBrandCategoryIdAndNames();
+ $brandCategorys = Yii::$service->product->brandcategory->getBrandCategoryIdAndNames();
$brandStatus = Yii::$service->product->brandcategory->getStatusArr();
-
+
$table_th_bar = [
[
'orderField' => $this->_primaryKey,
@@ -125,8 +123,8 @@ public function getTableFieldArr()
'width' => '110',
'align' => 'center',
],
-
-
+
+
[
'orderField' => 'status',
'label' => Yii::$service->page->translate->__('Status'),
@@ -134,8 +132,8 @@ public function getTableFieldArr()
'align' => 'center',
'display' => $brandStatus,
],
-
-
+
+
[
'orderField' => 'created_at',
'label' => Yii::$service->page->translate->__('Created At'),
diff --git a/app/appadmin/modules/Catalog/block/productupload/Manager.php b/app/appadmin/modules/Catalog/block/productupload/Manager.php
index 78e7b33af..81ed87050 100644
--- a/app/appadmin/modules/Catalog/block/productupload/Manager.php
+++ b/app/appadmin/modules/Catalog/block/productupload/Manager.php
@@ -9,8 +9,6 @@
namespace fecshop\app\appadmin\modules\Catalog\block\productupload;
-use fecshop\app\appadmin\interfaces\base\AppadminbaseBlockInterface;
-use fecshop\app\appadmin\modules\AppadminbaseBlock;
use Yii;
/**
@@ -20,7 +18,7 @@
*/
class Manager extends \yii\base\BaseObject
{
-
+
public $_fileFullDir;
public function getLastData()
@@ -28,14 +26,14 @@ public function getLastData()
return [
];
}
-
-
+
+
public function uploadProduct()
{
$fileFullDir = Yii::getAlias('@appadmin/runtime/upload/');
if ($this->saveUploadExcelFile($fileFullDir)) {
//echo $this->_fileFullDir;
-
+
$arr = \fec\helpers\CExcel::getExcelContent($this->_fileFullDir);
$i = 0;
if (is_array($arr) && !empty($arr)) {
@@ -59,9 +57,9 @@ public function uploadProduct()
]);
exit;
}
-
+
}
-
+
public function saveProduct($one)
{
// 从excel中获取数据。
@@ -83,28 +81,28 @@ public function saveProduct($one)
$meta_title = $one['P'];
$meta_keywords = $one['Q'];
$meta_description = $one['R'];
-
+
$short_description = $one['S'];
$description = $one['T'];
$main_image = $one['U'];
$gallery_image = $one['V'];
$group_attr_name = $one['W'];
$group_attrs = $one['X'];
-
+
$nameLang = Yii::$service->fecshoplang->getLangAttrName('name',$language_code);
$titleLang = Yii::$service->fecshoplang->getLangAttrName('meta_title',$language_code);
$metaKeywordsLang = Yii::$service->fecshoplang->getLangAttrName('meta_keywords',$language_code);
$metaDescriptionLang = Yii::$service->fecshoplang->getLangAttrName('meta_description',$language_code);
$shortDescriptionLang = Yii::$service->fecshoplang->getLangAttrName('short_description',$language_code);
$descriptionLang = Yii::$service->fecshoplang->getLangAttrName('description',$language_code);
-
+
$productMode = Yii::$service->product->getBySku($sku);
$productPrimaryKey = Yii::$service->product->getPrimaryKey();
$product_id = '';
if ($productMode && isset($productMode['sku']) && $productMode['sku']) {
$product_id = $productMode[$productPrimaryKey];
}
-
+
$productArr['name'][$nameLang] = $product_name;
$productArr['spu'] = $spu;
$productArr['sku'] = $sku;
@@ -124,8 +122,8 @@ public function saveProduct($one)
$productArr['meta_description'][$metaDescriptionLang] = $meta_description;
$productArr['short_description'][$shortDescriptionLang] = $short_description;
$productArr['description'][$descriptionLang] = $description;
-
-
+
+
$productArr['image']['main'] = [
'image' => $main_image,
'label' => '',
@@ -147,9 +145,9 @@ public function saveProduct($one)
}
}
}
-
+
$productArr['attr_group'] = $group_attr_name;
-
+
if ($group_attrs) {
$group_attr_info = json_decode($group_attrs, true);
if (is_array($group_attr_info)) {
@@ -158,37 +156,37 @@ public function saveProduct($one)
}
}
}
-
+
return Yii::$service->product->excelSave($productArr);
}
-
+
# 1.保存前台上传的文件。
public function saveUploadExcelFile($fileFullDir){
-
+
$name = $_FILES["file"]["name"];
$fileFullDir .= 'product_'.time().'_'.rand(1000,9999);
if(strstr($name,'.xlsx')){
$fileFullDir .='.xlsx';
} else if (strstr($name,'.xls')){
$fileFullDir .='.xls';
- }
- $this->_fileFullDir = $fileFullDir;
+ }
+ $this->_fileFullDir = $fileFullDir;
$result = @move_uploaded_file($_FILES["file"]["tmp_name"],$fileFullDir);
-
+
return $result;
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
}
diff --git a/app/appadmin/modules/Cms/CmsController.php b/app/appadmin/modules/Cms/CmsController.php
index 4a017c244..4fe1876dd 100644
--- a/app/appadmin/modules/Cms/CmsController.php
+++ b/app/appadmin/modules/Cms/CmsController.php
@@ -13,14 +13,13 @@
* @author Terry Zhao <2358269014@qq.com>
* @since 1.0
*/
-use fecadmin\FecadminbaseController;
-use Yii;
+
use fecshop\app\appadmin\modules\AppadminController;
class CmsController extends AppadminController
{
public $enableCsrfValidation = false;
-
+
//public function getViewPath()
//{
// return Yii::getAlias('@fecshop/app/appadmin/modules/Cms/views') . DIRECTORY_SEPARATOR . $this->id;
diff --git a/app/appadmin/modules/Config/ConfigController.php b/app/appadmin/modules/Config/ConfigController.php
index 6ff2108a8..92449f54b 100644
--- a/app/appadmin/modules/Config/ConfigController.php
+++ b/app/appadmin/modules/Config/ConfigController.php
@@ -13,14 +13,13 @@
* @author Terry Zhao <2358269014@qq.com>
* @since 1.0
*/
-use fecadmin\FecadminbaseController;
-use Yii;
+
use fecshop\app\appadmin\modules\AppadminController;
class ConfigController extends AppadminController
{
public $enableCsrfValidation = false;
-
+
//public function getViewPath()
//{
// return Yii::getAlias('@fecshop/app/appadmin/modules/Cms/views') . DIRECTORY_SEPARATOR . $this->id;
diff --git a/app/appadmin/modules/Config/block/appfrontstore/Manager.php b/app/appadmin/modules/Config/block/appfrontstore/Manager.php
index ef3131cbd..e634480d2 100644
--- a/app/appadmin/modules/Config/block/appfrontstore/Manager.php
+++ b/app/appadmin/modules/Config/block/appfrontstore/Manager.php
@@ -10,7 +10,6 @@
namespace fecshop\app\appadmin\modules\Config\block\appfrontstore;
use fec\helpers\CUrl;
-use fec\helpers\CRequest;
use fecshop\app\appadmin\interfaces\base\AppadminbaseBlockInterface;
use fecshop\app\appadmin\modules\AppadminbaseBlock;
use Yii;
@@ -139,7 +138,7 @@ public function getTableFieldArr()
2 => Yii::$service->page->translate->__('Disable'),
],
],
-
+
[
'orderField' => 'created_at',
'label' => Yii::$service->page->translate->__('Created At'),
@@ -158,7 +157,7 @@ public function getTableFieldArr()
return $table_th_bar;
}
-
+
/**
* list table body.
*/
@@ -184,5 +183,5 @@ public function getTableTbody()
return $this->getTableTbodyHtml($data);
}
-
+
}
diff --git a/app/appadmin/modules/Config/block/apphtml5store/Manager.php b/app/appadmin/modules/Config/block/apphtml5store/Manager.php
index 8ede01466..8b3356b1c 100644
--- a/app/appadmin/modules/Config/block/apphtml5store/Manager.php
+++ b/app/appadmin/modules/Config/block/apphtml5store/Manager.php
@@ -10,7 +10,6 @@
namespace fecshop\app\appadmin\modules\Config\block\apphtml5store;
use fec\helpers\CUrl;
-use fec\helpers\CRequest;
use fecshop\app\appadmin\interfaces\base\AppadminbaseBlockInterface;
use fecshop\app\appadmin\modules\AppadminbaseBlock;
use Yii;
@@ -139,7 +138,7 @@ public function getTableFieldArr()
2 => Yii::$service->page->translate->__('Disable'),
],
],
-
+
[
'orderField' => 'created_at',
'label' => Yii::$service->page->translate->__('Created At'),
@@ -158,7 +157,7 @@ public function getTableFieldArr()
return $table_th_bar;
}
-
+
/**
* list table body.
*/
@@ -184,5 +183,5 @@ public function getTableTbody()
return $this->getTableTbodyHtml($data);
}
-
+
}
diff --git a/app/appadmin/modules/Config/block/appserverstorelang/Manager.php b/app/appadmin/modules/Config/block/appserverstorelang/Manager.php
index 542c57a36..a9cececcc 100644
--- a/app/appadmin/modules/Config/block/appserverstorelang/Manager.php
+++ b/app/appadmin/modules/Config/block/appserverstorelang/Manager.php
@@ -9,10 +9,6 @@
namespace fecshop\app\appadmin\modules\Config\block\appserverstorelang;
-use fec\helpers\CUrl;
-use fec\helpers\CRequest;
-use fecshop\app\appadmin\interfaces\base\AppadminbaseBlockEditInterface;
-use fecshop\app\appadmin\modules\AppadminbaseBlockEdit;
use Yii;
/**
@@ -27,10 +23,10 @@ class Manager extends \yii\base\BaseObject
public $_key = 'appserver_store_lang';
protected $_one;
protected $_service;
-
+
public function init()
{
-
+
// 需要配置
$this->_saveUrl = Yii::$service->url->getUrl('config/appserverstorelang/managersave');
$this->setService();
@@ -41,20 +37,20 @@ public function init()
$this->_one['value'] = unserialize($this->_one['value']);
}
}
-
-
-
+
+
+
// 传递给前端的数据 显示编辑form
public function getLastData()
{
- $id = '';
+ $id = '';
if (isset($this->_one['id'])) {
$id = $this->_one['id'];
- }
+ }
$configLangs = Yii::$service->fecshoplang->getLangAndCodeArr();
$configLangsSelect = $this->getLangSelect($configLangs);
return [
- 'id' => $id,
+ 'id' => $id,
'configLangs' => $configLangs,
'configLangsSelect' => $configLangsSelect,
'langs' => $this->_one['value'],
@@ -70,15 +66,15 @@ public function getLangSelect($configLangs)
}
}
$str .= '';
-
+
return $str;
}
public function setService()
{
$this->_service = Yii::$service->storeBaseConfig;
}
-
-
+
+
public function getEditParam($langs)
{
$arr = [];
@@ -89,7 +85,7 @@ public function getEditParam($langs)
if ($one) {
list($lang_name, $lang_code) = explode('##', $one);
if ($lang_name && $lang_code) {
- $lang_code_name = isset($configLangs[$lang_code]) ? $configLangs[$lang_code] : '';
+ $lang_code_name = isset($configLangs[$lang_code]) ? $configLangs[$lang_code] : '';
if (in_array($lang_code, $langCodes)) {
continue;
}
@@ -101,9 +97,9 @@ public function getEditParam($langs)
];
}
}
-
+
}
-
+
return [
'key' => $this->_key,
'value' => $arr,
@@ -116,7 +112,7 @@ public function save()
{
$editFormData = Yii::$app->request->post('editFormData');
$langs = $editFormData['langs'];
-
+
$saveData = $this->getEditParam($langs);
/*
* if attribute is date or date time , db storage format is int ,by frontend pass param is int ,
@@ -124,7 +120,7 @@ public function save()
*/
// 设置 bdmin_user_id 为 当前的user_id
$this->_service->saveConfig($saveData);
-
+
$errors = Yii::$service->helper->errors->get();
if (!$errors) {
echo json_encode([
@@ -140,6 +136,6 @@ public function save()
exit;
}
}
-
-
-}
\ No newline at end of file
+
+
+}
diff --git a/app/appadmin/modules/Config/block/categorysort/Manager.php b/app/appadmin/modules/Config/block/categorysort/Manager.php
index cee5a6d16..be84e11b1 100644
--- a/app/appadmin/modules/Config/block/categorysort/Manager.php
+++ b/app/appadmin/modules/Config/block/categorysort/Manager.php
@@ -9,10 +9,6 @@
namespace fecshop\app\appadmin\modules\Config\block\categorysort;
-use fec\helpers\CUrl;
-use fec\helpers\CRequest;
-use fecshop\app\appadmin\interfaces\base\AppadminbaseBlockEditInterface;
-use fecshop\app\appadmin\modules\AppadminbaseBlockEdit;
use Yii;
/**
@@ -27,10 +23,10 @@ class Manager extends \yii\base\BaseObject
public $_key = 'category_sort';
protected $_one;
protected $_service;
-
+
public function init()
{
-
+
// 需要配置
$this->_saveUrl = Yii::$service->url->getUrl('config/categorysort/managersave');
$this->setService();
@@ -42,16 +38,16 @@ public function init()
$this->_one['value'] = unserialize($this->_one['value']);
}
}
-
-
-
+
+
+
// 传递给前端的数据 显示编辑form
public function getLastData()
{
- $id = '';
+ $id = '';
if (isset($this->_one['id'])) {
$id = $this->_one['id'];
- }
+ }
$sort_directions = $this->getSortDirection();
$sort_directions_select = $this->getSortSelect($sort_directions);
return [
@@ -71,23 +67,23 @@ public function getSortSelect($sort_directions)
}
}
$str .= '';
-
+
return $str;
}
public function getSortDirection()
{
$sort_direction = [
- 'desc' , 'asc'
+ 'desc' , 'asc'
];
return $sort_direction;
}
-
+
public function setService()
{
$this->_service = Yii::$service->storeBaseConfig;
}
-
-
+
+
public function getEditParam($category_sorts)
{
$arr = [];
@@ -106,7 +102,7 @@ public function getEditParam($category_sorts)
}
}
}
-
+
return [
'key' => $this->_key,
'value' => $arr,
@@ -119,7 +115,7 @@ public function save()
{
$editFormData = Yii::$app->request->post('editFormData');
$category_sorts = $editFormData['category_sorts'];
-
+
$saveData = $this->getEditParam($category_sorts);
//var_dump($saveData);
/*
@@ -128,7 +124,7 @@ public function save()
*/
// 设置 bdmin_user_id 为 当前的user_id
$this->_service->saveConfig($saveData);
-
+
$errors = Yii::$service->helper->errors->get();
if (!$errors) {
echo json_encode([
@@ -144,6 +140,6 @@ public function save()
exit;
}
}
-
-
-}
\ No newline at end of file
+
+
+}
diff --git a/app/appadmin/modules/Config/block/currency/Manager.php b/app/appadmin/modules/Config/block/currency/Manager.php
index 65223695d..30dd440b9 100644
--- a/app/appadmin/modules/Config/block/currency/Manager.php
+++ b/app/appadmin/modules/Config/block/currency/Manager.php
@@ -9,10 +9,6 @@
namespace fecshop\app\appadmin\modules\Config\block\currency;
-use fec\helpers\CUrl;
-use fec\helpers\CRequest;
-use fecshop\app\appadmin\interfaces\base\AppadminbaseBlockEditInterface;
-use fecshop\app\appadmin\modules\AppadminbaseBlockEdit;
use Yii;
/**
@@ -27,10 +23,10 @@ class Manager extends \yii\base\BaseObject
public $_key = 'currency';
protected $_one;
protected $_service;
-
+
public function init()
{
-
+
// 需要配置
$this->_saveUrl = Yii::$service->url->getUrl('config/currency/managersave');
$this->setService();
@@ -41,16 +37,16 @@ public function init()
$this->_one['value'] = unserialize($this->_one['value']);
}
}
-
-
-
+
+
+
// 传递给前端的数据 显示编辑form
public function getLastData()
{
- $id = '';
+ $id = '';
if (isset($this->_one['id'])) {
$id = $this->_one['id'];
- }
+ }
return [
'id' => $id,
'currencys' => $this->_one['value'],
@@ -61,8 +57,8 @@ public function setService()
{
$this->_service = Yii::$service->storeBaseConfig;
}
-
-
+
+
public function getEditParam($currencys)
{
$arr = [];
@@ -78,9 +74,9 @@ public function getEditParam($currencys)
];
}
}
-
+
}
-
+
return [
'key' => $this->_key,
'value' => $arr,
@@ -93,7 +89,7 @@ public function save()
{
$editFormData = Yii::$app->request->post('editFormData');
$currencys = $editFormData['currencys'];
-
+
$saveData = $this->getEditParam($currencys);
// 得到baseCurrencyCode
$base_currency = Yii::$app->store->get('base_info', 'base_currency');
@@ -116,16 +112,16 @@ public function save()
]);
exit;
}
- }
+ }
/*
* if attribute is date or date time , db storage format is int ,by frontend pass param is int ,
* you must convert string datetime to time , use strtotime function.
*/
// 设置 bdmin_user_id 为 当前的user_id
$this->_service->saveConfig($saveData);
-
-
-
+
+
+
$errors = Yii::$service->helper->errors->get();
if (!$errors) {
echo json_encode([
@@ -141,6 +137,6 @@ public function save()
exit;
}
}
-
-
-}
\ No newline at end of file
+
+
+}
diff --git a/app/appadmin/modules/Config/block/mutillang/Manager.php b/app/appadmin/modules/Config/block/mutillang/Manager.php
index 1bcc5d189..bb4a61d29 100644
--- a/app/appadmin/modules/Config/block/mutillang/Manager.php
+++ b/app/appadmin/modules/Config/block/mutillang/Manager.php
@@ -9,10 +9,6 @@
namespace fecshop\app\appadmin\modules\Config\block\mutillang;
-use fec\helpers\CUrl;
-use fec\helpers\CRequest;
-use fecshop\app\appadmin\interfaces\base\AppadminbaseBlockEditInterface;
-use fecshop\app\appadmin\modules\AppadminbaseBlockEdit;
use Yii;
/**
@@ -27,10 +23,10 @@ class Manager extends \yii\base\BaseObject
public $_key = 'mutil_lang';
protected $_one;
protected $_service;
-
+
public function init()
{
-
+
// 需要配置
$this->_saveUrl = Yii::$service->url->getUrl('config/mutillang/managersave');
$this->setService();
@@ -41,20 +37,20 @@ public function init()
$this->_one['value'] = unserialize($this->_one['value']);
}
}
-
-
-
+
+
+
// 传递给前端的数据 显示编辑form
public function getLastData()
{
- $id = '';
+ $id = '';
if (isset($this->_one['id'])) {
$id = $this->_one['id'];
- }
+ }
$search_engines = Yii::$service->search->getAllChildServiceName();
$search_engines_select = $this->getSearchSelect($search_engines);
return [
- 'id' => $id,
+ 'id' => $id,
'search_engines' => $search_engines,
'search_engines_select' => $search_engines_select,
'langs' => $this->_one['value'],
@@ -70,15 +66,15 @@ public function getSearchSelect($search_engines)
}
}
$str .= '';
-
+
return $str;
}
public function setService()
{
$this->_service = Yii::$service->storeBaseConfig;
}
-
-
+
+
public function getEditParam($langs)
{
$arr = [];
@@ -94,9 +90,9 @@ public function getEditParam($langs)
];
}
}
-
+
}
-
+
return [
'key' => $this->_key,
'value' => $arr,
@@ -109,7 +105,7 @@ public function save()
{
$editFormData = Yii::$app->request->post('editFormData');
$langs = $editFormData['langs'];
-
+
$saveData = $this->getEditParam($langs);
// 得到defaultLangCode
$default_lang = Yii::$app->store->get('base_info', 'default_lang');
@@ -132,15 +128,15 @@ public function save()
]);
exit;
}
- }
-
+ }
+
/*
* if attribute is date or date time , db storage format is int ,by frontend pass param is int ,
* you must convert string datetime to time , use strtotime function.
*/
// 设置 bdmin_user_id 为 当前的user_id
$this->_service->saveConfig($saveData);
-
+
$errors = Yii::$service->helper->errors->get();
if (!$errors) {
echo json_encode([
@@ -156,6 +152,6 @@ public function save()
exit;
}
}
-
-
-}
\ No newline at end of file
+
+
+}
diff --git a/app/appadmin/modules/Config/controllers/AppfrontstoreController.php b/app/appadmin/modules/Config/controllers/AppfrontstoreController.php
index 370ee96c7..63a0a2979 100644
--- a/app/appadmin/modules/Config/controllers/AppfrontstoreController.php
+++ b/app/appadmin/modules/Config/controllers/AppfrontstoreController.php
@@ -10,7 +10,6 @@
namespace fecshop\app\appadmin\modules\Config\controllers;
use fecshop\app\appadmin\modules\Config\ConfigController;
-use Yii;
/**
* @author Terry Zhao <2358269014@qq.com>
@@ -44,6 +43,6 @@ public function actionManagerdelete()
$this->getBlock('manageredit')->delete();
}
-
+
}
diff --git a/app/appadmin/modules/Config/controllers/Apphtml5storeController.php b/app/appadmin/modules/Config/controllers/Apphtml5storeController.php
index 1bdb89fef..7d8cd9516 100644
--- a/app/appadmin/modules/Config/controllers/Apphtml5storeController.php
+++ b/app/appadmin/modules/Config/controllers/Apphtml5storeController.php
@@ -10,7 +10,6 @@
namespace fecshop\app\appadmin\modules\Config\controllers;
use fecshop\app\appadmin\modules\Config\ConfigController;
-use Yii;
/**
* @author Terry Zhao <2358269014@qq.com>
@@ -44,6 +43,6 @@ public function actionManagerdelete()
$this->getBlock('manageredit')->delete();
}
-
+
}
diff --git a/app/appadmin/modules/Customer/CustomerController.php b/app/appadmin/modules/Customer/CustomerController.php
index 8d29edfd7..91ce3f1ff 100644
--- a/app/appadmin/modules/Customer/CustomerController.php
+++ b/app/appadmin/modules/Customer/CustomerController.php
@@ -13,14 +13,13 @@
* @author Terry Zhao <2358269014@qq.com>
* @since 1.0
*/
-use fecadmin\FecadminbaseController;
-use Yii;
+
use fecshop\app\appadmin\modules\AppadminController;
class CustomerController extends AppadminController
{
public $enableCsrfValidation = false;
-
+
//public function getViewPath()
//{
// return Yii::getAlias('@fecshop/app/appadmin/modules/Customer/views') . DIRECTORY_SEPARATOR . $this->id;
diff --git a/app/appadmin/modules/Fecadmin/block/log/Index.php b/app/appadmin/modules/Fecadmin/block/log/Index.php
index 711db4bc0..427d2e6e4 100755
--- a/app/appadmin/modules/Fecadmin/block/log/Index.php
+++ b/app/appadmin/modules/Fecadmin/block/log/Index.php
@@ -8,7 +8,6 @@
*/
namespace fecshop\app\appadmin\modules\Fecadmin\block\log;
-use fec\helpers\CUrl;
use fecshop\app\appadmin\interfaces\base\AppadminbaseBlockInterface;
use fecshop\app\appadmin\modules\AppadminbaseBlock;
use Yii;
@@ -26,11 +25,11 @@ public function init()
$this->_service = Yii::$service->admin->systemLog;
parent::init();
}
-
+
public function getLastData(){
# 返回数据的函数
# 隐藏部分
- $pagerForm = $this->getPagerForm();
+ $pagerForm = $this->getPagerForm();
# 搜索部分
$searchBar = $this->getSearchBar();
# 编辑 删除 按钮部分
@@ -40,8 +39,8 @@ public function getLastData(){
# 表内容部分
$tbody = $this->getTableTbody();
# 分页部分
- $toolBar = $this->getToolBar($this->_param['numCount'],$this->_param['pageNum'],$this->_param['numPerPage']);
-
+ $toolBar = $this->getToolBar($this->_param['numCount'],$this->_param['pageNum'],$this->_param['numPerPage']);
+
return [
'pagerForm' => $pagerForm,
'searchBar' => $searchBar,
@@ -87,38 +86,38 @@ public function getSearchArr(){
# 定义表格显示部分的配置
public function getTableFieldArr(){
$table_th_bar = [
- [
+ [
'orderField' => 'id',
'label' => Yii::$service->page->translate->__('Id'),
'width' => '70',
'align' => 'center',
-
+
],
- [
+ [
'orderField' => 'account',
'label' => Yii::$service->page->translate->__('Account'),
'width' => '70',
'align' => 'center',
],
- [
+ [
'orderField' => 'person',
'label' => Yii::$service->page->translate->__('User Name'),
'width' => '70',
'align' => 'left',
],
- [
+ [
'orderField' => 'menu',
'label' => Yii::$service->page->translate->__('Resource'),
'width' => '70',
'align' => 'left',
],
- [
+ [
'orderField' => 'url',
'label' => Yii::$service->page->translate->__('Url'),
'width' => '220',
'align' => 'left',
],
- [
+ [
'orderField' => 'created_at',
'label' => Yii::$service->page->translate->__('Created At'),
'width' => '130',
@@ -128,7 +127,7 @@ public function getTableFieldArr(){
];
return $table_th_bar ;
}
-
+
# table 内容部分
public function getTableTbodyHtml($data){
$fileds = $this->getTableFieldArr();
@@ -180,7 +179,7 @@ public function getTableTbodyHtml($data){
}
$str .= '';
}
-
+
return $str ;
}
# table 表 标题 1
@@ -192,7 +191,7 @@ public function getTableTheadHtml($table_th_bar){
foreach ($table_th_bar as $k => $field) {
if ($field['orderField'] == $this->_param['orderField']) {
$table_th_bar[$k]['class'] = $this->_param['orderDirection'];
- }
+ }
}
$str = '';
$str .= ' ';
-
+
return $str;
}
-
+
}
diff --git a/app/appadmin/modules/Fecadmin/block/logtj/Index.php b/app/appadmin/modules/Fecadmin/block/logtj/Index.php
index 3f577390a..6ad9e4293 100644
--- a/app/appadmin/modules/Fecadmin/block/logtj/Index.php
+++ b/app/appadmin/modules/Fecadmin/block/logtj/Index.php
@@ -8,7 +8,6 @@
*/
namespace fecshop\app\appadmin\modules\Fecadmin\block\logtj;
-use fec\helpers\CUrl;
use fec\helpers\CDate;
use fec\helpers\CRequest;
use fecshop\app\appadmin\interfaces\base\AppadminbaseBlockInterface;
@@ -30,11 +29,11 @@ public function init()
$this->_param['created_at_lt'] || $this->_param['created_at_lt'] = date('Y-m-d',strtotime(CDate::getCurrentDate().' +1 day '));
$this->_param['created_at_gte'] || $this->_param['created_at_gte'] = date('Y-m-d',strtotime($this->_param['created_at_gte'].' -1 month '));
}
-
+
public function getLastData(){
# 返回数据的函数
# 隐藏部分
- $pagerForm = $this->getPagerForm();
+ $pagerForm = $this->getPagerForm();
# 搜索部分
$searchBar = $this->getSearchBar();
# 编辑 删除 按钮部分
@@ -44,8 +43,8 @@ public function getLastData(){
# 表内容部分
$tbody = $this->getTableTbody();
# 分页部分
- $toolBar = $this->getToolBar($this->_param['numCount'],$this->_param['pageNum'],$this->_param['numPerPage']);
-
+ $toolBar = $this->getToolBar($this->_param['numCount'],$this->_param['pageNum'],$this->_param['numPerPage']);
+
return [
'pagerForm' => $pagerForm,
'searchBar' => $searchBar,
@@ -55,7 +54,7 @@ public function getLastData(){
'toolBar' => $toolBar,
];
}
-
+
# 定义搜索部分字段格式
public function getSearchArr(){
$data = [
@@ -72,7 +71,7 @@ public function getSearchArr(){
'columns_type' => 'string'
],
[ # selecit的Int 类型
- 'type' => 'select',
+ 'type' => 'select',
'title' => Yii::$service->page->translate->__('Type'),
'name' => 'tj_type',
'columns_type' => 'int', # int使用标准匹配, string使用模糊查询
@@ -93,41 +92,41 @@ public function getSearchArr(){
];
return $data;
}
-
+
# 定义表格显示部分的配置
public function getTableFieldArr(){
$table_th_bar = [
- [
+ [
'orderField' => 'account',
'label' => Yii::$service->page->translate->__('Account'),
'width' => '70',
'align' => 'center',
],
- [
+ [
'orderField' => 'person',
'label' => Yii::$service->page->translate->__('Name'),
'width' => '70',
'align' => 'left',
],
- //[
+ //[
// 'orderField' => 'menu',
// 'label' => '操作菜单',
// 'width' => '70',
// 'align' => 'left',
//],
- [
+ [
'orderField' => 'click_count',
'label' => Yii::$service->page->translate->__('Count'),
'width' => '220',
'align' => 'left',
],
];
-
+
return $table_th_bar ;
}
- # 得到表格的内容部分
+ # 得到表格的内容部分
public function getTableTbody(){
-
+
$obj = Yii::$service->admin->systemLog->getSystemLogModel();
$offset = ($this->_param['pageNum'] -1)*$this->_param['numPerPage'] ;
$limit = $this->_param['numPerPage'];
@@ -147,7 +146,7 @@ public function getTableTbody(){
$where []= " menu = 'login' ";
$group .= " ,menu ";
}
-
+
if($created_at_lt)
$where []= " created_at < '$created_at_lt' ";
if($created_at_gte)
@@ -157,24 +156,24 @@ public function getTableTbody(){
}else{
$where = '';
}
-
+
$table = $obj::tableName();
-
+
$db = \Yii::$app->db;
-
- # 得到 总数。
- $sql = "select count(*) as count from (select account,person,menu ,count(*) as click_count
+
+ # 得到 总数。
+ $sql = "select count(*) as count from (select account,person,menu ,count(*) as click_count
from $table $where group by $group ) as t ";
$data_count = $db->createCommand($sql,[])->queryOne();
$this->_param['numCount'] = $data_count['count'];
# 得到数据
- $sql = "select account,person,menu ,count(*) as click_count
+ $sql = "select account,person,menu ,count(*) as click_count
from $table $where group by $group order by click_count DESC $limit ";
$data = $db->createCommand($sql,[])->queryAll();
return $this->getTableTbodyHtml($data);
}
-
+
# table 内容部分
public function getTableTbodyHtml($data){
$fileds = $this->getTableFieldArr();
@@ -221,7 +220,7 @@ public function getTableTbodyHtml($data){
}
$str .= '';
}
-
+
return $str ;
}
# table 表 标题 1
@@ -233,7 +232,7 @@ public function getTableTheadHtml($table_th_bar){
foreach ($table_th_bar as $k => $field) {
if ($field['orderField'] == $this->_param['orderField']) {
$table_th_bar[$k]['class'] = $this->_param['orderDirection'];
- }
+ }
}
$str = '';
@@ -205,9 +204,9 @@ public function getTableTheadHtml($table_th_bar){
$str .= ' '.$label.' ';
}
$str .= '';
//$str .= ' ';
-
+
return $str;
}
-
-}
\ No newline at end of file
+
+}
diff --git a/app/appadmin/modules/Fecadmin/block/myaccount/Index.php b/app/appadmin/modules/Fecadmin/block/myaccount/Index.php
index b2e622b99..b7f445cbd 100644
--- a/app/appadmin/modules/Fecadmin/block/myaccount/Index.php
+++ b/app/appadmin/modules/Fecadmin/block/myaccount/Index.php
@@ -11,7 +11,7 @@
use Yii;
use fec\helpers\CUrl;
use fec\helpers\CRequest;
-use fecadmin\models\AdminUser\AdminUserResetPassword;
+
/**
* @author Terry Zhao <2358269014@qq.com>
* @since 1.0
@@ -21,7 +21,7 @@ class Index extends \yii\base\BaseObject
public function getLastData(){
$data = CRequest::param("updatepass");
if($data){
- // ajax update
+ // ajax update
$resetStatus = Yii::$service->adminUser->adminUser->resetCurrentPassword($data);
if (!$resetStatus) {
$errors = Yii::$service->helper->errors->get();
@@ -38,11 +38,11 @@ public function getLastData(){
$adminUser = \Yii::$app->user->identity;
$current_account = $adminUser->username;
$editUrl = CUrl::getUrl("fecadmin/myaccount/index");
-
+
return [
'current_account' => $current_account,
'editUrl' => $editUrl,
];
}
-
-}
\ No newline at end of file
+
+}
diff --git a/app/appadmin/modules/Fecadmin/controllers/AccountController.php b/app/appadmin/modules/Fecadmin/controllers/AccountController.php
index f2bf41b13..288e4eeee 100644
--- a/app/appadmin/modules/Fecadmin/controllers/AccountController.php
+++ b/app/appadmin/modules/Fecadmin/controllers/AccountController.php
@@ -7,9 +7,6 @@
* @license http://www.fecshop.com/license/
*/
namespace fecshop\app\appadmin\modules\Fecadmin\controllers;
-use Yii;
-use fec\helpers\CRequest;
-use fecadmin\FecadminbaseController;
use fecshop\app\appadmin\modules\AppadminController;
/**
* @author Terry Zhao <2358269014@qq.com>
@@ -19,20 +16,20 @@ class AccountController extends AppadminController
{
public $enableCsrfValidation = true;
public $blockNamespace = 'fecshop\\app\\appadmin\\modules\\Fecadmin\\block';
-
+
public function init()
{
// Yii::$service->page->theme->layoutFile = 'dashboard.php';
- parent::init();
+ parent::init();
}
-
+
# 我的账户
//public function actionIndex()
//{
// $data = $this->getBlock()->getLastData();
// return $this->render($this->action->id,$data);
//}
-
+
# 我的账户
public function actionManager()
{
@@ -40,31 +37,31 @@ public function actionManager()
$data = $this->getBlock()->getLastData();
return $this->render($this->action->id,$data);
}
-
-
+
+
public function actionManageredit()
{
//echo $this->action->id ;exit;
$data = $this->getBlock()->getLastData();
return $this->render($this->action->id,$data);
}
-
+
public function actionManagereditsave()
{
-
+
//echo $this->action->id ;exit;
$data = $this->getBlock("manageredit")->save();
//return $this->render($this->action->id,$data);
}
-
+
public function actionManagerdelete()
{
//echo $this->action->id ;exit;
$this->getBlock("manageredit")->delete();
-
+
}
-
+
}
diff --git a/app/appadmin/modules/Fecadmin/controllers/CacheController.php b/app/appadmin/modules/Fecadmin/controllers/CacheController.php
index a3903fff4..93acc7ce2 100644
--- a/app/appadmin/modules/Fecadmin/controllers/CacheController.php
+++ b/app/appadmin/modules/Fecadmin/controllers/CacheController.php
@@ -7,9 +7,7 @@
* @license http://www.fecshop.com/license/
*/
namespace fecshop\app\appadmin\modules\Fecadmin\controllers;
-use Yii;
use fec\helpers\CRequest;
-use fecadmin\FecadminbaseController;
use fecshop\app\appadmin\modules\AppadminController;
/**
* @author Terry Zhao <2358269014@qq.com>
@@ -29,10 +27,10 @@ public function actionIndex()
$data = $block->getLastData();
return $this->render($this->action->id,$data);
}
-
-
-
-
+
+
+
+
}
diff --git a/app/appadmin/modules/Fecadmin/controllers/ConfigController.php b/app/appadmin/modules/Fecadmin/controllers/ConfigController.php
index 3c8cc6d2d..1708364c4 100644
--- a/app/appadmin/modules/Fecadmin/controllers/ConfigController.php
+++ b/app/appadmin/modules/Fecadmin/controllers/ConfigController.php
@@ -7,9 +7,6 @@
* @license http://www.fecshop.com/license/
*/
namespace fecshop\app\appadmin\modules\Fecadmin\controllers;
-use Yii;
-use fec\helpers\CRequest;
-use fecadmin\FecadminbaseController;
use fecshop\app\appadmin\modules\AppadminController;
/**
* @author Terry Zhao <2358269014@qq.com>
@@ -19,37 +16,37 @@ class ConfigController extends AppadminController
{
public $blockNamespace = 'fecshop\\app\\appadmin\\modules\\Fecadmin\\block';
public $enableCsrfValidation = true;
-
+
public function actionManager()
{
$data = $this->getBlock()->getLastData();
return $this->render($this->action->id,$data);
}
-
-
+
+
public function actionManageredit()
{
//echo $this->action->id ;exit;
$data = $this->getBlock()->getLastData();
return $this->render($this->action->id,$data);
}
-
+
public function actionManagereditsave()
{
-
+
//echo $this->action->id ;exit;
$data = $this->getBlock("manageredit")->save();
//return $this->render($this->action->id,$data);
}
-
+
public function actionManagerdelete()
{
//echo $this->action->id ;exit;
$this->getBlock("manageredit")->delete();
-
+
}
-
+
}
diff --git a/app/appadmin/modules/Fecadmin/controllers/ErrorController.php b/app/appadmin/modules/Fecadmin/controllers/ErrorController.php
index 5cf80e1bf..592ef090a 100644
--- a/app/appadmin/modules/Fecadmin/controllers/ErrorController.php
+++ b/app/appadmin/modules/Fecadmin/controllers/ErrorController.php
@@ -8,8 +8,6 @@
*/
namespace fecshop\app\appadmin\modules\Fecadmin\controllers;
use Yii;
-use fec\helpers\CRequest;
-use fecadmin\FecadminbaseController;
use fecshop\app\appadmin\modules\AppadminController;
/**
* @author Terry Zhao <2358269014@qq.com>
@@ -18,7 +16,7 @@
class ErrorController extends AppadminController
{
public $enableCsrfValidation = true;
-
+
# 刷新缓存
public function actionIndex()
{
@@ -27,10 +25,10 @@ public function actionIndex()
";
exit;
}
-
-
-
-
+
+
+
+
}
diff --git a/app/appadmin/modules/Fecadmin/controllers/IndexController.php b/app/appadmin/modules/Fecadmin/controllers/IndexController.php
index b7f96315c..90ecc1ae7 100644
--- a/app/appadmin/modules/Fecadmin/controllers/IndexController.php
+++ b/app/appadmin/modules/Fecadmin/controllers/IndexController.php
@@ -8,8 +8,6 @@
*/
namespace fecshop\app\appadmin\modules\Fecadmin\controllers;
use Yii;
-use fec\helpers\CRequest;
-use fecadmin\FecadminbaseController;
use fecshop\app\appadmin\modules\AppadminController;
/**
* @author Terry Zhao <2358269014@qq.com>
@@ -18,21 +16,21 @@
class IndexController extends AppadminController
{
public $enableCsrfValidation = true;
-
+
public function init()
{
Yii::$service->page->theme->layoutFile = 'dashboard.php';
- parent::init();
+ parent::init();
}
-
+
public function actionIndex()
{
return $this->render('index');
}
-
-
-
-
+
+
+
+
}
diff --git a/app/appadmin/modules/Fecadmin/controllers/LogController.php b/app/appadmin/modules/Fecadmin/controllers/LogController.php
index eca5dd0bc..af66a8e1a 100644
--- a/app/appadmin/modules/Fecadmin/controllers/LogController.php
+++ b/app/appadmin/modules/Fecadmin/controllers/LogController.php
@@ -7,9 +7,6 @@
* @license http://www.fecshop.com/license/
*/
namespace fecshop\app\appadmin\modules\Fecadmin\controllers;
-use Yii;
-use fec\helpers\CRequest;
-use fecadmin\FecadminbaseController;
use fecshop\app\appadmin\modules\AppadminController;
/**
* @author Terry Zhao <2358269014@qq.com>
@@ -19,14 +16,14 @@ class LogController extends AppadminController
{
public $enableCsrfValidation = true;
public $blockNamespace = 'fecshop\\app\\appadmin\\modules\\Fecadmin\\block';
-
+
public function actionIndex()
- {
+ {
$data = $this->getBlock()->getLastData();
return $this->render($this->action->id,$data);
}
-
+
}
diff --git a/app/appadmin/modules/Fecadmin/controllers/LoginController.php b/app/appadmin/modules/Fecadmin/controllers/LoginController.php
index 31e70506f..3d18e2dca 100644
--- a/app/appadmin/modules/Fecadmin/controllers/LoginController.php
+++ b/app/appadmin/modules/Fecadmin/controllers/LoginController.php
@@ -9,12 +9,8 @@
namespace fecshop\app\appadmin\modules\Fecadmin\controllers;
use Yii;
use fec\helpers\CConfig;
-use fecadmin\FecadminbaseController;
-use fecshop\app\appadmin\modules\AppadminController;
-use yii\helpers\Url;
use fec\helpers\CModel;
-use fec\helpers\CDate;
use fecadmin\models\AdminUser\AdminUserLogin;
/**
@@ -25,7 +21,7 @@ class LoginController extends \fecadmin\controllers\LoginController
{
public $enableCsrfValidation = true;
public $blockNamespace;
-
+
/**
* init theme component property : $fecshopThemeDir and $layoutFile
* $fecshopThemeDir is appfront base theme directory.
@@ -49,9 +45,9 @@ public function init()
* set i18n translate category.
*/
Yii::$service->page->translate->category = 'appadmin';
- Yii::$service->page->theme->layoutFile = 'login.php';
+ Yii::$service->page->theme->layoutFile = 'login.php';
}
-
+
public function actionIndex()
{
$langCode = Yii::$app->request->get('lang');
@@ -87,7 +83,7 @@ public function actionIndex()
'error' => $errors,
]);
}
-
+
public function actionChangelang(){
$langCode = Yii::$app->request->get('lang');
if ($langCode) {
@@ -98,14 +94,14 @@ public function actionChangelang(){
]);
exit;
}
- }
-
+ }
+
echo json_encode([
'status' => 'fail'
]);
exit;
}
-
+
/**
* @param $view|string , (only) view file name ,by this module id, this controller id , generate view relative path.
* @param $params|Array,
@@ -139,7 +135,7 @@ public function findLayoutFile($view)
}
throw new InvalidValueException('layout file is not exist!');
}
-
+
}
diff --git a/app/appadmin/modules/Fecadmin/controllers/LogoutController.php b/app/appadmin/modules/Fecadmin/controllers/LogoutController.php
index 6e8ed7cee..55a2c8e25 100644
--- a/app/appadmin/modules/Fecadmin/controllers/LogoutController.php
+++ b/app/appadmin/modules/Fecadmin/controllers/LogoutController.php
@@ -9,13 +9,7 @@
namespace fecshop\app\appadmin\modules\Fecadmin\controllers;
use Yii;
use fec\helpers\CConfig;
-use fecadmin\FecadminbaseController;
-use fecshop\app\appadmin\modules\AppadminController;
use yii\web\Controller;
-use yii\helpers\Url;
-use fec\helpers\CModel;
-use fec\helpers\CDate;
-use fecadmin\models\AdminUser\AdminUserLogin;
/**
* @author Terry Zhao <2358269014@qq.com>
@@ -25,8 +19,8 @@ class LogoutController extends Controller
{
public $enableCsrfValidation = true;
public $blockNamespace;
-
-
+
+
/**
* init theme component property : $fecshopThemeDir and $layoutFile
* $fecshopThemeDir is appfront base theme directory.
@@ -54,7 +48,7 @@ public function init()
* 自定义Yii::$classMap,用于重写
*/
}
-
+
public function actionIndex()
{
$currentLang = Yii::$service->admin->getCurrentLangCode();
@@ -74,7 +68,7 @@ public function actionIndex()
// Yii::$app->getResponse()->redirect()->send();
//$this->redirect("/fecadmin/login/index",200)->send();
}
-
+
/**
* @param $view|string , (only) view file name ,by this module id, this controller id , generate view relative path.
* @param $params|Array,
@@ -108,7 +102,7 @@ public function findLayoutFile($view)
}
throw new InvalidValueException('layout file is not exist!');
}
-
+
}
diff --git a/app/appadmin/modules/Fecadmin/controllers/LogtjController.php b/app/appadmin/modules/Fecadmin/controllers/LogtjController.php
index caeea3f65..4d02ba25f 100644
--- a/app/appadmin/modules/Fecadmin/controllers/LogtjController.php
+++ b/app/appadmin/modules/Fecadmin/controllers/LogtjController.php
@@ -7,9 +7,6 @@
* @license http://www.fecshop.com/license/
*/
namespace fecshop\app\appadmin\modules\Fecadmin\controllers;
-use Yii;
-use fec\helpers\CRequest;
-use fecadmin\FecadminbaseController;
use fecshop\app\appadmin\modules\AppadminController;
/**
* @author Terry Zhao <2358269014@qq.com>
@@ -19,14 +16,14 @@ class LogtjController extends AppadminController
{
public $enableCsrfValidation = true;
public $blockNamespace = 'fecshop\\app\\appadmin\\modules\\Fecadmin\\block';
-
+
public function actionIndex()
{
$data = $this->getBlock()->getLastData();
return $this->render($this->action->id,$data);
}
-
+
}
diff --git a/app/appadmin/modules/Fecadmin/controllers/MyaccountController.php b/app/appadmin/modules/Fecadmin/controllers/MyaccountController.php
index 3f966d9e9..ca0ff0c59 100644
--- a/app/appadmin/modules/Fecadmin/controllers/MyaccountController.php
+++ b/app/appadmin/modules/Fecadmin/controllers/MyaccountController.php
@@ -7,9 +7,6 @@
* @license http://www.fecshop.com/license/
*/
namespace fecshop\app\appadmin\modules\Fecadmin\controllers;
-use Yii;
-use fec\helpers\CRequest;
-use fecadmin\FecadminbaseController;
use fecshop\app\appadmin\modules\AppadminController;
/**
* @author Terry Zhao <2358269014@qq.com>
@@ -19,14 +16,14 @@ class MyaccountController extends AppadminController
{
public $enableCsrfValidation = true;
public $blockNamespace = 'fecshop\\app\\appadmin\\modules\\Fecadmin\\block';
-
+
# 我的账户
public function actionIndex()
{
$data = $this->getBlock()->getLastData();
return $this->render($this->action->id,$data);
}
-
+
}
diff --git a/app/appadmin/modules/Fecadmin/controllers/ResourceController.php b/app/appadmin/modules/Fecadmin/controllers/ResourceController.php
index aaba037f2..139ebce53 100644
--- a/app/appadmin/modules/Fecadmin/controllers/ResourceController.php
+++ b/app/appadmin/modules/Fecadmin/controllers/ResourceController.php
@@ -7,9 +7,6 @@
* @license http://www.fecshop.com/license/
*/
namespace fecshop\app\appadmin\modules\Fecadmin\controllers;
-use Yii;
-use fec\helpers\CRequest;
-use fecadmin\FecadminbaseController;
use fecshop\app\appadmin\modules\AppadminController;
/**
* @author Terry Zhao <2358269014@qq.com>
@@ -64,7 +61,7 @@ public function actionManagerdelete()
}
-
+
}
diff --git a/app/appadmin/modules/Fecadmin/controllers/RoleController.php b/app/appadmin/modules/Fecadmin/controllers/RoleController.php
index 28cfe9008..fed4c82b8 100644
--- a/app/appadmin/modules/Fecadmin/controllers/RoleController.php
+++ b/app/appadmin/modules/Fecadmin/controllers/RoleController.php
@@ -7,9 +7,6 @@
* @license http://www.fecshop.com/license/
*/
namespace fecshop\app\appadmin\modules\Fecadmin\controllers;
-use Yii;
-use fec\helpers\CRequest;
-use fecadmin\FecadminbaseController;
use fecshop\app\appadmin\modules\AppadminController;
/**
* @author Terry Zhao <2358269014@qq.com>
diff --git a/app/appadmin/modules/Fecadmin/controllers/SystemlogController.php b/app/appadmin/modules/Fecadmin/controllers/SystemlogController.php
index db8deeb3e..d91e56748 100644
--- a/app/appadmin/modules/Fecadmin/controllers/SystemlogController.php
+++ b/app/appadmin/modules/Fecadmin/controllers/SystemlogController.php
@@ -7,9 +7,6 @@
* @license http://www.fecshop.com/license/
*/
namespace fecshop\app\appadmin\modules\Fecadmin\controllers;
-use Yii;
-use fec\helpers\CRequest;
-use fecadmin\FecadminbaseController;
use fecshop\app\appadmin\modules\AppadminController;
/**
* @author Terry Zhao <2358269014@qq.com>
@@ -18,16 +15,16 @@
class SystemlogController extends AppadminController
{
public $enableCsrfValidation = true;
-
+
# 刷新缓存
public function actionManager()
{
echo '';
@@ -246,8 +245,8 @@ public function getTableTheadHtml($table_th_bar){
$str .= ' '.$label.' ';
}
$str .= '