Show
Ignore:
Timestamp:
07/25/07 12:48:28 (6 years ago)
Author:
vdigital
Message:

Revised to repsect HTML conformity and to remove a minor bug on template.
Only the real administrator template is used for the Controller page.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/plugins/admin_multi_view/controller.php

    r2016 r2073  
    1212  pwg_unset_session_var( 'multiview_debug_l10n' ); 
    1313?> 
     14 
    1415<script type="text/javascript"> 
    1516  window.close(); 
     
    1819  exit(); 
    1920} 
     21?> 
     22<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" 
     23"http://www.w3.org/TR/html4/strict.dtd"> 
     24<?php 
    2025 
    2126$refresh_main = false; 
     
    6570 
    6671$my_url = get_root_url().'plugins/'.basename(dirname(__FILE__)).'/'.basename(__FILE__); 
    67 $my_theme = get_root_url().'template/'.$user['template'].'/theme/'.$user['theme'].'/theme.css'; 
     72$my_template = ''; 
    6873 
    6974$themes_html='Theme: <select onchange="document.location = this.options[this.selectedIndex].value;">'; 
     
    7176{ 
    7277  $selected = $pwg_template == pwg_get_session_var( 'multiview_theme', $user['template'].'/'.$user['theme'] ) ? 'selected="selected"' : ''; 
     78  $my_template = $selected == '' ? $my_template : $user['template'].'/theme/'.$user['theme']; 
    7379  $themes_html .= 
    7480    '<option value="' 
     
    113119} 
    114120?> 
    115  
    116121<html> 
    117122<head> 
    118123<title>Controller</title> 
     124<?php  
     125// Controller will be displayed  with  the **real admin template** (without Any if it has been removed) 
     126if ( $my_template !== '') { 
     127  $my_template = get_root_url().'template/'.$my_template.'/theme.css'; 
     128  echo '<link rel="stylesheet" type="text/css" href="' . $my_template .'">'; 
     129} 
     130?> 
     131 
    119132</head> 
    120 <link rel="stylesheet" type="text/css" href="<?php 
    121 echo $my_theme; 
    122 ?>"> 
    123133<body> 
    124  
     134<div> 
    125135<script type="text/javascript"> 
    126136if (window.opener==null) { 
    127137  window.close(); 
    128   document.write("<h2>How did you get here ???</h2>"); 
     138  document.write("<"+"h2>How did you get here ???<"+"/h2>"); 
    129139} 
    130140</script> 
     
    153163?> 
    154164</script> 
    155  
     165</div> 
    156166</body> 
    157  
    158167</html>