上线权限

This commit is contained in:
wuhao 2020-12-14 17:24:27 +08:00
parent 9a3fca1622
commit 9b59808474
3 changed files with 30 additions and 3 deletions

View File

@ -13,4 +13,7 @@ $DBVROLES = $configJson['dbvroles'];
$DBYYEROLES = $configJson['dbyyeroles']; $DBYYEROLES = $configJson['dbyyeroles'];
$DBCPEROLES = $configJson['dbcperoles']; $DBCPEROLES = $configJson['dbcperoles'];
$DBYFEROLES = $configJson['dbyferoles']; $DBYFEROLES = $configJson['dbyferoles'];
//上线
$SXYYEROLES = $configJson['sxyyeroles'];
?> ?>

View File

@ -104,7 +104,7 @@ if(!isn(r('mxfvroles'))){
file_put_contents("config.json",json_encode($configJson)); file_put_contents("config.json",json_encode($configJson));
echo "<script language=JavaScript> location.replace(location.href);</script>"; echo "<script language=JavaScript> location.replace(location.href);</script>";
} }
//修复节点浏览 //修复节点编辑
if(!isn(r('mxfyyeroles'))){ if(!isn(r('mxfyyeroles'))){
$roles = trim(_r("xfyyeroles")); $roles = trim(_r("xfyyeroles"));
$roles = str_replace("\r","",$roles); $roles = str_replace("\r","",$roles);
@ -113,6 +113,15 @@ if(!isn(r('mxfyyeroles'))){
file_put_contents("config.json",json_encode($configJson)); file_put_contents("config.json",json_encode($configJson));
echo "<script language=JavaScript> location.replace(location.href);</script>"; echo "<script language=JavaScript> location.replace(location.href);</script>";
} }
//***********************************上线***************************************************
if(!isn(r('msxyyeroles'))){
$roles = trim(_r("sxyyeroles"));
$roles = str_replace("\r","",$roles);
$arr = explode("\n",$roles);
$configJson['sxyyeroles'] = $arr;
file_put_contents("config.json",json_encode($configJson));
echo "<script language=JavaScript> location.replace(location.href);</script>";
}
//require_once(ROOT.'./_config.php'); //require_once(ROOT.'./_config.php');
?> ?>
@ -251,6 +260,17 @@ if(!isn(r('mxfyyeroles'))){
<input type="submit" name="mxfyyeroles" id="button" value="提交"> <input type="submit" name="mxfyyeroles" id="button" value="提交">
</p> </p>
</form> </form>
<!--上线节点-->
<h3>上线-运营中心编辑权限?</h3>
<form name="form1" method="post" action="">
<p>每行一个</p>
<p>
<textarea name="sxyyeroles" id="sxyyeroles" cols="45" rows="5" style="width:90%;height:300px;"><?=implode("\n",$SXYYEROLES)?></textarea>
</p>
<p>
<input type="submit" name="msxyyeroles" id="button" value="提交">
</p>
</form>
<p>&nbsp;</p> <p>&nbsp;</p>
</body> </body>
</html> </html>

View File

@ -16,6 +16,10 @@ $isdbyyerole = in_array($user['name'], $DBYYEROLES);//打包运营中心编辑
$isdbcperole = in_array($user['name'], $DBCPEROLES);//打包产品中心编辑权限 $isdbcperole = in_array($user['name'], $DBCPEROLES);//打包产品中心编辑权限
$isdbyferole = in_array($user['name'], $DBYFEROLES);//打包研发中心编辑权限 $isdbyferole = in_array($user['name'], $DBYFEROLES);//打包研发中心编辑权限
//上线
$issxyyerole = in_array($user['name'], $SXYYEROLES); //上线运营编辑
function fix2($v) function fix2($v)
{ {
$x = '00' . $v; $x = '00' . $v;
@ -327,8 +331,8 @@ if ($act == 'newevent') {
</div> </div>
<div id="gamesbtn" style="padding:0 11px 15px 11px;"> <div id="gamesbtn" style="padding:0 11px 15px 11px;">
<?php if ($canEdit) { ?><a href="./?app=edit" class='btn btn-minier btn-pink'>编辑游戏</a><? } ?> <!-- --><?php //if ($canEdit) { ?><!--<a href="./?app=edit" class='btn btn-minier btn-pink'>编辑游戏</a>--><?// } ?>
<!-- <a href="./?app=edit" class='btn btn-minier btn-pink'>编辑游戏</a>--> <a href="./?app=edit" class='btn btn-minier btn-pink'>编辑游戏</a>
<button value='' onclick='onlyShowGame(this)' class='btn btn-minier btn-info'>显示全部</button> <button value='' onclick='onlyShowGame(this)' class='btn btn-minier btn-info'>显示全部</button>
<?php <?php
foreach ($GAMES as $g) { foreach ($GAMES as $g) {