From 7a7334062564bcd5abab88492398f4bddbfbb61c Mon Sep 17 00:00:00 2001 From: tianya Date: Tue, 9 May 2023 00:07:29 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E8=A1=A8=E5=8D=95?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E9=80=89=E6=8B=A9=E6=A1=86=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apps/diy.php | 2 +- src/static/web/js/diy.js | 30 +++++++++++++++++++++++++++++- src/system/common.inc.php | 2 +- src/system/customfields.func.php | 2 +- src/theme/apps/post_diyform.htm | 3 +++ 5 files changed, 35 insertions(+), 4 deletions(-) diff --git a/src/apps/diy.php b/src/apps/diy.php index 1e130860..3c4236bd 100755 --- a/src/apps/diy.php +++ b/src/apps/diy.php @@ -74,7 +74,7 @@ if ($action == 'post') { $goto = !empty($cfg_cmspath) ? $cfg_cmspath : '/'; $bkmsg = '发布成功,请等待管理员处理'; //提交后返回提交页面 - echo""; + ShowMsg('提交成功', '-1'); exit; } ShowMsg($bkmsg, $goto); diff --git a/src/static/web/js/diy.js b/src/static/web/js/diy.js index 56332efd..cdee70e5 100644 --- a/src/static/web/js/diy.js +++ b/src/static/web/js/diy.js @@ -35,4 +35,32 @@ function SelectImage(sform, stype) { }); }) } -} \ No newline at end of file +} +$(document).ready(function () { + $('.datepicker').daterangepicker({ + "singleDatePicker": true, + "autoApply": true, + "showDropdowns": true, + "linkedCalendars": false, + "timePicker": true, + "timePicker24Hour": true, + //"timePickerSeconds": true, + "showCustomRangeLabel": false, + ranges: { + '今日': [moment(), moment()], + '昨日': [moment().subtract(1, 'days'), moment().subtract(1, 'days')], + '本月': [moment().startOf('month'), moment().startOf('month')], + '上月': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').startOf('month')] + }, + "locale": { + format: 'YYYY-MM-DD HH:mm', + applyLabel: '确定', + cancelLabel: '取消', + daysOfWeek: ['日', '一', '二', '三', '四', '五', '六'], + monthNames: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'], + firstDay: 1 + } + }, function (start) { + $(this).val(start.format("YYYY-MM-DD HH:mm")); + }); +}) \ No newline at end of file diff --git a/src/system/common.inc.php b/src/system/common.inc.php index f59a1788..71ee3b4c 100755 --- a/src/system/common.inc.php +++ b/src/system/common.inc.php @@ -7,7 +7,7 @@ * @link https://www.dedebiz.com */ //系统默认运行模式为安全模式,模板管理、标签管理、数据库管理、模块管理等功能已暂停,如果您需要这些功能,DEDEBIZ_SAFE_MODE后面值`TRUE`改为`FALSE`恢复使用 -define('DEDEBIZ_SAFE_MODE', FALSE); +define('DEDEBIZ_SAFE_MODE', TRUE); //生产环境使用`production`,如果采用`dev`模式,会有一些php的报错信息提示,用于开发调试 if (!defined('DEDE_ENVIRONMENT')) { define('DEDE_ENVIRONMENT', 'production'); diff --git a/src/system/customfields.func.php b/src/system/customfields.func.php index f1e450df..ab94fcf6 100755 --- a/src/system/customfields.func.php +++ b/src/system/customfields.func.php @@ -102,7 +102,7 @@ function GetFormItem($ctag, $admintype = 'admin') $innertext = ""; } else if ($fieldType == "datetime") { $nowtime = GetDateTimeMk(time()); - $innertext = ""; + $innertext = ""; } else if ($fieldType == 'img') { $fname = defined('DEDEADMIN')? 'form1' : 'addcontent'; $innertext = " "; diff --git a/src/theme/apps/post_diyform.htm b/src/theme/apps/post_diyform.htm index 32ada0ec..3296faf3 100644 --- a/src/theme/apps/post_diyform.htm +++ b/src/theme/apps/post_diyform.htm @@ -6,8 +6,11 @@ <?php echo $diy->name;?>-<?php echo $cfg_webname;?> + + +