-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathadd.php
More file actions
35 lines (30 loc) · 1.18 KB
/
Copy pathadd.php
File metadata and controls
35 lines (30 loc) · 1.18 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
<?php
require_once(WB_PATH.'/framework/functions.php');
if (!isset($section_id)) {
$section_id = $admin->get_post('section_id');
echo 'section_id war nicht korrekt gesetzt!<br/>Jetzt: '.$section_id;
}
if (!isset($page_id)) {
$page_id = $admin->get_post('page_id');
echo 'page_id war nicht korrekt gesetzt!<br/>Jetzt: '.$page_id;
}
// Insert an extra row into the database
$database->query("INSERT INTO ".TABLE_PREFIX."mod_cc_loupslider (page_id, section_id, navigation, random, easing, watermark, resize_x, resize_y, durationTimeOut, durationBlende, opacity) VALUES ('$page_id', '$section_id', '0', '0', '0', '', '724', '407', '8000', '3000', '0.8')");
$path = WB_PATH.MEDIA_DIRECTORY.'/cc_loupslider_';
$folder = $path.$section_id;
make_dir($folder);
make_dir($folder.'/cc_loupslider_watermark');
// Create index.php file
$content = ''.
"<?php
header('Location: ../');
?>";
$handle = fopen($folder.'/index.php', 'w');
fwrite($handle, $content);
fclose($handle);
change_mode($folder.'/index.php', 'file');
$handle = fopen($folder.'/cc_loupslider_watermark/index.php', 'w');
fwrite($handle, $content);
fclose($handle);
change_mode($folder.'/cc_loupslider_watermark/index.php', 'file');
?>