-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathooo-toggle.php
More file actions
30 lines (30 loc) · 1.02 KB
/
Copy pathooo-toggle.php
File metadata and controls
30 lines (30 loc) · 1.02 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
<?php
$target_dir = getcwd() . "\\images\\";
$target_file = $target_dir . $_POST['screenID'] . ".gif";
if ($_POST['screenID'] == "all") {
for ($i = 1; $i <= $_POST['screenCount']; $i++) {
$target_file = $target_dir . $i . ".gif";
if (!file_exists($target_file . ".ooo")) {
copy($target_file, $target_file . ".ooo");
copy($target_dir . "ooo.gif", $target_file);
}
}
} elseif ($_POST['screenID'] == "none") {
for ($i = 1; $i <= $_POST['screenCount']; $i++) {
$target_file = $target_dir . $i . ".gif";
if (file_exists($target_dir . $i . ".gif.ooo")) {
copy($target_file . ".ooo", $target_file);
unlink($target_file . ".ooo");
}
}
} elseif (file_exists($target_file . ".ooo")) {
copy($target_file . ".ooo", $target_file);
unlink($target_file . ".ooo");
} else {
copy($target_file, $target_file . ".ooo");
copy($target_dir . "ooo.gif", $target_file);
}
?>
<script type="text/javascript">
window.location = "gif-upload.php?screenCount=" + <?php echo $_POST['screenCount']; ?>;
</script>