<?php
if(!isn(r('modigames'))){
	$games = trim(_r("games"));
	$games = str_replace("\r","",$games);
	$arr = explode("\n",$games);
	$configJson['games'] = $arr;
	file_put_contents("config.json",json_encode($configJson));
}

if(!isn(r('modiroles'))){
	$roles = trim(_r("roles"));
	$roles = str_replace("\r","",$roles);
	$arr = explode("\n",$roles);
	$configJson['roles'] = $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>
<html lang="en">
<head>
</head>
<body>
<h3>游戏编辑</h3>
<form name="form1" method="post" action="">
  <p>每行一个</p>
  <p>
    <textarea name="games" id="games" cols="45" rows="5" style="width:90%;height:300px;"><?=implode("\n",$GAMES)?></textarea>
  </p>
  <p>
    <input type="submit" name="modigames" id="button" value="提交">
  </p>
</form>

<h3>哪些人可以编辑？</h3>
<form name="form1" method="post" action="">
  <p>每行一个</p>
  <p>
    <textarea name="roles" id="roles" cols="45" rows="5" style="width:90%;height:300px;"><?=implode("\n",$ROLES)?></textarea>
  </p>
  <p>
    <input type="submit" name="modiroles" id="button" value="提交">
  </p>
</form>

<h3>更新-信息查看区浏览权限？</h3>
<form name="form1" method="post" action="">
    <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>
<form name="form1" method="post" action="">
    <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>
<form name="form1" method="post" action="">
    <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>&nbsp;</p>
</body>
</html>