国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

35 行
1.3KB

  1. <?php
  2. /**
  3. * 添加模型版本
  4. *
  5. * @version $id:ai_model_add.php 2025 tianya $
  6. * @package DedeBIZ.Administrator
  7. * @copyright Copyright (c) 2025 DedeBIZ.COM
  8. * @license GNU GPL v2 (https://www.dedebiz.com/license)
  9. * @link https://www.dedebiz.com
  10. */
  11. require(dirname(__FILE__)."/config.php");
  12. CheckPurview('ai_ModelNew');
  13. if (empty($dopost)) $dopost = '';
  14. $aiid = isset($aiid) ? intval($aiid) : 0;
  15. if ($dopost == "add") {
  16. $model = isset($model)? HtmlReplace($model, -1) : '';
  17. $title = isset($title)? HtmlReplace($title, -1) : '';
  18. $description = isset($description)? HtmlReplace($description, -1) : '';
  19. $sortrank = isset($sortrank)? intval($sortrank) : 50;
  20. $query = "INSERT INTO `#@__ai_model` (aiid,title,model,description,sortrank) VALUES ('$aiid','$title','$model','$description','$sortrank'); ";
  21. $rs = $dsql->ExecuteNoneQuery($query);
  22. $burl = "ai_edit.php?id=".$aiid;
  23. if ($rs) {
  24. ShowMsg("成功添加一个模型版本", $burl);
  25. exit();
  26. } else {
  27. ShowMsg("添加模型版本时出错,原因:".$dsql->GetError(), "javascript:;");
  28. exit();
  29. }
  30. }
  31. if($aiid > 0) {
  32. $ai = $dsql->GetOne("SELECT * FROM `#@__ai` WHERE id=$aiid");
  33. }
  34. include DedeInclude('templets/ai_model_add.htm');
  35. ?>