📄 viewcart.aspx
字号:
<%@ Page Explicit="True" Language="VB" Debug="True" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.sqlclient" %>
<!--#include file="config.aspx" -->
<!--#include file="scrollerdata.aspx" -->
<!--#include file="man_menu.aspx" -->
<!--#include file="checklogin.aspx" -->
<Script Runat="Server">
Sub Page_Load( s As Object, e As EventArgs )
call logincheck
call checkstatus
call dbcon
call fillmanu
call scrollphone
if session("useriD")="" then
btnlogin.text="login"
end if
If Not isPostBack Then
if session("useriD")="" then
btnlogin.text="login"
end if
call bindcart
End If
End Sub
sub logincheck
if session("userID")="" or session("cartison")="" or session.sessionID<>request.QueryString("transID") or session("seccode")<>request.QueryString("seccode") then
session("invalidreq")="yes"
response.redirect("requesterror.aspx")
end if
end sub
sub bindcart
call dbcon
BCmd = New sqlCommand("Select phoneId,price,qty,totalamount,man_name from temp_cart,manufacturer where manufacturer.man_id=temp_cart.man_id and userid='" & session("userID") & "' and transid= '" & session.SessionID & "' and secCode='" & session("secCode") & "'",bcon)
Bcon.Open()
cartlist.DataSource = BCmd.ExecuteReader()
cartlist.DataBind()
BCon.Close()
call totaldisp
end sub
sub removeItem(s As Object, e As DataListCommandEventArgs)
dim phoneID as string
phoneId= e.commandargument
call dbcon
mcmd=new sqlcommand("delete from temp_cart where phoneID='" & phoneId & "' and transID='" & session.SessionID & "' and secCode='" & session("seccode") & "' and userid='" & session("userID") & "'",bcon)
bcon.open
mcmd.executenonquery
bcon.close
call bindcart
end sub
sub totaldisp
call dbcon
dim nodata as boolean
mcmd= new sqlcommand("select phoneID from temp_cart where transid='" & session.SessionID & " ' and secCode='" & session("secCode") & " ' and userID='" & session("userID") & "'",bcon)
bcon.open
dr=mcmd.executereader
if dr.hasrows=true then
nodata=true
else
nodata=false
end if
bcon.close
if nodata=true then
tcmd=new sqlcommand("select count(phoneID) as totITems,sum(totalamount) as totCost from temp_cart where transid='" & session.SessionID & " ' and secCode='" & session("secCode") & " ' and userID='" & session("userID") & "'",bcon)
bcon.open
objreader=tcmd.executereader
if objreader.hasrows=true then
objreader.read
totItems=objreader("totItems")
totCOst=objreader("totcost")
else
totItems=0
totCost=0.00
end if
bcon.close
end if
end sub
sub check_out(sender As Object, e As System.Web.UI.ImageClickEventArgs)
call dbcon
pcmd =new sqlcommand("select phoneID from temp_cart where transID='" & session.SessionID & "' and secCode='" & request.QueryString("secCode") &"'and userID='"& session("userID") &"'",bcon)
bcon.open
cdr=pcmd.executereader
if cdr.hasrows=true then
response.Redirect("checkout.aspx?transID=" &request.QueryString("transID") & "&secCode=" &cstr(session("secCode")) & "&userID=" &session("userID"))
lblmessage.visible=false
else
lblmessage.text="you have no items in your cart"
lblmessage.visible=true
end if
bcon.close
end sub
public nodata as boolean
public totcost as decimal=0.00
public totitems as integer=0
</Script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="icon"
type="image/png"
href="favicon.ico">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>GSMLanka - your online mobile shop,discussion forum and support for mobile users</title>
<link href="stylesheet1.css" rel="stylesheet1" type="text/css" />
<SCRIPT language=JavaScript
src="javascript.js"></SCRIPT>
<style type="text/css">
<!--
.borderTable {padding: 0px 0px 0px 0px;
border: 1px solid #cccccc;
}
.borderTable {padding: 0px 0px 0px 0px;
border: 1px solid #CCCCCC;
}
-->
</style>
<link href="stylesheet1.css" rel="stylesheet1" type="text/css" />
<style type="text/css">
<!--
.style1 {color: #FFFFFF}
.style3 {font-weight: bold}
-->
</style>
<link href="stylesheet1.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style4 {COLOR: #336699; FONT-FAMILY: Arial, Helvetica, sans-serif; font-size: 10pt;}
.style2 {TEXT-TRANSFORM: capitalize; COLOR: #336699; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none; font-size: 11px;}
-->
</style>
</head>
<body><form runat="server">
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="800" height="32" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="307" height="4"></td>
<td width="493"></td>
</tr>
<tr>
<td height="28" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" background="imagenew/up_serch_ban.jpg">
<!--DWLayoutTable-->
<tr>
<td width="153" height="28"> </td>
<td width="150" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="157" height="28"><font color="#336699">
<asp:TextBox ID="txtSearch" Columns="6" width="104px" runat="server" TextMode="SingleLine" />
<asp:Button ID="btnSearch" Text="Go" Width="32" runat="server" />
</font></td>
</tr>
</table></td>
<td width="4"> </td>
</tr>
</table></td>
<td><table width="100%" height="28" border="0" align="center" cellpadding="0" cellspacing="0" background="imagenew/up_ban.jpg" bgcolor="#FFCC00">
<!--DWLayoutTable-->
<tr>
<td width="52" height="28"
align="center" valign="middle" nowrap="nowrap" class="navtopdark1"
onclick="jump(this)" onMouseOver="colorOnTop(this)" onMouseOut="colorOffTop(this)"><a class="toplink"
href="index.aspx"><span class="style1">Home</span></a></td>
<td width="55"
align="center" valign="middle" nowrap="nowrap" class="navtopdark1"
onclick="jump(this)" onMouseOver="colorOnTop(this)" onMouseOut="colorOffTop(this)"><a class="toplink"
href="signup.aspx"><span class="style1">Register</span></a></td>
<td width="58"
align="center" valign="middle" nowrap="nowrap" class="navtopdark1"
onclick="jump(this)" onMouseOver="colorOnTop(this)" onMouseOut="colorOffTop(this)"><a class="toplink"
href="forum.aspx"><span class="style1">Forums</span></a></td>
<td width="72"
align="center" valign="middle" nowrap="nowrap" class="navtopdark1"
onclick="jump(this)" onMouseOver="colorOnTop(this)" onMouseOut="colorOffTop(this)"><a class="toplink"
href="orderstatus.aspx"><span class="style1">Track Order </span></a></td>
<td width="66"
align="center" valign="middle" nowrap="nowrap" class="navtopdark1"
onclick="jump(this)" onMouseOver="colorOnTop(this)" onMouseOut="colorOffTop(this)"><a class="toplink"
href="multimedia.aspx">Multimedia</a></td>
<td width="42"
align="center" valign="middle" nowrap="nowrap" class="navtopdark1"
onclick="jump(this)" onMouseOver="colorOnTop(this)" onMouseOut="colorOffTop(this)"><a class="toplink"
href="faq.aspx"><span class="style1">Faq</span></a></td>
<td width="50"
align="center" valign="middle" nowrap="nowrap" class="navtopdark1"
onclick="jump(this)" onMouseOver="colorOnTop(this)" onMouseOut="colorOffTop(this)"><a class="toplink"
href="about.aspx"><span class="style1">About</span></a></td>
<td width="80"
align="center" valign="middle" nowrap="nowrap" class="navtopdark1"
onclick="jump(this)" onMouseOver="colorOnTop(this)" onMouseOut="colorOffTop(this)"><a class="toplink"
href="contact.aspx"><span class="style1">Contact Us </span></a></td>
<td width="18"> </td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<table width="799" border="0" align="center" cellpadding="0" cellspacing="0" class="border4">
<!--DWLayoutTable-->
<tr>
<td width="7" height="7"></td>
<td width="783"></td>
<td width="7"></td>
</tr>
<tr>
<td height="134"></td>
<td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" background="imagenew/main_ban.jpg">
<!--DWLayoutTable-->
<tr>
<td width="783" height="134" valign="top"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="783" height="134" title="Banner">
<param name="movie" value="Flash Banner/banner.swf">
<param name="quality" value="high">
<embed src="Flash Banner/banner.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="783" height="134"></embed>
</object></td>
</tr>
</table></td>
<td></td>
</tr>
<tr>
<td height="8"></td>
<td></td>
<td></td>
</tr>
</table>
<table width="799" border="0" align="center" cellpadding="0" cellspacing="0" class="border4">
<!--DWLayoutTable-->
<tr>
<td width="7" height="18"></td>
<td width="783" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="783" height="18"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="f3f3f3">
<!--DWLayoutTable-->
<tr>
<td width="203" height="24" valign="middle">You are logged in as
<asp:Label ID="lblusertext" runat="server" Text='Guest' Font-Bold="true" /></td>
<td width="203"> </td>
<td width="377" align="right" valign="middle"><span class="style3">
<asp:LinkButton ID="btnViewprof" Text="View Profile" runat="server" />
<asp:LinkButton runat="server" id="showcart" OnClick="viewthecart" />
<asp:linkButton ID="btnlogin" onclick="sign" runat="server" />
</span></td>
</tr>
</table></td>
</tr>
</table></td>
<td width="7"></td>
</tr>
<tr>
<td height="9"></td>
<td></td>
<td></td>
</tr>
</table>
<table width="799" border="0" align="center" cellpadding="0" cellspacing="0" class="border4">
<!--DWLayoutTable-->
<tr>
<td width="7" height="430"> </td>
<td width="783" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="108" height="432" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -