-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathadmin.php
More file actions
executable file
·69 lines (41 loc) · 1006 Bytes
/
admin.php
File metadata and controls
executable file
·69 lines (41 loc) · 1006 Bytes
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
<?php
if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
// Fetch the template
global $template;
/*
* Add our template to the global template
*/
$template -> set_filenames(
array(
'plugin_admin_content' => dirname(__FILE__) . '/admin.tpl'
)
);
/*
* Assign action to template for the form submit
*/
$template -> assign(
array(
'PLUGIN_ACTION' => get_root_url() . 'admin.php?page=plugin-FancyFooter-admin'
)
);
/*
* Retrieve footer configuration variable.
* Remove slashes from earlier data escaping.
*/
$data = unserialize(conf_get_param(FANCY_FOOTER_ID));
/*
* Assign these to the template
*/
$template -> assign($data);
/*
* Assign the template contents to ADMIN_CONTENT
*/
$template -> assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
/*
* Update the footer parameters.
* Be sure to escape the serialized string.
*/
if(isset($_POST['save'])) {
conf_update_param(FANCY_FOOTER_ID, pwg_db_real_escape_string(serialize($_POST)));
}
?>