From 0bc32f95ff40e5402cdae36fbfac48aec802c4be Mon Sep 17 00:00:00 2001 From: kf_wuhao <15392746632@qq.com> Date: Mon, 1 Mar 2021 12:29:35 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=B0=E5=BD=95=E5=BB=B6=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _config.php | 3 +++ edit.php | 20 ++++++++++++++++++++ pmcalendar.php | 38 +++++++++++++++++++++++++++++++++++++- 3 files changed, 60 insertions(+), 1 deletion(-) diff --git a/_config.php b/_config.php index 194bd41..2584f47 100644 --- a/_config.php +++ b/_config.php @@ -17,4 +17,7 @@ $DBYFEROLES = $configJson['dbyferoles']; //上线 $SXYYEROLES = $configJson['sxyyeroles']; $SXAROLES = $configJson['sxaroles']; +// 延期编辑 +$YQEROLES = $configJson['yqeroles']; + ?> \ No newline at end of file diff --git a/edit.php b/edit.php index a88344b..c1d2458 100644 --- a/edit.php +++ b/edit.php @@ -131,6 +131,15 @@ if(!isn(r('sxaroles'))){ file_put_contents("config.json",json_encode($configJson)); echo ""; } +//***********************************延期评论*************************************************** +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 ""; +} //require_once(ROOT.'./_config.php'); ?> @@ -290,6 +299,17 @@ if(!isn(r('sxaroles'))){

+ +

延期评论权限?

+
+

每行一个

+

+ +

+

+ +

+

 

\ No newline at end of file diff --git a/pmcalendar.php b/pmcalendar.php index 48d6e80..21d625e 100644 --- a/pmcalendar.php +++ b/pmcalendar.php @@ -88,7 +88,6 @@ function getOneEvent($id){ $user = SESS::get('EVENTUserInfo'); // if(isn($user))exit(); $user = json_decode($user, true); -//$user['name'] = "吴昊"; $canEdit = in_array($user['name'], $ROLES); $isgxvrole ='1'; //in_array($user['name'], $GXVROLES); //更新信息查看区浏览权限 $isgxyyerole = in_array($user['name'], $GXYYEROLES);//更新运营中心编辑权限 @@ -107,6 +106,21 @@ $isdbyferole = in_array($user['name'], $DBYFEROLES);//打包研发中心编辑 $issxyyerole = in_array($user['name'], $SXYYEROLES); //上线运营编辑 $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) { $x = '00' . $v; @@ -182,6 +196,18 @@ if ($act == 'newevent') { '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}'"); DB::exe($sql); we('1'); @@ -198,12 +224,20 @@ if ($act == 'newevent') { } else if ($act == 'movevent') { $id = r('id'); + $reason = r('reason'); $keys = array('start', 'end'); $dict = array(); foreach ($keys as $k) { $dict[$k] = r($k); } 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}'"); DB::exe($sql); we('1'); @@ -1820,6 +1854,8 @@ if ($act == 'newevent') { dict.start = $.fullCalendar.formatDate(event.start, 'yyyy-MM-dd'); dict.end = $.fullCalendar.formatDate(event.end, 'yyyy-MM-dd'); loading.show(); + dict.reason = prompt("请输入延期原因"); + $.post('./?app=pmcalendar&act=movevent', dict, function (txt) { loading.hide(); if (txt == '1') {