From dfa852c604de00d9c03027e06c8b0df847a00cd7 Mon Sep 17 00:00:00 2001 From: wuhao <15392746632@qq.com> Date: Thu, 10 Dec 2020 16:03:04 +0800 Subject: [PATCH 1/2] 'update' --- edit.php | 122 +++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 106 insertions(+), 16 deletions(-) diff --git a/edit.php b/edit.php index 2704425..ad65af2 100644 --- a/edit.php +++ b/edit.php @@ -53,6 +53,48 @@ if(!isn(r('mgxyferoles'))){ file_put_contents("config.json",json_encode($configJson)); echo ""; } +//**********************************打包节点**************************************************** +if(!isn(r('mdbvroles'))){ + $roles = trim(_r("dbvroles")); + $roles = str_replace("\r","",$roles); + $arr = explode("\n",$roles); + $configJson['dbvroles'] = $arr; +// exit(json_encode($configJson)); + file_put_contents("config.json",json_encode($configJson)); + echo ""; +} +//打包节点运营编辑 +if(!isn(r('mdbyyeroles'))){ + $roles = trim(_r("dbyyeroles")); + $roles = str_replace("\r","",$roles); + $arr = explode("\n",$roles); + $configJson['dbyyeroles'] = $arr; + file_put_contents("config.json",json_encode($configJson)); + echo ""; +} +//打包节点产品编辑 +if(!isn(r('mdbcperoles'))){ + $roles = trim(_r("dbcperoles")); + $roles = str_replace("\r","",$roles); + $arr = explode("\n",$roles); + $configJson['dbcperoles'] = $arr; + file_put_contents("config.json",json_encode($configJson)); + echo ""; +} +//打包节点研发编辑 +if(!isn(r('mdbyferoles'))){ + $roles = trim(_r("dbyferoles")); + $roles = str_replace("\r","",$roles); + $arr = explode("\n",$roles); + $configJson['dbyferoles'] = $arr; + file_put_contents("config.json",json_encode($configJson)); + echo ""; +} + + + + +//***********************************修复*************************************************** //修复节点浏览 if(!isn(r('mxfvroles'))){ $roles = trim(_r("xfvroles")); @@ -101,16 +143,17 @@ if(!isn(r('mxfyyeroles'))){

-

更新-信息查看区浏览权限?

-
-

每行一个

-

- -

-

- -

-
+ + + + + + + + + + +

更新-运营中心编辑权限?

每行一个

@@ -121,26 +164,73 @@ if(!isn(r('mxfyyeroles'))){

-

更新-产品中心编辑权限?

+ + + + + + + + + + + + + + + + + + + + + + + +

打包-信息查看区浏览权限?

每行一个

- +

- +

-

更新-研发中心编辑权限?

+

打包-运营中心编辑权限?

每行一个

- +

- +

+

打包-产品中心编辑权限?

+
+

每行一个

+

+ +

+

+ +

+
+

打包-研发中心编辑权限?

+
+

每行一个

+

+ +

+

+ +

+
+ + + +

修复-信息查看区浏览权限?

每行一个

From ee7f19ac549e5303cad7cff9e3f99069266f529b Mon Sep 17 00:00:00 2001 From: wuhao <15392746632@qq.com> Date: Thu, 10 Dec 2020 16:11:59 +0800 Subject: [PATCH 2/2] update --- _config.php | 5 +++++ pmcalendar.php | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/_config.php b/_config.php index a061bc8..eb0baf9 100644 --- a/_config.php +++ b/_config.php @@ -8,4 +8,9 @@ $GXCPEROLES = $configJson['gxcperoles']; $GXYFEROLES = $configJson['gxyferoles']; $XFVROLES = $configJson['xfvroles']; $XFYYEROLES = $configJson['xfyyeroles']; + +$DBVROLES = $configJson['dbvroles']; +$DBYYEROLES = $configJson['dbyyeroles']; +$DBCPEROLES = $configJson['dbcperoles']; +$DBYFEROLES = $configJson['dbyferoles']; ?> \ No newline at end of file diff --git a/pmcalendar.php b/pmcalendar.php index c27f086..218932c 100644 --- a/pmcalendar.php +++ b/pmcalendar.php @@ -11,6 +11,11 @@ $isgxyferole = in_array($user['name'], $GXYFEROLES);//更新研发中心编辑 $isxfvrole = in_array($user['name'], $XFVROLES); //修复信息查看区浏览权限 $isxfyyerole = in_array($user['name'], $XFYYEROLES);//修复运营中心编辑权限 +$isdbvrole ='1'; //in_array($user['name'], $DBVROLES); //打包信息查看区浏览权限 +$isdbyyerole = in_array($user['name'], $DBYYEROLES);//打包运营中心编辑权限 +$isdbcperole = in_array($user['name'], $DBCPEROLES);//打包产品中心编辑权限 +$isdbyferole = in_array($user['name'], $DBYFEROLES);//打包研发中心编辑权限 + function fix2($v) { $x = '00' . $v;