Rev | Line | |
---|
[9261] | 1 | <?php |
---|
| 2 | |
---|
| 3 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
| 4 | |
---|
| 5 | if (!is_numeric($_GET['edit'])) |
---|
| 6 | { |
---|
| 7 | die('Wrong identifier'); |
---|
| 8 | } |
---|
| 9 | |
---|
| 10 | // Suppression |
---|
| 11 | if (isset($_REQUEST['delete']) and isset($_GET['edit'])) |
---|
| 12 | { |
---|
| 13 | pwg_query('DELETE FROM ' . ADD_PAGES_TABLE . ' WHERE id = ' . $_GET['edit'] . ';'); |
---|
| 14 | @unlink($conf['local_data_dir'].'/additional_pages_backup/' . $_GET['edit'] . '.txt'); |
---|
| 15 | if ($conf['additional_pages']['homepage'] == $_GET['edit']) |
---|
| 16 | { |
---|
| 17 | $conf['additional_pages']['homepage'] = null; |
---|
[9272] | 18 | conf_update_param('additional_pages', pwg_db_real_escape_string(serialize($conf['additional_pages']))); |
---|
[9261] | 19 | } |
---|
| 20 | redirect($my_base_url.'&page_deleted='); |
---|
| 21 | } |
---|
| 22 | |
---|
[9270] | 23 | $q = 'SELECT id , lang , title , content , users , groups , permalink, standalone |
---|
[9261] | 24 | FROM ' . ADD_PAGES_TABLE . ' |
---|
| 25 | WHERE id = '.$_GET['edit'].';'; |
---|
| 26 | |
---|
| 27 | $edited_page = mysql_fetch_assoc(pwg_query($q)); |
---|
| 28 | $page_title = l10n('ap_modify'); |
---|
| 29 | $edited_page['homepage'] = $conf['additional_pages']['homepage'] == $edited_page['id']; |
---|
[9270] | 30 | $edited_page['standalone'] = ($edited_page['standalone'] == 'true'); |
---|
[9261] | 31 | |
---|
| 32 | // Lien de suppression |
---|
| 33 | $template->assign('delete', true); |
---|
| 34 | |
---|
[9264] | 35 | include(AP_PATH.'admin/add_page.inc.php'); |
---|
[9261] | 36 | |
---|
| 37 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.