-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdata.php
executable file
·48 lines (34 loc) · 1.1 KB
/
data.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
45
46
47
48
<?php
if(isset($_GET['saveConection'])) {
$project = $_POST['project'];
$data = $_POST['data'];
file_put_contents('D:/wamp/www/Dropbox/Project323/'.$project.'/links.config', $data."\n", FILE_APPEND | LOCK_EX);
echo "done";
}
if(isset($_GET['connections'])) {
$project = $_POST['project'];
$toBeRestored = file_get_contents('D:/wamp/www/Dropbox/Project323/'.$project.'/links.config');
$data = unserialize($toBeRestored);
echo $data;
}
if(isset($_GET['getImages'])) {
$project = $_POST['project'];
$dir = 'D:/wamp/www/Dropbox/Project323/'.$project;
echo "<ul>";
if ($handle = opendir($dir)) {
$blacklist = array('.', '..', '.dropbox', 'desktop.ini', 'links.config');
while (false !== ($file = readdir($handle))) {
if (!in_array($file, $blacklist)) { ?>
<li><img src="getimg.php?src=<?=$project.'/'.$file?>" /></li>
<?php }
}
closedir($handle);
}
echo "</ul>";
}
if(isset($_GET['logout'])) {
session_start();
$_SESSION['login'] = false;
header("location: login.php");
}
?>