Skip to content

Commit 6558e05

Browse files
committed
init project
0 parents  commit 6558e05

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+4223
-0
lines changed

!_login_bk.html

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<html>
2+
<head>
3+
<title>IERG4230 T2 demo website</title>
4+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
5+
</head>
6+
7+
<body bgcolor="#FFFFFF">
8+
9+
<h3 align="center">Please Login in your account</h3>
10+
<hr>
11+
<form method="post" action="login.php">
12+
<table width="75%" border="0">
13+
<tr>
14+
<td width="37%" height="39">Username :</td>
15+
<td width="63%" height="39">
16+
<input type="text" name="name" size="7" maxlength="20">
17+
</td>
18+
</tr>
19+
<tr>
20+
<td width="37%" height="32">
21+
<p>Password :</p>
22+
</td>
23+
<td width="63%" height="32">
24+
<input type="password" name="pswd" size="7" maxlength="20">
25+
</td>
26+
</tr>
27+
<tr>
28+
<td width="37%" height="32">
29+
<p>User type :</p>
30+
</td>
31+
<td width="63%" height="32">
32+
<select name="usertype">
33+
<option value="trader">trader</option>
34+
<option value="user">user</option>
35+
</select>
36+
</td>
37+
</tr>
38+
</table>
39+
<hr>
40+
<BR>
41+
<input type="submit" name="submit" value="Sign in">
42+
<input type="reset" name="reset" value="Reset">
43+
</form>
44+
if you have no accounts, please <a href="http://ierg4230-sooocitrus.c9users.io/signup.php">Sign up</a> here.
45+
<p>&nbsp;</p>
46+
</body>
47+
</html>

!_signup_bk.html

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<html>
2+
<head>
3+
<title>IERG4230 T2 demo website</title>
4+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
5+
</head>
6+
7+
<body bgcolor="#FFFFFF">
8+
<h3 align="center">Please full in all the blocks.</h3>
9+
<form method="post" action="signup.php">
10+
<table width="75%" border="0">
11+
<tr>
12+
<td width="37%" height="39">Username :</td>
13+
<td width="63%" height="39">
14+
<input type="text" name="name" size="7" maxlength="20">
15+
</td>
16+
</tr>
17+
<tr>
18+
<td width="37%" height="32">
19+
<p>Password :</p>
20+
</td>
21+
<td width="63%" height="32">
22+
<input type="password" name="pswd" size="7" maxlength="20">
23+
</td>
24+
</tr>
25+
<tr>
26+
<td width="37%" height="32">
27+
<p>Email :</p>
28+
</td>
29+
<td width="63%" height="32">
30+
<input type="text" name="email" size="11" maxlength="20">
31+
</td>
32+
</tr>
33+
<tr>
34+
<td width="37%" height="32">
35+
<p>Contact Number :</p>
36+
</td>
37+
<td width="63%" height="32">
38+
<input type="text" name="phnum" size="11" maxlength="20">
39+
</td>
40+
</tr>
41+
<tr>
42+
<td width="37%" height="32">
43+
<p>User type :</p>
44+
</td>
45+
<td width="63%" height="32">
46+
<select name="usertype">
47+
<option value="trader">trader</option>
48+
<option value="user">user</option>
49+
</select>
50+
</td>
51+
</tr>
52+
</table>
53+
<hr>
54+
<BR>
55+
<input type="submit" name="submit" value="Sign up">
56+
<input type="reset" name="reset" value="Reset">
57+
<p>&nbsp;</p>
58+
</form>
59+
</body>
60+
61+
</html>

!_traderpage_bk.php

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
<html>
2+
<body>
3+
4+
<?php
5+
6+
define('DBSERVER',"localhost");
7+
define('DBUSER',"sooocitrus");
8+
define('DBPASS',"mypass");
9+
define('DATABASE',"IERG4230");
10+
11+
if (!$connection = @ mysql_connect(DBSERVER, DBUSER, DBPASS))
12+
die("Cannot connect");
13+
14+
@mysql_select_db(DATABASE) or die( "Unable to select database");
15+
16+
$query="SELECT * FROM data;";
17+
$result=mysql_query($query);
18+
19+
$num=mysql_numrows($result);
20+
21+
mysql_close();
22+
?>
23+
24+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
25+
<meta name="GENERATOR" content="Mozilla/4.72 [en] (Windows NT 5.0; I) [Netscape]">
26+
<title>Users Data</title>
27+
</head>
28+
<body style="background-color:lightgrey;">
29+
30+
<h3 align="center">User data table</h3>
31+
<center>
32+
<h3>
33+
Rice Barrel Information for April 2016</h3></center>
34+
<center><table BORDER >
35+
<tr BGCOLOR="#FFFF64">
36+
<td><b>User Name</b></td>
37+
38+
<td>
39+
<center><b>Address</b></center>
40+
</td>
41+
42+
<td><b>Contact</b> <br>
43+
<b>Number</b></td>
44+
45+
<td><b>Rice Type</b>
46+
</td>
47+
<td><b>Size</b></td>
48+
49+
<td><b>Status</b></td>
50+
</tr>
51+
52+
<?php
53+
$i=0;
54+
while ($i < $num) {
55+
$name = mysql_result($result,$i,"owner");
56+
$addr = mysql_result($result,$i,"addr");
57+
$size = mysql_result($result,$i,"size");
58+
$phnum = mysql_result($result,$i,"phonenum");
59+
$riceType = mysql_result($result,$i,"RiceType");
60+
$status = mysql_result($result,$i,"status");
61+
62+
print '<tr BGCOLOR="#FFFFA0">';
63+
print "<td>".$name."</td>";
64+
print "<td>".$addr."</td>";
65+
print "<td>".$phnum."</td>";
66+
print "<td>".$riceType."</td>";
67+
print "<td>".$size."</td>";
68+
print "<td>".$status."</td>";
69+
print "</tr>";
70+
$i++;
71+
}
72+
?>
73+
74+
</tr>
75+
</table>
76+
<meta http-equiv="refresh" content="30">
77+
</center>
78+
79+
</body>
80+
</html>

!_userpage_bk.html

+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
<html>
2+
<head>
3+
<title>IERG4230 T2 demo website</title>
4+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
5+
</head>
6+
7+
<body bgcolor="#FFFFFF">
8+
9+
<h3 align="center">Please reg your device</h3>
10+
<hr>
11+
<form method="post" action="userpage.php">
12+
<table width="75%" border="0">
13+
<tr>
14+
<td width="37%" height="39">Device ID :</td>
15+
<td width="63%" height="39">
16+
<input type="text" name="device_id" size="7" maxlength="20">
17+
</td>
18+
</tr>
19+
</tr>
20+
<tr>
21+
<td width="37%" height="32">
22+
<p>Size :</p>
23+
</td>
24+
<td width="63%" height="32">
25+
<select name="size">
26+
<option value="big">10L</option>
27+
<option value="mid">5L</option>
28+
<option value="small">3L</option>
29+
</select>
30+
</td>
31+
</tr>
32+
<tr>
33+
<td width="37%" height="32">
34+
<p>Owner :</p>
35+
</td>
36+
<td width="63%" height="32">
37+
<input type="text" name="owner" size="7" maxlength="20">
38+
</td>
39+
</tr>
40+
<tr>
41+
<td width="37%" height="32">
42+
<p>Address :</p>
43+
</td>
44+
<td width="63%" height="32">
45+
<input type="text" name="addr" size="7" maxlength="20">
46+
</td>
47+
</tr>
48+
<tr>
49+
<td width="37%" height="32">
50+
<p>Email :</p>
51+
</td>
52+
<td width="63%" height="32">
53+
<input type="text" name="email" size="7" maxlength="20">
54+
</td>
55+
</tr>
56+
<tr>
57+
<td width="37%" height="32">
58+
<p>Contact Number :</p>
59+
</td>
60+
<td width="63%" height="32">
61+
<input type="text" name="phonenum" size="7" maxlength="20">
62+
</td>
63+
</tr>
64+
<tr>
65+
<td width="37%" height="32">
66+
<p>Rice type :</p>
67+
</td>
68+
<td width="63%" height="32">
69+
<select name="ricetype">
70+
<option value="expensive">$100/kg</option>
71+
<option value="fair">$30/kg</option>
72+
<option value="cheap">$10/kg</option>
73+
</select>
74+
</td>
75+
</tr>
76+
</table>
77+
<hr>
78+
<BR>
79+
<input type="submit" name="submit" value="Sign in">
80+
<input type="reset" name="reset" value="Reset">
81+
</form>
82+
if you have no accounts, please <a href="http://ierg4230-sooocitrus.c9users.io/signup.php">Sign up</a> here.
83+
<p>&nbsp;</p>
84+
</body>
85+
</html>

IERG4230.sql

+106
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
-- MySQL dump 10.13 Distrib 5.5.47, for debian-linux-gnu (x86_64)
2+
--
3+
-- Host: localhost Database: IERG4230
4+
-- ------------------------------------------------------
5+
-- Server version 5.5.47-0ubuntu0.14.04.1
6+
7+
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
8+
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
9+
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
10+
/*!40101 SET NAMES utf8 */;
11+
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
12+
/*!40103 SET TIME_ZONE='+00:00' */;
13+
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
14+
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
15+
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
16+
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
17+
18+
--
19+
-- Table structure for table `data`
20+
--
21+
22+
DROP TABLE IF EXISTS `data`;
23+
/*!40101 SET @saved_cs_client = @@character_set_client */;
24+
/*!40101 SET character_set_client = utf8 */;
25+
CREATE TABLE `data` (
26+
`owner` varchar(20) DEFAULT NULL,
27+
`addr` varchar(30) DEFAULT NULL,
28+
`size` varchar(6) DEFAULT NULL,
29+
`phonenum` varchar(13) DEFAULT NULL,
30+
`riceType` varchar(13) DEFAULT NULL,
31+
`id` varchar(6) DEFAULT NULL,
32+
`status` varchar(10) DEFAULT NULL,
33+
`email` varchar(30) DEFAULT NULL
34+
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
35+
/*!40101 SET character_set_client = @saved_cs_client */;
36+
37+
--
38+
-- Dumping data for table `data`
39+
--
40+
41+
LOCK TABLES `data` WRITE;
42+
/*!40000 ALTER TABLE `data` DISABLE KEYS */;
43+
INSERT INTO `data` VALUES ('demo','demoaddress','mid','+881293819','fair','145475','EMPTY','[email protected]');
44+
/*!40000 ALTER TABLE `data` ENABLE KEYS */;
45+
UNLOCK TABLES;
46+
47+
--
48+
-- Table structure for table `traderdb`
49+
--
50+
51+
DROP TABLE IF EXISTS `traderdb`;
52+
/*!40101 SET @saved_cs_client = @@character_set_client */;
53+
/*!40101 SET character_set_client = utf8 */;
54+
CREATE TABLE `traderdb` (
55+
`name` varchar(20) DEFAULT NULL,
56+
`psswd` varchar(20) DEFAULT NULL,
57+
`email` varchar(20) DEFAULT NULL,
58+
`phonenum` varchar(20) DEFAULT NULL
59+
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
60+
/*!40101 SET character_set_client = @saved_cs_client */;
61+
62+
--
63+
-- Dumping data for table `traderdb`
64+
--
65+
66+
LOCK TABLES `traderdb` WRITE;
67+
/*!40000 ALTER TABLE `traderdb` DISABLE KEYS */;
68+
INSERT INTO `traderdb` VALUES ('test','test','test','test'),('alice','alice','oneera.citrus@gmail.','+85265561423'),('demo_trader','123456','[email protected]','+656565454');
69+
/*!40000 ALTER TABLE `traderdb` ENABLE KEYS */;
70+
UNLOCK TABLES;
71+
72+
--
73+
-- Table structure for table `userdb`
74+
--
75+
76+
DROP TABLE IF EXISTS `userdb`;
77+
/*!40101 SET @saved_cs_client = @@character_set_client */;
78+
/*!40101 SET character_set_client = utf8 */;
79+
CREATE TABLE `userdb` (
80+
`name` varchar(20) DEFAULT NULL,
81+
`psswd` varchar(20) DEFAULT NULL,
82+
`email` varchar(20) DEFAULT NULL,
83+
`phonenum` varchar(20) DEFAULT NULL
84+
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
85+
/*!40101 SET character_set_client = @saved_cs_client */;
86+
87+
--
88+
-- Dumping data for table `userdb`
89+
--
90+
91+
LOCK TABLES `userdb` WRITE;
92+
/*!40000 ALTER TABLE `userdb` DISABLE KEYS */;
93+
INSERT INTO `userdb` VALUES ('test','test','oneera.citrus@gmail.','+85265561423'),('LIHaocheng','123456','[email protected]','51732161'),('demo_user','test','[email protected]','+5656545544');
94+
/*!40000 ALTER TABLE `userdb` ENABLE KEYS */;
95+
UNLOCK TABLES;
96+
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
97+
98+
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
99+
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
100+
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
101+
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
102+
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
103+
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
104+
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
105+
106+
-- Dump completed on 2016-05-19 4:53:39

IERG_4230_Thu_Group2_proposal.pdf

396 KB
Binary file not shown.

css/font-awesome.min.css

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)