-
Notifications
You must be signed in to change notification settings - Fork 0
/
NewGames.aspx
174 lines (134 loc) · 7.97 KB
/
NewGames.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
<%@ Page MasterPageFile="~/GameAddict.Master" Language="C#" AutoEventWireup="true" CodeFile="NewGames.aspx.cs" Inherits="NewGames" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<asp:Content ID="HomeContentHead" ContentPlaceHolderID="GameAddictHead" runat="server">
<style>
.buttons-div{
display:block;
margin: 100px 10px 10px 0px;
}
.my-button{
float: right;
display: inline-block;
padding: 5px;
background-color: #1a1a1a;
border-radius: 4px;
margin-left: 8px;
border: none;
}
.pad-more{
padding: 10px;
}
.my-button a{
text-decoration: none;
}
.favorites:hover{
cursor: pointer;
color: #c19506;
}
.details{
font-size: 14px;
}
.attr{
display: inline-block;
margin: 2px;
margin-bottom: 10px;
}
.value{
display: inline-block;
width: 10%;
margin-bottom: 10px;
}
</style>
<script>
$(document).ready(function () {
$(".nav-ul li").each(function () {
$(this).removeClass("active first-active");
});
$('#newgames').addClass("active");
});
</script>
<script>
function Add_To_Wishlist(id) {
alert(id);
}
function GetPlatform() {
alert("In");
}
</script>
</asp:Content>
<asp:Content ID="HomeContentBody" ContentPlaceHolderID="GameAddictBody" runat="server">
<div runat="server" ID="testDiv"></div>
<div id="content">
<div class="block">
<div class="block-bot">
<div class="head">
<div class="filter" style="padding:10px;" >
<h3 >All Games</h3>
<div class="cl"> </div>
</div>
</div>
<div class="row-articles articles">
<div class="cl"> </div>
<asp:SqlDataSource ID="SqlDataSourceAllGames" runat="server" ConnectionString="<%$ ConnectionStrings:GameAddictConnectionString %>" SelectCommand="SELECT GameID, Name, Details, Image, DateAdded, ReleasedDate, Rating, Review, isActive FROM Game WHERE (isActive = 1) AND (ReleasedDate <= GETDATE()) ORDER BY ReleasedDate DESC"></asp:SqlDataSource>
<asp:Repeater ID="all_games" runat="server" DataSourceID="SqlDataSourceAllGames" OnItemCommand="all_games_ItemCommand">
<ItemTemplate>
<asp:Literal runat="server" ID="GameID" Visible="false" Text='<%# id = (int)Eval("GameID") %>'></asp:Literal>
<asp:TextBox ID="tb_IDBox" Visible="false" Text='<%# Eval("GameID") %>' runat="server"></asp:TextBox>
<div class="article last-article">
<div class="cl"> </div>
<div class="image"><a href="#">
<img src='Images/Game/<%# Eval("Image") %>' alt="" /></a> </div>
<div class="cnt" style="margin-left: 10px;">
<h4 style="display: inline-block;"><a href="#"><%# Eval("Name") %></a></h4>
<div style="display: inline-block; float: right;">
<asp:SqlDataSource ID="SqlDataSourceGamePlatform" runat="server" ConnectionString="<%$ ConnectionStrings:GameAddictConnectionString %>" SelectCommand="SELECT * FROM [GamePlatform] JOIN [Platform] ON [Platform].PlatformID = [GamePlatform].PlatformID WHERE ([GameID] = @GameID AND GamePlatform.[IsActive] = 1)">
<SelectParameters>
<asp:ControlParameter ControlID="tb_IDBox" PropertyName="Text" DefaultValue="1" Name="GameID" Type="Int32"></asp:ControlParameter>
</SelectParameters>
</asp:SqlDataSource>
<asp:DataList ID="price_list" runat="server" OnItemCommand="price_list_ItemCommand" DataSourceID="SqlDataSourceGamePlatform" DataKeyField="GamePlatformID">
<ItemTemplate>
<table>
<tr>
<td style="width:60px;"><%# Eval("Name") %> </td>
<td style="width:60px;">$<%# Eval("DVDPrice") %></td>
<td>
<asp:Button CssClass="my-button" CommandName="cart" CommandArgument='<%# Eval("GamePlatformID") %>' ForeColor="Gray" ID="btn_cart" runat="server" Text="Add" />
</td>
</tr>
</table>
</ItemTemplate>
</asp:DataList>
</div>
<div class="rating" style="margin: 10px 10px 10px 0px;">
<div class="stars" style="display: inline-block;">
<%#DataBinder.Eval(Container.DataItem, "Rating") %> <span class="star-rating fa fa-star"></span>
</div>
<div style="display: inline-block; margin-left: 10px;">
<span>
<asp:Label ID="comment" runat="server" Text='<%# Eval("Review") %>'></asp:Label>
<span class="fa fa-comment"></span></span>
</div>
</div>
<div>
Release Date :
<%# Eval("ReleasedDate", "{0:d}")%>
</div>
<div class="buttons-div">
<asp:Button CssClass="my-button" ID="btn_details" runat="server" Text="View Details" CommandArgument='<%# Eval("GameID") %>' CommandName="detail" ForeColor="#999999" CausesValidation="False" />
<asp:Button CssClass="my-button" ID="btn_wish" runat="server" Text="Add To WishList" CommandArgument='<%# Eval("GameID") %>' CommandName="wish" ForeColor="#999999" CausesValidation="False" />
</div>
</div>
<div class="cl"> </div>
</div>
<div class="divider"></div>
<br />
<br />
<div class="cl"> </div>
</ItemTemplate>
</asp:Repeater>
</div>
</div>
</div>
</div>
</asp:Content>