-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDefault6.aspx
executable file
·398 lines (372 loc) · 20.8 KB
/
Default6.aspx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="Default6.aspx.vb" Inherits="Default6" title="未命名頁面" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<link href="StyleSheet.css" rel="stylesheet" type="text/css" />
<style type="text/css" >
.advertising
{
width:830px;
margin-top:10px;
margin-left:10px;
}
.listviewstyle
{
margin:10px;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div id="mainout">
<div class="category" style=" background-image:url(images/categorybottom.png); background-repeat:no-repeat; background-position :bottom left ;">
<div style=" background-image:url(images/categorybg.png); background-repeat:no-repeat ; background-position :top left ;">
<br />
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:DB_RentConnectionString2 %>"
SelectCommand="SELECT ca_id, layer, ca_name FROM category WHERE (ca_id like @Param1 + '__')">
<SelectParameters>
<asp:QueryStringParameter DefaultValue="0" Name="Param1"
QueryStringField="layer" />
</SelectParameters>
</asp:SqlDataSource>
<asp:ListView ID="ListView1" runat="server" DataSourceID="SqlDataSource2"
GroupItemCount="6">
<EmptyItemTemplate>
<td runat="server" />
</EmptyItemTemplate>
<ItemTemplate>
<td runat="server" style="">
<div class="listviewstyle">
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# "Default6.aspx?layer=" & Eval("ca_id") %>' Text='<%#Eval("ca_name")%>' Font-Size="80%" Font-Bold="True"></asp:HyperLink>
</div>
</td>
</ItemTemplate>
<EmptyDataTemplate>
<table runat="server" style="">
</table>
</EmptyDataTemplate>
<InsertItemTemplate>
<td runat="server" style="">
<asp:TextBox ID="ca_nameTextBox" runat="server" Text='<%# Bind("ca_name") %>' />
<br />
<asp:Button ID="InsertButton" runat="server" CommandName="Insert"
Text="Insert" />
<br />
<asp:Button ID="CancelButton" runat="server" CommandName="Cancel"
Text="Clear" />
<br />
</td>
</InsertItemTemplate>
<LayoutTemplate>
<table runat="server">
<tr runat="server">
<td runat="server">
<table ID="groupPlaceholderContainer" runat="server" border="0" style="">
<tr ID="groupPlaceholder" runat="server">
</tr>
</table>
</td>
</tr>
<tr runat="server">
<td runat="server" style="">
</td>
</tr>
</table>
</LayoutTemplate>
<EditItemTemplate>
<td runat="server" style="">
ca_name:
<asp:TextBox ID="ca_nameTextBox" runat="server" Text='<%# Bind("ca_name") %>' />
<br />
<asp:Button ID="UpdateButton" runat="server" CommandName="Update"
Text="Update" />
<br />
<asp:Button ID="CancelButton" runat="server" CommandName="Cancel"
Text="Cancel" />
<br />
</td>
</EditItemTemplate>
<GroupTemplate>
<tr ID="itemPlaceholderContainer" runat="server">
<td ID="itemPlaceholder" runat="server">
</td>
</tr>
</GroupTemplate>
<SelectedItemTemplate>
<td runat="server" style="">
ca_name:
<asp:Label ID="ca_nameLabel" runat="server" Text='<%# Eval("ca_name") %>' />
<br />
</td>
</SelectedItemTemplate>
</asp:ListView>
</div>
<br />
</div>
<div class="advertising">
<div class="advertisingbottom" style ="padding :10px;">
<br />
<asp:SqlDataSource ID="SqlDataSource4" runat="server"
ConnectionString="<%$ ConnectionStrings:DB_RentConnectionString2 %>"
SelectCommand="SELECT top 4 * FROM [commodity] WHERE whether_shelf = 0 AND com_id like @layer + '%' ORDER BY RAND()">
<SelectParameters>
<asp:QueryStringParameter DefaultValue="%" Name="layer"
QueryStringField="layer" />
</SelectParameters>
</asp:SqlDataSource>
<asp:DataList ID="DataList2" runat="server" DataSourceID="SqlDataSource4"
Font-Size="80%" RepeatDirection="Horizontal" RepeatColumns="4">
<ItemTemplate>
<div style="text-align :center ; margin:5px 8px; width:180px;">
<div style="background-image:url(images/bg_header.gif); height :1.6em; border:2px solid #000000;">
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# "Default7.aspx?com_id=" & Eval("com_id") %>' Text='<%#Eval("com_name")%>' Font-Bold ="True" title='<%# Eval("com_name") %>' ForeColor="White"></asp:HyperLink>
</div>
<div style="width :176px; color:White ; background-image:url(images/bg_grade_1.png); background-repeat :repeat-x ; background-position :bottom left ; border:2px solid #112222">
<div class="minpic" style="margin-left:25px; margin-right :25px;">
<asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl='<%# "Default7.aspx?com_id=" & Eval("com_id") %>'>
<asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval("com_pic", "~\ComPicData\{0}") %>' Height="7em" ImageAlign="Baseline" BorderStyle="Solid" BorderWidth="1px" BorderColor="Black" />
</asp:HyperLink>
</div>
<div style="width :176px; color:Black ;"><span>訂金:<%#Eval("add_money")%>元</span>|<span>租金:<%#Eval("rent")%>元</span></div>
</div>
</div>
</ItemTemplate>
</asp:DataList>
</div>
</div>
<div class="category">
<div id="search_area">
<div style="font-size :80%; margin-bottom :40px;">
關鍵字:
<div>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</div>
商品資訊:
<div>
<asp:RadioButtonList ID="RadioButtonList1" runat="server"
RepeatDirection="Horizontal" RepeatColumns="3">
<asp:ListItem Value="%">不分類</asp:ListItem>
<asp:ListItem Value="1">全新品</asp:ListItem>
<asp:ListItem Value="2">二手品</asp:ListItem>
</asp:RadioButtonList>
<asp:CheckBoxList ID="CheckBoxList1" runat="server" RepeatColumns="2"
RepeatDirection="Horizontal">
<asp:ListItem Value =" AND add_money = 0">免訂金</asp:ListItem>
<asp:ListItem Value =" AND pay = 5">虛擬貨幣</asp:ListItem>
<asp:ListItem Value =" AND (merchandise = 1 OR merchandise = 3)">可交換</asp:ListItem>
<asp:ListItem Value =" AND shipping =1">可面交</asp:ListItem>
<asp:ListItem Value =" AND continue_sign = 0">可續約</asp:ListItem>
<asp:ListItem>最新刊登</asp:ListItem>
</asp:CheckBoxList>
</div>
地區:
<div>
<asp:DropDownList ID="DropDownList1" runat="server">
<asp:ListItem Value="%">不限地區</asp:ListItem>
<asp:ListItem>台北市</asp:ListItem>
<asp:ListItem>基隆市</asp:ListItem>
<asp:ListItem>台北縣</asp:ListItem>
<asp:ListItem>宜蘭縣</asp:ListItem>
<asp:ListItem>桃園縣</asp:ListItem>
<asp:ListItem>新竹市</asp:ListItem>
<asp:ListItem>新竹縣</asp:ListItem>
<asp:ListItem>苗栗縣</asp:ListItem>
<asp:ListItem>台中市</asp:ListItem>
<asp:ListItem>台中縣</asp:ListItem>
<asp:ListItem>彰化縣</asp:ListItem>
<asp:ListItem>南投縣</asp:ListItem>
<asp:ListItem>嘉義市</asp:ListItem>
<asp:ListItem>嘉義縣</asp:ListItem>
<asp:ListItem>雲林縣</asp:ListItem>
<asp:ListItem>台南市</asp:ListItem>
<asp:ListItem>台南縣</asp:ListItem>
<asp:ListItem>高雄市</asp:ListItem>
<asp:ListItem>高雄縣</asp:ListItem>
<asp:ListItem>屏東縣</asp:ListItem>
<asp:ListItem>花蓮縣</asp:ListItem>
<asp:ListItem>台東縣</asp:ListItem>
</asp:DropDownList>
</div>
運費: <div>
<asp:DropDownList ID="DropDownList2" runat="server">
<asp:ListItem Value=" AND add_money >= 0">不限運費</asp:ListItem>
<asp:ListItem Value=" AND add_money = 0">免運費</asp:ListItem>
<asp:ListItem Value=" AND add_money <= 30">30元以下</asp:ListItem>
<asp:ListItem Value=" AND add_money <= 50">50元以下</asp:ListItem>
<asp:ListItem Value=" AND add_money <= 80">80元以下</asp:ListItem>
<asp:ListItem Value=" AND add_money <= 150">150元以下</asp:ListItem>
<asp:ListItem Value=" AND add_money <= 500">500元以下</asp:ListItem>
</asp:DropDownList>
</div>
租金:
<div>
<asp:TextBox ID="TextBox2" runat="server" Width="60px"></asp:TextBox>元~<asp:TextBox ID="TextBox3"
runat="server" Width="60px"></asp:TextBox>元
</div>
<asp:Button ID="Button1" runat="server" Text="篩選商品" />
</div>
<div style="background-image:url(images/bgbottom.png); background-repeat :no-repeat ; background-position :bottom left ; padding-left :8px; margin-left :-10px;">
<div class="publicity">
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:DB_RentConnectionString2 %>"
SelectCommand="SELECT top 5 * FROM [commodity] WHERE whether_shelf = 0 ORDER BY Rank DESC"></asp:SqlDataSource>
<asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource1"
Font-Size="80%">
<ItemTemplate>
<div style="text-align :center ; margin:5px 0; width:180px;">
<div style="background-image:url(images/bg_header.gif); height :1.6em; border:2px solid #000000;">
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# "Default7.aspx?com_id=" & Eval("com_id") %>' Text='<%#Eval("com_name")%>' Font-Bold ="True" title='<%# Eval("com_name") %>' ForeColor="White"></asp:HyperLink>
</div>
<div style="width :176px; color:White ; background-image:url(images/bg_grade_2.png); background-repeat :repeat-x ; background-position :bottom left ; border:2px solid #cc9900">
<div class="minpic" style="margin-left:25px; margin-right :25px;">
<asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl='<%# "Default7.aspx?com_id=" & Eval("com_id") %>'>
<asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval("com_pic", "~\ComPicData\{0}") %>' Height="7em" ImageAlign="Baseline" BorderStyle="Solid" BorderWidth="1px" BorderColor="Black" />
</asp:HyperLink>
</div>
<div style="width :176px; color:Black ;"><span>訂金:<%#Eval("add_money")%>元</span>|<span>租金:<%#Eval("rent")%>元</span></div>
</div>
</div>
</ItemTemplate>
</asp:DataList>
</div>
<br />
</div>
</div>
<div class="searchoutcome">
<div style="border :2px solid #000000; height: 1.7em; background-image:url(images/bg_header.gif); color:White ; padding-top:2px; width :578px; margin:0px 16px; font-weight :bold ;">搜尋結果</div>
<asp:SqlDataSource ID="SqlDataSource3" runat="server"
ConnectionString="<%$ ConnectionStrings:DB_RentConnectionString2 %>"
SelectCommand="SELECT * FROM [commodity], [member_data] WHERE commodity.re_member_id = member_data.id AND whether_shelf = 0 AND ([com_id] LIKE @Param1 + '%') AND com_name like '%' + @search + '%' AND state like @state AND area like @area AND rent >= @rent1 AND rent <= @rent2 AND com_name like '%' + @search2 + '%'">
<SelectParameters>
<asp:QueryStringParameter DefaultValue="0" Name="Param1" QueryStringField="layer" Type="String" />
<asp:SessionParameter Name="search" SessionField="search" Type="String" DefaultValue ="%" />
<asp:ControlParameter ControlID ="Textbox1" Name ="search2" PropertyName ="text" DefaultValue ="%" Type ="String" />
<asp:ControlParameter ControlID ="RadioButtonList1" Name ="state" PropertyName ="SelectedValue" Type="String" DefaultValue ="%" />
<asp:ControlParameter ControlID ="DropDownList1" Name ="area" PropertyName ="SelectedValue" Type ="String" DefaultValue ="%" />
<asp:ControlParameter ControlID="TextBox2" Name="rent1" PropertyName="Text" DefaultValue="0" Type="Int32" />
<asp:ControlParameter ControlID="TextBox3" Name="rent2" PropertyName="Text" DefaultValue="999999999" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
<asp:ListView ID="ListView2" runat="server" DataKeyNames="com_id"
DataSourceID="SqlDataSource3" GroupItemCount="2">
<EmptyItemTemplate>
<td runat="server" />
</EmptyItemTemplate>
<ItemTemplate>
<td id="Td1" runat="server" style="">
<div class="productview">
<div style="width:280px; float :left;">
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# "Default7.aspx?com_id=" & Eval("com_id") %>' Text='<%#Eval("com_name")%>' Font-Size="120%" Font-Bold ="True" title='<%# Eval("com_name") %>' ></asp:HyperLink>
<div style="width:280px"><span style="margin-left:10px;">點閱次數:<%#Eval("click_percentage")%></span></div>
<div class="minpic">
<asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl='<%# "Default7.aspx?com_id=" & Eval("com_id") %>'>
<asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval("com_pic", "~\ComPicData\{0}") %>' Height="7em" ImageAlign="Baseline" BorderStyle="Solid" BorderColor="Black" BorderWidth="1px" />
</asp:HyperLink>
</div>
<div class="productinfo">
<ul>
<li>出租者:<%#Eval("account")%></li>
<li>出租方評價:<%#Eval("evaluat")%></li>
<li>交換:<asp:Label ID="Label2" runat="server" Text='<%#Eval("merchandise")%>'></asp:Label></li>
</ul>
</div>
</div>
<div style="width:280px;"><span style="margin-left:10px;">訂金:<%#Eval("add_money")%>元</span>|<span>租金:<%#Eval("rent")%>元</span>|<span>租期:<%#Eval("days")%>天</span></div>
</div>
</td>
</ItemTemplate>
<EmptyDataTemplate>
<table runat="server" style="">
<tr>
<td>
No data was returned.</td>
</tr>
</table>
</EmptyDataTemplate>
<InsertItemTemplate>
<td runat="server" style="">
com_id:
<asp:TextBox ID="com_idTextBox" runat="server" Text='<%# Bind("com_id") %>' />
<br />
com_name:
<asp:TextBox ID="com_nameTextBox" runat="server"
Text='<%# Bind("com_name") %>' />
<br />
com_pic:
<asp:TextBox ID="com_picTextBox" runat="server" Text='<%# Bind("com_pic") %>' />
<br />
<asp:Button ID="InsertButton" runat="server" CommandName="Insert"
Text="Insert" />
<br />
<asp:Button ID="CancelButton" runat="server" CommandName="Cancel"
Text="Clear" />
<br />
</td>
</InsertItemTemplate>
<LayoutTemplate>
<table runat="server">
<tr runat="server">
<td runat="server">
<table ID="groupPlaceholderContainer" runat="server" border="0" style="">
<tr ID="groupPlaceholder" runat="server">
</tr>
</table>
</td>
</tr>
<tr runat="server">
<td runat="server" style=" text-align :center ;">
<asp:DataPager ID="DataPager1" runat="server" PageSize="12">
<Fields>
<asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True"
ShowNextPageButton="False" ShowPreviousPageButton="False" FirstPageText="第一頁" />
<asp:NumericPagerField />
<asp:NextPreviousPagerField ButtonType="Button" ShowLastPageButton="True"
ShowNextPageButton="False" ShowPreviousPageButton="False" LastPageText="最後一頁" />
</Fields>
</asp:DataPager>
</td>
</tr>
</table>
</LayoutTemplate>
<EditItemTemplate>
<td runat="server" style="">
com_id:
<asp:Label ID="com_idLabel1" runat="server" Text='<%# Eval("com_id") %>' />
<br />
com_name:
<asp:TextBox ID="com_nameTextBox" runat="server"
Text='<%# Bind("com_name") %>' />
<br />
com_pic:
<asp:TextBox ID="com_picTextBox" runat="server" Text='<%# Bind("com_pic") %>' />
<br />
<asp:Button ID="UpdateButton" runat="server" CommandName="Update"
Text="Update" />
<br />
<asp:Button ID="CancelButton" runat="server" CommandName="Cancel"
Text="Cancel" />
<br />
</td>
</EditItemTemplate>
<GroupTemplate>
<tr ID="itemPlaceholderContainer" runat="server">
<td ID="itemPlaceholder" runat="server">
</td>
</tr>
</GroupTemplate>
<SelectedItemTemplate>
<td runat="server" style="">
com_id:
<asp:Label ID="com_idLabel" runat="server" Text='<%# Eval("com_id") %>' />
<br />
com_name:
<asp:Label ID="com_nameLabel" runat="server" Text='<%# Eval("com_name") %>' />
<br />
com_pic:
<asp:Label ID="com_picLabel" runat="server" Text='<%# Eval("com_pic") %>' />
<br />
</td>
</SelectedItemTemplate>
</asp:ListView>
</div>
</div>
</div>
</asp:Content>