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

📄 item_edit.asp

📁 是一个关于小学信息化教育的平台,提供了学校论坛,和聊天室功能!
💻 ASP
📖 第 1 页 / 共 3 页
字号:
<!--#include file="../../include/db.asp"-->
<!--#include file="../../include/admin_check.asp"-->
<%


Set conn = OpenOrGet_Database("sql_conn")

infosql="select * from item_type order by number"
'response.end
set rs=Open_rs(conn,infosql)

myNumber=trim(request("number"))
'response.end
if myNumber<>"" and myNumber<>"root" then
	selectsql="select id,help,style,support_new,table_style,limit_len,support_more,title_num,title_color,show_type,name from item_type where number='"&myNumber&"'"
'response.write selectsql
'response.end
	set itemRs=open_rs(conn,selectsql)
	
	if (itemRs.bof and itemRs.eof) then
	  Response.Write "<script language=javascript>"
   	  Response.Write "alert('你选择的项目已经不存在,请重新选择');"
    	  Response.Write "history.go(-1);"
    	  Response.Write "</script>"
	  Response.End
	end if
end if

'数据库操作
if trim(request("act"))="update" then
	
	if trim(request("show_type"))="char" then
		itemRs("show_type")="char"
		
		if trim(request("help_yn"))<>"no" then
			if trim(request("help"))<>"" then
				itemRs("help")=request("help")
			end if
		else
			itemRs("help")="no"
		end if
	
		if trim(request("new_yn"))<>"no" then
			itemRs("support_new")="yes"
		else
			itemRs("support_new")="no"
		end if
	
	'response.write request("limitLen")
	'response.end
		if trim(request("limitLen_yn"))<>"no" then
			itemRs("limit_Len")=cint(trim(request("limitLen"))) 
		else
			itemRs("limit_len")=0
		end if
	
		if trim(request("more_yn"))<>"no" then
			itemRs("support_more")="yes"
		else
			itemRs("support_more")="no"
		end if
	
		if trim(request("titleNum_yn"))<>"no" then
			if trim(request("titleNum"))<>"" then
				itemRs("title_num")=cint(request("titleNum"))
			end if
		else
			itemRs("title_num")=0
		end if

		if trim(request("style_yn"))<>"no" then
			itemRs("style")=cint(trim(request("title_style")))
			itemRs("title_color")=trim(request("title_color"))
		
		else
			itemRs("style")=1
			itemRs("title_color")="black"
		end if

		itemRs("table_style")=(trim(request("table_style")))
	else
		itemRs("show_type")=trim(request("show_type"))
		
		if trim(request("help_yn"))<>"no" then
			if trim(request("help"))<>"" then
				itemRs("help")=request("help")
			end if
		else
			itemRs("help")="no"
		end if
	
		if trim(request("new_yn"))<>"no" then
			itemRs("support_new")="yes"
		else
			itemRs("support_new")="no"
		end if
	
	'response.write request("limitLen")
	'response.end
		if trim(request("limitLen_yn"))<>"no" then
			itemRs("limit_Len")=cint(trim(request("limitLen"))) 
		else
			itemRs("limit_len")=0
		end if
	
		if trim(request("more_yn"))<>"no" then
			itemRs("support_more")="yes"
		else
			itemRs("support_more")="no"
		end if
	
		if trim(request("titleNum_yn"))<>"no" then
			if trim(request("titleNum"))<>"" then
				itemRs("title_num")=cint(request("titleNum"))
			end if
		else
			itemRs("title_num")=0
		end if

		if trim(request("style_yn"))<>"no" then
			itemRs("style")=cint(trim(request("title_style")))
			itemRs("title_color")=trim(request("title_color"))
		
		else
			itemRs("style")=1
			itemRs("title_color")="black"
		end if

		itemRs("table_style")=(trim(request("table_style")))
	end if
	
	itemRs.update	
	itemRs.requery
end if

%>
<!--#include file="tree/treelist.asp"-->
<html>
<head>
<title>深圳育才一小欢迎您!</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="/include/page.css" type="text/css">
</head>

<body >
<table width="1" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr> 
    <td> 
      <table width="753" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td><!--#include file="../../include/admin_banner.inc"--></td>
        </tr>
        <tr> 
          <td> 
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td width="1%">&nbsp;</td>
                <td width="99%"> 
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td id="td1">&nbsp;</td>
                    </tr>
                    <tr> 
                      <td> 
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                          <tr> 
                            <td width="21%" valign="top"><!--#include file="../../include/admin_left.inc"--></td>
                            <td width="2%" valign="top">&nbsp;</td>
                            <td width="77%" height=1 valign="top"> 
                              <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr> 
                                  <td> 
                                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                      <tr valign="top"> 
                                        <td background="/images/middle/m-bg.gif" width="70"><img src="/images/wzgl.gif"></td>
                                        <td background="/images/middle/m-bg.gif"  align="right"><img src="/images/middle/pacer1.gif" width="3" height="38"></td>
                                        <td background="/images/middle/m-bg.gif"  align="right" valign="middle" width="16"><img src="/images/middle/more.gif" width="16" height="16" border=0 alt="更多"></td>
                                        <td background="/images/middle/m-bg.gif"  align="right" width="8"><img src="/images/middle/pacer.gif" width="8" height="38"></td>
                                        <td background="/images/middle/m-bg.gif"  align="right" valign="middle" width="16"><img src="/images/middle/help.gif" width="16" height="16" border=0 alt="栏目帮助"></td>
                                        <td width="6" align="right"><img src="/images/middle/M-r.gif" width="16" height="38"></td>
                                      </tr>
                                    </table>
                                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                      <tr> 
                                        <td class="bg-left" width="6"><img src="/images/left/l-l.gif" border=0></td>
                                        <td class="newsborder" width="100%" > 
                                          <table width="100%" border="0" cellspacing="1" cellpadding="0">
                                            <tr> 
                                              <td height="170" valign="top" width=35%> 
                                                <p> 
                                                  <%treelist rs,"admin","item_edit.asp"%>

⌨️ 快捷键说明

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