Skip to content

Commit

Permalink
fecadmin controller and view , migrate to fecshop appadmin
Browse files Browse the repository at this point in the history
  • Loading branch information
fancyecommerce committed Nov 3, 2018
1 parent 6c60f4d commit f0bae49
Show file tree
Hide file tree
Showing 12 changed files with 403 additions and 1 deletion.
12 changes: 12 additions & 0 deletions app/appadmin/config/modules/Fecadmin.php
Expand Up @@ -22,6 +22,18 @@
'cache' => [
'class' => 'fecshop\app\appadmin\modules\Fecadmin\controllers\CacheController',
],
'config' => [
'class' => 'fecshop\app\appadmin\modules\Fecadmin\controllers\ConfigController',
],
'logtj' => [
'class' => 'fecshop\app\appadmin\modules\Fecadmin\controllers\LogtjController',
],
'log' => [
'class' => 'fecshop\app\appadmin\modules\Fecadmin\controllers\LogController',
],
'myaccount' => [
'class' => 'fecshop\app\appadmin\modules\Fecadmin\controllers\MyaccountController',
],
'index' => [
'class' => 'fecshop\app\appadmin\modules\Fecadmin\controllers\IndexController',
],
Expand Down
60 changes: 60 additions & 0 deletions app/appadmin/modules/Fecadmin/controllers/ConfigController.php
@@ -0,0 +1,60 @@
<?php
/**
* FecShop file.
*
* @link http://www.fecshop.com/
* @copyright Copyright (c) 2016 FecShop Software LLC
* @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>
* @since 1.0
*/
class ConfigController extends AppadminController
{
public $enableCsrfValidation = false;

public function actionManager()
{
$data = $this->getFecadminBlock()->getLastData();
return $this->render($this->action->id,$data);
}


public function actionManageredit()
{
//echo $this->action->id ;exit;
$data = $this->getFecadminBlock()->getLastData();
return $this->render($this->action->id,$data);
}

public function actionManagereditsave()
{

//echo $this->action->id ;exit;
$data = $this->getFecadminBlock("manageredit")->save();
//return $this->render($this->action->id,$data);
}

public function actionManagerdelete()
{
//echo $this->action->id ;exit;
$this->getFecadminBlock("manageredit")->delete();

}


}








38 changes: 38 additions & 0 deletions app/appadmin/modules/Fecadmin/controllers/LogController.php
@@ -0,0 +1,38 @@
<?php
/**
* FecShop file.
*
* @link http://www.fecshop.com/
* @copyright Copyright (c) 2016 FecShop Software LLC
* @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>
* @since 1.0
*/
class LogController extends AppadminController
{
public $enableCsrfValidation = false;

public function actionIndex()
{

$data = $this->getFecadminBlock()->getLastData();
return $this->render($this->action->id,$data);
}


}








Expand Up @@ -43,7 +43,8 @@ public function actionIndex()
$AdminUserLogin = new AdminUserLogin;
$AdminUserLogin->attributes = $loginParam;
if($AdminUserLogin->login()){
\fecadmin\helpers\CSystemlog::saveSystemLog();
//\fecadmin\helpers\CSystemlog::saveSystemLog();
Yii::$service->admin->systemLog->save();
//$this->redirect("/",200)->send();
Yii::$app->getResponse()->redirect("/")->send();
return;
Expand Down
Expand Up @@ -33,6 +33,7 @@ public function actionIndex()
if($isGuest){

}else{
Yii::$service->admin->systemLog->save();
Yii::$app->user->logout();
}
\fecadmin\helpers\CSystemlog::saveSystemLog();
Expand Down
37 changes: 37 additions & 0 deletions app/appadmin/modules/Fecadmin/controllers/LogtjController.php
@@ -0,0 +1,37 @@
<?php
/**
* FecShop file.
*
* @link http://www.fecshop.com/
* @copyright Copyright (c) 2016 FecShop Software LLC
* @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>
* @since 1.0
*/
class LogtjController extends AppadminController
{
public $enableCsrfValidation = false;

public function actionIndex()
{
$data = $this->getFecadminBlock()->getLastData();
return $this->render($this->action->id,$data);
}


}








37 changes: 37 additions & 0 deletions app/appadmin/modules/Fecadmin/controllers/MyaccountController.php
@@ -0,0 +1,37 @@
<?php
/**
* FecShop file.
*
* @link http://www.fecshop.com/
* @copyright Copyright (c) 2016 FecShop Software LLC
* @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>
* @since 1.0
*/
class MyaccountController extends AppadminController
{
public $enableCsrfValidation = false;

# 我的账户
public function actionIndex()
{
$data = $this->getFecadminBlock()->getLastData();
return $this->render($this->action->id,$data);
}

}








37 changes: 37 additions & 0 deletions app/appadmin/theme/base/default/fecadmin/config/manager.php
@@ -0,0 +1,37 @@
<?php
/**
* FecShop file.
*
* @link http://www.fecshop.com/
* @copyright Copyright (c) 2016 FecShop Software LLC
* @license http://www.fecshop.com/license/
*/
use fec\helpers\CRequest;
?>
<form id="pagerForm" method="post" action="<?= \fec\helpers\CUrl::getCurrentUrl(); ?>">
<?= CRequest::getCsrfInputHtml(); ?>
<?= $pagerForm; ?>
</form>
<div class="pageHeader">
<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="<?= \fec\helpers\CUrl::getCurrentUrl(); ?>" method="post">
<?php echo CRequest::getCsrfInputHtml(); ?>
<div class="searchBar">
<?php echo $searchBar; ?>
</div>
</form>
</div>
<div class="pageContent">
<div class="panelBar">
<?= $editBar; ?>
</div>
<div class="panelBar">
<?= $toolBar; ?>
</div>
<table class="table" width="100%" layoutH="138">
<?= $thead; ?>
<tbody>
<?= $tbody; ?>
</tbody>
</table>

</div>
47 changes: 47 additions & 0 deletions app/appadmin/theme/base/default/fecadmin/config/manageredit.php
@@ -0,0 +1,47 @@
<?php
/**
* FecShop file.
*
* @link http://www.fecshop.com/
* @copyright Copyright (c) 2016 FecShop Software LLC
* @license http://www.fecshop.com/license/
*/
use yii\helpers\Html;
use fec\helpers\CRequest;
?>
<style>
.dialog .pageContent {background:none;}
.dialog .pageContent .pageFormContent{background:none;}
</style>
<div class="pageContent">
<form method="post" action="<?= $saveUrl ?>" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDoneCloseAndReflush);">
<?php echo CRequest::getCsrfInputHtml(); ?>
<div layouth="56" class="pageFormContent" style="height: 240px; overflow: auto;">

<input type="hidden" value="<?= $product_id; ?>" size="30" name="product_id" class="textInput ">

<fieldset id="fieldset_table_qbe">
<legend style="color:#cc0000">编辑信息</legend>
<div>
<?= $editBar; ?>

</div>
</fieldset>



</div>

<div class="formBar">
<ul>
<!--<li><a class="buttonActive" href="javascript:;"><span>保存</span></a></li>-->
<li><div class="buttonActive"><div class="buttonContent"><button onclick="func('accept')" value="accept" name="accept" type="submit">保存</button></div></div></li>

<li>
<div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
</li>
</ul>
</div>
</form>
</div>

37 changes: 37 additions & 0 deletions app/appadmin/theme/base/default/fecadmin/log/index.php
@@ -0,0 +1,37 @@
<?php
/**
* FecShop file.
*
* @link http://www.fecshop.com/
* @copyright Copyright (c) 2016 FecShop Software LLC
* @license http://www.fecshop.com/license/
*/
use fec\helpers\CRequest;
?>
<form id="pagerForm" method="post" action="<?= \fec\helpers\CUrl::getCurrentUrl(); ?>">
<?= CRequest::getCsrfInputHtml(); ?>
<?= $pagerForm; ?>
</form>
<div class="pageHeader">
<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="<?= \fec\helpers\CUrl::getCurrentUrl(); ?>" method="post">
<?php echo CRequest::getCsrfInputHtml(); ?>
<div class="searchBar">
<?php echo $searchBar; ?>
</div>
</form>
</div>
<div class="pageContent">
<div class="panelBar">
<?php //echo $editBar; ?>
</div>
<div class="panelBar">
<?= $toolBar; ?>
</div>
<table class="table" width="100%" layoutH="138">
<?= $thead; ?>
<tbody>
<?= $tbody; ?>
</tbody>
</table>

</div>
37 changes: 37 additions & 0 deletions app/appadmin/theme/base/default/fecadmin/logtj/index.php
@@ -0,0 +1,37 @@
<?php
/**
* FecShop file.
*
* @link http://www.fecshop.com/
* @copyright Copyright (c) 2016 FecShop Software LLC
* @license http://www.fecshop.com/license/
*/
use fec\helpers\CRequest;
?>
<form id="pagerForm" method="post" action="<?= \fec\helpers\CUrl::getCurrentUrl(); ?>">
<?= CRequest::getCsrfInputHtml(); ?>
<?= $pagerForm; ?>

</form>
<div class="pageHeader">
<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="<?= \fec\helpers\CUrl::getCurrentUrl(); ?>" method="post">
<?php echo CRequest::getCsrfInputHtml(); ?>
<div class="searchBar">
<?php echo $searchBar; ?>
</div>
</form>
</div>
<div class="pageContent">
<div class="panelBar">
<?php //echo $editBar; ?>
</div>
<div class="panelBar">
<?= $toolBar; ?>
</div>
<table class="table" width="100%" layoutH="138">
<?= $thead; ?>
<tbody>
<?= $tbody; ?>
</tbody>
</table>
</div>

0 comments on commit f0bae49

Please sign in to comment.