-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCreateNote.php
More file actions
273 lines (223 loc) · 6.17 KB
/
Copy pathCreateNote.php
File metadata and controls
273 lines (223 loc) · 6.17 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
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
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
<!DOCTYPE html>
<?php include 'Header.html'; ?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="title" content="Share.gy: Create a note" >
<meta name="description" content="Create & Share a note instantly">
<meta name="keywords" content="Share.gy,share content,anonymous file upload,url shortener, note sharing site" >
<meta http-equiv="X-Frame-Options" content="deny">
<title>Share.gy: Create a note</title>
<script src='https://cdn.tinymce.com/4/tinymce.min.js'></script>
<script>
tinymce.init({
selector: '#mytextarea',
plugins: 'code',
height:'500'
});
</script>
<style>
/* The Modal (background) */
.modal {
display: none; /* Hidden by default */
position: fixed; /* Stay in place */
z-index: 1; /* Sit on top */
left: 0;
top: 0;
width: 100%; /* Full width */
height: 100%; /* Full height */
overflow: auto; /* Enable scroll if needed */
background-color: rgb(0,0,0); /* Fallback color */
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
-webkit-animation-name: fadeIn; /* Fade in the background */
-webkit-animation-duration: 0.4s;
animation-name: fadeIn;
animation-duration: 0.4s
}
/* Modal Content */
.modal-content {
position: fixed;
bottom: 0;
background-color: #fefefe;
width: 100%;
-webkit-animation-name: slideIn;
-webkit-animation-duration: 0.4s;
animation-name: slideIn;
animation-duration: 0.4s
}
/* The Close Button */
.close {
color: white;
float: right;
font-size: 28px;
font-weight: bold;
}
.close:hover,
.close:focus {
color: #000;
text-decoration: none;
cursor: pointer;
}
.modal-header {
padding: 2px 16px;
background-color: #559BDB;
color: white;
box-shadow: 0px 0px 4px blue;
}
.modal-body {
/* background-color: #f57d2d;*/
padding: 40px 16px;
border-color: transparent;
box-shadow: 0px 0px 4px blue;
font-size: 22px !important;
text-align: center;
color: #ffffff !important;
background: #f57d2d;
margin: 20px;
padding: 15px;
padding-left: 0px;
padding-right: 0px;
width: 500px;
}
.modal-footer {
padding: 2px 16px;
background-color: #559BDB;
color: white;
box-shadow: 0px 0px 4px blue;
}
/* Add Animation */
@-webkit-keyframes slideIn {
from {bottom: -300px; opacity: 0}
to {bottom: 0; opacity: 1}
}
@keyframes slideIn {
from {bottom: -300px; opacity: 0}
to {bottom: 0; opacity: 1}
}
@-webkit-keyframes fadeIn {
from {opacity: 0}
to {opacity: 1}
}
@keyframes fadeIn {
from {opacity: 0}
to {opacity: 1}
}
/*Custom*/
.id_10{
border-color: transparent;
box-shadow: 0px 0px 4px blue;
font-size: 20px;
text-align: center;
alignment-adjust: central;
color: #ffffff !important;
background: #559bdb;
margin: 20px;
padding: 5px;
margin-top: 40px;
padding-left: 20px;
padding-right: 20px;
width: 70%;
}
/*Modal button*/
#modal-button{
border-color: transparent;
box-shadow: 0px 0px 4px blue;
font-size: 20px;
text-align: center;
color: #ffffff !important;
background: #f57d2d;
margin: 5px;
padding: 5px;
padding-left: 40px;
padding-right: 40px;
}
#shortURL{
background: #f57d2d;
border-color: transparent;
color: #ffffff !important;
font-size: 22px;
}*::-webkit-input-placeholder {
color : rgb(211,211,211);
</style>
</head>
<body>
<form method="post" action="Backend/ProcessData.php"><center>
<input type="text" class="id_10" placeholder="Enter your post title" value="<?php echo filter_input(INPUT_GET,'title',FILTER_SANITIZE_FULL_SPECIAL_CHARS); ?>" name="title"/>
<textarea id="mytextarea" name="noteContent">Start writing your note here. . .</textarea>
<input type="button" id="post" class="id_10" value="Submit"/>
<div id="myModal" class="modal">
<!-- Modal content -->
<div class="modal-content">
<div class="modal-header">
<span class="close">×</span>
<h2>Choose a Link</h2>
</div>
<div class="modal-body">
<label>http://Share.gy/</label> <input type="text" id="shortURL" placeholder="<Randomly Generate>" name="shortUrl"/>
</div>
<label style="text-size:3pt!important;" id="shortUrlAvailability"></label>
<div class="modal-footer">
<input type="hidden" value="Note" id="q7_input7" name="q7_input7"/>
<input type="submit" id="modal-button" value="Create & Start sharing"/>
</div>
</div>
</div>
</center>
</form>
<script>
// Get the modal
var modal = document.getElementById('myModal');
// Get the button that opens the modal
var btn = document.getElementById("post");
// Get the <span> element that closes the modal
var span = document.getElementsByClassName("close")[0];
// When the user clicks the button, open the modal
btn.onclick = function() {
modal.style.display = "block";
}
// When the user clicks on <span> (x), close the modal
span.onclick = function() {
modal.style.display = "none";
}
// When the user clicks anywhere outside of the modal, close it
window.onclick = function(event) {
if (event.target == modal) {
modal.style.display = "none";
}
}
</script>
</body>
<!--ShortURL availability check-->
<script type="text/javascript" src="Libraries/jquery-1.11.3-jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function()
{
$("#shortURL").keyup(function()
{
var name = $(this).val();
if(name.length > 3)
{
$("#shortUrlAvailability").html('checking...');
/*$.post("username-check.php", $("#reg-form").serialize())
.done(function(data){
$("#result").html(data);
});*/
$.ajax({
type : 'POST',
url : 'Backend/ShortURL-Availability.php',
data : $(this).serialize(),
success : function(data)
{
$("#shortUrlAvailability").html(data);
}
});
return false;
}
else
{
$("#shortUrlAvailability").html('');
}
});
});
</script>
</html>