diff options
Diffstat (limited to 'code/admin/add.php')
-rw-r--r-- | code/admin/add.php | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/code/admin/add.php b/code/admin/add.php new file mode 100644 index 0000000..c839e0a --- /dev/null +++ b/code/admin/add.php @@ -0,0 +1,55 @@ +<?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']); + + $kind=sanitize($_GET, 'kind', '/[^a-z_]+/', 'page'); /* Could be : page, media */ +?> +<!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="admin.js"></script> +<title><?=($kind=='media')?_('Add media'):_('Add page')?></title> +</head> +<body> +<form> + +<fieldset> +<legend><?=($kind=='media')?_('Media tree'):_('Page tree')?></legend> +<div class="css-treeview"> +<?php + if ($kind=='media') { + $tree=find_all('../media', 'media'); + } else { + $tree=find_all('./content', 'page'); + } + php_array_to_tree($tree, 'select_fold'); +?> +</div> +</fieldset> + +<fieldset> +<legend><?=($kind=='media')?_('Media folder'):_('Page folder')?></legend> +<label for="fold_path"><?=_('Folder path')?></label> +<input id="fold_path" name="fold_path" readonly="readonly" value="<?=_('(choose a folder in the tree)')?>"><br> + +<label for="fold_add_name"><?=_('New item name')?></label> +<input id="fold_add_name" type="text" value=""> + +<label for="fold_add_fold"><?=_('Actions')?></label> +<input id="fold_add_fold" type="button" value="<?=_('Add folder')?>" onclick="go_add('<?=$kind?>','fold');"> +<input id="fold_add_item" type="button" value="<?=_('Add page')?>" onclick="go_add('<?=$kind?>','item');"> +</fieldset> + +</form> +</body> +</html> |