From 8701d911071cb1814a4fa8795ee9f9243ee08b12 Mon Sep 17 00:00:00 2001 From: xushubieli Date: Tue, 21 Dec 2021 10:27:30 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E8=A1=A8=E5=8D=95=EF=BC=8C=E5=92=8C=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/dede/dialog/select_images.php | 2 +- src/dede/dialog/select_soft.php | 6 +- src/dede/dialog/select_templets.php | 4 +- src/dede/templets/diy_list.htm | 103 ++++++++++++++-------------- src/plus/diy.php | 42 ++++++------ 5 files changed, 80 insertions(+), 77 deletions(-) diff --git a/src/dede/dialog/select_images.php b/src/dede/dialog/select_images.php index b1d5c949..ae863246 100644 --- a/src/dede/dialog/select_images.php +++ b/src/dede/dialog/select_images.php @@ -58,7 +58,7 @@ html{background:#f2f2f2} body{margin:0;line-height:22px;font:12px Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif} a{text-decoration:none!important} table{background:#fff} -.bg{margin:10px;border-radius:2px;box-shadow:0 1px 2px 0 rgba(0,0,0,.05)} +.bg{margin:10px;border-radius:.2rem;box-shadow:0 1px 2px 0 rgba(0,0,0,.05)} .linerow{border-bottom:1px solid #eee!important} .napisdiv{left:40;top:10;width:150px;height:100px;position:absolute;z-index:3;display:none} diff --git a/src/dede/dialog/select_soft.php b/src/dede/dialog/select_soft.php index e5d98a10..32036420 100644 --- a/src/dede/dialog/select_soft.php +++ b/src/dede/dialog/select_soft.php @@ -51,7 +51,7 @@ html{background:#f2f2f2} body{margin:0;line-height:22px;font:12px Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif} a{text-decoration:none!important} table{background:#fff} -.bg{margin:10px;border-radius:2px;box-shadow:0 1px 2px 0 rgba(0,0,0,.05)} +.bg{margin:10px;border-radius:.2rem;box-shadow:0 1px 2px 0 rgba(0,0,0,.05)} .linerow{border-bottom:1px solid #eee!important} @@ -128,7 +128,7 @@ table{background:#fff} \r\n"; echo $line; } else if (is_dir("$inpath/$file")) { - if (preg_match("#^_(.*)$#i", $file)) continue; #屏蔽FrontPage扩展目录和linux隐蔽目录 + if (preg_match("#^_(.*)$#i", $file)) continue; if (preg_match("#^\.(.*)$#i", $file)) continue; $line = "\n $file @@ -168,7 +168,7 @@ table{background:#fff} - 请点击要选择的文件,红色字样的为刚上传的文件 + 点击选择的文件,红色字样的为刚上传的文件 diff --git a/src/dede/dialog/select_templets.php b/src/dede/dialog/select_templets.php index 0f7df7bb..f7c54c87 100644 --- a/src/dede/dialog/select_templets.php +++ b/src/dede/dialog/select_templets.php @@ -43,7 +43,7 @@ html{background:#f2f2f2} body{margin:0;line-height:22px;font:12px Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif} a{text-decoration:none!important} table{background:#fff} -.bg{margin:10px;border-radius:2px;box-shadow:0 1px 2px 0 rgba(0,0,0,.05)} +.bg{margin:10px;border-radius:.2rem;box-shadow:0 1px 2px 0 rgba(0,0,0,.05)} .linerow{border-bottom:1px solid #eee!important} @@ -183,7 +183,7 @@ table{background:#fff} - +
diff --git a/src/dede/templets/diy_list.htm b/src/dede/templets/diy_list.htm index c6c66865..c138e03e 100755 --- a/src/dede/templets/diy_list.htm +++ b/src/dede/templets/diy_list.htm @@ -1,77 +1,80 @@ - + - - <?php echo $diy->name;?> + <?php echo $diy->name; ?> - - + + - - +
-
name;?>内容列表
+
name; ?>列表
- - + +
- {dede:datalist} '; - foreach($fieldlist as $field=>$fielddata) - { - if($fields[$field]=='') continue; - if($fielddata[1]=='img') + if(!empty($fields)) { - $fields[$field] = " 图片附件\r\n"; - } - else if($fielddata[1]=='addon') - { - $fields[$field] = " 其它附件"; - } - else - { - if(!in_array($fielddata[1],$allowhtml)){ - $fields[$field] = dede_htmlspecialchars($fields[$field]); + $allowhtml = array('htmltext'); + $fields['sta'] = $fields['ifcheck'] == 1 ?'已审核':'未审核'; + echo ''; + foreach($fieldlist as $field=>$fielddata) + { + if($fields[$field]=='') continue; + if($fielddata[1]=='img'){ + $fields[$field] = "图片附件\r\n"; + } + else if($fielddata[1]=='addon'){ + $fields[$field] = "其它附件"; + } else { + if(!in_array($fielddata[1],$allowhtml)){ + $fields[$field] = dede_htmlspecialchars($fields[$field]); + } + } + echo ''; } + } else { + echo ''; } - echo ''; - } -} else { - echo ""; -} -?> + ?> {/dede:datalist} - + -
-
 自定义表单管理 > 内容列表
- +
+ +
id'.$fields['id'].'   状态: '.$fields['sta'].'
'.$fields['id'].' '.$fields['sta'].'
'.$fielddata[0].''.$fields[$field].'
暂无记录
'.$fielddata[0].''.$fields[$field].'
暂无记录
{dede:pagelist listsize=5 /}{dede:pagelist listsize='8'/}
- - -    - + + + + + +
+ - \ No newline at end of file diff --git a/src/plus/diy.php b/src/plus/diy.php index 54749c7c..cdfcfd3f 100755 --- a/src/plus/diy.php +++ b/src/plus/diy.php @@ -1,5 +1,4 @@ + if($fieldinfo[0] == 'ip') + { + ${$fieldinfo[0]}=GetIP(); + } + //获取时间,表单添加text数据类型sj字段型后模板用 + if($fieldinfo[0] == 'sj') + { + ${$fieldinfo[0]}=date("Y-m-d H:i"); } else { - ${$fieldinfo[0]} = GetFieldValue(${$fieldinfo[0]}, $fieldinfo[1], 0, 'add', '', 'diy', $fieldinfo[0]); + ${$fieldinfo[0]} = GetFieldValue(${$fieldinfo[0]}, $fieldinfo[1],0,'add','','diy', $fieldinfo[0]); } $addvar .= ', `' . $fieldinfo[0] . '`'; $addvalue .= ", '" . ${$fieldinfo[0]} . "'"; } } } - $query = "INSERT INTO `{$diy->table}` (`id`, `ifcheck` $addvar) VALUES (NULL, 0 $addvalue); "; - if ($dsql->ExecuteNoneQuery($query)) { $id = $dsql->GetLastID(); - if ($diy->public == 2) { - //diy.php?action=view&diyid={$diy->diyid}&id=$id + if ($diy->public == 2) + { $goto = "diy.php?action=list&diyid={$diy->diyid}"; - $bkmsg = '发布成功,现在转向表单列表页...'; + $bkmsg = '发布成功,现在转向表单列表页'; } else { $goto = !empty($cfg_cmspath) ? $cfg_cmspath : '/'; - $bkmsg = '发布成功,请等待管理员处理...'; + $bkmsg = '发布成功,请等待管理员处理'; + //提交后返回提交页面 + echo""; } - ShowMsg($bkmsg, $goto); + showmsg($bkmsg, $goto); } } } /*---------------------------- function list(){ } ----------------------------*/ else if ($action == 'list') { +---------------------------*/ +else if ($action == 'list') { if (empty($diy->public)) { ShowMsg('后台关闭前台浏览', 'javascript:;'); exit(); @@ -96,7 +99,6 @@ function list(){ } $query = "SELECT * FROM `{$diy->table}` ORDER BY id DESC"; else $query = "SELECT * FROM `{$diy->table}` WHERE ifcheck=1 ORDER BY id DESC"; - $datalist = new DataListCP(); $datalist->pageSize = 10; $datalist->SetParameter('action', 'list'); @@ -110,7 +112,6 @@ function list(){ } showMsg('后台关闭前台浏览', 'javascript:;'); exit(); } - if (empty($id)) { showMsg('非法操作!未指定id', 'javascript:;'); exit(); @@ -126,7 +127,6 @@ function list(){ } showmsg('你访问的记录不存在或未经审核', '-1'); exit(); } - $fieldlist = $diy->getFieldList(); include DEDEROOT . "/templets/plus/{$diy->viewTemplate}"; -} +} \ No newline at end of file From 36f800d315048cdb2ecc4ce640236fb28ee71cf7 Mon Sep 17 00:00:00 2001 From: xushubieli Date: Tue, 21 Dec 2021 12:00:36 +0800 Subject: [PATCH 02/11] =?UTF-8?q?=E7=A6=81=E6=AD=A2=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E5=BC=95=E6=93=8E=E6=94=B6=E5=BD=95=E5=90=8E=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/dede/templets/index2.htm | 1 + src/dede/templets/login.htm | 11 +++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/dede/templets/index2.htm b/src/dede/templets/index2.htm index 89d9a8d6..106fbdc5 100755 --- a/src/dede/templets/index2.htm +++ b/src/dede/templets/index2.htm @@ -2,6 +2,7 @@ + <?php echo $cfg_webname; ?>后台管理 diff --git a/src/dede/templets/login.htm b/src/dede/templets/login.htm index dd58e9bc..17ac693c 100755 --- a/src/dede/templets/login.htm +++ b/src/dede/templets/login.htm @@ -1,7 +1,8 @@ - + + @@ -12,7 +13,7 @@ body{font:14px Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif;back header{background:#fff} header .logo{width:260px;padding:1em 0} .login-from{max-width:580px;width:100%} -.login-area{background-color:#fff;padding:2em} +.login-area{background:#fff;padding:2em;border-radius:.25rem} .login-area .btnLogin{width:100%} .login-power{padding-top:1em} .login-power a,.goindex a{color:#3DB058} @@ -32,10 +33,8 @@ header .logo{width:260px;padding:1em 0} -
- +
+ '; + $redmsg = ''; } else { $redmsg = ''; } - //登录检测 $admindirs = explode('/', str_replace("\\", '/', dirname(__FILE__))); $admindir = $admindirs[count($admindirs) - 1]; @@ -57,44 +51,40 @@ if ($dopost == 'login') { $svali = strtolower(GetCkVdValue()); if (($validate == '' || $validate != $svali) && preg_match("/6/", $safe_gdopen)) { ResetVdValue(); - ShowMsg('验证码不正确!', 'login.php', 0, 1000); + ShowMsg('验证码不正确', 'login.php', 0, 1000); exit; } else { $cuserLogin = new userLogin($admindir); if (!empty($userid) && !empty($pwd)) { $res = $cuserLogin->checkUser($userid, $pwd); - //success if ($res == 1) { $cuserLogin->keepUser(); if (!empty($gotopage)) { - ShowMsg('成功登录,正在转向管理管理主页!', $gotopage); + ShowMsg('成功登录,正在转向管理管理主页', $gotopage); exit(); } else { - ShowMsg('成功登录,正在转向管理管理主页!', "index.php"); + ShowMsg('成功登录,正在转向管理管理主页', "index.php"); exit(); } } - //error else if ($res == -1) { ResetVdValue(); - ShowMsg('你的用户名不存在!', 'login.php', 0, 1000); + ShowMsg('你的用户名不存在', 'login.php', 0, 1000); exit; } else { ResetVdValue(); - ShowMsg('你的密码错误!', 'login.php', 0, 1000); + ShowMsg('你的密码错误', 'login.php', 0, 1000); exit; } } - //password empty else { ResetVdValue(); - ShowMsg('用户和密码没填写完整!', 'login.php', 0, 1000); + ShowMsg('用户和密码没填写完整', 'login.php', 0, 1000); exit; } } } - -include('templets/login.htm'); +include('templets/login.htm'); \ No newline at end of file diff --git a/src/dede/templets/index_body.htm b/src/dede/templets/index_body.htm index b031fffd..1d1e26fd 100755 --- a/src/dede/templets/index_body.htm +++ b/src/dede/templets/index_body.htm @@ -3,7 +3,7 @@ 系统概况 - + diff --git a/src/dede/templets/login.htm b/src/dede/templets/login.htm index 17ac693c..7182fb09 100755 --- a/src/dede/templets/login.htm +++ b/src/dede/templets/login.htm @@ -3,7 +3,7 @@ - + @@ -33,8 +33,8 @@ header .logo{width:260px;padding:1em 0} -
- +
+