记录延期
This commit is contained in:
parent
bc6bf0eb10
commit
0bc32f95ff
@ -17,4 +17,7 @@ $DBYFEROLES = $configJson['dbyferoles'];
|
||||
//上线
|
||||
$SXYYEROLES = $configJson['sxyyeroles'];
|
||||
$SXAROLES = $configJson['sxaroles'];
|
||||
// 延期编辑
|
||||
$YQEROLES = $configJson['yqeroles'];
|
||||
|
||||
?>
|
20
edit.php
20
edit.php
@ -131,6 +131,15 @@ if(!isn(r('sxaroles'))){
|
||||
file_put_contents("config.json",json_encode($configJson));
|
||||
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');
|
||||
|
||||
?>
|
||||
@ -290,6 +299,17 @@ if(!isn(r('sxaroles'))){
|
||||
<input type="submit" name="msxyyeroles" id="button" value="提交">
|
||||
</p>
|
||||
</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> </p>
|
||||
</body>
|
||||
</html>
|
@ -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') {
|
||||
|
Loading…
Reference in New Issue
Block a user