⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 topic_templet.asp

📁 gmaple软件下载系统1.0Beta 具有一下功能: 1.模板功能,前台的呈现更加灵活. 2.支持静态生成,可在动态与静态间随时切换. 3.在静态模式下,可自定义生成目录,生成方式灵活.
💻 ASP
字号:
<!--#include file="admin_include.asp"-->
<%
if request.Form.Count>0 then
	id = request.Form("id")
	templet_name = HTMLEncode(trim(request.Form("templet_name")))
	templet_content = HTMLEncode(trim(request.Form("templet_content")))
	sql="select * from [templet] where SD_templet_type='Topic' and SD_templet_project="&id
	rs.open sql,conn,1,3
	if rs.eof then
		rs.addnew
		rs("SD_templet_name")=templet_name
		rs("SD_templet_content")=templet_content
		rs("SD_templet_type")="Topic"
		rs("SD_templet_default")=1
		rs("SD_templet_project")=id
		rs("SD_templet_addtime")=now()
		rs.update
	else
		rs("SD_templet_name")=templet_name
		rs("SD_templet_content")=templet_content
		rs("SD_templet_default")=1
		rs("SD_templet_addtime")=now()
		rs.update
	end if
	rs.close
	debug("操作成功")
elseif request.QueryString.count>0 then
	id = request.QueryString("id")
	sql="select * from [templet] where SD_templet_type='Topic' and SD_templet_project="&id
	rs.open sql,conn,1,1
	if not rs.eof then
		templet_name = HTMLDncode(rs("SD_templet_name"))
		templet_content = HTMLDncode(rs("SD_templet_content"))
	end if
end if
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="Css/Main.Css" />
<script language="javascript" src="../js/jquery.js"></script>
<script language="javascript" src="../js/jquery.form.js"></script>
<script language="javascript">
//<!--
function CheckTempletEdit(obj,id){
	if (obj.templet_name.value==""){
		alert("模板名称为空!");
		obj.templet_name.focus();
		return false;
	}
	if (obj.templet_content.value==""){
		alert("模板内容为空!");
		obj.templet_content.focus();
		return false;		
	}
	$("#TempletEdit").ajaxForm(function(ReText){
		alert(ReText);
		if(ReText.search("操作成功")>=0){
			location.href="Topic_Class.asp?id="+id;
		}
	})
}
//-->
</script>
<title>专题模板设置</title>
</head>

<body>
<form method="post" id="TempletEdit" action="Topic_Templet.asp" name="TempletEdit">
<input name="id" type="hidden" value="<%=id%>"/>
<table width="97%" cellpadding="2" cellspacing="1" style="border:1px #FFFFFF solid">
  <tr>
    <td colspan="2" class="table_caption"><%if id<>"" then%>修改模板(<%=templet_name%>)<%else%>添加模板<%end if%></td>
  </tr>
  <tr>
    <td colspan="2" bgcolor="#CCCCCC" class="intro"><strong>快捷导航:</strong>
      <a href="Topic.asp">专题管理</a>
    </td>
  </tr>
  <tr>
    <td class="leftbg">模板名称:</td>
    <td class="rightbg"><input name="templet_name" type="text" class="TextBox3" value="<%=templet_name%>"/></td>
  </tr>
  <tr>
    <td class="leftbg">模板内容:</td>
    <td class="rightbg"><textarea name="templet_content" cols="70" rows="25" wrap="off" class="DownUrlBox"><%=templet_content%></textarea></td>
  </tr>
  <tr>
    <td colspan="2" class="header" style="text-align:right;">
      <img class="hand" src="../images/sizeplus.gif" onclick="ChangeTempletSize('plus');" alt="加大尺寸" />
      <img class="hand" src="../images/sizeminus.gif" onclick="ChangeTempletSize('minus');" alt="缩小尺寸" />
    </td>
  </tr>
  <tr>
    <td colspan="2" class="header text_nor">
      <input type="submit" class="submitCmd" onclick="return CheckTempletEdit(this.form,<%=id%>);" value="保 存" />
      <input type="reset" class="submitCmd" value="重 置" />
    </td>
  </tr>
</table>
</form>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -