diff --git a/edit.php b/edit.php index efa548e..a2b0701 100644 --- a/edit.php +++ b/edit.php @@ -142,7 +142,7 @@ require_once(ROOT.'./_config.php');

-

修复-信息查看区浏览权限?

+

修复-运营中心编辑权限?

每行一个

diff --git a/pmcalendar.php b/pmcalendar.php index f3833ab..2aa72be 100644 --- a/pmcalendar.php +++ b/pmcalendar.php @@ -1,7 +1,8 @@

筛选: - 编辑游戏 + + 编辑游戏
-
+ --> - -
- - - - - -
提交
- +
+
- +
@@ -645,22 +647,17 @@ if ($act == 'newevent') {
- -
- -
- - -
-
提交
- +
+
- - +
@@ -775,15 +772,27 @@ if ($act == 'newevent') { //产品提交 $('#cptijiao').click(function(){ var cptext = $("#cptext").val(); + var myDate = new Date(); + var year= myDate.getFullYear(); //获取当前年份(2位) + var month= myDate.getMonth(); + var day=myDate.getDate(); + var branch=myDate.getHours(); //获取当前小时数(0-23) + var second=myDate.getMinutes(); //获取当前分钟数(0-59) + + var arr = [] + arr['msg'] = cptext, + arr['date'] = year+'/'+month+'/'+day+' '+ branch + ':'+ second + $.ajax({ url: './?app=pmcalendar&act=editchanpin', dataType: 'json', data: { id: notid, - content: cptext + content: arr }, success: function (res) { console.log(res); + alert('提交成功') }, error: function () { alert('数据异常,请稍后重试!!!') @@ -793,15 +802,26 @@ if ($act == 'newevent') { //运营 $('#yytijiao').click(function(){ var yytext = $("#yytext").val(); + var myDate = new Date(); + var year= myDate.getFullYear(); //获取当前年份(2位) + var month= myDate.getMonth(); + var day=myDate.getDate(); + var branch=myDate.getHours(); //获取当前小时数(0-23) + var second=myDate.getMinutes(); //获取当前分钟数(0-59) + + var arr = [] + arr['msg'] = yytext, + arr['date'] = year+'/'+month+'/'+day+' '+ branch + ':'+ second $.ajax({ url: './?app=pmcalendar&act=edityunying', dataType: 'json', data: { id: notid, - content: yytext + content: arr }, success: function (res) { console.log(res); + alert('提交成功') }, error: function () { alert('数据异常,请稍后重试!!!') @@ -812,15 +832,25 @@ if ($act == 'newevent') { //研发 $('#yftijiao').click(function(){ var yftext = $("#yftext").val(); + var myDate = new Date(); + var year= myDate.getFullYear(); //获取当前年份(2位) + var month= myDate.getMonth(); + var day=myDate.getDate(); + var branch=myDate.getHours(); //获取当前小时数(0-23) + var second=myDate.getMinutes(); //获取当前分钟数(0-59) + var arr = [] + arr['msg'] = yftext, + arr['date'] = year+'/'+month+'/'+day+' '+ branch + ':'+ second $.ajax({ url: './?app=pmcalendar&act=edityanfa', dataType: 'json', data: { id: notid, - content: yftext + content: arr }, success: function (res) { console.log(res); + alert('提交成功') }, error: function () { alert('数据异常,请稍后重试!!!') @@ -830,17 +860,91 @@ if ($act == 'newevent') { var i = 0; function bianji(){ - if(i == 0){ - $('#cptext').attr('disabled',false) - $('#yytext').attr('disabled',false) - $('#yftext').attr('disabled',false) - i = 1; - }else { - $('#cptext').attr('disabled',true) - $('#yytext').attr('disabled',true) - $('#yftext').attr('disabled',true) - i = 0; - } + + if(""=="1"){ + if(i == 0){ + $('#yytext').attr('disabled',false) + $("#upfujian_yy").show(); + i = 1; + }else { + $('#yytext').attr('disabled',true) + $("#upfujian_yy").hide(); + i = 0; + } + }; + if(""=="1"){ + if(i == 0){ + $('#cptext').attr('disabled',false) + $("#upfujian_cp").show(); + i = 1; + }else { + $('#cptext').attr('disabled',true) + $("#upfujian_cp").hide(); + i = 0; + } + }; + console.log("") + if(""=="1"){ + if(i == 0){ + $('#yftext').attr('disabled',false) + $("#upfujian_yf").show(); + upfujian_yf + i = 1; + }else { + $('#yftext').attr('disabled',true) + $("#upfujian_yf").hide(); + i = 0; + } + }; + + if(""=="1"){ + if(i == 0){ + $('#yytext').attr('disabled',false) + $("#upfujian_yy").show(); + i = 1; + }else { + $('#yytext').attr('disabled',true) + $("#upfujian_yy").hide(); + i = 0; + } + }; + + if(""=="1"){ + if(i == 0){ + $('#cptext').attr('disabled',false) + $('#yytext').attr('disabled',false) + $('#yftext').attr('disabled',false) + $(".upfujian").show(); + i = 1; + }else { + $('#cptext').attr('disabled',true) + $('#yytext').attr('disabled',true) + $('#yftext').attr('disabled',true) + $(".upfujian").hide(); + i = 0; + } + }; + + // $canEdit = in_array($user['name'], $ROLES); + // $isgxvrole = in_array($user['name'], $GXVROLES); //更新信息查看区浏览权限 + // $isgxyyerole = in_array($user['name'], $GXYYEROLES);//更新运营中心编辑权限 + // $isgxcperole = in_array($user['name'], $GXCPEROLES);//更新产品中心编辑权限 + // $isgxyferole = in_array($user['name'], $GXYFEROLES);//更新研发中心编辑权限 + // $isxfvrole = in_array($user['name'], $XFVROLES); //修复信息查看区浏览权限 + // $isxfyyerole = in_array($user['name'], $XFYYEROLES);//修复运营中心编辑权限 + + + // if(i == 0){ + // $('#cptext').attr('disabled',false) + // $('#yytext').attr('disabled',false) + // $('#yftext').attr('disabled',false) + // i = 1; + // }else { + // $('#cptext').attr('disabled',true) + // $('#yytext').attr('disabled',true) + // $('#yftext').attr('disabled',true) + // i = 0; + // } } @@ -986,9 +1090,68 @@ if ($act == 'newevent') { } , eventClick: function (calEvent, jsEvent, view) { - // if(""!="1")return; - // console.log('calEvent', calEvent, jsEvent, view); + console.log(calEvent.className[0]) notid = calEvent.id; + if(""!="1"){ + + if(calEvent.className[0] == 'label-danger'){ + if(""!="1" && ""!="1" && ""!="1" && ""!="1"){ + return + }else{ + $('#uploader').attr('action','./?app=uploader&id='+ calEvent.id +'&bumen=chanpin&act=add'); + $('#uploader_yy').attr('action','./?app=uploader&id='+ calEvent.id +'&bumen=yunyig&act=add') + $("#uploader_yf").attr('action','./?app=uploader&id='+ calEvent.id +'&bumen=yanfa&act=add') + + //console.log($('#uploader').attr('action')) + + dict = {}; + $.post('./?app=pmcalendar&act=getEventByid', {id: calEvent.id}, function (txt) { + var j = JSON.parse(txt); + dict.start = j.start; + dict.end = j.end; + dict.id = calEvent.id; + $('#game').val(j.game); + $('#hour').val(j.shour); + $('#min').val(j.smin); + $('#event').val(j.event); + $('#title').val(j.title); + hourChange($('#hour')); + }); + dstr = $.fullCalendar.formatDate(calEvent.start, 'yyyy-MM-dd'); + showEventData(calEvent.id); + }; + }else if(calEvent.className[0] == 'label-purple'){ + if(""!="1" && ""!="1"){ + return + }else{ + $('#uploader').attr('action','./?app=uploader&id='+ calEvent.id +'&bumen=chanpin&act=add'); + $('#uploader_yy').attr('action','./?app=uploader&id='+ calEvent.id +'&bumen=yunyig&act=add') + $("#uploader_yf").attr('action','./?app=uploader&id='+ calEvent.id +'&bumen=yanfa&act=add') + + //console.log($('#uploader').attr('action')) + + dict = {}; + $.post('./?app=pmcalendar&act=getEventByid', {id: calEvent.id}, function (txt) { + var j = JSON.parse(txt); + dict.start = j.start; + dict.end = j.end; + dict.id = calEvent.id; + $('#game').val(j.game); + $('#hour').val(j.shour); + $('#min').val(j.smin); + $('#event').val(j.event); + $('#title').val(j.title); + hourChange($('#hour')); + }); + dstr = $.fullCalendar.formatDate(calEvent.start, 'yyyy-MM-dd'); + showEventData(calEvent.id); + }; + }else{ + return + } + } + + $('#uploader').attr('action','./?app=uploader&id='+ calEvent.id +'&bumen=chanpin&act=add'); $('#uploader_yy').attr('action','./?app=uploader&id='+ calEvent.id +'&bumen=yunyig&act=add') @@ -1184,13 +1347,6 @@ if ($act == 'newevent') { document.getElementById("yffujian").innerHTML = tmpltxt(arryf);//数据渲染 } } - - - // tmpltxt = doT.template(document.getElementById("fujian-dot").innerHTML);//生成模板方法 - // document.getElementById("yyfujian").innerHTML = tmpltxt(arr);//数据渲染 - - // tmpltxt = doT.template(document.getElementById("fujian-dot").innerHTML);//生成模板方法 - // document.getElementById("yffujian").innerHTML = tmpltxt(arr);//数据渲染 }, error: function () { alert('数据异常,请稍后重试!!!') @@ -1199,11 +1355,12 @@ if ($act == 'newevent') { } $("#yiny").click(function () { + location.reload(); $("#popup-bg").hide(); }) function Info() { - console.log(dstr); + if(""!="1")return; showEventInfo(dstr, { "save": { "label": " 保存",