/
info.php
353 lines (293 loc) · 11.8 KB
/
info.php
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
<?php require_once('Connections/connect.php'); ?>
<script>
<?php $i=0;$j=0;?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("oci_real_escape_string") ? oci_real_escape_string($theValue) : oci_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
?>
<?php
//oci_select_db($database_connect, $connect);
$sql1 = oci_parse($connect,"SELECT * FROM product ORDER BY qtysold DESC");
oci_execute($sql1);
$dyn_table1 ='<tr>';
While($j<5&& $row = oci_fetch_assoc($sql1)){
$Name1 = $row["Name"];
$Type1 = $row["Type"];
$image1 = $row["prod_image"];
$price1 = $row["New_Price"];
$prodid = $row["Prodid"];
{
$dyn_table1 .='<p><td><tr><tr><br>'.$Name1.'</tr>';
$dyn_table1 .='<br>'.$Type1.'<br>';
$dyn_table1 .='<img src="'.$image1.'" width = 100, height = 100/><br>';
$dyn_table1 .='<a href="productdetail.php?Prodid='.$prodid.'"><img src="images/templatemo_detail.png"></a>';
$dyn_table1 .='<img src="images/templatemo_addtocart.png"></td></p><br><br><br><br><br>';
}
$j++;
}
$dyn_table1 .='</tr></table>';
?>
<?php
//mysql_select_db($database_connect, $connect);
$sql = oci_parse($connect,"SELECT * FROM product ORDER BY Prodid DESC ");
oci_execute($sql);
$dyn_table ='<table border="0" cellpadding="10"><tr>';
While($i<3 && $row = oci_fetch_assoc($sql)){
$Name = $row["Name"];
$Type = $row["Type"];
$image=$row["prod_image"];
$Prodid = $row["Prodid"];
if($i%3==0){
$dyn_table .='</tr><tr>';
/*$dyn_table .='<td>'.$Name;
$dyn_table .='<br>'.$Type.'<br>';
$dyn_table .='<img src="'.$image.'" width = 200, height = 200/></td>';
*/
}//else {
$dyn_table .='<td>'.$Name;
$dyn_table .='<br>'.$Type.'<br>';
$dyn_table .='<img src="'.$image.'" width = "150", height ="200"/>';
$dyn_table.='<br><img src="images/templatemo_addtocart.png" >';
$dyn_table.='<a href = "productdetail?Prodid='.$Prodid.'"><img src="images/templatemo_detail.png"></a></td>';
//}
$i++;
}
$dyn_table .='</tr></table>';
?>
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>BAZZINGA | User Profile</title>
<meta name="keywords" content="shopping store, e-mall, ecommerce, online shop" />
<meta name="description" content="E-mall is an online shopping store that provides the most trendy clothes at the lowest prices " />
<link href="style1.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="nivo-slider.css" type="text/css" media="screen" />
<link rel="stylesheet" type="text/css" href="css/ddsmoothmenu.css" />
<style type="text/css">
#templatemo_body_wrapper #templatemo_wrapper #templatemo_main #content table tr th {
color: #FFF;
}
</style>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/ddsmoothmenu.js">
</script>
<script type="text/javascript">
ddsmoothmenu.init({
mainmenuid: "top_nav", //menu DIV id
orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
classname: 'ddsmoothmenu', //class added to menu's outer DIV
//customtheme: ["#1c5a80", "#18374a"],
contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
})
</script>
</head>
<body>
<div id="templatemo_body_wrapper">
<div id="templatemo_wrapper">
<div id="templatemo_header">
<div id="site_title"><h1>changed BAZZINGA</h1><br><h5>The online Shopping Store</h5></div>
<div id="header_right">
<p>
<a href="myaccount.php">My Account</a> | <a href="wishlist.php">My Wishlist</a> | <a href="cart.php">My Cart</a> | <a href="checkout.php">Checkout</a> | <a href="logout.php">Log Out</a></p>
<p>
Shopping Cart: <strong></strong> ( <a href="cart.php">Show Cart</a> )
</p>
</div>
<div class="cleaner"></div>
</div> <!-- END of templatemo_header -->
<div id="templatemo_menubar">
<div id="top_nav" class="ddsmoothmenu">
<ul>
<li><a href="index.php">Home</a></li>
<li><a href="info.php" class="selected">Info</a></li>
<li><a href="acchistory.php">Account history</a></li>
<li><a href="query_rep1.php">Query Replies</a></li>
<li><a href="checkout.php">Checkout</a></li>
<li><a href="contact.php">Contact Us</a></li>
</ul>
<br style="clear: left" />
</div> <!-- end of ddsmoothmenu -->
<div id="templatemo_search">
<form action="#" method="get">
<input type="text" value=" " name="keyword" id="keyword" title="keyword" onFocus="clearText(this)" onBlur="clearText(this)" class="txt_field" />
<input type="submit" name="Search" value=" " alt="Search" id="searchbutton" title="Search" class="sub_btn" />
</form>
</div>
</div> <!-- END of templatemo_menubar -->
<div id="templatemo_main">
<div class= "cover">
<div id="slider-wrapper">
<div id="slider" class="nivoSlider">
<a href=""><img src="images/gallery/Dress-like-A-Londoner.jpg" width="900" height="500" alt="" /></a>
<a href="#"><img src="images/gallery/commuter.jpg" alt="" width="800" height="500" title="" /></a>
<a href="#"><img src="images/gallery/heroBanner_2.jpg" width="800" height="500" alt="" /></a>
<a href=""><img src="images/gallery/i_contactus.jpg" width="800" height="500" alt="" title="" /></a>
<a href=""><img src="images/gallery/large-mens-clothinglarge-mens-clothing.jpg" width="800" height="500" alt="" title="" /></a>
</div>
</div>
<script type="text/javascript" src="js/jquery-1.4.3.min.js"></script>
<script type="text/javascript" src="js/jquery.nivo.slider.pack.js"></script>
<script type="text/javascript">
$(window).load(function() {
$('#slider').nivoSlider();
});
</script>
</div>
<p> </p>
<div id="sidebar" class="float_l">
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<div class="sidebar_box"><span class="bottom"></span>
<h3>Profile Picture</h3>
<div class="profile_pic">
</div>
</div>
<div class="sidebar_box"><span class="bottom"></span>
<h3><a class="sidebar_box_icon" title="image" rel="nofollow" target="_blank"><img src="images/templatemo_sidebar_header.png" alt="image" title="image" /></a>Bestsellers </h3>
<div class="content">
<div class="bs_box">
<?php echo $dyn_table1;?>
</div>
</div>
</div>
</div>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<div id="content" class="float_r">
<p> </p>
<p> </p>
<p>
<?php
session_start();
if(isset($_SESSION['MM_Username']))
{?>
<label style="font-size:36px" style="font-style:italic">
<?php
echo "Welcome ".$_SESSION['MM_Username']."<br>";?>
</label>
</p>
<p> </p>
<p> </p>
<?php $m = $_SESSION['MM_Username'];
//mysql_select_db($database_connect, $connect);
$query_Recordset1 = "SELECT * FROM user_signup where Username = '$m'";
$Recordset1 = oci_parse($connect,$query_Recordset1);
oci_execute($Recordset1);
$row_Recordset1 = oci_fetch_assoc($Recordset1);
$totalRows_Recordset1 = oci_num_rows($Recordset1);
?>
<table width="566" height="71" border="1">
<tr>
<th width="163" scope="row">My Name :</th>
<td width="387"><?php echo $row_Recordset1['First Name']; ?><br /><?php echo $row_Recordset1['Last Name'];?></td>
</tr>
<tr>
<th scope="row">My DOB :</th>
<td><?php echo $row_Recordset1['DOB']; ?></td>
</tr>
<tr>
<th scope="row">My Country :</th>
<td><?php echo $row_Recordset1['Country']; ?></td>
</tr>
<tr>
<th scope="row">My City :</th>
<td><?php echo $row_Recordset1['City']; ?></td>
</tr>
<tr>
<th scope="row">My Address:</th>
<td><?php echo $row_Recordset1['Address']; ?></td>
</tr>
<tr>
<th scope="row">My Zipcode :</th>
<td><?php echo $row_Recordset1['Zipcode']; ?></td>
</tr>
<tr>
<th scope="row">My Contact No :</th>
<td><?php echo $row_Recordset1['Contact No']; ?></td>
</tr>
<tr>
<th scope="row">My E-Mail ID :</th>
<td><?php echo $row_Recordset1['E-Mail Id']; ?></td>
</tr>
<tr>
<th scope="row">My Username :</th>
<td><?php echo $row_Recordset1['Username']; ?></td>
</tr>
<tr>
<th scope="row"> </th>
<td><form id="form1" name="form1" method="post" action="">
<a href="editprofile.php"><img src="images/gallery/edit.png"/></a>
</form></td>
</tr>
</table>
<?php }
else
{
echo "you are not logged in";
}?>
<p> </p>
<p> </p>
<h1><strong>New Products</strong></h1>
<div class="product_box">
<?php echo $dyn_table;?>
</div>
<div class="cleaner"></div>
</div>
<div class="cleaner"></div>
</div> <!-- END of templatemo_main -->
<div id="templatemo_footer">
<p><a href="index.php">Home</a> | <a href="products.php">Products</a> | <a href="about.php">About</a> | <a href="faqs.html">FAQs</a> | <a href="checkout.php">Checkout</a> | <a href="contact.php">Contact Us</a>
</p>
Copyright © 2015 <a href="#">BAZZINGA</a>
<div class="pins">
<a href="#"><img src="images/pin_1.png"></a>
<a href="#"><img src="images/pin_2.png"></a>
<a href="#"><img src="images/pin_3.png"></a>
<a href="#"><img src="images/pin_4.png"></a>
</div>
</div> <!-- END of templatemo_footer -->
</div> <!-- END of templatemo_wrapper -->
</div> <!-- END of templatemo_body_wrapper -->
<script type='text/javascript' src='js/logging.js'></script>
</body>
</html>
<?php
oci_free_result($Recordset1);
?>