diff --git a/_config.php b/_config.php index ce87175..a061bc8 100644 --- a/_config.php +++ b/_config.php @@ -2,4 +2,10 @@ $configJson = json_decode(file_get_contents('config.json'),true); $GAMES = $configJson['games']; $ROLES = $configJson['roles']; +$GXVROLES = $configJson['gxvroles']; +$GXYYEROLES = $configJson['gxyyeroles']; +$GXCPEROLES = $configJson['gxcperoles']; +$GXYFEROLES = $configJson['gxyferoles']; +$XFVROLES = $configJson['xfvroles']; +$XFYYEROLES = $configJson['xfyyeroles']; ?> \ No newline at end of file diff --git a/config.json b/config.json index d8ebd54..e7ca3ac 100644 --- a/config.json +++ b/config.json @@ -1,50 +1 @@ -{ - "games": [ - "\u5b64\u5c9b\u5947\u5175", - "\u90e8\u843d\u6218\u9b42", - "\u90e8\u843d\u7e41\u4f53\u7248", - "\u90e8\u843d\u97e9\u6587\u7248", - "\u90e8\u843d\u8d8a\u5357\u7248", - "\u90e8\u843d\u82f1\u6587\u7248", - "\u90e8\u843d\u6cf0\u6587\u7248", - "\u90e8\u843dH5\u7248", - "\u66d9\u5149\u4e4b\u5883", - "\u9b54\u6cd5\u95e8H5", - "\u6b63\u7248\u9b54\u6cd5\u95e8\u539f\u751f", - "3D\u963f\u51e1\u8fbe", - "\u5927\u6218\u56fd", - "\u5927\u4e09\u56fd", - "\u5927\u4e09\u56fd\u97e9\u6587", - "\u5766\u514b\u7a81\u88ad", - "\u5251\u5723\u6302\u673a", - "\u7cbe\u7075\u7eaa\u5143", - "\u9b54\u6cd5\u65e0\u654c", - "\u4e50\u8c37\u519b\u5e08", - "X\u7cbe\u7075", - "\u5730\u4ea7\u5927\u4ea8", - "\u4e50\u8c37MT", - "\u8d85\u7ea7\u6536\u85cf\u5bb6", - "\u4e71\u4e16\u957f\u6b4c", - "\u6b4c\u624b2019", - "\u6b4c\u624bCOCOS", - "\u8bd9\u8c10\u4e09\u56fd", - "\u751f\u5316\u7eaa\u5143", - "\u6218\u56fd\u4e89\u9e23", - "\u6697\u9ed1\u5730\u4e0b\u57ce\u7e41\u4f53", - "\u5996\u7075\u6218\u59ec", - "\u5c71\u6d77\u7ecf", - "3D\u751f\u5316", - "\u98ce\u66b4\u5947\u5175", - "\u4e2d\u53e4\u6218\u9524", - "\u50cf\u7d20\u9879\u76ee", - "\u5176\u4ed6" - ], - "roles": [ - "\u5434\u660a", - "\u8212\u5c55", - "\u9093\u5b9a\u658c" - ], - "chanpin": ["\u5434\u660a"], - "yunying": ["\u5434\u660a"], - "yanfa": ["\u5434\u660a"] -} \ No newline at end of file +{"games":["\u5b64\u5c9b\u5947\u5175","\u90e8\u843d\u6218\u9b42","\u90e8\u843d\u7e41\u4f53\u7248","\u90e8\u843d\u97e9\u6587\u7248","\u90e8\u843d\u8d8a\u5357\u7248","\u90e8\u843d\u82f1\u6587\u7248","\u90e8\u843d\u6cf0\u6587\u7248","\u90e8\u843dH5\u7248","\u66d9\u5149\u4e4b\u5883","\u9b54\u6cd5\u95e8H5","\u6b63\u7248\u9b54\u6cd5\u95e8\u539f\u751f","3D\u963f\u51e1\u8fbe","\u5927\u6218\u56fd","\u5927\u4e09\u56fd","\u5927\u4e09\u56fd\u97e9\u6587","\u5766\u514b\u7a81\u88ad","\u5251\u5723\u6302\u673a","\u7cbe\u7075\u7eaa\u5143","\u9b54\u6cd5\u65e0\u654c","\u4e50\u8c37\u519b\u5e08","X\u7cbe\u7075","\u5730\u4ea7\u5927\u4ea8","\u4e50\u8c37MT","\u8d85\u7ea7\u6536\u85cf\u5bb6","\u4e71\u4e16\u957f\u6b4c","\u6b4c\u624b2019","\u6b4c\u624bCOCOS","\u8bd9\u8c10\u4e09\u56fd","\u751f\u5316\u7eaa\u5143","\u6218\u56fd\u4e89\u9e23","\u6697\u9ed1\u5730\u4e0b\u57ce\u7e41\u4f53","\u5996\u7075\u6218\u59ec","\u5c71\u6d77\u7ecf","3D\u751f\u5316","\u98ce\u66b4\u5947\u5175","\u4e2d\u53e4\u6218\u9524","\u50cf\u7d20\u9879\u76ee","\u5176\u4ed6"],"roles":["\u5434\u660a","\u8212\u5c55","\u9093\u5b9a\u658c","dddd","ddd"],"chanpin":["\u5434\u660a"],"yunying":["\u5434\u660a"],"yanfa":["\u5434\u660a"],"gxvroles":["aaaaa","555"],"gxyyeroles":["bbb"],"gxcperoles":["cccc"],"gxyferoles":["ddddd"],"xfvroles":["eeeee"],"xfyyeroles":["ffff"]} \ No newline at end of file diff --git a/edit.php b/edit.php index 7cf3342..efa548e 100644 --- a/edit.php +++ b/edit.php @@ -14,15 +14,55 @@ if(!isn(r('modiroles'))){ $configJson['roles'] = $arr; file_put_contents("config.json",json_encode($configJson)); } - -if(!isn(r('modiroles'))){ - $cproles = trim(_r("chanpin")); - $cproles = str_replace("\r","",$cproles); - $arr = explode("\n",$cproles); - $configJson['cproles'] = $arr; - file_put_contents("config.json",json_encode($configJson)); +//更新节点浏览 +if(!isn(r('mgxvroles'))){ + $roles = trim(_r("gxvroles")); + $roles = str_replace("\r","",$roles); + $arr = explode("\n",$roles); + $configJson['gxvroles'] = $arr; +// exit(json_encode($configJson)); + file_put_contents("config.json",json_encode($configJson)); +} +//更新节点运营编辑 +if(!isn(r('mgxyyeroles'))){ + $roles = trim(_r("gxyyeroles")); + $roles = str_replace("\r","",$roles); + $arr = explode("\n",$roles); + $configJson['gxyyeroles'] = $arr; + file_put_contents("config.json",json_encode($configJson)); +} +//更新节点产品编辑 +if(!isn(r('mgxcperoles'))){ + $roles = trim(_r("gxcperoles")); + $roles = str_replace("\r","",$roles); + $arr = explode("\n",$roles); + $configJson['gxcperoles'] = $arr; + file_put_contents("config.json",json_encode($configJson)); +} +//更新节点研发编辑 +if(!isn(r('mgxyferoles'))){ + $roles = trim(_r("gxyferoles")); + $roles = str_replace("\r","",$roles); + $arr = explode("\n",$roles); + $configJson['gxyferoles'] = $arr; + file_put_contents("config.json",json_encode($configJson)); +} +//修复节点浏览 +if(!isn(r('mxfvroles'))){ + $roles = trim(_r("xfvroles")); + $roles = str_replace("\r","",$roles); + $arr = explode("\n",$roles); + $configJson['xfvroles'] = $arr; + file_put_contents("config.json",json_encode($configJson)); +} +//修复节点浏览 +if(!isn(r('mxfyyeroles'))){ + $roles = trim(_r("xfyyeroles")); + $roles = str_replace("\r","",$roles); + $arr = explode("\n",$roles); + $configJson['xfyyeroles'] = $arr; + file_put_contents("config.json",json_encode($configJson)); } - require_once(ROOT.'./_config.php'); ?> @@ -52,37 +92,65 @@ require_once(ROOT.'./_config.php');

-

产品编辑权限

+

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

-

每行一个

-

- -

-

- -

+

每行一个

+

+ +

+

+ +

- -

运营编辑权限

+

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

-

每行一个

-

- -

-

- -

+

每行一个

+

+ +

+

+ +

- -

研发编辑权限

+

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

-

每行一个

-

- -

-

- -

+

每行一个

+

+ +

+

+ +

+
+

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

+
+

每行一个

+

+ +

+

+ +

+
+

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

+
+

每行一个

+

+ +

+

+ +

+
+

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

+
+

每行一个

+

+ +

+

+ +

 

diff --git a/pmcalendar.php b/pmcalendar.php index bdafb85..f3833ab 100644 --- a/pmcalendar.php +++ b/pmcalendar.php @@ -3,10 +3,12 @@ $user = SESS::get('EVENTUserInfo'); //if(isn($user))exit(); $user = json_decode($user, true); $canEdit = in_array($user['name'], $ROLES); -$canEdit = true; -$isYunYing = true; -$isYanfa = true; -$isChanping = true; +$isgxvrole = in_array($user['name'], $GXVROLES); //更新信息查看区浏览权限 +$isgxyyerole = in_array($user['name'], $GXYYEROLES);//更新运营中心编辑权限 +$isgxcperole = in_array($user['name'], $GXCPEROLES);//更新产品中心编辑权限 +$isgxyferole = in_array($user['name'], $GXYFEROLES);//更新研发中心编辑权限 +$isxfvrole = in_array($user['name'], $XFVROLES); //修复信息查看区浏览权限 +$isxfyyerole = in_array($user['name'], $XFYYEROLES);//修复运营中心编辑权限 function fix2($v) {