-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadd.php
More file actions
146 lines (126 loc) · 3.82 KB
/
Copy pathadd.php
File metadata and controls
146 lines (126 loc) · 3.82 KB
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
<?php
session_start();?>
<html lang="en" dir="ltr">
<head>
<link rel="stylesheet" href="./css.css">
<link rel="stylesheet" href="./add.css">
<title>Add</title>
</head>
<body>
<ul>
<li>
<a class="logo" href="index.php">
<b>
<font size="4">Mixthy</font>
</b>
</a>
</li>
<li class="auth">
<?php
if(isset($_SESSION["click"])){?>
<div>
<span class="logo">
<b>
<font size="4">
<?php echo $_SESSION["Username"];?>
</font>
</b>
</span>
<a class="logo" href="logout.php">
<b>
<font size="4">Log out</font>
</b>
</a>
</div>
<?php
}
else{?>
<a class="logo" href="login.php">
<b>
<font size="4">LogIn</font>
</b>
</a>
<?php
}
?>
</li>
</ul>
<div class="w3-content w3-section" >
<img class="mySlides" src="./img/slide.jpg" style="width:100%;height:25%">
<img class="mySlides" src="./img/slide9.jpg" style="width:100%;height:25%">
<img class="mySlides" src="./img/slide7.jpg" style="width:100%;height:25%">
</div>
<script>
var myIndex = 0;
carousel();
function carousel() {
var i;
var x = document.getElementsByClassName("mySlides");
for (i = 0; i < x.length; i++) {
x[i].style.display = "none";
}
myIndex++;
if (myIndex > x.length) {
myIndex = 1
}
x[myIndex - 1].style.display = "block";
setTimeout(carousel, 2000); // Change image every 2 seconds
}
</script>
<ul class="menu">
<li>
<a class="logo" href="index.php">
<b>Top vote</b>
</a>
</li>
<li>
<a class="logo" href="mix&match.php">
<b>Mix & Match</b>
</a>
</li>
<li>
<a class="active logo" href="add.php">
<b>Add</b>
</a>
</li>
</ul>
<?php
// Connect to database
if($_SESSION["UserID"] == "")
{ ?>
<script type='text/javascript'>alert('please login');window.location.href='login.php';</script>"
<?php exit();
}
else {
?>
<form enctype="multipart/form-data" method="post" action="add2.php">
<div class="content tooltip">
<h1>Add your style</h1>
<span>คุณสามารถเลือกอัพโหลดรูปภาพแแบบเต็มตัวรูปเดียวหรือแยกอัพโหลดเสื้อกางเกงและรองเท้าแบบแยกกัน</span>
</div>
<br>
<div class="box">
<div class="full">
<h3>รูปเต็มตัว</h3>
<input type="file" name="full" id="full"> <br><br>
</div>
<div class="shirt">
<h3>เสื้อ</h3>
<input type="file" name="shirt" id="shirt"> <br><br>
</div>
<div class="pant">
<h3>กางเกง</h3>
<input type="file" name="pant" id="pant" > <br><br>
</div>
<div class="shoe">
<h3>รองเท้า </h3>
<input type="file" name="shoe" id="shoe"> <br><br>
</div>
</div>
<div class="right">
<input type="submit" value="Upload and Preview Images" name="Submit"> <br><br>
</div>
</form>
<?php } ?>
</body>
</html>