forked from klakathy/mini-web-site-for-online-selling
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlist_want_appliancepost.php
218 lines (197 loc) · 9.68 KB
/
list_want_appliancepost.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
<?php
session_start();
require_once 'login.php';
$db = new mysqli($db_hostname,$db_username,$db_password, $db_database);
if ($db->connect_error)
{
echo "<script>alert('Failed to connect to MySQL: " . $db->connect_error."')</script>";
}
$userid=$_SESSION['userid'];
//$itemid=$_GET['item'];
$itemid=4190301001;
$query= "SELECT * FROM likelist WHERE user = '$userid' AND item = '$itemid'";
$result = $db->query($query);
$qpost= "SELECT user FROM itemlist WHERE user = '$userid' AND item = '$itemid'";
$rpost = $db->query($qpost);
if($rpost->num_rows!=0) $status= "my post";
elseif($result->num_rows==0) {$status="add to likelist";}
else $status= "my likeitem";
?>
<html>
<head>
<title>Description Page</title>
<script type="text/JavaScript" src="js/imagesize.js"></script>
<link href="css/homepage.css" type="text/css" rel="stylesheet"/>
<script type="text/JavaScript" src="js/mainmenu.js"></script>
<script type="text/JavaScript" src="js/time.js"></script>
<script type="text/javascript">
function changelike(a0){
var s=0;
if(a0.innerText=="my likeitem")s=1;
else if(a0.innerText=="add to likelist")s=2;
else return;
if (window.XMLHttpRequest)xmlhttp=new XMLHttpRequest();
else xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
var src='changelike.php?s='+s+'&item=<?php echo $itemid;?>';
xmlhttp.open("GET",src,true);
xmlhttp.send();
xmlhttp.onreadystatechange=function(){ a0.innerHTML=xmlhttp.responseText;}
}
</script>
</head>
<body>
<?php include 'menu.php';?>
<div id="top" class="container">
<!--border--><div style="height: 70px;"></div>
<div class="container_content">
<div class="choice_btn choice_image">
<img src="images/game.jpg" alt="image loading failure" title="game console photo"/>
<div>
<h1>Looking for Electronics Sale</h1>
<h2>Perfered Price: $200-$400</h2>
<h3>Provided by: HIJ</h3>
</div>
</div>
</div>
<!--end--><div class="container-end" style="height: 30px;"></div>
</div>
<div style="height: 30px;background-color: white; padding: 15 15px;" align="center">
status:
<button style="font-size: 150%;" onclick="changelike(this)"><?php echo $status;?></button>
</div>
<!--3-1 Description part-->
<div id="description" class="container">
<!--border--><div style="height: 40px;"></div>
<div align="center" style="background-color: white; padding: 30 30 30 30px;">
<h1>Description</h1>
</div>
<!--start--><div class="container-start"></div>
<div style="background-color: white;min-width: 700px;">
<div class="choice_btn" style="padding: 20px 10%;">
<h3>Description</h3>
<p>I truly need some household appliance, such as cleaner, mop, microwave etc. However, I do not need any large appliance such as refrigerator. I am currently in Crystal City, Virginia. I am open to any price negotiation. IF you have some used game console, such as Play Station 4 or Xbox, you are also very welcome to contact me. I am very willing to buy some used game console. </p>
<p>If you have any other options that I could use, I would also like to look at them and buy them.</p>
<p>Contact me for more details.</p>
</div>
</div>
<!--end--><div class="container-end"></div>
</div>
<!--3-2 Picture part-->
<div id="picture" class="container">
<!--border--><div style="height: 40px;"></div>
<div align="center" style="background-color: white; padding: 30 30 30 30px;">
<h1>Pictures</h1>
</div>
<!--start--><div class="container-start"></div>
<div style="background-color: white;min-width: 700px;">
<div class="choice_btn" style="padding: 20px 10%;">
<p>Click on images to change size</p>
<p><img src="images/appliance.jpg" title="appliance photo" alt="image loading failure" width="400" onclick="size(this)"/></p>
<p><img src="images/game.jpg" title="game console photo" alt="image loading failure" width="400" onclick="size(this)"/></p>
</div>
</div>
<!--end--><div class="container-end"></div>
</div>
<!--3-3 Post part-->
<div id="post" class="container">
<!--border--><div style="height: 40px;"></div>
<div align="center" style="background-color: white; padding: 30 30 30 30px;">
<h1>Post Information</h1>
</div>
<!--start--><div class="container-start"></div>
<div style="background-color: white;min-width: 700px;">
<div class="choice_btn" style="padding: 20px 10%;">
<h3>Post information</h3>
<p>This entry is posted by <a href="ABC.php">HIJ</a></p>
<p><a href="ABC.php"><img src="images/photo_ABC.jpg" alt="image loading failure" title="ABC" width="200" height="200" border="2"/></a></p>
<hr/>
<p>This item is posted on 02.01.2019<br/></p>
<p><i>other:</i> <br/>
I will open to any sublease until April.
</p>
</div>
</div>
<!--end--><div class="container-end"></div>
</div>
<!--3-4 Purchase part-->
<div id="purchase" class="container">
<!--border--><div style="height: 40px;"></div>
<div align="center" style="background-color: white; padding: 30 30 30 30px;">
<h1>Purchase Information</h1>
</div>
<!--start--><div class="container-start"></div>
<div style="background-color: white;min-width: 700px;">
<div class="choice_btn" style="padding: 20px 10%;">
<h3>Wanting Information</h3>
<hr/>
<p>Price: <b>$200-$400</b></p>
<p><i>Writer says: </i><br/>Remeber that price could negotiate. Welcome to contact me.</p>
<hr/>
<p>Place: <b>Baltimore</b></p>
<p><i>Owner says: </i><br/>I will go to DC every Tuesday.</p>
</div>
</div>
<!--end--><div class="container-end"></div>
</div>
<!--3-5 Contact part-->
<div id="contact" class="container">
<!--border--><div style="height: 40px;"></div>
<div align="center" style="background-color: white; padding: 30 30 30 30px;">
<h1>Contact Information</h1>
</div>
<!--start--><div class="container-start"></div>
<div style="background-color: white;min-width: 700px;">
<div class="choice_btn" style="padding: 20px 10%;">
<h3>Contact Information</h3>
<hr/>
<p>Email:[email protected]<br/>
Cell:7654321<hr/>
Others: <br/>
Please send me sms or email. Do not call!
</p>
</div>
</div>
<!--end--><div class="container-end"></div>
</div>
<!--4 contact div-->
<div id="window0" class="window0">
<div class="window0-content" align="left">
<span class="close" onclick="closecontact()">×</span>
<section id="about_section">
<h2>About Us</h2>
<p style="font-size: 100%">
This web site is designed by Yiran Gao, Zixiao Guo, Minqiang Liang, Xiaoyue Niu.
<br/><br/>This project is a resale website, named JHU Student Second-hand Exchange Platform, particularly designed for JHU students. It provides platforms for students to sell and buy second-hand things from each other. This website is launched as a descendent of the university site, that only students or alumni from JHU registered in our database are served as customers. We do not sell or buy any products, but users are able to publish the items they no longer use or they want to buy in JHU SSEP. No online transactions will be made via the platform, users are able to contact for further information per methods provided by the publisher, and are encouraged to check the items and finish the transaction by themselves.
</p>
</section>
<section id=contact_section>
<h2>Contact Form</h2>
<form name="form_contact">
<h3>Name<sup>*</sup><input type="text" size="40" name="name_contact" id="name_contact" class="resizedTextbox" required="required"/></h3>
<h3>Email<sup>*</sup><input type="text" size="40" name="email_contact" id="email_contact" class="resizedTextbox" required="required"/></h3>
<h3>Phone (Optional) <input type="text"size="21" name="phone_contact" id="phone_contact" class="resizedTextbox"</h3>
<h3>Message<sup>*</sup></h3>
<br/><textarea name="message_contact" style="width: 90%;" rows="10" required="required"></textarea>
<br/><input type="submit" value="Submit" onclick="checkform()"/>
</form>
</section>
</div>
</div>
<!--5 go up menu-->
<div class="goup">
<button type="button" class="dropbtn"><a href="#top"><img src="images/goup.png" alt="TOP" height="40" width="40"/><br/>TOP</a></button>
<div class="goup-menu">
<a href="#description" style="padding: 10 10px;">Description</a>
<a href="#picture" style="padding: 10 10px;">Pictures</a>
<a href="#post" style="padding: 10 10px;">Post</a>
<a href="#purchase" style="padding: 10 10px;">Purchase</a>
<a href="#contact" style="padding: 10 10px;">Contact</a>
</div>
</div>
</body>
<footer id="copyright"align="center" style="padding: 10 20 10 20px; min-width: 700px;overflow-x: hidden;">
<span id="de" style="float: left;">CLOCK</span>
©:DC Student Secondhand Exchange Platform 2019
<span id="stay" style="float: right;">CLOCK</span>
</footer>
</html>