权限编辑
This commit is contained in:
parent
f678e26058
commit
d6df8b356f
@ -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'];
|
||||
?>
|
51
config.json
51
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"]
|
||||
}
|
||||
{"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"]}
|
136
edit.php
136
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');
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
@ -52,37 +92,65 @@ require_once(ROOT.'./_config.php');
|
||||
</p>
|
||||
</form>
|
||||
|
||||
<h3>产品编辑权限</h3>
|
||||
<h3>更新-信息查看区浏览权限?</h3>
|
||||
<form name="form1" method="post" action="">
|
||||
<p>每行一个</p>
|
||||
<p>
|
||||
<textarea name="cproles" id="cproles" cols="45" rows="5" style="width:90%;height:300px;"><?=implode("\n",$CPROLES)?></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<input type="submit" name="modiroles" id="button" value="提交">
|
||||
</p>
|
||||
<p>每行一个</p>
|
||||
<p>
|
||||
<textarea name="gxvroles" id="gxvroles" cols="45" rows="5" style="width:90%;height:300px;"><?=implode("\n",$GXVROLES)?></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<input type="submit" name="mgxvroles" id="button" value="提交">
|
||||
</p>
|
||||
</form>
|
||||
|
||||
<h3>运营编辑权限</h3>
|
||||
<h3>更新-运营中心编辑权限?</h3>
|
||||
<form name="form1" method="post" action="">
|
||||
<p>每行一个</p>
|
||||
<p>
|
||||
<textarea name="yyroles" id="yyroles" cols="45" rows="5" style="width:90%;height:300px;"><?=implode("\n",$yyROLES)?></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<input type="submit" name="modiroles" id="button" value="提交">
|
||||
</p>
|
||||
<p>每行一个</p>
|
||||
<p>
|
||||
<textarea name="gxyyeroles" id="gxyyeroles" cols="45" rows="5" style="width:90%;height:300px;"><?=implode("\n",$GXYYEROLES)?></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<input type="submit" name="mgxyyeroles" id="button" value="提交">
|
||||
</p>
|
||||
</form>
|
||||
|
||||
<h3>研发编辑权限</h3>
|
||||
<h3>更新-产品中心编辑权限?</h3>
|
||||
<form name="form1" method="post" action="">
|
||||
<p>每行一个</p>
|
||||
<p>
|
||||
<textarea name="yfroles" id="yfroles" cols="45" rows="5" style="width:90%;height:300px;"><?=implode("\n",$yfROLES)?></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<input type="submit" name="modiroles" id="button" value="提交">
|
||||
</p>
|
||||
<p>每行一个</p>
|
||||
<p>
|
||||
<textarea name="gxcperoles" id="gxcperoles" cols="45" rows="5" style="width:90%;height:300px;"><?=implode("\n",$GXCPEROLES)?></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<input type="submit" name="mgxcperoles" id="button" value="提交">
|
||||
</p>
|
||||
</form>
|
||||
<h3>更新-研发中心编辑权限?</h3>
|
||||
<form name="form1" method="post" action="">
|
||||
<p>每行一个</p>
|
||||
<p>
|
||||
<textarea name="gxyferoles" id="gxyferoles" cols="45" rows="5" style="width:90%;height:300px;"><?=implode("\n",$GXYFEROLES)?></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<input type="submit" name="mgxyferoles" id="button" value="提交">
|
||||
</p>
|
||||
</form>
|
||||
<h3>修复-信息查看区浏览权限?</h3>
|
||||
<form name="form1" method="post" action="">
|
||||
<p>每行一个</p>
|
||||
<p>
|
||||
<textarea name="xfvroles" id="xfvroles" cols="45" rows="5" style="width:90%;height:300px;"><?=implode("\n",$XFVROLES)?></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<input type="submit" name="mxfvroles" id="button" value="提交">
|
||||
</p>
|
||||
</form>
|
||||
<h3>修复-信息查看区浏览权限?</h3>
|
||||
<form name="form1" method="post" action="">
|
||||
<p>每行一个</p>
|
||||
<p>
|
||||
<textarea name="xfyyeroles" id="xfyyeroles" cols="45" rows="5" style="width:90%;height:300px;"><?=implode("\n",$XFYYEROLES)?></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<input type="submit" name="mxfyyeroles" id="button" value="提交">
|
||||
</p>
|
||||
</form>
|
||||
<p> </p>
|
||||
</body>
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user