| @@ -1,7 +1,7 @@ | |||||
| function checkSubmitAlb() { | function checkSubmitAlb() { | ||||
| if ($("#gallery .atlas").length > 0) { | if ($("#gallery .atlas").length > 0) { | ||||
| //这里从gallery中取出图片元素信息 | //这里从gallery中取出图片元素信息 | ||||
| $("#gallery .atlas").each(function () { | |||||
| $("#gallery .atlas").each(function() { | |||||
| albums.push({ | albums.push({ | ||||
| "img": $(this).find("img").attr("src"), | "img": $(this).find("img").attr("src"), | ||||
| "txt": $(this).find("input").val() | "txt": $(this).find("input").val() | ||||
| @@ -1,22 +1,3 @@ | |||||
| $(function () { | |||||
| $.get("index_testenv.php",function (data) { | |||||
| if (data !== '') { | |||||
| $("#body-tips").html(data); | |||||
| } | |||||
| }); | |||||
| $.get("index_body.php?dopost=get_articles",function (data) { | |||||
| if (data !== '') { | |||||
| $("#system-word").html(data); | |||||
| } | |||||
| }); | |||||
| }); | |||||
| function Copyinfo() { | |||||
| var val = document.getElementById('fz-0'); | |||||
| window.getSelection().selectAllChildren(val); | |||||
| document.execCommand("Copy"); | |||||
| ShowMsg("成功复制环境配置信息"); | |||||
| } | |||||
| //Dedebiz info | |||||
| var dedebizInfo; | var dedebizInfo; | ||||
| function ViewDedeBIZ() { | function ViewDedeBIZ() { | ||||
| if (dedebizInfo === false) { | if (dedebizInfo === false) { | ||||
| @@ -53,7 +34,7 @@ function ViewDedeBIZ() { | |||||
| </table>`); | </table>`); | ||||
| } | } | ||||
| function LoadServer() { | function LoadServer() { | ||||
| $.get("index_body.php?dopost=system_info",function (data) { | |||||
| $.get("index_body.php?dopost=system_info",function(data) { | |||||
| let rsp = JSON.parse(data); | let rsp = JSON.parse(data); | ||||
| if (rsp.code === 200) { | if (rsp.code === 200) { | ||||
| if (rsp.result.core.code === 200) { | if (rsp.result.core.code === 200) { | ||||
| @@ -106,7 +87,7 @@ function LoadServer() { | |||||
| } | } | ||||
| }); | }); | ||||
| } | } | ||||
| Date.prototype.Format = function (fmt) { | |||||
| Date.prototype.Format = function(fmt) { | |||||
| var o = { | var o = { | ||||
| "M+" : this.getMonth() + 1, //月份 | "M+" : this.getMonth() + 1, //月份 | ||||
| "d+" : this.getDate(), //日 | "d+" : this.getDate(), //日 | ||||
| @@ -122,7 +103,7 @@ Date.prototype.Format = function (fmt) { | |||||
| return fmt; | return fmt; | ||||
| } | } | ||||
| function LoadStat() { | function LoadStat() { | ||||
| $.get("index_body.php?dopost=get_statistics",function (data) { | |||||
| $.get("index_body.php?dopost=get_statistics",function(data) { | |||||
| try { | try { | ||||
| let rsp = JSON.parse(data); | let rsp = JSON.parse(data); | ||||
| if (rsp.code == 200) { | if (rsp.code == 200) { | ||||
| @@ -134,7 +115,7 @@ function LoadStat() { | |||||
| $("#today_uv").html(tuv); | $("#today_uv").html(tuv); | ||||
| $("#today_ip").html(tip); | $("#today_ip").html(tip); | ||||
| $("#today_vv").html(tvv); | $("#today_vv").html(tvv); | ||||
| $.get("index_body.php?dopost=get_statistics&sdate=-1",function (data) { | |||||
| $.get("index_body.php?dopost=get_statistics&sdate=-1",function(data) { | |||||
| let rsp = JSON.parse(data); | let rsp = JSON.parse(data); | ||||
| if (rsp.code == 200) { | if (rsp.code == 200) { | ||||
| $("#total_pv").html(parseInt(rsp.result.pv) + tpv); | $("#total_pv").html(parseInt(rsp.result.pv) + tpv); | ||||
| @@ -152,7 +133,7 @@ function LoadStat() { | |||||
| d.setDate(d.getDate() - 1); | d.setDate(d.getDate() - 1); | ||||
| var s = d.Format("yyyy-MM-dd"); | var s = d.Format("yyyy-MM-dd"); | ||||
| s = s.replaceAll("-", ""); | s = s.replaceAll("-", ""); | ||||
| $.get("index_body.php?dopost=get_statistics&sdate=" + s,function (data) { | |||||
| $.get("index_body.php?dopost=get_statistics&sdate=" + s,function(data) { | |||||
| try { | try { | ||||
| let rsp = JSON.parse(data); | let rsp = JSON.parse(data); | ||||
| if (rsp.code == 200) { | if (rsp.code == 200) { | ||||
| @@ -241,11 +222,23 @@ async function LoadStatChart() { | |||||
| }, | }, | ||||
| }); | }); | ||||
| } | } | ||||
| $(document).ready(function () { | |||||
| $(document).ready(function() { | |||||
| $(function() { | |||||
| $.get("index_testenv.php",function(data) { | |||||
| if (data !== '') { | |||||
| $("#body-tips").html(data); | |||||
| } | |||||
| }); | |||||
| $.get("index_body.php?dopost=get_articles",function(data) { | |||||
| if (data !== '') { | |||||
| $("#system-word").html(data); | |||||
| } | |||||
| }); | |||||
| }); | |||||
| LoadServer(); | LoadServer(); | ||||
| LoadStat(); | LoadStat(); | ||||
| LoadStatChart(); | LoadStatChart(); | ||||
| setInterval(function () { | |||||
| setInterval(function() { | |||||
| LoadServer(); | LoadServer(); | ||||
| }, 60000) | |||||
| }, 3000) | |||||
| }); | }); | ||||
| @@ -92,8 +92,8 @@ function InitPage() { | |||||
| var selsource = $Obj('selsource'); | var selsource = $Obj('selsource'); | ||||
| var selwriter = $Obj('selwriter'); | var selwriter = $Obj('selwriter'); | ||||
| var colorbt = $Obj('color'); | var colorbt = $Obj('color'); | ||||
| if (selsource) { selsource.onmousedown = function (e) { SelectSource(e); } } | |||||
| if (selwriter) { selwriter.onmousedown = function (e) { SelectWriter(e); } } | |||||
| if (selsource) { selsource.onmousedown = function(e) { SelectSource(e); } } | |||||
| if (selwriter) { selwriter.onmousedown = function(e) { SelectWriter(e); } } | |||||
| } | } | ||||
| function $Nav() { | function $Nav() { | ||||
| if (window.navigator.userAgent.indexOf("MSIE") >= 1) return 'IE'; | if (window.navigator.userAgent.indexOf("MSIE") >= 1) return 'IE'; | ||||
| @@ -399,7 +399,7 @@ function DedeConfirm(content = "", title = "确认提示") { | |||||
| backdrop: 'static', | backdrop: 'static', | ||||
| show: true | show: true | ||||
| }); | }); | ||||
| $("#DedeModal" + modalID).on('hidden.bs.modal', function (e) { | |||||
| $("#DedeModal" + modalID).on('hidden.bs.modal', function(e) { | |||||
| $("#DedeModal" + modalID).remove(); | $("#DedeModal" + modalID).remove(); | ||||
| }) | }) | ||||
| }) | }) | ||||
| @@ -439,7 +439,7 @@ function ShowMsg(content, ...args) { | |||||
| backdrop: 'static', | backdrop: 'static', | ||||
| show: true | show: true | ||||
| }); | }); | ||||
| $("#GKModal" + modalID).on('hidden.bs.modal', function (e) { | |||||
| $("#GKModal" + modalID).on('hidden.bs.modal', function(e) { | |||||
| $("#GKModal" + modalID).remove(); | $("#GKModal" + modalID).remove(); | ||||
| }) | }) | ||||
| return modalID; | return modalID; | ||||
| @@ -447,7 +447,7 @@ function ShowMsg(content, ...args) { | |||||
| //隐藏并销毁modal | //隐藏并销毁modal | ||||
| function CloseModal(modalID) { | function CloseModal(modalID) { | ||||
| $("#" + modalID).modal('hide'); | $("#" + modalID).modal('hide'); | ||||
| $("#" + modalID).on('hidden.bs.modal', function (e) { | |||||
| $("#" + modalID).on('hidden.bs.modal', function(e) { | |||||
| if ($("#" + modalID).length > 0) { | if ($("#" + modalID).length > 0) { | ||||
| $("#" + modalID).remove(); | $("#" + modalID).remove(); | ||||
| } | } | ||||
| @@ -461,7 +461,7 @@ var mdlCropperID = ""; | |||||
| var pubAt = 0; | var pubAt = 0; | ||||
| var optCropper = { | var optCropper = { | ||||
| preview: ".pv", | preview: ".pv", | ||||
| crop: function (e) { | |||||
| crop: function(e) { | |||||
| $("#cropWidth").text(Math.round(e.detail.height)); | $("#cropWidth").text(Math.round(e.detail.height)); | ||||
| $("#cropHeight").text(Math.round(e.detail.width)); | $("#cropHeight").text(Math.round(e.detail.width)); | ||||
| if ($(this).cropper("getCroppedCanvas")) { | if ($(this).cropper("getCroppedCanvas")) { | ||||
| @@ -472,7 +472,7 @@ var optCropper = { | |||||
| }, | }, | ||||
| aspectRatio: 4 / 3, | aspectRatio: 4 / 3, | ||||
| //拖动截取缩略图后,截取的缩略图更新到imageItems中 | //拖动截取缩略图后,截取的缩略图更新到imageItems中 | ||||
| cropend: function (data) { | |||||
| cropend: function(data) { | |||||
| //这里的id要单独取出来 | //这里的id要单独取出来 | ||||
| var dataUrl = $(this).cropper("getCroppedCanvas").toDataURL(); | var dataUrl = $(this).cropper("getCroppedCanvas").toDataURL(); | ||||
| litpicImg = dataUrl; | litpicImg = dataUrl; | ||||
| @@ -523,15 +523,15 @@ function uploadImage(litpicImgSrc) { | |||||
| alert("上传缩略图错误"); | alert("上传缩略图错误"); | ||||
| }); | }); | ||||
| } | } | ||||
| $(document).ready(function () { | |||||
| $("#btnClearAll").click(function (event) { | |||||
| $(document).ready(function() { | |||||
| $("#btnClearAll").click(function(event) { | |||||
| litpicImgSrc = ""; | litpicImgSrc = ""; | ||||
| litpicImg = ""; | litpicImg = ""; | ||||
| $("#picname").val(litpicImg); | $("#picname").val(litpicImg); | ||||
| $("#litPic").attr("src", "/static/web/img/thumbnail.jpg"); | $("#litPic").attr("src", "/static/web/img/thumbnail.jpg"); | ||||
| }) | }) | ||||
| //添加图片 | //添加图片 | ||||
| $("#iptAddImages").change(function (event) { | |||||
| $("#iptAddImages").change(function(event) { | |||||
| var files = event.target.files; | var files = event.target.files; | ||||
| for (var i = 0, f; f = files[i]; i++) { | for (var i = 0, f; f = files[i]; i++) { | ||||
| //如果不是图片忽略 | //如果不是图片忽略 | ||||
| @@ -540,8 +540,8 @@ $(document).ready(function () { | |||||
| } | } | ||||
| //将图片渲染到浏览器 | //将图片渲染到浏览器 | ||||
| var reader = new FileReader(); | var reader = new FileReader(); | ||||
| reader.onload = (function (theFile) { | |||||
| return function (e) { | |||||
| reader.onload = (function(theFile) { | |||||
| return function(e) { | |||||
| litpicImgSrc = e.target.result; | litpicImgSrc = e.target.result; | ||||
| if (cfg_uplitpic_cut == 'Y') { | if (cfg_uplitpic_cut == 'Y') { | ||||
| SetThumb(litpicImgSrc); | SetThumb(litpicImgSrc); | ||||
| @@ -564,7 +564,7 @@ $(document).ready(function () { | |||||
| noClose: false, | noClose: false, | ||||
| title: '图片裁剪', | title: '图片裁剪', | ||||
| }); | }); | ||||
| setTimeout(function () { | |||||
| setTimeout(function() { | |||||
| $("#cropImg" + mdlCropperID).cropper(optCropper); | $("#cropImg" + mdlCropperID).cropper(optCropper); | ||||
| }, 500); | }, 500); | ||||
| } | } | ||||
| @@ -593,10 +593,10 @@ $(document).ready(function () { | |||||
| monthNames: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'], | monthNames: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'], | ||||
| firstDay: 1 | firstDay: 1 | ||||
| } | } | ||||
| }, function (start) { | |||||
| }, function(start) { | |||||
| $(this).val(start.format("YYYY-MM-DD HH:mm:ss")); | $(this).val(start.format("YYYY-MM-DD HH:mm:ss")); | ||||
| }); | }); | ||||
| $('.datepicker').on('show.daterangepicker', function (ev, picker) { | |||||
| $('.datepicker').on('show.daterangepicker', function(ev, picker) { | |||||
| if (picker.element.offset().top - $(window).scrollTop() + picker.container.outerHeight() > $(window).height()) { | if (picker.element.offset().top - $(window).scrollTop() + picker.container.outerHeight() > $(window).height()) { | ||||
| picker.drops = 'up'; | picker.drops = 'up'; | ||||
| } else { | } else { | ||||
| @@ -15,7 +15,7 @@ function showStepArea(step) { | |||||
| $("#btnStep" + step).show(); | $("#btnStep" + step).show(); | ||||
| } | } | ||||
| function update() { | function update() { | ||||
| $.get("api.php?action=update", function (rs) { | |||||
| $.get("api.php?action=update", function(rs) { | |||||
| if (rs.code === 0) { | if (rs.code === 0) { | ||||
| $("#_updateMsg").html(rs.msg); | $("#_updateMsg").html(rs.msg); | ||||
| if (rs.data.finish === false) { | if (rs.data.finish === false) { | ||||
| @@ -32,7 +32,7 @@ function update() { | |||||
| }) | }) | ||||
| } | } | ||||
| function hasNewVersion() { | function hasNewVersion() { | ||||
| $.get("api.php?action=has_new_version", function (rs) { | |||||
| $.get("api.php?action=has_new_version", function(rs) { | |||||
| try { | try { | ||||
| if (rs.code === 0) { | if (rs.code === 0) { | ||||
| if (rs.result.HasNew === true) { | if (rs.result.HasNew === true) { | ||||
| @@ -51,24 +51,24 @@ function hasNewVersion() { | |||||
| } | } | ||||
| }) | }) | ||||
| } | } | ||||
| $(document).ready(function () { | |||||
| $(document).ready(function() { | |||||
| hasNewVersion(); | hasNewVersion(); | ||||
| $("#btnCancel").click(function () { | |||||
| $("#btnCancel").click(function() { | |||||
| currentStep = 1; | currentStep = 1; | ||||
| $("#_fileList").html(``); | $("#_fileList").html(``); | ||||
| }) | }) | ||||
| $("#btnBackup").click(function () { | |||||
| $("#btnBackup").click(function() { | |||||
| let alertMsg = dedeAlter("正在备份差异文件", 'info', true); | let alertMsg = dedeAlter("正在备份差异文件", 'info', true); | ||||
| $("#_msgInfo").html(alertMsg); | $("#_msgInfo").html(alertMsg); | ||||
| $("#_msgInfo").show(); | $("#_msgInfo").show(); | ||||
| $.get("api.php?action=update_backup", function (rs) { | |||||
| $.get("api.php?action=update_backup", function(rs) { | |||||
| if (rs.code === 0) { | if (rs.code === 0) { | ||||
| alertMsg = dedeAlter(`成功备份差异文件,目录:${rs.data.backupdir}`, 'success'); | alertMsg = dedeAlter(`成功备份差异文件,目录:${rs.data.backupdir}`, 'success'); | ||||
| $("#_msgInfo").html(alertMsg); | $("#_msgInfo").html(alertMsg); | ||||
| } | } | ||||
| }) | }) | ||||
| }) | }) | ||||
| $("#systemUpdate").click(function () { | |||||
| $("#systemUpdate").click(function() { | |||||
| if (hasNewVer === false) { | if (hasNewVer === false) { | ||||
| currentStep = 5; | currentStep = 5; | ||||
| showStepArea(currentStep); | showStepArea(currentStep); | ||||
| @@ -78,7 +78,7 @@ $(document).ready(function () { | |||||
| $('#mdlUpdate').modal('show'); | $('#mdlUpdate').modal('show'); | ||||
| showStepArea(currentStep); | showStepArea(currentStep); | ||||
| currentStep++; | currentStep++; | ||||
| $.get("api.php?action=get_changed_files", function (rs) { | |||||
| $.get("api.php?action=get_changed_files", function(rs) { | |||||
| if (rs.code === 0) { | if (rs.code === 0) { | ||||
| let fstr = '<ul class="list-group list-group-flush">'; | let fstr = '<ul class="list-group list-group-flush">'; | ||||
| let i = 1; | let i = 1; | ||||
| @@ -94,17 +94,17 @@ $(document).ready(function () { | |||||
| } | } | ||||
| }) | }) | ||||
| }) | }) | ||||
| $('#mdlUpdate').on('hidden.bs.modal', function (event) { | |||||
| $('#mdlUpdate').on('hidden.bs.modal', function(event) { | |||||
| currentStep = 1; | currentStep = 1; | ||||
| $("#_msgInfo").html(''); | $("#_msgInfo").html(''); | ||||
| $("#_msgInfo").hide(); | $("#_msgInfo").hide(); | ||||
| }) | }) | ||||
| $("#btnGoStep3").click(function () { | |||||
| $("#btnGoStep3").click(function() { | |||||
| currentStep++ | currentStep++ | ||||
| $("#_msgInfo").html(''); | $("#_msgInfo").html(''); | ||||
| $("#_msgInfo").hide(); | $("#_msgInfo").hide(); | ||||
| showStepArea(currentStep); | showStepArea(currentStep); | ||||
| $.get("api.php?action=get_update_versions", function (rs) { | |||||
| $.get("api.php?action=get_update_versions", function(rs) { | |||||
| if (rs.code === 0) { | if (rs.code === 0) { | ||||
| let fstr = '<ul class="list-group list-group-flush">'; | let fstr = '<ul class="list-group list-group-flush">'; | ||||
| let i = 1; | let i = 1; | ||||
| @@ -119,14 +119,14 @@ $(document).ready(function () { | |||||
| } | } | ||||
| }) | }) | ||||
| }) | }) | ||||
| $("#btnGoStep4").click(function () { | |||||
| $("#btnGoStep4").click(function() { | |||||
| currentStep++ | currentStep++ | ||||
| $("#_msgInfo").html(''); | $("#_msgInfo").html(''); | ||||
| $("#_msgInfo").hide(); | $("#_msgInfo").hide(); | ||||
| showStepArea(currentStep); | showStepArea(currentStep); | ||||
| update(); | update(); | ||||
| }) | }) | ||||
| $("#btnOK").click(function () { | |||||
| $("#btnOK").click(function() { | |||||
| hasNewVersion(); | hasNewVersion(); | ||||
| }) | }) | ||||
| }) | }) | ||||
| @@ -249,9 +249,9 @@ if ($dopost == "show") { | |||||
| } | } | ||||
| if ($copytemplet == 1) { | if ($copytemplet == 1) { | ||||
| $tmpletdir = $cfg_basedir.$cfg_templets_dir.'/'.$cfg_df_style; | $tmpletdir = $cfg_basedir.$cfg_templets_dir.'/'.$cfg_df_style; | ||||
| copy("{$tmpletdir}/article_{$nid}.htm", "{$tmpletdir}/{$newnid}_article.htm"); | |||||
| copy("{$tmpletdir}/list_{$nid}.htm", "{$tmpletdir}/{$newnid}_list.htm"); | |||||
| copy("{$tmpletdir}/index_{$nid}.htm", "{$tmpletdir}/{$newnid}_index.htm"); | |||||
| copy("{$tmpletdir}/article_{$nid}.htm", "{$tmpletdir}/article_{$newnid}.htm"); | |||||
| copy("{$tmpletdir}/list_{$nid}.htm", "{$tmpletdir}/list_{$newnid}.htm"); | |||||
| copy("{$tmpletdir}/index_{$nid}.htm", "{$tmpletdir}/index_{$newnid}.htm"); | |||||
| } | } | ||||
| $rs = $dsql->ExecuteNoneQuery($inquery); | $rs = $dsql->ExecuteNoneQuery($inquery); | ||||
| if ($rs) { | if ($rs) { | ||||
| @@ -56,7 +56,7 @@ | |||||
| </ul> | </ul> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <div class="body-left"> | |||||
| <div class="menu-left"> | |||||
| <div class="menu"><iframe name="menu" src="index_menu.php"></iframe></div> | <div class="menu"><iframe name="menu" src="index_menu.php"></iframe></div> | ||||
| </div> | </div> | ||||
| <div class="body-right"> | <div class="body-right"> | ||||
| @@ -24,7 +24,7 @@ | |||||
| <div class="col-md-12 my-3"> | <div class="col-md-12 my-3"> | ||||
| <div class="card"> | <div class="card"> | ||||
| <div class="card-header"> | <div class="card-header"> | ||||
| <a href="#statChart"><i class="fa fa-bar-chart"></i> 流量统计表</a> | |||||
| <span><i class="fa fa-bar-chart"></i> 流量统计表</span> | |||||
| </div> | </div> | ||||
| <div class="card-body"> | <div class="card-body"> | ||||
| <table class="table"> | <table class="table"> | ||||
| @@ -63,8 +63,7 @@ | |||||
| <div class="col-md-7 my-3"> | <div class="col-md-7 my-3"> | ||||
| <div class="card"> | <div class="card"> | ||||
| <div class="card-header"> | <div class="card-header"> | ||||
| <a href="javascript:Copyinfo()"><i class="fa fa-cogs"></i> 软件信息</a> | |||||
| <span id="fz-0">软件:<?php echo $cfg_version_detail;?>丨操作系统:<?php echo PHP_OS;?>丨Web服务器:<?php echo $_SERVER['SERVER_SOFTWARE'];?>丨PHP:<?php echo @phpversion();?>丨数据库:<?php echo $dsql->GetVersion();?>丨上传限制:<?php echo ini_get("post_max_size")?></span> | |||||
| <span><i class="fa fa-cogs"></i> 软件信息</span> | |||||
| </div> | </div> | ||||
| <div class="card-body"> | <div class="card-body"> | ||||
| <table class="table table-borderless"> | <table class="table table-borderless"> | ||||
| @@ -122,7 +121,7 @@ | |||||
| <div class="col-md-7 my-3"> | <div class="col-md-7 my-3"> | ||||
| <div class="card"> | <div class="card"> | ||||
| <div class="card-header"> | <div class="card-header"> | ||||
| <a name="statChart"><i class="fa fa-line-chart"></i> 流量统计图</a> | |||||
| <span><i class="fa fa-line-chart"></i> 流量统计图</span> | |||||
| </div> | </div> | ||||
| <div class="card-body"> | <div class="card-body"> | ||||
| <canvas id="statChart"></canvas> | <canvas id="statChart"></canvas> | ||||
| @@ -141,10 +141,10 @@ input:focus,select:focus,textarea:focus { | |||||
| body.hidemenu { | body.hidemenu { | ||||
| background:none | background:none | ||||
| } | } | ||||
| body.showmenu .body-left { | |||||
| body.showmenu .menu-left { | |||||
| display:block | display:block | ||||
| } | } | ||||
| body.hidemenu .body-left { | |||||
| body.hidemenu .menu-left { | |||||
| display:none | display:none | ||||
| } | } | ||||
| body.showmenu .body-right { | body.showmenu .body-right { | ||||
| @@ -155,7 +155,7 @@ body.hidemenu .body-right { | |||||
| left:0; | left:0; | ||||
| transition:all 0.5s | transition:all 0.5s | ||||
| } | } | ||||
| .body-left { | |||||
| .menu-left { | |||||
| position:absolute; | position:absolute; | ||||
| top:60px; | top:60px; | ||||
| left:0; | left:0; | ||||
| @@ -36,7 +36,7 @@ function SelectImage(sform, stype) { | |||||
| }) | }) | ||||
| } | } | ||||
| } | } | ||||
| $(document).ready(function () { | |||||
| $(document).ready(function() { | |||||
| $('.datepicker').daterangepicker({ | $('.datepicker').daterangepicker({ | ||||
| "singleDatePicker": true, | "singleDatePicker": true, | ||||
| "autoApply": true, | "autoApply": true, | ||||
| @@ -63,4 +63,4 @@ $(document).ready(function () { | |||||
| }, function (start) { | }, function (start) { | ||||
| $(this).val(start.format("YYYY-MM-DD HH:mm")); | $(this).val(start.format("YYYY-MM-DD HH:mm")); | ||||
| }); | }); | ||||
| }) | |||||
| }); | |||||
| @@ -135,9 +135,6 @@ function jsScript($js) | |||||
| function SpGetEditor($fname, $fvalue, $nheight = "350", $etype = "Basic", $gtype = "print", $isfullpage = "false", $bbcode = false) | function SpGetEditor($fname, $fvalue, $nheight = "350", $etype = "Basic", $gtype = "print", $isfullpage = "false", $bbcode = false) | ||||
| { | { | ||||
| global $cfg_ckeditor_initialized; | global $cfg_ckeditor_initialized; | ||||
| if (!isset($GLOBALS['cfg_html_editor'])) { | |||||
| $GLOBALS['cfg_html_editor'] = 'fck'; | |||||
| } | |||||
| if ($gtype == "") { | if ($gtype == "") { | ||||
| $gtype = "print"; | $gtype = "print"; | ||||
| } | } | ||||
| @@ -145,7 +142,7 @@ function SpGetEditor($fname, $fvalue, $nheight = "350", $etype = "Basic", $gtype | |||||
| $addConfig = ""; | $addConfig = ""; | ||||
| if (defined("DEDEADMIN")) { | if (defined("DEDEADMIN")) { | ||||
| $emoji = ""; | $emoji = ""; | ||||
| if ($GLOBALS['cfg_db_language']=="utf8mb4") { | |||||
| if ($GLOBALS['cfg_db_language'] == "utf8mb4") { | |||||
| $emoji = ",emoji"; | $emoji = ",emoji"; | ||||
| } | } | ||||
| $addConfig = ",{allowedContent:true,pasteFilter:null,filebrowserImageUploadUrl:'./dialog/select_images_post.php',filebrowserUploadUrl:'./dialog/select_media_post.php?ck=1',extraPlugins:'html5video,html5audio,dedepagebreak,ddfilebrowser,mimage,textindent,tabletools,tableresize,tableselection,codesnippet{$emoji}',codeSnippet_theme: 'default'}"; | $addConfig = ",{allowedContent:true,pasteFilter:null,filebrowserImageUploadUrl:'./dialog/select_images_post.php',filebrowserUploadUrl:'./dialog/select_media_post.php?ck=1',extraPlugins:'html5video,html5audio,dedepagebreak,ddfilebrowser,mimage,textindent,tabletools,tableresize,tableselection,codesnippet{$emoji}',codeSnippet_theme: 'default'}"; | ||||
| @@ -77,7 +77,7 @@ function newmail($mid, $userid, $mailto, $type, $send) | |||||
| $mailtitle = $cfg_webname.":密码修改"; | $mailtitle = $cfg_webname.":密码修改"; | ||||
| $mailto = $mailto; | $mailto = $mailto; | ||||
| $headers = "From:".$cfg_adminemail."\r\nReply-To:$cfg_adminemail"; | $headers = "From:".$cfg_adminemail."\r\nReply-To:$cfg_adminemail"; | ||||
| $mailbody = "尊敬的".$userid."会员,临时登录密码:".$randval."\r\n请在三天内修改登录密码:".$cfg_basehost.$cfg_memberurl."/resetpassword.php?dopost=getpasswd&id=".$mid; | |||||
| $mailbody = "尊敬的".$userid."会员,临时验证码:".$randval."\r\n请在3天内修改登录密码:".$cfg_basehost.$cfg_memberurl."/resetpassword.php?dopost=getpasswd&id=".$mid; | |||||
| if ($type == 'INSERT') { | if ($type == 'INSERT') { | ||||
| $key = md5($randval); | $key = md5($randval); | ||||
| $sql = "INSERT INTO `#@__pwd_tmp` (`mid` ,`membername` ,`pwd` ,`mailtime`) VALUES ('$mid', '$userid', '$key', '$mailtime');"; | $sql = "INSERT INTO `#@__pwd_tmp` (`mid` ,`membername` ,`pwd` ,`mailtime`) VALUES ('$mid', '$userid', '$key', '$mailtime');"; | ||||
| @@ -86,7 +86,7 @@ function newmail($mid, $userid, $mailto, $type, $send) | |||||
| sendmail($mailto, $mailtitle, $mailbody, $headers); | sendmail($mailto, $mailtitle, $mailbody, $headers); | ||||
| return ShowMsg('验证码已经发送到原来的邮箱,请注意查收', 'login.php', '', '5000'); | return ShowMsg('验证码已经发送到原来的邮箱,请注意查收', 'login.php', '', '5000'); | ||||
| } else if ($send == 'N') { | } else if ($send == 'N') { | ||||
| return ShowMsg('稍后前往密码修改页', $cfg_basehost.$cfg_memberurl."/resetpassword.php?dopost=getpasswd&id=".$mid."&key=".$randval); | |||||
| return ShowMsg('正在前往密码修改', $cfg_basehost.$cfg_memberurl."/resetpassword.php?dopost=getpasswd&id=".$mid."&key=".$randval); | |||||
| } | } | ||||
| } else { | } else { | ||||
| return ShowMsg('修改失败,请联系管理员', 'login.php'); | return ShowMsg('修改失败,请联系管理员', 'login.php'); | ||||
| @@ -97,9 +97,9 @@ function newmail($mid, $userid, $mailto, $type, $send) | |||||
| if ($db->ExecuteNoneQuery($sql)) { | if ($db->ExecuteNoneQuery($sql)) { | ||||
| if ($send === 'Y') { | if ($send === 'Y') { | ||||
| sendmail($mailto, $mailtitle, $mailbody, $headers); | sendmail($mailto, $mailtitle, $mailbody, $headers); | ||||
| ShowMsg('修改验证码已经发送到原来的邮箱请查收', 'login.php'); | |||||
| ShowMsg('临时验证码已经发送到原来的邮箱请查收', 'login.php'); | |||||
| } elseif ($send === 'N') { | } elseif ($send === 'N') { | ||||
| return ShowMsg('稍后前往密码修改页', $cfg_basehost.$cfg_memberurl."/resetpassword.php?dopost=getpasswd&id=".$mid."&key=".$randval); | |||||
| return ShowMsg('正在前往密码修改', $cfg_basehost.$cfg_memberurl."/resetpassword.php?dopost=getpasswd&id=".$mid."&key=".$randval); | |||||
| } | } | ||||
| } else { | } else { | ||||
| ShowMsg('修改失败,请与管理员联系', 'login.php'); | ShowMsg('修改失败,请与管理员联系', 'login.php'); | ||||
| @@ -13,11 +13,11 @@ if (empty($dopost)) $dopost = ''; | |||||
| if (empty($fmdo)) $fmdo = ''; | if (empty($fmdo)) $fmdo = ''; | ||||
| if ($fmdo == 'sendMail') { | if ($fmdo == 'sendMail') { | ||||
| if (!CheckEmail($cfg_ml->fields['email'])) { | if (!CheckEmail($cfg_ml->fields['email'])) { | ||||
| ShowMsg('您的邮箱格式有错误', '-1'); | |||||
| ShowMsg('您的邮箱格式有错误', 'index.php'); | |||||
| exit(); | exit(); | ||||
| } | } | ||||
| if ($cfg_ml->fields['spacesta'] != -10) { | if ($cfg_ml->fields['spacesta'] != -10) { | ||||
| ShowMsg('您的帐号不在邮件验证状态,本操作无效', '-1'); | |||||
| ShowMsg('您的帐号不在邮件验证状态,本操作无效', 'index.php'); | |||||
| exit(); | exit(); | ||||
| } | } | ||||
| $userhash = md5($cfg_cookie_encode.'--'.$cfg_ml->fields['mid'].'--'.$cfg_ml->fields['email']); | $userhash = md5($cfg_cookie_encode.'--'.$cfg_ml->fields['mid'].'--'.$cfg_ml->fields['email']); | ||||
| @@ -25,11 +25,9 @@ if ($fmdo == 'sendMail') { | |||||
| $url = preg_replace("#http:\/\/#i", '', $url); | $url = preg_replace("#http:\/\/#i", '', $url); | ||||
| $proto = IsSSL()? "https://" : "http://"; | $proto = IsSSL()? "https://" : "http://"; | ||||
| $url = $proto.preg_replace("#\/\/#i", '/', $url); | $url = $proto.preg_replace("#\/\/#i", '/', $url); | ||||
| $mailtitle = "{$cfg_webname},会员邮件验证通知"; | |||||
| $mailtitle = "来自{$cfg_webname}:邮件验证通知"; | |||||
| $mailbody = ''; | $mailbody = ''; | ||||
| $mailbody .= "尊敬的会员<span class='text-primary'>{$cfg_ml->fields['uname']}</span>,欢迎注册成为<span class='text-primary'>{$cfg_webname}</span>会员\r\n"; | |||||
| $mailbody .= "要通过注册,还必须进行最后一步操作,请点击或复制下面链接到地址栏浏览这地址:\r\n"; | |||||
| $mailbody .= "{$url}\r\n"; | |||||
| $mailbody .= "尊敬的{$cfg_ml->fields['uname']}会员,欢迎成为{$cfg_webname}会员!\r\n通过注册还须进行最后一步操作,请点击链接或复制链接到地址栏访问:{$url}"; | |||||
| $headers = "From: ".$cfg_adminemail."\r\nReply-To: ".$cfg_adminemail; | $headers = "From: ".$cfg_adminemail."\r\nReply-To: ".$cfg_adminemail; | ||||
| if (!empty($cfg_bizcore_appid) && !empty($cfg_bizcore_key)) { | if (!empty($cfg_bizcore_appid) && !empty($cfg_bizcore_key)) { | ||||
| $client = new DedeBizClient(); | $client = new DedeBizClient(); | ||||
| @@ -51,23 +49,23 @@ if ($fmdo == 'sendMail') { | |||||
| } else if ($fmdo == 'checkMail') { | } else if ($fmdo == 'checkMail') { | ||||
| $mid = intval($mid); | $mid = intval($mid); | ||||
| if (empty($mid)) { | if (empty($mid)) { | ||||
| ShowMsg('您的效验串不合法', '-1'); | |||||
| ShowMsg('您的效验串不合法', 'index.php'); | |||||
| exit(); | exit(); | ||||
| } | } | ||||
| $row = $dsql->GetOne("SELECT * FROM `#@__member` WHERE mid='{$mid}' "); | $row = $dsql->GetOne("SELECT * FROM `#@__member` WHERE mid='{$mid}' "); | ||||
| $needUserhash = md5($cfg_cookie_encode.'--'.$mid.'--'.$row['email']); | $needUserhash = md5($cfg_cookie_encode.'--'.$mid.'--'.$row['email']); | ||||
| if ($needUserhash != $userhash) { | if ($needUserhash != $userhash) { | ||||
| ShowMsg('您的效验串不合法', '-1'); | |||||
| ShowMsg('您的效验串不合法', 'index.php'); | |||||
| exit(); | exit(); | ||||
| } | } | ||||
| if ($row['spacesta'] != -10) { | if ($row['spacesta'] != -10) { | ||||
| ShowMsg('操作无效,您的帐号不在邮件验证状态', '-1'); | |||||
| ShowMsg('操作无效,您的帐号不在邮件验证状态', 'index.php'); | |||||
| exit(); | exit(); | ||||
| } | } | ||||
| $dsql->ExecuteNoneQuery("UPDATE `#@__member` SET spacesta=0 WHERE mid='{$mid}' "); | $dsql->ExecuteNoneQuery("UPDATE `#@__member` SET spacesta=0 WHERE mid='{$mid}' "); | ||||
| //清除会员缓存 | //清除会员缓存 | ||||
| $cfg_ml->DelCache($mid); | $cfg_ml->DelCache($mid); | ||||
| ShowMsg('会员缓存已清理', 'login.php'); | |||||
| ShowMsg('正在验证中', 'login.php'); | |||||
| exit(); | exit(); | ||||
| } else if ($fmdo == 'user') { | } else if ($fmdo == 'user') { | ||||
| //检查账号是否存在 | //检查账号是否存在 | ||||
| @@ -123,17 +121,17 @@ if ($fmdo == 'sendMail') { | |||||
| else if ($dopost == "money2s") { | else if ($dopost == "money2s") { | ||||
| CheckRank(0, 0);//禁止游客操作 | CheckRank(0, 0);//禁止游客操作 | ||||
| if ($cfg_money_scores == 0) { | if ($cfg_money_scores == 0) { | ||||
| ShowMsg('系统禁用了积分与金币兑换功能', '-1'); | |||||
| ShowMsg('系统禁用了积分与金币兑换功能', 'index.php'); | |||||
| exit(); | exit(); | ||||
| } | } | ||||
| $money = empty($money) ? "" : abs(intval($money)); | $money = empty($money) ? "" : abs(intval($money)); | ||||
| if (empty($money)) { | if (empty($money)) { | ||||
| ShowMsg('您没指定要兑换多少金币', '-1'); | |||||
| ShowMsg('您没指定要兑换多少金币', 'index.php'); | |||||
| exit(); | exit(); | ||||
| } | } | ||||
| $needscores = $money * $cfg_money_scores; | $needscores = $money * $cfg_money_scores; | ||||
| if ($cfg_ml->fields['scores'] < $needscores) { | if ($cfg_ml->fields['scores'] < $needscores) { | ||||
| ShowMsg('您积分不足,不能换取这么多的金币', '-1'); | |||||
| ShowMsg('您积分不足,不能换取这么多的金币', 'index.php'); | |||||
| exit(); | exit(); | ||||
| } | } | ||||
| $litmitscores = $cfg_ml->fields['scores'] - $needscores; | $litmitscores = $cfg_ml->fields['scores'] - $needscores; | ||||
| @@ -161,7 +159,7 @@ if ($fmdo == 'sendMail') { | |||||
| } | } | ||||
| if ($pwd == '') { | if ($pwd == '') { | ||||
| ResetVdValue(); | ResetVdValue(); | ||||
| ShowMsg("密码不能为空", "-1", 0, 2000); | |||||
| ShowMsg('密码不能为空', 'index.php', 0, 2000); | |||||
| exit(); | exit(); | ||||
| } | } | ||||
| $isNeed = $cfg_ml->isNeedCheckCode($userid); | $isNeed = $cfg_ml->isNeedCheckCode($userid); | ||||
| @@ -177,24 +175,24 @@ if ($fmdo == 'sendMail') { | |||||
| $rs = $cfg_ml->CheckUser($userid, $pwd); | $rs = $cfg_ml->CheckUser($userid, $pwd); | ||||
| if ($rs == 0) { | if ($rs == 0) { | ||||
| ResetVdValue(); | ResetVdValue(); | ||||
| ShowMsg("您的账号错误", "index.php", 0, 2000); | |||||
| ShowMsg('您的账号错误', 'index.php', 0, 2000); | |||||
| exit(); | exit(); | ||||
| } else if ($rs == -1) { | } else if ($rs == -1) { | ||||
| ResetVdValue(); | ResetVdValue(); | ||||
| ShowMsg("您的密码错误", "index.php", 0, 2000); | |||||
| ShowMsg('您的密码错误', 'index.php', 0, 2000); | |||||
| exit(); | exit(); | ||||
| } else if ($rs == -2) { | } else if ($rs == -2) { | ||||
| ResetVdValue(); | ResetVdValue(); | ||||
| ShowMsg("管理员帐号不允许从前台登录", "index.php", 0, 2000); | |||||
| ShowMsg('管理员帐号不允许从前台登录', 'index.php', 0, 2000); | |||||
| exit(); | exit(); | ||||
| } else { | } else { | ||||
| //清除会员缓存 | //清除会员缓存 | ||||
| $cfg_ml->DelCache($cfg_ml->M_ID); | $cfg_ml->DelCache($cfg_ml->M_ID); | ||||
| if (empty($gourl) || preg_match("#action|_do#i", $gourl)) { | if (empty($gourl) || preg_match("#action|_do#i", $gourl)) { | ||||
| ShowMsg("正在登录会员中心,请稍等", "index.php", 0, 2000); | |||||
| ShowMsg('正在登录会员中心,请稍等', 'index.php', 0, 2000); | |||||
| } else { | } else { | ||||
| $gourl = str_replace('^', '&', $gourl); | $gourl = str_replace('^', '&', $gourl); | ||||
| ShowMsg("正在前往指定页面,请稍等", $gourl, 0, 2000); | |||||
| ShowMsg('正在前往指定页面,请稍等', $gourl, 0, 2000); | |||||
| } | } | ||||
| exit(); | exit(); | ||||
| } | } | ||||
| @@ -202,7 +200,7 @@ if ($fmdo == 'sendMail') { | |||||
| //退出登录 | //退出登录 | ||||
| else if ($dopost == "exit") { | else if ($dopost == "exit") { | ||||
| $cfg_ml->ExitCookie(); | $cfg_ml->ExitCookie(); | ||||
| ShowMsg("已退出会员中心", "index.php", 0, 2000); | |||||
| ShowMsg('已退出会员中心', 'index.php', 0, 2000); | |||||
| exit(); | exit(); | ||||
| } | } | ||||
| } else if ($fmdo == 'purl'){ | } else if ($fmdo == 'purl'){ | ||||
| @@ -260,6 +258,6 @@ if ($fmdo == 'sendMail') { | |||||
| $win->Display(DEDEMEMBER."/templets/win_templet.htm"); | $win->Display(DEDEMEMBER."/templets/win_templet.htm"); | ||||
| exit; | exit; | ||||
| } else { | } else { | ||||
| ShowMsg("操作失败", "index.php"); | |||||
| ShowMsg('操作失败', 'index.php'); | |||||
| } | } | ||||
| ?> | ?> | ||||
| @@ -85,7 +85,7 @@ if ($dopost == "") { | |||||
| $dtime = time(); | $dtime = time(); | ||||
| if ($dtime - $tptim > $row['mailtime']) { | if ($dtime - $tptim > $row['mailtime']) { | ||||
| $db->ExecuteNoneQuery("DELETE FROM `#@__pwd_tmp` WHERE `md` = '$id';"); | $db->ExecuteNoneQuery("DELETE FROM `#@__pwd_tmp` WHERE `md` = '$id';"); | ||||
| ShowMsg("临时密码修改期限已过期", "login.php"); | |||||
| ShowMsg("临时验证码修改期限已过期", "login.php"); | |||||
| exit(); | exit(); | ||||
| } | } | ||||
| require_once(dirname(__FILE__)."/templets/resetpassword2.htm"); | require_once(dirname(__FILE__)."/templets/resetpassword2.htm"); | ||||
| @@ -114,7 +114,7 @@ if ($dopost == "") { | |||||
| ShowMsg('新密码为空或填写不一致', '-1'); | ShowMsg('新密码为空或填写不一致', '-1'); | ||||
| exit; | exit; | ||||
| } | } | ||||
| ShowMsg('临时密码错误', '-1'); | |||||
| ShowMsg('临时验证码错误', '-1'); | |||||
| exit; | exit; | ||||
| } | } | ||||
| } | } | ||||
| @@ -27,8 +27,8 @@ | |||||
| </div> | </div> | ||||
| <?php if (empty($key)) {?> | <?php if (empty($key)) {?> | ||||
| <div class="form-group"> | <div class="form-group"> | ||||
| <label>会员临时密码</label> | |||||
| <input type="password" name="pwdtmp" id="iptPwdtmp" class="form-control" placeholder="请输会员临时密码"> | |||||
| <label>临时验证码</label> | |||||
| <input type="password" name="pwdtmp" id="iptPwdtmp" class="form-control" placeholder="请输临时验证码"> | |||||
| </div> | </div> | ||||
| <?php } else {?> | <?php } else {?> | ||||
| <div class="form-group"> | <div class="form-group"> | ||||