记录延期

This commit is contained in:
kf_wuhao 2021-03-01 12:29:35 +08:00
parent bc6bf0eb10
commit 0bc32f95ff
3 changed files with 60 additions and 1 deletions

View File

@ -17,4 +17,7 @@ $DBYFEROLES = $configJson['dbyferoles'];
//上线 //上线
$SXYYEROLES = $configJson['sxyyeroles']; $SXYYEROLES = $configJson['sxyyeroles'];
$SXAROLES = $configJson['sxaroles']; $SXAROLES = $configJson['sxaroles'];
// 延期编辑
$YQEROLES = $configJson['yqeroles'];
?> ?>

View File

@ -131,6 +131,15 @@ if(!isn(r('sxaroles'))){
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('myqeroles'))){
$roles = trim(_r("yqeroles"));
$roles = str_replace("\r","",$roles);
$arr = explode("\n",$roles);
$configJson['yqeroles'] = $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');
?> ?>
@ -290,6 +299,17 @@ if(!isn(r('sxaroles'))){
<input type="submit" name="msxyyeroles" id="button" value="提交"> <input type="submit" name="msxyyeroles" id="button" value="提交">
</p> </p>
</form> </form>
<!--延期评论权限-->
<h3>延期评论权限?</h3>
<form name="form1" method="post" action="">
<p>每行一个</p>
<p>
<textarea name="yqeroles" id="yqeroles" cols="45" rows="5" style="width:90%;height:300px;"><?=implode("\n",$YQEROLES)?></textarea>
</p>
<p>
<input type="submit" name="myqeroles" id="button" value="提交">
</p>
</form>
<p>&nbsp;</p> <p>&nbsp;</p>
</body> </body>
</html> </html>

View File

@ -88,7 +88,6 @@ function getOneEvent($id){
$user = SESS::get('EVENTUserInfo'); $user = SESS::get('EVENTUserInfo');
// if(isn($user))exit(); // if(isn($user))exit();
$user = json_decode($user, true); $user = json_decode($user, true);
//$user['name'] = "吴昊";
$canEdit = in_array($user['name'], $ROLES); $canEdit = in_array($user['name'], $ROLES);
$isgxvrole ='1'; //in_array($user['name'], $GXVROLES); //更新信息查看区浏览权限 $isgxvrole ='1'; //in_array($user['name'], $GXVROLES); //更新信息查看区浏览权限
$isgxyyerole = in_array($user['name'], $GXYYEROLES);//更新运营中心编辑权限 $isgxyyerole = in_array($user['name'], $GXYYEROLES);//更新运营中心编辑权限
@ -107,6 +106,21 @@ $isdbyferole = in_array($user['name'], $DBYFEROLES);//打包研发中心编辑
$issxyyerole = in_array($user['name'], $SXYYEROLES); //上线运营编辑 $issxyyerole = in_array($user['name'], $SXYYEROLES); //上线运营编辑
$issxarole = in_array($user['name'], $SXAROLES); //可以添加上线卡片 $issxarole = in_array($user['name'], $SXAROLES); //可以添加上线卡片
//延期评论
$isyqeroles = in_array($user['name'], $YQEROLES);
//调试
//$user['name'] = "吴昊";
//$canEdit = 1;
//$isgxyyerole=1;
//$isgxcperole=1;
//$isgxyferole=1;
//$isxfvrole=1;
//$isxfyyerole=1;
//$isdbcperole=1;
//$isdbyferole=1;
//$isyqeroles =1;
function fix2($v) function fix2($v)
{ {
$x = '00' . $v; $x = '00' . $v;
@ -182,6 +196,18 @@ if ($act == 'newevent') {
'chanpin_remark' => json_encode($data_array) 'chanpin_remark' => json_encode($data_array)
); );
$sql = DB::update('calendar', $dict, "id='{$id}'");
DB::exe($sql);
we('1');
} else if ($act == 'edityanqi') {
$id = r('id');
$content = stripslashes(r('content'));
$data_array = json_decode($content,true);
$data_array['date'] =date("Y-m-d H:i:s");
$dict = array(
'yanqi_remark' => json_encode($data_array)
);
$sql = DB::update('calendar', $dict, "id='{$id}'"); $sql = DB::update('calendar', $dict, "id='{$id}'");
DB::exe($sql); DB::exe($sql);
we('1'); we('1');
@ -198,12 +224,20 @@ if ($act == 'newevent') {
} else if ($act == 'movevent') { } else if ($act == 'movevent') {
$id = r('id'); $id = r('id');
$reason = r('reason');
$keys = array('start', 'end'); $keys = array('start', 'end');
$dict = array(); $dict = array();
foreach ($keys as $k) { foreach ($keys as $k) {
$dict[$k] = r($k); $dict[$k] = r($k);
} }
if (isn($dict['end'])) $dict['end'] = $dict['start']; if (isn($dict['end'])) $dict['end'] = $dict['start'];
$event = DB::getone("select game,event,start,`end`,yanqi_history from calendar where id={$id}");
$yanqi_history=$event['yanqi_history'];
if (!$yanqi_history) $yanqi_history = '[]';
$yanqi_history = json_decode($yanqi_history,true);
$yanqi_history[] = array('date1'=>$event['start'],'date2'=>$dict['end'],'reason'=>$reason);
$dict['yanqi_history']=json_encode($yanqi_history,true);
$sql = DB::update('calendar', $dict, "id='{$id}'"); $sql = DB::update('calendar', $dict, "id='{$id}'");
DB::exe($sql); DB::exe($sql);
we('1'); we('1');
@ -1820,6 +1854,8 @@ if ($act == 'newevent') {
dict.start = $.fullCalendar.formatDate(event.start, 'yyyy-MM-dd'); dict.start = $.fullCalendar.formatDate(event.start, 'yyyy-MM-dd');
dict.end = $.fullCalendar.formatDate(event.end, 'yyyy-MM-dd'); dict.end = $.fullCalendar.formatDate(event.end, 'yyyy-MM-dd');
loading.show(); loading.show();
dict.reason = prompt("请输入延期原因");
$.post('./?app=pmcalendar&act=movevent', dict, function (txt) { $.post('./?app=pmcalendar&act=movevent', dict, function (txt) {
loading.hide(); loading.hide();
if (txt == '1') { if (txt == '1') {