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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
|
<?php
require_once('utils.php');
need_auth();
// Config loading
$site_conf = load_ini_site_conf("content/site_conf.ini");
if ( ! is_array($site_conf) ) trigger_error("Error parsing site_conf.ini", E_USER_ERROR);
// Localization Init
l10n_init($site_conf['site_admin_lang']);
// Pre-computed because used twice
$page_title = _('Admin');
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="treeview.css">
<link rel="stylesheet" href="admin.css">
<script type="text/javascript" src="microajax.minified.js"></script>
<script type="text/javascript" src="admin.js"></script>
<title><?=$page_title?></title>
</head>
<body>
<h1><?=$page_title?></h1>
<form>
<span class="inline_half">
<fieldset>
<legend><?=_('Page tree')?></legend>
<input id="page_add" class="tree_add" type="button" value="<?=_('Add/Delete page')?>" onclick="go_add_form('page');">
<div class="css-treeview">
<?php
$page_tree=find_all('./content', 'page');
//echo '<pre>' . print_r($page_tree,true) . '</pre>' . "\n";
php_array_to_tree($page_tree, '', 'load_page_props', '', 'pagedir-0');
?>
</div>
</fieldset>
</span><!-- No blanks here, important for CSS --><span class="inline_half">
<fieldset>
<legend><?=_('Selected page')?></legend>
<label for="page_path"><?=_('Page path')?></label>
<input id="page_path" name="page_path" readonly="readonly" value="<?=_('(choose a page in the tree)')?>"><br>
<label for="page_edit"><?=_('Actions')?></label>
<input id="page_edit" type="button" value="<?=_('Edit page')?>" onclick="go_edit_page();">
<!--<input id="page_delete" type="button" value="<?=_('Delete page')?>" onclick="go_delete_page();">-->
<input id="page_rename" type="button" value="<?=_('Rename page')?>" onclick="rename_page();">
<br><br>
<label for="page_title"><?=_('Page title')?></label>
<input id="page_title" name="page_title" value=""><br>
<label for="page_description"><?=_('Page description')?></label>
<input id="page_description" name="page_description" value=""><br>
<label for="page_keywords"><?=_('Page keywords')?></label>
<input id="page_keywords" name="page_keywords" value=""><br>
<label for="page_submit"></label>
<input id="page_submit" type="button" value="<?=_('Save properties')?>" onclick="save_page_props();"><br>
</fieldset>
</span><!-- No blanks here, important for CSS --><span class="inline_half">
<fieldset>
<legend><?=_('Media tree')?></legend>
<input id="media_add" class="tree_add" type="button" value="<?=_('Add/Delete media')?>" onclick="go_add_form('media');">
<div class="css-treeview">
<?php
$media_tree=find_all('../media', 'media');
//echo '<pre>' . print_r($media_tree,true) . '</pre>' . "\n";
php_array_to_tree($media_tree, '', 'load_media_props', '', 'mediadir-0');
?>
</div>
</fieldset>
</span><!-- No blanks here, important for CSS --><span class="inline_half">
<fieldset>
<legend><?=_('Selected Media')?></legend>
<label for="media_path"><?=_('Media path')?></label>
<input id="media_path" name="media_path" readonly="readonly" value="<?=_('(choose a media in the tree)')?>"><br>
<!--<label for="media_edit"><?=_('Actions')?></label>
<input id="media_edit" type="button" value="Edit media">
<input id="media_delete" type="button" value="<?=_('Delete media')?>" onclick="go_delete_media();">
<br><br>
-->
<label for="media_title"><?=_('Media title')?></label>
<input id="media_title" name="media_title" value=""><br>
<label for="media_description"><?=_('Media description')?></label>
<input id="media_description" name="media_description" value=""><br>
<!--
<label for="media_keywords">Media keywords</label>
<input id="media_keywords" name="media_keywords" value=""><br>
-->
<label for="media_submit"></label>
<input id="media_submit" type="button" value="<?=_('Save properties')?>" onclick="save_media_props();"><br>
</fieldset>
</span><!-- No blanks here, important for CSS --><span class="inline_half">
<fieldset>
<legend><?=_('Site properties')?></legend>
<label for="site_admin_lang"><?=_('Admin lang')?></label>
<input id="site_admin_lang" name="site_admin_lang" value="<?=$site_conf['site_admin_lang']?>"><br>
<label for="site_default_page"><?=_('Default page')?></label>
<input id="site_default_page" name="site_default_page" value="<?=$site_conf['site_default_page']?>"><br>
<label for="site_submit"></label>
<input id="site_submit" type="button" value="<?=_('Save properties')?>" onclick="save_site_props();"><br>
</fieldset>
</span><!-- No blanks here, important for CSS --><span class="inline_half">
<!-- Place holder -->
</span>
</form>
</body>
</html>
|