forked from jashgopani/p5TextAnimator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
111 lines (102 loc) · 3.77 KB
/
Copy pathindex.php
File metadata and controls
111 lines (102 loc) · 3.77 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Text Animator</title>
<style>
body{
background-image: url("video.gif");
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;
}
a{
text-decoration: none;
}
#myVideo {
position: fixed;
right: 0;
bottom: 0;
min-width: 100%;
min-height: 100%;
}
.content {
position: fixed;
bottom: 0;
background: rgba(255, 255, 255, 0.2);
font-family : sans-serif;
color: #000;
width: 100%;
padding: 20px;
}
/* Style the button used to pause/play the video */
#myBtn {
width: 200px;
font-size: 18px;
padding: 10px;
border: none;
background: #000;
color: #fff;
cursor: pointer;
border-radius : 25px;
}
#myBtn:hover {
background: #ddd;
color: black;
}
.upload{
border : 2px solid black;
margin : 10px 0px;
padding : 10px 0px;
}
.extra,input{
border:0px;
font-size : 20px;
padding : 10px;
border-radius : 30px;
}
#submit:hover{
background : #000;
color : #ffffff;
}
</style>
</head>
<body>
<center>
<div class="content">
<h1>TEXT ANIMATOR</h1>
<h2>Images brought to life</h2>
<div class="upload"><p>Upload Your Image here</p>
<form action="?" method="post" enctype="multipart/form-data">
<input type="file" name="file" id="file" class="extra">
<input type="submit" value="Upload Image" name="submit" id="submit" class="extra">
</form></div>
<!-- Use a button to pause/play the video with JavaScript -->
<a href="Circle Parking/index.html"><button id="myBtn">Growing Heads</button></a>
<a href="Steering behaviour/index.html"><button id="myBtn">Touch Me Not</button></a>
<a href="Circle Parking Bubbling/index.html"><button id="myBtn">Boiling Rings</button></a>
<a href="Waving Balls/index.html"><button id="myBtn">Waving Balls</button></a>
<a href="Circle Parking Glowing/index.html"><button id="myBtn">Flashing Atoms</button></a>
<?php
if(isset($_POST['submit'])){
$file_name = $_FILES['file']['name'];
$file_extension = explode(".", $_FILES["file"]["name"]);
$file_ext;
if($file_extension[sizeof($file_extension)-1]!=null){
$file_ext = $file_extension[sizeof($file_extension)-1];
$file_type = $_FILES['file']['type'];
$file_temp_loc = $_FILES['file']['tmp_name'];
$file_store = "uploads/user.".$file_ext;
move_uploaded_file($file_temp_loc,$file_store);
chmod($file_store,0777);
echo "<script>sessionStorage.setItem(\"type\",\"$file_ext\");</script>";
echo "<script>alert(\"Image Uploaded\");</script>";
echo "<script>alert(\" Click on any of the effects to preview\");</script>";
}
}
?>
</div></center>
</body>
</html>