diff options
author | vdigital <vdigital@piwigo.org> | 2007-07-25 10:48:28 +0000 |
---|---|---|
committer | vdigital <vdigital@piwigo.org> | 2007-07-25 10:48:28 +0000 |
commit | 8d50ba3facbfe3aedb0f87f47dfbd3b902cd7f76 (patch) | |
tree | 7fcf926d4770ddae799bc11a8df60210b6a7f87d /plugins/admin_multi_view/controller.php | |
parent | 94c265d0cd6866fac7f6a1606348a5a0032614be (diff) |
Revised to repsect HTML conformity and to remove a minor bug on template.
Only the real administrator template is used for the Controller page.
git-svn-id: http://piwigo.org/svn/trunk@2073 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'plugins/admin_multi_view/controller.php')
-rw-r--r-- | plugins/admin_multi_view/controller.php | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/plugins/admin_multi_view/controller.php b/plugins/admin_multi_view/controller.php index 32ad18b88..3b694c7e2 100644 --- a/plugins/admin_multi_view/controller.php +++ b/plugins/admin_multi_view/controller.php @@ -11,12 +11,17 @@ if (!is_admin() or !function_exists('multiview_user_init') ) pwg_unset_session_var( 'multiview_show_queries' ); pwg_unset_session_var( 'multiview_debug_l10n' ); ?> + <script type="text/javascript"> window.close(); </script> <?php exit(); } +?> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" +"http://www.w3.org/TR/html4/strict.dtd"> +<?php $refresh_main = false; @@ -64,12 +69,13 @@ if ( isset($_GET['debug_l10n']) ) } $my_url = get_root_url().'plugins/'.basename(dirname(__FILE__)).'/'.basename(__FILE__); -$my_theme = get_root_url().'template/'.$user['template'].'/theme/'.$user['theme'].'/theme.css'; +$my_template = ''; $themes_html='Theme: <select onchange="document.location = this.options[this.selectedIndex].value;">'; foreach (get_pwg_themes() as $pwg_template) { $selected = $pwg_template == pwg_get_session_var( 'multiview_theme', $user['template'].'/'.$user['theme'] ) ? 'selected="selected"' : ''; + $my_template = $selected == '' ? $my_template : $user['template'].'/theme/'.$user['theme']; $themes_html .= '<option value="' .$my_url.'?theme='.$pwg_template @@ -112,20 +118,24 @@ if (!$conf['show_queries']) $debug_l10n_html.='<a href="'.$my_url.'?debug_l10n=0">Revert debug language</a>'; } ?> - <html> <head> <title>Controller</title> +<?php +// Controller will be displayed with the **real admin template** (without Any if it has been removed) +if ( $my_template !== '') { + $my_template = get_root_url().'template/'.$my_template.'/theme.css'; + echo '<link rel="stylesheet" type="text/css" href="' . $my_template .'">'; +} +?> + </head> -<link rel="stylesheet" type="text/css" href="<?php -echo $my_theme; -?>"> <body> - +<div> <script type="text/javascript"> if (window.opener==null) { window.close(); - document.write("<h2>How did you get here ???</h2>"); + document.write("<"+"h2>How did you get here ???<"+"/h2>"); } </script> @@ -152,7 +162,6 @@ View as: window.opener.location = window.opener.location;'; ?> </script> - +</div> </body> - </html> |