create_call.asp

来自「top-cms内容管理系统」· ASP 代码 · 共 188 行

ASP
188
字号
<%
'###########################################################################################
'*  程序名称: Top-CMS
'*---------------------------------------------------------------------------------------
'*  系统版本: 1.0 0215
'*  版权所有: www.Net-Develop.com
'*  程序设计: 江南行客
'*  联系方式:
'*            OICQ:2503086
'*            EMAIL:net-oa@sohu.com
'*  网站地址: 
'*            http://www.net-develop.com  
'*            http://www.top-cms.com   
'*---------------------------------------------------------------------------------------
'*  Copyright 2004 www.net-develop.com - All Rights Reserved.
'###########################################################################################
%>
<!--#include file="../common/common.asp" -->
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../css/style.css">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<%
Set objCMS = Server.CreateObject("TopCMS.CreateCallMethod")
if objCMS.ChkAdminPower then
	SystemI_Init
	objCMS.OpenDB()
	If Not objCMS.CheckAdminField("Call") Then
        objCMS.OutInfo "对不起,你不具备此项权限。", ""
        Response.End
    End If
	
	If Request.ServerVariables("REQUEST_METHOD")="POST" Then
		objCMS.CreateCall
	else
		t = lcase(cstr(objCMS.ChkString(Request("t"), "U")))
		if t="" then
			objCMS.OutInfo "参数传递错误",""
			response.end
		end if
		select case (t)
			case "msg"
				text="公告"
			case "class"
				text="专题"
			case "poll"
				text="调查项目"
		end select
	
	%>	
		<form name="form1" method="post" action="create_call.asp">
  <table width="100%" border="1" bordercolor="#999999" cellspacing="0" cellpadding="2" align="center">
    <tr> 
      <td colspan="2" background="../Images/default_nav.gif"><font color="#FFFFFF">生成<%=text%>调用方式</font></td>
    </tr>
    <tr> 
      <td align="right" width="20%" bgcolor="#EEEEEE">调用方式:</td>
      <td width="80%" bgcolor="#EEEEEE"> <input type="checkbox" name="html" value="1" checked>
        Include方式(.html) 
        <input name="js" type="checkbox" value="1" checked>
        JS方式(.js) </td>
    </tr>
    <%
	select case (t)
		case "class" %>
    <tr> 
      <td align="right" width="20%">要生成的专题:</td>
      <td width="80%"> <%
	  dbSql = "SELECT cID,cName FROM db_Class Order By cID Desc"
		set dbRs=objCMS.MyRs(dbSql,1,1,1)
		If not dbRs.EOF Then
			do while not dbRs.eof
				response.write "<input type=""checkbox"" name=""cID"" value=""" & dbRs("cID") & """>"
				response.write "<a href=""classinfo.asp?cID=" & dbRs("cID") & """>" & trim(dbRs("cName")) & "</a><br>"
				dbRs.movenext
			loop
		else
			objCMS.OutInfo "当前还没有任何专题",""
			response.end
		end if
		dbRs.close
		set dbRs=nothing
	%> </td>
    </tr>
    <tr> 
      <td align="right" width="20%">参数设置:</td>
      <td width="80%"> 标题长 
        <input type="text" name="tWidth" size="3" maxlength="3" value="16"> <br>
        是否带图 
        <input type="checkbox" name="cPic" value="1" checked> </td>
    </tr>
    <%case "poll"%>
    <tr> 
      <td align="right" width="20%">要生成的调查主题:</td>
      <td width="80%"> <%
	  dbSql = "SELECT qID,qTitle,qActive,qVote,qDate FROM db_Question Order By qID Desc"
		set dbRs=objCMS.MyRs(dbSql,1,1,1)
		If not dbRs.EOF Then
			do while not dbRs.eof
				response.write "<input type=""radio"" name=""qID"" value=""" & dbRs("qID") & """"
				if CBool(trim(dbRs("qActive"))) then response.write " checked"
				response.write ">"
        response.write "<a href=""../asp/poll.asp?qID=" & dbRs("qID") & """ target=""_blank"">" &  Trim(dbRs("qTitle")) & "</a>" 
        response.write "<font color=""#999999"">[" & dbRs("qVote") & "] [" & dbRs("qDate") & "] </font><br>"
				dbRs.movenext
			loop
		else
			objCMS.OutInfo "当前还没有任何调查项目",""
			response.end
		end if
		dbRs.close
		set dbRs=nothing
		
	%> </td>
    </tr>
    <%case "pic","commend","new"%>
    <tr> 
      <td align="right" width="20%">要生成的栏目&类别:</td>
      <td width="80%"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
          
            <%=objCMS.ListAllCategory(t)%> 
        </table></td>
    </tr>
    <tr> 
      <td align="right" width="20%">参数设置:</td>
      <td width="80%"> 标题长度 
        <input type="text" name="titleWidth" size="3" maxlength="3" value="20"> 
        <br>
        信息条数 
        <input type="text" name="infoNum" size="3" maxlength="3" value="8"> <br>
        分几列显示 
        <input type="text" name="infoCol" size="3" maxlength="3" value="1"> </td>
    </tr>
    <%end select %>
    <tr> 
      <td align="right" width="20%" bgcolor="#EEEEEE">&nbsp;</td>
      <td width="80%" bgcolor="#EEEEEE">&nbsp;</td>
    </tr>
    <tr> 
      <td align="center" colspan="2" bgcolor="#CCCCCC"> <input type="hidden" name="t" value="<%=t%>"> 
        <input type="submit" name="B1" value=" 更新 "> <input type="button" name="B2" value=" 取消 " onclick="history.back();"> 
      </td>
    </tr>
	</table>
	</form>

	<%if LCase(t)="pic" or LCase(t)="commend" or LCase(t)="new" then ishidden="hidden"%>
	<script language="JavaScript">
	function listcall(t){
	c.className="";
	<%response.write "cinclude.value='<!--#include virtual=""" & AbsWebPath & "call/call@' + t +'/call.html"" -->';"
	response.write "cjs.value='<!--#include virtual=""" & AbsWebPath & "call/call@' + t +'/call.js"" -->';"
	%>
	}
	</script>
  <table width="100%" border="1" bordercolor="#999999" cellspacing="0" cellpadding="2" align="center" id="c" class="<%=ishidden%>">
    <tr bgcolor="#EEEEEE"> 
      <td colspan="2"><font color="#666666"><strong>调用方式</strong></font></td>
    </tr>
    <tr> 
      <td align="right" width="20%"><font color="#999999">调用方式示例:</font></td>
      <td width="80%"> <p><font color="#999999"> Include方式调用:<br>
          <textarea cols="45" name="cinclude" rows="2" style="color:#666666"><%
		  response.write "<!--#include virtual=""" & AbsWebPath & "call/call@" & t & "/call.html"" -->"
		  %></textarea>
          </font></p>
        <p><font color="#999999"> JS方式调用:<br>
          <textarea cols="45" name="cjs" rows="2" style="color:#666666"><%response.write "<script language=""JavaScript"" src=""" & AbsWebPath & "call/call@" & t & "/call.js""></script>"%></textarea>
          </font></p>
        <p><font color="#999999">(注:生成调用文件后,在你想要调用<%=text%>的地方插入上述任何一种代码均可。)</font></p></td>
    </tr>
  </table>


<%
	end if
	objCMS.CloseDB	
else
	objCMS.OutInfo "对不起,您还没有登录,请先登录","Login"
end if
set objCMS=nothing
%>
</body>
</html>

⌨️ 快捷键说明

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