nextnum.asp

来自「不错的ASP整站源代码。在IIS环境下运行都没有问题」· ASP 代码 · 共 139 行

ASP
139
字号
<!--#include file="../checkuser.asp" -->
<%
 m_ver = Trim(request("ver"))
 if m_ver="cn" then 
  tmpstr_t="[中文版]"
 elseif  m_ver="en"  then 
 tmpstr_t="[英文版]"
 else
 response.write "错误访问页面,请重试" 
 response.end    
 End If%>
<!--#include file="../../include/db_conn.asp"-->
<html>
<head>
<META NAME="robots" CONTENT="none">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
 <link rel="stylesheet" href="../include/styles.css" type="text/css">
 </head>

<body bgcolor="#FFFFFF" leftMargin=0 marginwidth="0" topmargin=0>
<%
set myrs=server.CreateObject("Adodb.recordset")
intCatalogID = trim(request("cid"))
if intCatalogID <> "" then
	strSQL = "SELECT CatalogID,CatalogName FROM ys_product_catalog WHERE CatalogID<>ParentID AND ParentID=" & intCatalogID & " and version='"&m_ver&"'  ORDER BY InfoClsIndex"
else
	strSQL = "SELECT CatalogID,CatalogName FROM ys_product_catalog WHERE  version='"&m_ver&"' ORDER BY InfoClsIndex"
end if

myrs.Open strSQL,conn,1,1
if not myrs.EOF then
%>



<script language="javascript">

	function upsel(){
		var findex=document.form2.news_link_select.selectedIndex;
		if(findex < 1) return;
		var ftext=document.form2.news_link_select.options[findex].text;
		var fvalue=document.form2.news_link_select.options[findex].value;
		var qvalue=document.form2.news_link_select.options[findex-1].value;
		var qtext=document.form2.news_link_select.options[findex-1].text;
		document.form2.news_link_select.options[findex-1].text=ftext; 
		document.form2.news_link_select.options[findex-1].value=fvalue;
		document.form2.news_link_select.options[findex].text=qtext;
		document.form2.news_link_select.options[findex].value=qvalue;
		document.form2.news_link_select.selectedIndex=findex-1;
	}
		
	function downsel()	{
		var nIndex=document.form2.news_link_select.length;
		var findex=document.form2.news_link_select.selectedIndex;
		if((findex >= nIndex-1) || findex < 0) return;
		var fvalue=document.form2.news_link_select.options[findex].value;
		var ftext=document.form2.news_link_select.options[findex].text;
		var hvalue=document.form2.news_link_select.options[findex+1].value;
		var htext=document.form2.news_link_select.options[findex+1].text;
		document.form2.news_link_select.options[findex+1].text=ftext; 
		document.form2.news_link_select.options[findex+1].value=fvalue;
		document.form2.news_link_select.options[findex].text=htext;
		document.form2.news_link_select.options[findex].value=hvalue;
		document.form2.news_link_select.selectedIndex=findex+1;
	}


	function released_news_str1(){
		document.form2.button_qd.disabled=true;
		var link_str="";
		var current_link_id;
		
		for(var i=0; i<(document.form2.news_link_select.options.length); i++){
				
				current_link_id=document.form2.news_link_select.options[i].value+",";
				link_str+=current_link_id;				
			}
		//alert(link_str);
		document.form2.released_news_str.value=link_str;
		document.form2.submit();
		}
		</script>
                          <form name="form2" action="include/setup_obinfo_ok.asp" method="post" class="box">
                       <input type="hidden" name="ver" value="<%=m_ver%>">                     
                     <table width=544 align="center" > 
                       <tr bgcolor="#FFFFFF"> 
                        <td colspan="2" height=18>栏目顺序排列</td>
                      </tr>
                         <tr> 
                              <td width="3"> 
                           <td width="220"> 
                                  <select size=5 name="news_link_select" multiple style="WIDTH: 220px;HEIGHT: 150px;COLOR: navy;" language=javascript >
                                    <%do until myrs.eof%>
									<option value="<%=myrs("catalogID")%>"><%=myrs("catalogname")%></option>
                                    <%myrs.movenext
									loop
									%>
                                  </select>
                                  <input type="hidden" name="released_news_str">
                                  <input type="hidden" name="cid" value="<%=intCatalogID%>">
                           </td>
                              <td width="3"></td>
                              <td width="165" height="41" class="pc1" valign="top"> 
                                <table width="100%" border="0" cellspacing="0" cellpadding="0" >
                                  <tr align="center" valign="top"> 
                                    <td height="40"> <input type="button" name="button_3" value="↑上  移" class="input"  style="WIDTH: 70px;HEIGHT: 22px;BACKGROUND-COLOR: #ffffff" onClick="upsel();"> 
                                    </td>
                                  </tr>
                                  <tr align="center" valign="top"> 
                                    <td height="40"> <input type="button" name="button_32" value="↓下  移" class="input"  style="WIDTH: 70px;HEIGHT: 22px;BACKGROUND-COLOR: #ffffff" onClick="downsel();"> 
                                    </td>
                                  </tr>
                                  <tr align="center" valign="top"> 
                                    <td height="40"> 
                                      <input type="button" name="button_34" value="恢  复" class="input"  style="WIDTH: 70px;HEIGHT: 22px;BACKGROUND-COLOR: #ffffff" onClick="javascript:location.href='nextnum.asp?cid=<%=intCatalogID%>'"> 
                                    </td>
                                  </tr>
                                  <tr align="center" valign="top"> 
                                    <td height="40"> <input type="button" name="button_qd" value="确  定" class="input"  style="WIDTH: 70px;HEIGHT: 22px;BACKGROUND-COLOR: #ffffff" onClick="javascript:released_news_str1();"> 
                                    </td>
                                  </tr>
                                </table>
                           </td>
                       </tr>
                        </table>
                        </td>
                      </tr>

				</table>                            
                            
                          </form>
                          <%
end if
myrs.Close
set myrs=nothing
call closedb()
%>
</body>
</html>

⌨️ 快捷键说明

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