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

📄 spec.asp

📁 蓝芒3.0A最新所有功能完整破解版
💻 ASP
字号:
<% ModuleCode="M0640" %>
<!--#include file="../../Include/Reference.asp"-->
<%
Call PrintPageHead
%>
<!--#include file="../../Include/connect.asp"-->
<script Language="JavaScript">
<!--
function CheckAll()
{  
	//检查非空
	if (!CheckEmpty(addform.SpecCode, "特殊业务编号"))			return false;
	if (!CheckInteger(addform.SpecCode, "特殊业务编号"))			return false; 
	if (!CheckEmpty(addform.SpecName, "特殊业务名称"))			return false;   
	if (!CheckEmpty(addform.TypeCode, "类型"))			return false;   
	if (!CheckEmpty(addform.SPChange, "改变大小"))			return false;   
	if (!CheckInteger(addform.SPChange, "改变大小"))			return false;   
	//全部通过
	submitonce(addform);
	return true;
}
-->
</script>

<script language="javascript">
function gotourl(type) 
{
 if(type==1)
 {
   document.addform.action= "Spec.asp#1";
   document.addform.submit();
 }
 }
</script>

<%
strActionName="SpecSQL.asp"
strFileName="Spec.asp"
strPriceFileName="SpecPrice.asp"

strAct=request("act")
if strAct="" then
	strAct="1"
end if

SpecCode=request("SpecCode")

ProdType=Request("ProdType")
if ProdType="" then
	ProdType="2"
end if

'response.write "strAct:"&strAct&";SpecCode:"&SpecCode&";ProdType:"&ProdType
strSQL="Select * from T_DNS_ProdType where TypeCode<>'1'"
Set Rs= Server.CreateObject("ADODB.Recordset")
Rs.open strSQL,Cn,1,1
If Rs.eof then
%>
	<br><br><br><br><p align="center" class="titletext">目前还没有产品类型,请先<a href="ProductType.asp" class="a2">添加产品类型</a>
<%
else

	if ProdType="" then
		ProdType=Rs("TypeCode")
	end if
	
	while not Rs.eof 
		if ProdType=Rs("TypeCode") then
			Response.Write "[<b>" & Rs("TypeName") & "</b>]&nbsp;"
			ProdTypeName=Rs("TypeName")
		else
			Response.Write "[<a href='Spec.asp?ProdType=" & Rs("TypeCode") & "' class='a2'>" & Rs("TypeName") & "</a>]&nbsp;"
		end if
		Rs.movenext
	wend
	Rs.Close
	
	strSQL="Select * from T_DNS_SpecInfo where TypeCode='" & ProdType & "'"
	Rs.open strSQL,Cn,1,1
	
	If Rs.Eof Then
		%>
		<br><br><br><br><p align="center" class="titletext">目前还没有该产品类型特殊业务!</p>
		<%
	else
	
	%>
	<br><br>   
	<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
	  <tr> 
	    <td height="26" class="titletext"><font color="<%=Opt_Font_TitleColor%>"><strong><%=ProdTypeName%>特殊业务</strong></fong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	    <a href="<%=strFileName%>?act=1&ProdType=<%=ProdType%>&SpecCode=<%=Rs("SpecCode")%>#1" class="a2">添加<%=ProdTypeName%>特殊业务</a></td>
	  </tr>
	  <tr> 
	    <td>
	       <table border="0" cellpadding="3" cellspacing="1" bgcolor="<%=Opt_Table_BGColor%>" width="100%">
	        <tr bgcolor="<%=Opt_TR_BGColor%>" height="24"> 
	          <td>编号</td>
	          <td>名称</td>
	          <td>操作情况</td>
	          <td>价格</td>
	          <td>修改</td>
	          <td>删除</td>
	        </tr>
	<%
		i=0
		Do While Not Rs.Eof
		if i mod 2 =0 Then %>
	     <tr bgcolor="<%=Opt_TD_BGColor1%>" height="20">
	     <% else %>
	     <tr bgcolor="<%=Opt_TD_BGColor2%>" height="20">
	     <% end if %>
	            <td><font color="<%=Opt_Font_IndexColor%>"><%=Rs("SpecCode")%></font></td>
	            <td><%=Rs("SpecName")%></td>
	            </td>
	            <td>
	        	<%
	        	if Rs("OperType")="1" then
	        		response.write "类型升级:&nbsp;"
	        	else
	        		response.write "改变大小:&nbsp;"
	        	end if
	        	%>
	        	<%
	        	if Rs("OperType")="1" then
	        		strBPName1=""
	        		strBPName2=""
	        		if Rs("BPCode1")<>"" then
						strSQL="Select BPName from T_DNS_ProdBasicPower where BPCode='"& Rs("BPCode1")&"'"
						Set Rs1= Server.CreateObject("ADODB.Recordset")
						Rs1.open strSQL,Cn
						if  not Rs1.eof then
	        				strBPName1=rs1("BPName")
	        			end if
						Rs1.Close
						Set Rs1=Nothing
					end if
	        		if Rs("BPCode2")<>"" then
						strSQL="Select BPName from T_DNS_ProdBasicPower where BPCode='"& Rs("BPCode2")&"'"
						Set Rs1= Server.CreateObject("ADODB.Recordset")
						Rs1.open strSQL,Cn
						if  not Rs1.eof then
	        				strBPName2=rs1("BPName")
	        			end if
						Rs1.Close
						Set Rs1=Nothing
					end if
					response.write strBPName1&"&nbsp;->&nbsp;"&strBPName2
	        	else
	        		response.write rs("SPChange")&"&nbsp;M"
	        	end if
	        	%>
				</td>
	            <td>
				<a href="<%=strPriceFileName%>?SpecCode=<%=Rs("SpecCode")%>" class="a2">查看</a>&nbsp;
	            </td>
	            <td>
	            <a href="<%=strFileName%>?act=2&ProdType=<%=ProdType%>&SpecCode=<%=Rs("SpecCode")%>#1" class="a2">修改</a>&nbsp;	            
				<%if rs("IfUse")="N" then%>
					<a href="<%=strActionName%>?act=4&ProdType=<%=ProdType%>&SpecCode=<%=Rs("SpecCode")%>" class="a2">启用</a>
				<%else%>
					<a href="<%=strActionName%>?act=5&ProdType=<%=ProdType%>&SpecCode=<%=Rs("SpecCode")%>" class="a2">禁用</a>
				<%end if%>
	            </td>
	            <td>
				<a href="<%=strActionName%>?act=3&ProdType=<%=ProdType%>&SpecCode=<%=Rs("SpecCode")%>" class="a2">删除</a>&nbsp;
	            </td>
	        </tr>
	        <%
			i=i+1
			Rs.MoveNext
		Loop
	%>
	      </table>
	    </table>
	<%
	end if
	Rs.Close
	%>
	<table>
	  <tr> 
	    <td height="40">&nbsp;<a name="1"></a></td>
	  </tr>
	  <tr> 
	    <td height="26" bgcolor="#FFFFFF" class="titletext"><font color="<%=Opt_Font_TitleColor%>">
	    <strong>
	    <%
	    if strAct="1" then
	    	response.write "添加"
	    else
	    	response.write "修改"
	    end if
	    %>特殊业务
	    </strong></font></td>
	  </tr>
	  <tr>
		<%
		if strACT="2" then
			strSQL="Select * from T_DNS_SpecInfo where SpecCode='"&SpecCode&"'"
			Set Rs2= Server.CreateObject("ADODB.Recordset")
			Rs2.open strSQL,Cn
		end if
	    strSelect1=""
	    strSelect2=""
	    strOperType="1"
	    strSPChange=""
	    strBPCode1=""
	    strBPCode2=""
	    strSpecCode=ProdType
	    strSpecName=""
	    if len(request("OperType"))>0 then
	    	strSpecCode=request("SpecCode")
	    	strSpecName=request("SpecName")
	    	if request("OperType")="1" then
	    		strSelect1="selected"
	    	else
	    		strSelect2="selected"
	    		strOperType="2"
	    	end if
	    else
	    	if strACT="1" then '添加
	    		strSelect1="selected"
	    		if (ProdType="3") then
	    			strSelect2="selected"
	    			strOperType="2"
	    		end if
	    	else '修改
	    		if rs2("OperType")="1" then
	    			strSelect1="selected"
					strBPCode1=rs2("BPCode1")
					strBPCode2=rs2("BPCode2")
	    		else
	    			strSelect2="selected"
	    			strOperType="2"
					strSPChange=rs2("SPChange")

	    		end if
	    	end if
	    end if
	    %>
	    <td><table width="500" border="0" cellpadding="3" cellspacing="1" bgcolor="<%=Opt_Table_BGColor%>">
	        <form name="addform" method="post" action="<%=strActionName%>?act=<%=strAct%>&ProdType=<%=ProdType%>" onSubmit="return(CheckAll());">
	          <input type="hidden" name="act" value="<%=strAct%>">
	          <tr height="24">
	            <td width="100" bgcolor="<%=Opt_TR_BGColor%>">产品类型</td>
	            <td width="400" bgcolor="<%=Opt_TD_BGColor2%>">
	            <select name="TypeCode" class="input">
				<%
				strSQL="Select * from T_DNS_ProdType where TypeCode='"&ProdType&"'"
				Set Rs1= Server.CreateObject("ADODB.Recordset")
				Rs1.open strSQL,Cn
				while not Rs1.eof
				%>
					<option value="<%=Rs1("TypeCode")%>"
					<% if Rs1("TypeCode")=ProdType then
						Response.Write "Selected"
					   end if
					%>
					><%=Rs1("TypeName")%></option>
				<%
					Rs1.movenext
				wend
				Rs1.Close
				Set Rs1=Nothing
				%>
	            </select>
	           </td>
	          </tr>
	          <tr height="24">
	            <td  bgcolor="<%=Opt_TR_BGColor%>">特殊业务编号</td>
	            <td  bgcolor="<%=Opt_TD_BGColor2%>">
	            <%if strAct="1" then%>
	            	<input name="SpecCode" type="text" class="input"  size="5" maxlength="5" value="<%=strSpecCode%>">
	            	* 请参考上面的代码,请勿重复
	            <%else%>
	            	<input name="SpecCode" type="hidden"  value="<%=SpecCode%>">
	            	&nbsp;<font color=red><b><%=SpecCode%></b></font>
	            <%end if%>
	            </td>
	          </tr>
	          
	          <tr height="24">
	            <td  bgcolor="<%=Opt_TR_BGColor%>">特殊业务名称</td>
	            <td  bgcolor="<%=Opt_TD_BGColor2%>">
	            <%if strACT="1" then%>
	            <input name="SpecName" type="text" class="input" size="20" maxlength="50" value="<%=strSpecName%>">
	            <%else%>
	            <input name="SpecName" type="text" class="input" size="20" maxlength="50" value="<%=rs2("SpecName")%>">
	            <%end if%>
	            </td>
	          </tr>
	          <tr height="24">
	            <td  bgcolor="<%=Opt_TR_BGColor%>">操作情况</td>
	            <td  bgcolor="<%=Opt_TD_BGColor2%>">

	            <select name="OperType"  class="input" onChange="gotourl(1)">
					<%if ProdType="2" then%>
						<option value="1" <%=strSelect1%> >类型升级</option>					
					<%end if%>
					<option value="2" <%=strSelect2%> >改变大小</option>
				</select>&nbsp;:&nbsp;
				<%if strOperType="1" then%>
					<%if ProdType="2" then%>
						<input name="SPChange" type="hidden" value="1">
						<select name="BPCode1" class="input">
						<%
						strSQL="Select * from T_DNS_ProdBasicPower where IfUse='Y' and TypeCode='2'"
						Set Rs1= Server.CreateObject("ADODB.Recordset")
						Rs1.open strSQL,Cn
						while not Rs1.eof
						%>
							<option value="<%=Rs1("BPCode")%>"
							<% if Rs1("BPCode")=strBPCode1 then
								Response.Write "Selected"
							   end if
							%>
							><%=Rs1("BPName")%></option>
						<%
							Rs1.movenext
						wend
						Rs1.Close
						Set Rs1=Nothing
						%>
						</select>
						&nbsp;->&nbsp;
						<select name="BPCode2" class="input">
						<%
						strSQL="Select * from T_DNS_ProdBasicPower where IfUse='Y' and TypeCode='2'"
						Set Rs1= Server.CreateObject("ADODB.Recordset")
						Rs1.open strSQL,Cn
						while not Rs1.eof
						%>
							<option value="<%=Rs1("BPCode")%>"
							<% if Rs1("BPCode")=strBPCode2 then
								Response.Write "Selected"
							   end if
							%>
							><%=Rs1("BPName")%></option>
						<%
							Rs1.movenext
						wend
						Rs1.Close
						'Set Rs1=Nothing
						%>
						</select>
					<%end if%>
				<%else%>
					<input name="SPChange" type="text" class="input" size="8" maxlength="8" value="<%=strSPChange%>">&nbsp;M
				<%end if%>
	            </td>
	          </tr>

	          <tr height="26">
	          <td bgcolor="<%=Opt_TD_BGColor2%>" colspan="2" align="center">
				<%if strACT="1" then%>
	            	<input type="submit" class="button" value=" 添加 ">
				<%else%>
					<input type="submit" class="button" value=" 修改 ">
				<%end if%>
	            <input type="reset" class="button" value=" 重写 ">
	          </td>
	        </tr>
	        </form>
	      </table></td>
	  </tr>
	</table>

<%
end if

Cn.Close
Set Rs=Nothing
Set Cn=Nothing

Call PrintPageBottom
%>

⌨️ 快捷键说明

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