diff options
| author | fisharebest <fisharebest@gmail.com> | 2011-11-05 14:25:38 +0000 |
|---|---|---|
| committer | fisharebest <fisharebest@gmail.com> | 2011-11-05 14:25:38 +0000 |
| commit | 9184390d6d1424fcb32e2edc70d4feced52fa3f4 (patch) | |
| tree | 60ad769580e96d229ef8b024b233fcfbd186fdd0 /index_edit.php | |
| parent | 9b21eb42558a27852c3f93b872a7baa62b51040a (diff) | |
| download | webtrees-9184390d6d1424fcb32e2edc70d4feced52fa3f4.tar.gz webtrees-9184390d6d1424fcb32e2edc70d4feced52fa3f4.tar.bz2 webtrees-9184390d6d1424fcb32e2edc70d4feced52fa3f4.zip | |
Major MVC refactoring. Every page now has a controller.
Diffstat (limited to 'index_edit.php')
| -rw-r--r-- | index_edit.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/index_edit.php b/index_edit.php index 7396d1a011..4ee7a26d5a 100644 --- a/index_edit.php +++ b/index_edit.php @@ -26,6 +26,8 @@ define('WT_SCRIPT_NAME', 'index_edit.php'); require './includes/session.php'; +$controller=new WT_Controller_Simple(); + $ctype=safe_REQUEST($_REQUEST, 'ctype', array('user', 'gedcom')); if (!$ctype) { @@ -43,10 +45,9 @@ if (isset($_REQUEST['name'])) $name = $_REQUEST['name']; //-- make sure that they have user status before they can use this page //-- otherwise have them login again if (!WT_USER_ID) { - print_simple_header(''); + $controller->pageHeader(); echo WT_I18N::translate('<b>Access Denied</b><br />You do not have access to this resource.'); echo '<div class="center"><a href="javascript:;" onclick="self.close();">', WT_I18N::translate('Close Window').'</a></div>'; - print_simple_footer(); exit; } if (!WT_USER_IS_ADMIN) $setdefault=false; @@ -99,10 +100,11 @@ if ($ctype=='user') { } if ($ctype=='user') { - print_simple_header(WT_I18N::translate('My page')); + $controller->setPageTitle(WT_I18N::translate('My page')); } else { - print_simple_header(get_gedcom_setting(WT_GED_ID, 'title')); + $controller->setPageTitle(WT_I18N::translate(get_gedcom_setting(WT_GED_ID, 'title')); } +$controller->pageHeader(); if ($action=='update') { foreach (array('main', 'side') as $location) { |
