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

📄 shop.aspx

📁 ASP.NET构建的笑傲江湖社区(C#,全源码提供)
💻 ASPX
字号:
<%@ Page language="c#" Codebehind="shop.aspx.cs" AutoEventWireup="false" Inherits="xajh.shop" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
	<head>
		<title>江湖商店</title>
		<meta content="Microsoft Visual Studio 7.0" name="GENERATOR">
		<meta content="C#" name="CODE_LANGUAGE">
		<meta content="JavaScript" name="vs_defaultClientScript">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
		<link href="css/xajh.css" type="text/css" rel="stylesheet">
		<script language="javascript" type="text/javascript">
		function buy(v)
		{
			if (confirm("你确定要购买此物品吗?"))
			{
				document.shop.buyid.value = v;
				document.shop.buynum.value = document.getElementById("dl_" + v).value;
				document.shop.byts_buy.click();
			}
		}
		function checkdis(v)
		{
			if (v == "-1")
			{
				return "..";
			}
			else
			{
				return v;
			}
		}
		function showinfo(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19)
		{
			document.writeln ("『要求』等级:<font class=\"byts\">" + checkdis(v1) + "</font><font style=\"position: relative; top: 5\">~</font><font class=\"byts\">" + checkdis(v2) + "</font>");
			document.writeln ("战级:<font class=\"byts\">" + checkdis(v3) + "</font><font style=\"position: relative; top: 5\">~</font><font class=\"byts\">" + checkdis(v4) + "</font>");
			document.writeln ("会员:<font class=\"byts\">" + checkdis(v5) + "</font><font style=\"position: relative; top: 5\">~</font><font class=\"byts\">" + checkdis(v6) + "</font>");
			document.write ("性别:<font class=\"byts\">");
			if (v7 == "boy")
			{
				document.write ("男");
			}
			else if (v7 == "girl")
			{
				document.write ("女");
			}
			else
			{
				document.write ("无要求");
			}
			document.write ("</font><br />");
			if (v8 != "")
			{
				document.write ("『附加要求』<font class=\"byts\">" + v8 + "</font><br />");
			}
/////////////////////////////////////////////////
			document.write ("『结果』");
			if (v9 != "(无)")
			{
				document.write (v9 + ":<font class=\"byts\">" + v10 + "</font><font style=\"position: relative; top: 5\">~</font><font class=\"byts\">" + v11 + "</font> ");
			}
			if (v12 != "(无)")
			{
				document.write (v12 + ":<font class=\"byts\">" + v13 + "</font><font style=\"position: relative; top: 5\">~</font><font class=\"byts\">" + v14 + "</font> ");
			}
			if (v15 != "(无)")
			{
				document.write (v15 + ":<font class=\"byts\">" + v16 + "</font><font style=\"position: relative; top: 5\">~</font><font class=\"byts\">" + v17 + "</font> ");
			}
			document.write ("<br />『针对』自己:<font class=\"byts\">");
			if (v18 == "True" || v18 == "true")
			{
				document.write ("允许");
			}
			else
			{
				document.write ("禁止");
			}
			document.write ("</font> 别人:<font class=\"byts\">");
			if (v19 == "True" || v19 == "true")
			{
				document.write ("允许");
			}
			else
			{
				document.write ("禁止");
			}
			document.write ("</font>");
		}
		</script>
	</head>
	<body id="iebody" runat="server">
		<form id="shop" method="post" runat="server">
			<div align="center"><asp:label id="showtitle" runat="server" font-size="11pt" font-bold="True">江湖商店</asp:label><br>
				[<a href="javascript:window.close()">关闭窗口</a>][<a href="javascript:location.reload()">刷新页面</a>]
				<hr color="#ffff00" size="1">
				<input id="buyid" type="hidden" runat="server"> <input id="buynum" type="hidden" runat="server">
				<asp:datagrid id="shopview" runat="server" width="610px" autogeneratecolumns="False" borderwidth="1px" bordercolor="#ffffff">
					<headerstyle cssclass="table_head"></headerstyle>
					<columns>
						<asp:templatecolumn headertext="名 称">
							<headerstyle horizontalalign="Center" width="75px"></headerstyle>
							<itemstyle cssclass="table_body1" horizontalalign="Center" width="75px"></itemstyle>
							<itemtemplate>
								<%# ((System.Data.DataRow) Container.DataItem)["名称"] %>
							</itemtemplate>
						</asp:templatecolumn>
						<asp:templatecolumn headertext="单 价">
							<headerstyle horizontalalign="Center" width="55px"></headerstyle>
							<itemstyle cssclass="table_body2" horizontalalign="Center" width="55px"></itemstyle>
							<itemtemplate>
								<%# ((System.Data.DataRow) Container.DataItem)["价格"] %>
							</itemtemplate>
						</asp:templatecolumn>
						<asp:templatecolumn headertext="说 明">
							<headerstyle horizontalalign="Center" width="390px"></headerstyle>
							<itemstyle cssclass="table_body1" width="390px"></itemstyle>
							<itemtemplate>
								<script language="javascript" type="text/javascript">
showinfo(
"<%# ((System.Data.DataRow) Container.DataItem)["等级最小"] %>",//1
"<%# ((System.Data.DataRow) Container.DataItem)["等级最大"] %>",//2
"<%# ((System.Data.DataRow) Container.DataItem)["战级最小"] %>",//3
"<%# ((System.Data.DataRow) Container.DataItem)["战级最大"] %>",//4
"<%# ((System.Data.DataRow) Container.DataItem)["会员最小"] %>",//5
"<%# ((System.Data.DataRow) Container.DataItem)["会员最大"] %>",//6
"<%# ((System.Data.DataRow) Container.DataItem)["性别限制"] %>",//7
"<%# ((System.Data.DataRow) Container.DataItem)["其他限制"] %>",//8
"<%# ((System.Data.DataRow) Container.DataItem)["字段名称1"] %>",//9
"<%# ((System.Data.DataRow) Container.DataItem)["数值开始1"] %>",//10
"<%# ((System.Data.DataRow) Container.DataItem)["数值结束1"] %>",//11
"<%# ((System.Data.DataRow) Container.DataItem)["字段名称2"] %>",//12
"<%# ((System.Data.DataRow) Container.DataItem)["数值开始2"] %>",//13
"<%# ((System.Data.DataRow) Container.DataItem)["数值结束2"] %>",//14
"<%# ((System.Data.DataRow) Container.DataItem)["字段名称3"] %>",//15
"<%# ((System.Data.DataRow) Container.DataItem)["数值开始3"] %>",//16
"<%# ((System.Data.DataRow) Container.DataItem)["数值结束3"] %>",//17
"<%# ((System.Data.DataRow) Container.DataItem)["针对自己"] %>",//18
"<%# ((System.Data.DataRow) Container.DataItem)["针对别人"] %>"//19
);</script>
							</itemtemplate>
						</asp:templatecolumn>
						<asp:templatecolumn headertext="数 量">
							<headerstyle horizontalalign="Center" width="55px"></headerstyle>
							<itemstyle cssclass="table_body2" horizontalalign="Center" width="55px"></itemstyle>
							<itemtemplate>
								<select name='dl_<%# ((System.Data.DataRow) Container.DataItem)["id"] %>'>
									<option value="1">1</option>
									<option value="2">2</option>
									<option value="3">3</option>
									<option value="4">4</option>
									<option value="5">5</option>
									<option value="6">6</option>
									<option value="7">7</option>
									<option value="8">8</option>
									<option value="9">9</option>
									<option value="10">10</option>
									<option value="20">20</option>
									<option value="30">30</option>
									<option value="40">40</option>
									<option value="50">50</option>
									<option value="60">60</option>
									<option value="70">70</option>
									<option value="80">80</option>
									<option value="90">90</option>
									<option value="100">100</option>
								</select>
							</itemtemplate>
						</asp:templatecolumn>
						<asp:templatecolumn headertext="操作">
							<headerstyle horizontalalign="Center" width="35px"></headerstyle>
							<itemstyle cssclass="table_body1" horizontalalign="Center" width="35px"></itemstyle>
							<itemtemplate>
								<font style="CURSOR:hand;text-decoration:underline" onclick='buy(<%# ((System.Data.DataRow) Container.DataItem)["id"] %>)'>
									购买</font>
							</itemtemplate>
						</asp:templatecolumn>
					</columns>
				</asp:datagrid>
				<asp:button id="byts_buy" runat="server" width="0px" text="" height="0px"></asp:button><br>
				<br>
				<asp:label id="showmsg" runat="server"></asp:label>
				<br>
				<asp:label id="byts_copyright" runat="server"></asp:label></div>
		</form>
	</body>
</html>

⌨️ 快捷键说明

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