Skip to content

Commit f0bae49

Browse files
fecadmin controller and view , migrate to fecshop appadmin
1 parent 6c60f4d commit f0bae49

File tree

12 files changed

+403
-1
lines changed

12 files changed

+403
-1
lines changed

app/appadmin/config/modules/Fecadmin.php

+12
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,18 @@
2222
'cache' => [
2323
'class' => 'fecshop\app\appadmin\modules\Fecadmin\controllers\CacheController',
2424
],
25+
'config' => [
26+
'class' => 'fecshop\app\appadmin\modules\Fecadmin\controllers\ConfigController',
27+
],
28+
'logtj' => [
29+
'class' => 'fecshop\app\appadmin\modules\Fecadmin\controllers\LogtjController',
30+
],
31+
'log' => [
32+
'class' => 'fecshop\app\appadmin\modules\Fecadmin\controllers\LogController',
33+
],
34+
'myaccount' => [
35+
'class' => 'fecshop\app\appadmin\modules\Fecadmin\controllers\MyaccountController',
36+
],
2537
'index' => [
2638
'class' => 'fecshop\app\appadmin\modules\Fecadmin\controllers\IndexController',
2739
],
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<?php
2+
/**
3+
* FecShop file.
4+
*
5+
* @link http://www.fecshop.com/
6+
* @copyright Copyright (c) 2016 FecShop Software LLC
7+
* @license http://www.fecshop.com/license/
8+
*/
9+
namespace fecshop\app\appadmin\modules\Fecadmin\controllers;
10+
use Yii;
11+
use fec\helpers\CRequest;
12+
use fecadmin\FecadminbaseController;
13+
use fecshop\app\appadmin\modules\AppadminController;
14+
/**
15+
* @author Terry Zhao <2358269014@qq.com>
16+
* @since 1.0
17+
*/
18+
class ConfigController extends AppadminController
19+
{
20+
public $enableCsrfValidation = false;
21+
22+
public function actionManager()
23+
{
24+
$data = $this->getFecadminBlock()->getLastData();
25+
return $this->render($this->action->id,$data);
26+
}
27+
28+
29+
public function actionManageredit()
30+
{
31+
//echo $this->action->id ;exit;
32+
$data = $this->getFecadminBlock()->getLastData();
33+
return $this->render($this->action->id,$data);
34+
}
35+
36+
public function actionManagereditsave()
37+
{
38+
39+
//echo $this->action->id ;exit;
40+
$data = $this->getFecadminBlock("manageredit")->save();
41+
//return $this->render($this->action->id,$data);
42+
}
43+
44+
public function actionManagerdelete()
45+
{
46+
//echo $this->action->id ;exit;
47+
$this->getFecadminBlock("manageredit")->delete();
48+
49+
}
50+
51+
52+
}
53+
54+
55+
56+
57+
58+
59+
60+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?php
2+
/**
3+
* FecShop file.
4+
*
5+
* @link http://www.fecshop.com/
6+
* @copyright Copyright (c) 2016 FecShop Software LLC
7+
* @license http://www.fecshop.com/license/
8+
*/
9+
namespace fecshop\app\appadmin\modules\Fecadmin\controllers;
10+
use Yii;
11+
use fec\helpers\CRequest;
12+
use fecadmin\FecadminbaseController;
13+
use fecshop\app\appadmin\modules\AppadminController;
14+
/**
15+
* @author Terry Zhao <2358269014@qq.com>
16+
* @since 1.0
17+
*/
18+
class LogController extends AppadminController
19+
{
20+
public $enableCsrfValidation = false;
21+
22+
public function actionIndex()
23+
{
24+
25+
$data = $this->getFecadminBlock()->getLastData();
26+
return $this->render($this->action->id,$data);
27+
}
28+
29+
30+
}
31+
32+
33+
34+
35+
36+
37+
38+

app/appadmin/modules/Fecadmin/controllers/LoginController.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ public function actionIndex()
4343
$AdminUserLogin = new AdminUserLogin;
4444
$AdminUserLogin->attributes = $loginParam;
4545
if($AdminUserLogin->login()){
46-
\fecadmin\helpers\CSystemlog::saveSystemLog();
46+
//\fecadmin\helpers\CSystemlog::saveSystemLog();
47+
Yii::$service->admin->systemLog->save();
4748
//$this->redirect("/",200)->send();
4849
Yii::$app->getResponse()->redirect("/")->send();
4950
return;

app/appadmin/modules/Fecadmin/controllers/LogoutController.php

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public function actionIndex()
3333
if($isGuest){
3434

3535
}else{
36+
Yii::$service->admin->systemLog->save();
3637
Yii::$app->user->logout();
3738
}
3839
\fecadmin\helpers\CSystemlog::saveSystemLog();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
/**
3+
* FecShop file.
4+
*
5+
* @link http://www.fecshop.com/
6+
* @copyright Copyright (c) 2016 FecShop Software LLC
7+
* @license http://www.fecshop.com/license/
8+
*/
9+
namespace fecshop\app\appadmin\modules\Fecadmin\controllers;
10+
use Yii;
11+
use fec\helpers\CRequest;
12+
use fecadmin\FecadminbaseController;
13+
use fecshop\app\appadmin\modules\AppadminController;
14+
/**
15+
* @author Terry Zhao <2358269014@qq.com>
16+
* @since 1.0
17+
*/
18+
class LogtjController extends AppadminController
19+
{
20+
public $enableCsrfValidation = false;
21+
22+
public function actionIndex()
23+
{
24+
$data = $this->getFecadminBlock()->getLastData();
25+
return $this->render($this->action->id,$data);
26+
}
27+
28+
29+
}
30+
31+
32+
33+
34+
35+
36+
37+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
/**
3+
* FecShop file.
4+
*
5+
* @link http://www.fecshop.com/
6+
* @copyright Copyright (c) 2016 FecShop Software LLC
7+
* @license http://www.fecshop.com/license/
8+
*/
9+
namespace fecshop\app\appadmin\modules\Fecadmin\controllers;
10+
use Yii;
11+
use fec\helpers\CRequest;
12+
use fecadmin\FecadminbaseController;
13+
use fecshop\app\appadmin\modules\AppadminController;
14+
/**
15+
* @author Terry Zhao <2358269014@qq.com>
16+
* @since 1.0
17+
*/
18+
class MyaccountController extends AppadminController
19+
{
20+
public $enableCsrfValidation = false;
21+
22+
# 我的账户
23+
public function actionIndex()
24+
{
25+
$data = $this->getFecadminBlock()->getLastData();
26+
return $this->render($this->action->id,$data);
27+
}
28+
29+
}
30+
31+
32+
33+
34+
35+
36+
37+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
/**
3+
* FecShop file.
4+
*
5+
* @link http://www.fecshop.com/
6+
* @copyright Copyright (c) 2016 FecShop Software LLC
7+
* @license http://www.fecshop.com/license/
8+
*/
9+
use fec\helpers\CRequest;
10+
?>
11+
<form id="pagerForm" method="post" action="<?= \fec\helpers\CUrl::getCurrentUrl(); ?>">
12+
<?= CRequest::getCsrfInputHtml(); ?>
13+
<?= $pagerForm; ?>
14+
</form>
15+
<div class="pageHeader">
16+
<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="<?= \fec\helpers\CUrl::getCurrentUrl(); ?>" method="post">
17+
<?php echo CRequest::getCsrfInputHtml(); ?>
18+
<div class="searchBar">
19+
<?php echo $searchBar; ?>
20+
</div>
21+
</form>
22+
</div>
23+
<div class="pageContent">
24+
<div class="panelBar">
25+
<?= $editBar; ?>
26+
</div>
27+
<div class="panelBar">
28+
<?= $toolBar; ?>
29+
</div>
30+
<table class="table" width="100%" layoutH="138">
31+
<?= $thead; ?>
32+
<tbody>
33+
<?= $tbody; ?>
34+
</tbody>
35+
</table>
36+
37+
</div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<?php
2+
/**
3+
* FecShop file.
4+
*
5+
* @link http://www.fecshop.com/
6+
* @copyright Copyright (c) 2016 FecShop Software LLC
7+
* @license http://www.fecshop.com/license/
8+
*/
9+
use yii\helpers\Html;
10+
use fec\helpers\CRequest;
11+
?>
12+
<style>
13+
.dialog .pageContent {background:none;}
14+
.dialog .pageContent .pageFormContent{background:none;}
15+
</style>
16+
<div class="pageContent">
17+
<form method="post" action="<?= $saveUrl ?>" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDoneCloseAndReflush);">
18+
<?php echo CRequest::getCsrfInputHtml(); ?>
19+
<div layouth="56" class="pageFormContent" style="height: 240px; overflow: auto;">
20+
21+
<input type="hidden" value="<?= $product_id; ?>" size="30" name="product_id" class="textInput ">
22+
23+
<fieldset id="fieldset_table_qbe">
24+
<legend style="color:#cc0000">编辑信息</legend>
25+
<div>
26+
<?= $editBar; ?>
27+
28+
</div>
29+
</fieldset>
30+
31+
32+
33+
</div>
34+
35+
<div class="formBar">
36+
<ul>
37+
<!--<li><a class="buttonActive" href="javascript:;"><span>保存</span></a></li>-->
38+
<li><div class="buttonActive"><div class="buttonContent"><button onclick="func('accept')" value="accept" name="accept" type="submit">保存</button></div></div></li>
39+
40+
<li>
41+
<div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
42+
</li>
43+
</ul>
44+
</div>
45+
</form>
46+
</div>
47+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
/**
3+
* FecShop file.
4+
*
5+
* @link http://www.fecshop.com/
6+
* @copyright Copyright (c) 2016 FecShop Software LLC
7+
* @license http://www.fecshop.com/license/
8+
*/
9+
use fec\helpers\CRequest;
10+
?>
11+
<form id="pagerForm" method="post" action="<?= \fec\helpers\CUrl::getCurrentUrl(); ?>">
12+
<?= CRequest::getCsrfInputHtml(); ?>
13+
<?= $pagerForm; ?>
14+
</form>
15+
<div class="pageHeader">
16+
<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="<?= \fec\helpers\CUrl::getCurrentUrl(); ?>" method="post">
17+
<?php echo CRequest::getCsrfInputHtml(); ?>
18+
<div class="searchBar">
19+
<?php echo $searchBar; ?>
20+
</div>
21+
</form>
22+
</div>
23+
<div class="pageContent">
24+
<div class="panelBar">
25+
<?php //echo $editBar; ?>
26+
</div>
27+
<div class="panelBar">
28+
<?= $toolBar; ?>
29+
</div>
30+
<table class="table" width="100%" layoutH="138">
31+
<?= $thead; ?>
32+
<tbody>
33+
<?= $tbody; ?>
34+
</tbody>
35+
</table>
36+
37+
</div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
/**
3+
* FecShop file.
4+
*
5+
* @link http://www.fecshop.com/
6+
* @copyright Copyright (c) 2016 FecShop Software LLC
7+
* @license http://www.fecshop.com/license/
8+
*/
9+
use fec\helpers\CRequest;
10+
?>
11+
<form id="pagerForm" method="post" action="<?= \fec\helpers\CUrl::getCurrentUrl(); ?>">
12+
<?= CRequest::getCsrfInputHtml(); ?>
13+
<?= $pagerForm; ?>
14+
15+
</form>
16+
<div class="pageHeader">
17+
<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="<?= \fec\helpers\CUrl::getCurrentUrl(); ?>" method="post">
18+
<?php echo CRequest::getCsrfInputHtml(); ?>
19+
<div class="searchBar">
20+
<?php echo $searchBar; ?>
21+
</div>
22+
</form>
23+
</div>
24+
<div class="pageContent">
25+
<div class="panelBar">
26+
<?php //echo $editBar; ?>
27+
</div>
28+
<div class="panelBar">
29+
<?= $toolBar; ?>
30+
</div>
31+
<table class="table" width="100%" layoutH="138">
32+
<?= $thead; ?>
33+
<tbody>
34+
<?= $tbody; ?>
35+
</tbody>
36+
</table>
37+
</div>

0 commit comments

Comments
 (0)