-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstoreSlot-bkk.php
44 lines (36 loc) · 943 Bytes
/
storeSlot-bkk.php
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
<?php
// load the data and delete the line from the array
$lines = file('slots.js');
$last = sizeof($lines) - 1 ;
unset($lines[$last]);
// write the new data to the file
$fp = fopen('slots.js', 'w');
fwrite($fp, implode('', $lines));
fclose($fp);
$File = "slots.js";
$Handle = fopen($File, 'a+');
fwrite($Handle, "{\n");
if($_GET['name']){
$name = $_GET['name'];
$Data = "name:'$name', \n";
fwrite($Handle, $Data);
$desc = $_GET['desc'];
$Data = "desc:'$desc',\n";
fwrite($Handle, $Data);
$bg = $_GET['bg'];
$Data = "bg:'$bg',\n";
fwrite($Handle, $Data);
$iframe = $_GET['iframe'];
$Data = "iframe:'$iframe',\n";
fwrite($Handle, $Data);
$video = $_GET['video'];
$Data = "video:'$video',\n";
fwrite($Handle, $Data);
fwrite($Handle, "},\n];");
print "Data Written";
}
fclose($Handle);
?>
<html><head><script>setTimeout(function(){
self.close();
},5000);</script></head><body></body></html>