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

📄 admin_product.asp

📁 正版创力4.1SQL商业版!!!ASP版。
💻 ASP
📖 第 1 页 / 共 5 页
字号:
			response.write "<a href='Admin_Product.asp?Action=Modify&ChannelID="&SQL(1,i)&"&InfoID=" & InfoID &"' class='blue'>修改</a>"
			Select Case SQL(49,i)
			Case 1
				response.write "&nbsp;&nbsp;<a href='Admin_Property.asp?ChannelID="&SQL(1,i)&"&Action=CancelPassed&InfoID=" & InfoID & "'>取消通过</a>"
			Case 0
				response.write "&nbsp;&nbsp;<a href='Admin_Property.asp?ChannelID="&SQL(1,i)&"&Action=SetPassed&InfoID=" & InfoID & "' class='red'>通过</a>"
				response.write "&nbsp;&nbsp;<a href='Admin_NoPass.asp?ChannelID="&SQL(1,i)&"&InfoID=" & InfoID & "'>退回</a>"
			Case Else
				response.write "&nbsp;&nbsp;<a href='Admin_Property.asp?ChannelID="&SQL(1,i)&"&Action=SetPassed&InfoID=" & InfoID & "' class='red'>通过</a>"
				response.write "&nbsp;&nbsp;<a href=""Admin_InfoDel.asp?Action=DelRecyclebin&ChannelID="&SQL(1,i)&"&InfoID="&InfoID&""" onclick=""return confirm('确定要彻底删除此记录吗?本操作将不可恢复!');"">删除</a>"
			End Select
		End If
	%></td>
	</tr>
	<%Next%>
	<tr class="tdbg">
		<td colspan="2" height="30"><input name="chkAll" type="checkbox" id="chkAll" onclick="CheckAll(this.form)" value="checkbox">选中所有</td>
		<td colspan="7"><% Call InfoManegeOptionBottom("product") %></td>
	</tr>
	</form>
</table>
<%
end sub

Sub EditMain()
	Dim rsInfo,strCusTom,ShortcutMenu
	Dim sUnit,sKeyword
	strCusTom		= Split(Cl.Channel.selectSingleNode("@custom").text,"@@@")
	sUnit			= Split(strCusTom(2),"$")
	sKeyword		= Split(strCusTom(3),"$")
	if Action="Modify" then
		InfoID		= Cl.GetClng(request("InfoID"))
		if InfoID=0 then Cl.ShowErr("<li>请指定要修改的商品ID</li>")
		sql="select * from Cl_Product where InfoID=" & InfoID & ""
		Set rsInfo= Cl.Execute(sql)
		if rsInfo.bof and rsInfo.eof then
			Cl.ShowErr("<li>找不到"&Cl.ChannelItemName&"</li>")
		else
			ClassID	= rsInfo("ClassID")
			set tClass=Cl.Execute("select ClassName,RootID,ParentID,Depth,ParentPath,ClassMaster From Cl_Class where ChannelID="&ChannelID&" and ClassID=" & ClassID)
			if tClass.bof and tClass.eof then
				tClass.Close :Set tClass=Nothing
				Cl.ShowErr("<li>找不到指定的栏目</li>")
			else
				ClassName	= tClass(0) : RootID	= tClass(1)
				ParentID	= tClass(2) : Depth		= tClass(3)
				ParentPath	= tClass(4) : ClassMaster= tClass(5) 
				tClass.Close :Set tClass=Nothing
				if ParentID>0 then
					dim sqlPath,rsPath
					sqlPath="select ClassMaster From Cl_Class where ChannelID="&ChannelID&" and ClassID in (" & ParentPath & ") order by Depth"
					set rsPath=Cl.Execute(sqlPath)
					if Not rsPath.eof then
						sqlPath=rsPath.GetRows(-1)
						for i=0 to Ubound(sqlPath,2)
							ClassMaster = ClassMaster & "|" & sqlPath(0,i)
						Next
						sqlPath=Empty
					End if
					rsPath.Close:Set rsPath=Nothing
				end if
				IsClassMaster=Cl.TrueClassMaster(ClassMaster,Cl.Admin_Info(1))
				if Not IsClassMaster then
					if Not Cl.TrueChannelPurview(2,ChannelID) then
						dim sTempP,IsTruePurview
						sTempP=ParentPath & "," & ClassID
						IsTruePurview=False
						if rsInfo("Status")=1 then
							IsTruePurview = Cl.TrueArrClassPurview(1,ChannelID,sTempP)
						elseif rsInfo("Editor")=Cl.MemberName then
							IsTruePurview = True
						else
							IsTruePurview = Cl.TrueArrClassPurview(2,ChannelID,sTempP)
						end if
						if Not IsTruePurview then
							Cl.ShowErr("<li>您无权修改或查看此栏目或资料!</li>")
						end if
					end if
				end if
			end if
		end if
		ClassID			= rsInfo("ClassID")
		SpecialID		= rsInfo("SpecialID")
		Prefixion		= rsInfo("Prefixion")
		ProductName		= rsInfo("ProductName")
		ProductSn		= rsInfo("ProductSn")
		Keyword			= rsInfo("Keyword")
		Producer		= rsInfo("Producer")
		Trademark		= rsInfo("Trademark")
		ProductModel	= rsInfo("ProductModel")
		EndDate			= rsInfo("EndDate")
		NoOver			= rsInfo("NoOver")
		MarketPrice		= rsInfo("MarketPrice")
		MemberPrice		= rsInfo("MemberPrice")
		Discount		= rsInfo("Discount")
		TruePrice		= rsInfo("TruePrice")
		'TaxRate		= rsInfo("TaxRate")
		'IncludeTax		= rsInfo("IncludeTax")
		InfoPoint		= rsInfo("InfoPoint")
		StockNum		= rsInfo("StockNum")
		ProductUnit		= rsInfo("ProductUnit")
		PresentExp		= rsInfo("PresentExp")
		Intro			= rsInfo("Intro")
		Explain			= rsInfo("Explain")
		PicUrl			= rsInfo("PicUrl")
		ProductType		= rsInfo("ProductType")
		DownloadUrl		= rsInfo("DownloadUrl")
		CardPoint		= rsInfo("CardPoint")
		UploadFiles		= rsInfo("UploadFiles")
		InfoGroup		= rsInfo("InfoGroup")
		OnTop			= rsInfo("OnTop")
		Hot				= rsInfo("Hot")
		Elite			= rsInfo("Elite")
		Stars			= rsInfo("Stars")
		Hits			= rsInfo("Hits")
		BackPoint		= rsInfo("BackPoint")
		BackPointRate	= rsInfo("BackPointRate")
		BackMoney		= rsInfo("BackMoney")
		BackMoneyRate	= rsInfo("BackMoneyRate")
		UpdateTime		= rsInfo("UpdateTime")
		Status			= rsInfo("Status")
		ProjectID		= rsInfo("ProjectID")
		TemplateID		= rsInfo("TemplateID")
		CssID			= rsInfo("CssID")
		rsInfo.close:set rsInfo=Nothing
	else
		ClassID			= 0
		SpecialID		= 0
		Prefixion		= ""
		ProductName		= ""
		ProductSn		= Cl.Format_time(now(),8)
		Keyword			= sKeyword(0)
		Producer		= ""
		Trademark		= ""
		ProductModel	= ""
		EndDate			= Now() + 365
		NoOver			= True
		MarketPrice		= 0
		MemberPrice		= 0
		Discount		= 10
		TruePrice		= 0
		'TaxRate		= 1
		'IncludeTax		= True
		InfoPoint		= 0
		StockNum		= 100
		ProductUnit		= sUnit(0)
		PresentExp		= 0
		Intro	= ""
		Explain	= ""
		PicUrl	= ""
		ProductType		= 0
		DownloadUrl		= ""
		CardPoint		= 100
		UploadFiles		= ""
		InfoGroup		= "5"
		OnTop			= False
		Hot				= False
		Elite			= False
		Stars			= 3
		Hits			= 0
		BackPoint		= 0
		BackPointRate	= 0
		BackMoney		= 0
		BackMoneyRate	= 0
		UpdateTime		= Now()
		Status			= 1
		ProjectID		= 0
		TemplateID		= 0
		CssID			= 0
	end if
%>
<script language="JavaScript" type="text/javascript">
function CheckForm()
{
	if (document.myform.ClassID.value=="0")
	{
		alert("<%=Cl.ChannelItemName%>所属栏目为外部栏目或您无此栏目添加权限!");
		document.myform.ClassID.focus();
		return false;
	}
		if (document.myform.ProductName.value==""){
		alert("<%=Cl.ChannelItemName%>名称不能为空!");
		document.myform.ProductName.focus();
		return false;
	}
		if (document.myform.Keyword.value==""){
		alert("关键字不能为空!");
		document.myform.Keyword.focus();
		return false;
	}
		if (document.myform.MemberPrice.value==""){
		alert("<%=Cl.ChannelItemName%>会员零售价不能为空!");
		document.myform.MemberPrice.focus();
		return false;
	}
		if (document.myform.TruePrice.value==""){
		alert("<%=Cl.ChannelItemName%>实际零售价不能为空!");
		document.myform.TruePrice.focus();
		return false;
	}
		if (document.myform.ProductUnit.value==""){
		alert("<%=Cl.ChannelItemName%>单位不能为空!");
		document.myform.ProductUnit.focus();
		return false;
	}
	if (document.myform.Intro.value==""){
		alert("<%=Cl.ChannelItemName%>简介不能为空!");
		document.myform.Intro.focus();
		return false;
	}
	if (document.myform.ProductType[1].checked==true){
		if (document.myform.DownloadUrl.value==""){
			alert("<%=Cl.ChannelItemName%>地址不能为空!");
			document.myform.DownloadUrl.focus();
			return false;
		}
	}
	for(var i=0;i<document.myform.TempUploadFiles.length;i++){
		if (document.myform.UploadFiles.value=="") document.myform.UploadFiles.value=document.myform.TempUploadFiles.options[i].value;
		else document.myform.UploadFiles.value+="@@@"+document.myform.TempUploadFiles.options[i].value;
	}
	return true;
}
function chkProductType(n)
{
	if (n==1)
	{
		$("ShowDownloadUrl").style.display="";
		$("ShowCardPoint").style.display="none";
	}
	else if (n==2)
	{
		$("ShowDownloadUrl").style.display="none";
		$("ShowCardPoint").style.display="";
	}
	else
	{
		$("ShowDownloadUrl").style.display="none";
		$("ShowCardPoint").style.display="none";
	}
}
function IsDigit(){
	return ((event.keyCode >= 48) && (event.keyCode <= 57));
}
function regInput(obj, reg, inputStr)
{
	var docSel = document.selection.createRange()
	if (docSel.parentElement().tagName != "INPUT")    return false
	oSel = docSel.duplicate()
	oSel.text = ""
	var srcRange = obj.createTextRange()
	oSel.setEndPoint("StartToStart", srcRange)
	var str = oSel.text + inputStr + srcRange.text.substr(oSel.text.length)
	return reg.test(str)
}
function getprice(sPrice){
	if(sPrice=="" || isNaN(sPrice)){
	sPrice=0;}
	else{
	document.myform.TruePrice.value=Math.round(sPrice * Math.abs(document.myform.Discount.value/10)*100)/100;
	}
}
</script>
<script src="../inc/Js/selectdate.js" type="text/javascript"></script>
<form action="Admin_Product.asp" method="post" name="myform" target="_self" id="myform" onSubmit="return CheckForm();">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="border">
	<tr>
	  <td height="22" align="center" class="title" colspan="4"><b><%if Action="Modify" then%>修改<%else%>添加<%end if%><%=Cl.ChannelItemName%></b></td>
	</tr>
	<tr class="tdbg"> 
		<td width="100" align="right"><b>所属栏目:</b></td>
		<td colspan="3">
			<select name="ClassID" style="width:200px;">
			<option value="0" selected="selected">请选择<%=Cl.ChannelItemName%>栏目</option>
				<%=ShowClass_Option(ChannelID,ClassID,0,1)%>
			</select>&nbsp;&nbsp;
			<font color="#FF0000"><b>注意:</b></font><font color="#0000FF">不能指定为外部栏目</font>
			&nbsp;&nbsp;
			<%if Action="Add" then%>
			<input type="checkbox" id="IsShowSpecial" onclick="chkShowSpecial();" /> 
			指定专题
			<%end if%>
		</td>
	</tr>
	<tr class="tdbg" <%If Action="Add" Then Response.write " style='display:none;'"%> id="ShowSpecial">
		<td width="100" align="right"><strong>所属专题:</strong></td>

⌨️ 快捷键说明

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