Browse Source

Update diy_add.php

tags/6.2.8
叙述、别离 1 year ago
parent
commit
7b17fff6aa
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      src/admin/diy_add.php

+ 4
- 4
src/admin/diy_add.php View File

@@ -31,7 +31,7 @@ if (empty($action)) {
$name = dede_htmlspecialchars($name);
$row = $dsql->GetOne("SELECT * FROM `#@__diyforms` WHERE diyid='$diyid' OR `table` LIKE '$table' OR name LIKE '$name'");
if (is_array($row)) {
ShowMsg("自定义表单diyid或名称在数据库中重复", "-1");
ShowMsg("自定义表单diyid和自定义表单表名称数据库已存在,请重新填写", "-1");
exit();
}
if ($cfg_dbtype=="sqlite") {
@@ -44,7 +44,7 @@ if (empty($action)) {
while ($row = $dsql->GetArray("biz")) {
if (empty($row[0])) $row[0] = '';
if ($table == $row[0]) {
showmsg('指定的自定义表单在数据库中重复', '-1');
showmsg('指定的自定义表单称数据库已存在,请重新填写', '-1');
exit();
}
}
@@ -60,9 +60,9 @@ if (empty($action)) {
if ($dsql->ExecuteNoneQuery($sql)) {
$query = "INSERT INTO `#@__diyforms` (`diyid`,`name`,`table`,`info`,`listtemplate`,`viewtemplate`,`posttemplate`,`public` ) VALUES ('$diyid','$name','$table','','$listtemplate','$viewtemplate','$posttemplate','$public')";
$dsql->ExecuteNoneQuery($query);
showmsg('自定义表单创建成功,请添加字段', 'diy_main.php');
showmsg('成功创建一个自定义表单', 'diy_main.php');
} else {
showmsg('自定义表单创建失败', '-1');
showmsg('创建自定义表单失败', '-1');
}
}
?>

Loading…
Cancel
Save