前端
This commit is contained in:
parent
d6df8b356f
commit
61dffb79e4
2
edit.php
2
edit.php
@ -142,7 +142,7 @@ require_once(ROOT.'./_config.php');
|
|||||||
<input type="submit" name="mxfvroles" id="button" value="提交">
|
<input type="submit" name="mxfvroles" id="button" value="提交">
|
||||||
</p>
|
</p>
|
||||||
</form>
|
</form>
|
||||||
<h3>修复-信息查看区浏览权限?</h3>
|
<h3>修复-运营中心编辑权限?</h3>
|
||||||
<form name="form1" method="post" action="">
|
<form name="form1" method="post" action="">
|
||||||
<p>每行一个</p>
|
<p>每行一个</p>
|
||||||
<p>
|
<p>
|
||||||
|
261
pmcalendar.php
261
pmcalendar.php
@ -1,7 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
$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 = in_array($user['name'], $GXVROLES); //更新信息查看区浏览权限
|
$isgxvrole = in_array($user['name'], $GXVROLES); //更新信息查看区浏览权限
|
||||||
$isgxyyerole = in_array($user['name'], $GXYYEROLES);//更新运营中心编辑权限
|
$isgxyyerole = in_array($user['name'], $GXYYEROLES);//更新运营中心编辑权限
|
||||||
@ -288,7 +289,8 @@ if ($act == 'newevent') {
|
|||||||
</div>
|
</div>
|
||||||
<div id="gamesbtn">
|
<div id="gamesbtn">
|
||||||
筛选:
|
筛选:
|
||||||
<?php if ($canEdit) { ?><a href="./?app=edit" class='btn btn-minier btn-pink'>编辑游戏</a><? } ?>
|
<!-- <?php if ($canEdit) { ?><a href="./?app=edit" class='btn btn-minier btn-pink'>编辑游戏</a><? } ?> -->
|
||||||
|
<a href="./?app=edit" class='btn btn-minier btn-pink'>编辑游戏</a>
|
||||||
<button value='' onclick='onlyShowGame(this)' class='btn btn-minier btn-info'>显示全部</button>
|
<button value='' onclick='onlyShowGame(this)' class='btn btn-minier btn-info'>显示全部</button>
|
||||||
<?php
|
<?php
|
||||||
foreach ($GAMES as $g) {
|
foreach ($GAMES as $g) {
|
||||||
@ -581,7 +583,7 @@ if ($act == 'newevent') {
|
|||||||
<!-- 附件 -->
|
<!-- 附件 -->
|
||||||
<div class='fujian' id='fujianname'></div>
|
<div class='fujian' id='fujianname'></div>
|
||||||
<div class="tijaioanniu">
|
<div class="tijaioanniu">
|
||||||
<div style=" position: relative;display: inline-block;">
|
<div style=" position: relative; display: none" class="upfujian" id="upfujian_cp">
|
||||||
<iframe id="_hideiframe" name="_hideiframe" style="display: none;"></iframe>
|
<iframe id="_hideiframe" name="_hideiframe" style="display: none;"></iframe>
|
||||||
<form method="post" id="uploader" style="display: block; clear: both; margin-top: 10px;;" target="_hideiframe" action="" enctype="multipart/form-data">
|
<form method="post" id="uploader" style="display: block; clear: both; margin-top: 10px;;" target="_hideiframe" action="" enctype="multipart/form-data">
|
||||||
<input name="cid" type="hidden" value="<%=DATA.lastShowCardID%>" />
|
<input name="cid" type="hidden" value="<%=DATA.lastShowCardID%>" />
|
||||||
@ -615,18 +617,18 @@ if ($act == 'newevent') {
|
|||||||
<input name="customer_file" type="file" id="excelFile2"
|
<input name="customer_file" type="file" id="excelFile2"
|
||||||
style="position: absolute;top: 0;left: 0;right: 0;bottom: 0;z-index: 1001;opacity: 0;filter:alpha(opacity=0);">
|
style="position: absolute;top: 0;left: 0;right: 0;bottom: 0;z-index: 1001;opacity: 0;filter:alpha(opacity=0);">
|
||||||
</div> -->
|
</div> -->
|
||||||
|
<div class="tijaioanniu">
|
||||||
<div style=" position: relative;display: inline-block;">
|
<div style=" position: relative;display: none;" class="upfujian" id="upfujian_yy">
|
||||||
<iframe id="_hideiframe2" name="_hideiframe" style="display: none;"></iframe>
|
<iframe id="_hideiframe2" name="_hideiframe" style="display: none;"></iframe>
|
||||||
<form method="post" id="uploader_yy" style="display: block; clear: both; margin-top: 10px;;" target="_hideiframe" action="" enctype="multipart/form-data">
|
<form method="post" id="uploader_yy" style="display: block; clear: both; margin-top: 10px;;" target="_hideiframe" action="" enctype="multipart/form-data">
|
||||||
<input name="cid" type="hidden" value="<%=DATA.lastShowCardID%>" />
|
<input name="cid" type="hidden" value="<%=DATA.lastShowCardID%>" />
|
||||||
<input type="file" id="fujian_yy" name="fujian[]" multiple onchange="document.getElementById('uploader_yy').submit()">
|
<input type="file" id="fujian_yy" name="fujian[]" multiple onchange="document.getElementById('uploader_yy').submit()">
|
||||||
</form>
|
</form>
|
||||||
<div class='tijiao' id="yytijiao">提交</div>
|
<div class='tijiao' id="yytijiao">提交</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -645,22 +647,17 @@ if ($act == 'newevent') {
|
|||||||
|
|
||||||
<!-- 附件 -->
|
<!-- 附件 -->
|
||||||
<div class='fujian' id='yffujian'></div>
|
<div class='fujian' id='yffujian'></div>
|
||||||
|
<div class="tijaioanniu">
|
||||||
<div style=" position: relative;display: inline-block;">
|
<div style=" position: relative;display: none;" class="upfujian" id="upfujian_yf">
|
||||||
<iframe id="_hideiframe3" name="_hideiframe" style="display: none;"></iframe>
|
<iframe id="_hideiframe3" name="_hideiframe" style="display: none;"></iframe>
|
||||||
<form method="post" id="uploader_yf" style="display: block; clear: both; margin-top: 10px;;" target="_hideiframe" action="" enctype="multipart/form-data">
|
<form method="post" id="uploader_yf" style="display: block; clear: both; margin-top: 10px;;" target="_hideiframe" action="" enctype="multipart/form-data">
|
||||||
<input name="cid" type="hidden" value="<%=DATA.lastShowCardID%>" />
|
<input name="cid" type="hidden" value="<%=DATA.lastShowCardID%>" />
|
||||||
<input type="file" id="fujian_yf" name="fujian[]" multiple onchange="document.getElementById('uploader_yf').submit()">
|
<input type="file" id="fujian_yf" name="fujian[]" multiple onchange="document.getElementById('uploader_yf').submit()">
|
||||||
</form>
|
</form>
|
||||||
<div class='tijiao' id="yftijiao">提交</div>
|
<div class='tijiao' id="yftijiao">提交</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <div style=" position: relative;display: inline-block;">
|
|
||||||
<img class='tianjia' src='/assets/images/jiahao.png'/>
|
|
||||||
<input name="customer_file" type="file" id="excelFile3"
|
|
||||||
style="position: absolute;top: 0;left: 0;right: 0;bottom: 0;z-index: 1001;opacity: 0;filter:alpha(opacity=0);">
|
|
||||||
</div> -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -775,15 +772,27 @@ if ($act == 'newevent') {
|
|||||||
//产品提交
|
//产品提交
|
||||||
$('#cptijiao').click(function(){
|
$('#cptijiao').click(function(){
|
||||||
var cptext = $("#cptext").val();
|
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({
|
$.ajax({
|
||||||
url: './?app=pmcalendar&act=editchanpin',
|
url: './?app=pmcalendar&act=editchanpin',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
data: {
|
data: {
|
||||||
id: notid,
|
id: notid,
|
||||||
content: cptext
|
content: arr
|
||||||
},
|
},
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
|
alert('提交成功')
|
||||||
},
|
},
|
||||||
error: function () {
|
error: function () {
|
||||||
alert('数据异常,请稍后重试!!!')
|
alert('数据异常,请稍后重试!!!')
|
||||||
@ -793,15 +802,26 @@ if ($act == 'newevent') {
|
|||||||
//运营
|
//运营
|
||||||
$('#yytijiao').click(function(){
|
$('#yytijiao').click(function(){
|
||||||
var yytext = $("#yytext").val();
|
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({
|
$.ajax({
|
||||||
url: './?app=pmcalendar&act=edityunying',
|
url: './?app=pmcalendar&act=edityunying',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
data: {
|
data: {
|
||||||
id: notid,
|
id: notid,
|
||||||
content: yytext
|
content: arr
|
||||||
},
|
},
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
|
alert('提交成功')
|
||||||
},
|
},
|
||||||
error: function () {
|
error: function () {
|
||||||
alert('数据异常,请稍后重试!!!')
|
alert('数据异常,请稍后重试!!!')
|
||||||
@ -812,15 +832,25 @@ if ($act == 'newevent') {
|
|||||||
//研发
|
//研发
|
||||||
$('#yftijiao').click(function(){
|
$('#yftijiao').click(function(){
|
||||||
var yftext = $("#yftext").val();
|
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({
|
$.ajax({
|
||||||
url: './?app=pmcalendar&act=edityanfa',
|
url: './?app=pmcalendar&act=edityanfa',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
data: {
|
data: {
|
||||||
id: notid,
|
id: notid,
|
||||||
content: yftext
|
content: arr
|
||||||
},
|
},
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
|
alert('提交成功')
|
||||||
},
|
},
|
||||||
error: function () {
|
error: function () {
|
||||||
alert('数据异常,请稍后重试!!!')
|
alert('数据异常,请稍后重试!!!')
|
||||||
@ -830,17 +860,91 @@ if ($act == 'newevent') {
|
|||||||
|
|
||||||
var i = 0;
|
var i = 0;
|
||||||
function bianji(){
|
function bianji(){
|
||||||
if(i == 0){
|
|
||||||
$('#cptext').attr('disabled',false)
|
if("<?=$isgxyyerole?>"=="1"){
|
||||||
$('#yytext').attr('disabled',false)
|
if(i == 0){
|
||||||
$('#yftext').attr('disabled',false)
|
$('#yytext').attr('disabled',false)
|
||||||
i = 1;
|
$("#upfujian_yy").show();
|
||||||
}else {
|
i = 1;
|
||||||
$('#cptext').attr('disabled',true)
|
}else {
|
||||||
$('#yytext').attr('disabled',true)
|
$('#yytext').attr('disabled',true)
|
||||||
$('#yftext').attr('disabled',true)
|
$("#upfujian_yy").hide();
|
||||||
i = 0;
|
i = 0;
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
if("<?=$isgxcperole?>"=="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("<?=$isgxyferole?>")
|
||||||
|
if("<?=$isgxyferole?>"=="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("<?=$isxfyyerole?>"=="1"){
|
||||||
|
if(i == 0){
|
||||||
|
$('#yytext').attr('disabled',false)
|
||||||
|
$("#upfujian_yy").show();
|
||||||
|
i = 1;
|
||||||
|
}else {
|
||||||
|
$('#yytext').attr('disabled',true)
|
||||||
|
$("#upfujian_yy").hide();
|
||||||
|
i = 0;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
if("<?=$canEdit?>"=="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) {
|
eventClick: function (calEvent, jsEvent, view) {
|
||||||
// if("<?=$canEdit?>"!="1")return;
|
console.log(calEvent.className[0])
|
||||||
// console.log('calEvent', calEvent, jsEvent, view);
|
|
||||||
notid = calEvent.id;
|
notid = calEvent.id;
|
||||||
|
if("<?=$canEdit?>"!="1"){
|
||||||
|
|
||||||
|
if(calEvent.className[0] == 'label-danger'){
|
||||||
|
if("<?=$isgxvrole?>"!="1" && "<?=$isgxyyerole?>"!="1" && "<?=$isgxcperole?>"!="1" && "<?=$isgxyferole?>"!="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("<?=$isxfvrole?>"!="1" && "<?=$isxfyyerole?>"!="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').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_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);//数据渲染
|
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 () {
|
error: function () {
|
||||||
alert('数据异常,请稍后重试!!!')
|
alert('数据异常,请稍后重试!!!')
|
||||||
@ -1199,11 +1355,12 @@ if ($act == 'newevent') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$("#yiny").click(function () {
|
$("#yiny").click(function () {
|
||||||
|
location.reload();
|
||||||
$("#popup-bg").hide();
|
$("#popup-bg").hide();
|
||||||
})
|
})
|
||||||
|
|
||||||
function Info() {
|
function Info() {
|
||||||
console.log(dstr);
|
if("<?=$canEdit?>"!="1")return;
|
||||||
showEventInfo(dstr, {
|
showEventInfo(dstr, {
|
||||||
"save": {
|
"save": {
|
||||||
"label": "<i class='icon-check'></i> 保存",
|
"label": "<i class='icon-check'></i> 保存",
|
||||||
|
Loading…
Reference in New Issue
Block a user