-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathimagefeed.html
191 lines (170 loc) · 4.71 KB
/
imagefeed.html
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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<!--
EVERYTHING IS PHYSICAL
EVERYTHING IS FRACTAL
EVERYTHING IS RECURSIVE
NO MONEY
MO MINING
NO PROPERTY
LOOK AT THE INSECTS
LOOK AT THE FUNGI
LANGUAGE IS HOW THE MIND PARSES REALITY
-->
<link href="data:image/x-icon;base64,AAABAAEAEBAQAAEABAAoAQAAFgAAACgAAAAQAAAAIAAAAAEABAAAAAAAgAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAP//AP///wANAP8A5Dz6ABueRwAAt/8A6BonABo86AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAREREREREREREREAAAEREREREQCIgREREd3dwAAB3d3d3d3d3d3d3d3d3d3d3d3d3VVVVVVVQAFVVAAVVVQIiBRAiIBEQIAIBECAAERAgAgFgIABmYCIiBmAiIGZgIiIGYCIgZmYCIAaIAAMzMzAAiIiIiIiIiIiIiIiIiIiIiIgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" rel="icon" type="image/x-icon" />
<!--Stop Google:-->
<META NAME="robots" CONTENT="noindex,nofollow">
</head>
<body>
<table id = "linktable">
<tr>
<td>
<a href = "index.html">
HOME
</a>
</td>
<td>
<a href = "picrust.html">PI CRUST</a>
</td>
</tr>
<tr>
<td>
<a href = "alignimage.html">ALIGN ICON</a>
</td>
<tr>
<td>
<a href = "globalimagefeed.html">GLOBAL IMAGES</a>
</td>
</tr>
</tr>
</table>
<div id = "imagefeedheader">
<form id = "uploadform" action="upload.php" method="post" enctype="multipart/form-data">
<span id ="uploadspan">UPLOAD:</span>
<input type="file" name="fileToUpload" id="fileToUpload">
<input type="submit" value="Upload Image" name="submit" id ="submitinput">
</form>
</div>
<div id = "imagefeed"></div>
<script>
uploadImages = [];
var httpcUpload = new XMLHttpRequest();
httpcUpload.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
uploadImages = JSON.parse(this.responseText);
loadimagefeed();
}
};
httpcUpload.open("GET", "dir.php?filename=images", true);
httpcUpload.send();
function loadimagefeed(){
for(var index = uploadImages.length - 1;index >= 0;index--) {
var newuploadbox = document.createElement("DIV");
newuploadbox.classList.add("imagebox");
var newimg = document.createElement("IMG");
newimg.src = "images/" + uploadImages[index];
newimg.classList.add("uploadimage");
newuploadbox.appendChild(newimg);
document.getElementById("imagefeed").appendChild(newuploadbox);
var newdiv = document.createElement("DIV");
newdiv.innerHTML = uploadImages[index];
newdiv.className = "filelabel";
newuploadbox.appendChild(newdiv);
/*
var newimg = document.createElement("IMG");
newimg.src = "iconsymbols/delete.svg";
newuploadbox.appendChild(newimg);
newimg.classList.add("button");
newimg.classList.add("deletebutton");
newimg.onclick = function(){
var imageurl =this.parentElement.getElementsByClassName("uploadimage")[0].src;
var imagename = "images/" + imageurl.split("uploadimages/")[1];
var httpc = new XMLHttpRequest();
var url = "deletefile.php";
httpc.open("POST", url, true);
httpc.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=utf-8");
httpc.send("filename=" + imagename);//send text to deletefile.php
this.parentElement.parentElement.removeChild(this.parentElement);
}
*/
}
}
</script>
<style>
#fileToUpload,#submitinput,#uploadspan{
font-size:2em;
}
#fileToUpload,#submitinput{
cursor:pointer;
}
body{
overflow:hidden;
font-size:1em;
background-color:#808080;
}
h1{
text-align:center;
}
#linktable{
position:absolute;
top:0px;
right:0px;
}
#linktable a{
background-color:black;
color:#ff2cb4;
font-size:2em;
}
#imagefeedheader{
position:absolute;
left:0px;
top:0px;
padding-top:1em;
padding-left:1em;
height:8em;
}
#imagefeed{
position:absolute;
top:10em;
left:0px;
right:0px;
bottom:0px;
overflow:scroll;
}
.uploadimage{
max-width:50%;
margin:auto;
display:block;
background-color:#808080;
}
.imagebox{
border-top:solid;
padding-bottom:1em;
padding-top:1em;
padding-left:1em;
}
.deletebutton{
width:4em;
background-color:#808080;
}
.button{
cursor:pointer;
}
.button:hover{
background-color:green;
}
.button:active{
background-color:yellow;
}
.data{
display:none;
}
.filelabel{
color:#ff2cb4;
font-size:2em;
}
</style>
</body>
</html>