[ Index ]
 

Code source de Joomla 1.0.13

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

/administrator/popups/ -> modulewindow.php (source)

   1  <?php
   2  /**
   3  * @version $Id: modulewindow.php 5864 2006-11-27 22:54:44Z Saka $
   4  * @package Joomla
   5  * @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
   6  * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
   7  * Joomla! is free software. This version may have been modified pursuant
   8  * to the GNU General Public License, and as distributed it includes or
   9  * is derivative of works licensed under the GNU General Public License or
  10  * other free or open source software licenses.
  11  * See COPYRIGHT.php for copyright notices and details.
  12  */
  13  
  14  // Set flag that this is a parent file
  15  define( "_VALID_MOS", 1 );
  16  
  17  require_once ( '../includes/auth.php' );
  18  include_once ( $mosConfig_absolute_path . '/language/' . $mosConfig_lang . '.php' );
  19  
  20  // limit access to functionality
  21  $option = strval( mosGetParam( $_SESSION, 'option', '' ) );
  22  $task     = strval( mosGetParam( $_SESSION, 'task', '' ) );
  23  switch ($option) {
  24      case 'com_modules':
  25          if ( $task != 'edit' && $task != 'editA'  && $task != 'new' ) {
  26              echo _NOT_AUTH;
  27              return;
  28          }
  29          break;
  30  
  31      default:
  32          echo _NOT_AUTH;
  33          return;
  34          break;
  35  }
  36  
  37  $title     = stripslashes( mosGetParam( $_REQUEST, 'title', 0 ) );
  38  $css     = mosGetParam( $_REQUEST, 't', '');
  39  $row     = null;
  40  
  41  $database = new database( $mosConfig_host, $mosConfig_user, $mosConfig_password, $mosConfig_db, $mosConfig_dbprefix );
  42  $database->debug( $mosConfig_debug );
  43  
  44  $query = "SELECT *"
  45  . "\n FROM #__modules"
  46  . "\n WHERE title = " . $database->Quote( $title )
  47  ;
  48  $database->setQuery( $query );
  49  $database->loadObject( $row );
  50  
  51  $pat        = "src=images";
  52  $replace    = "src=../../images";
  53  $pat2        = "\\\\'";
  54  $replace2    = "'";
  55  $content    = eregi_replace($pat, $replace, $row->content);
  56  $content    = eregi_replace($pat2, $replace2, $row->content);
  57  $title        = eregi_replace($pat2, $replace2, $row->title);
  58  
  59  // css file handling
  60  // check to see if template exists
  61  if ( $css != '' && !is_dir($mosConfig_absolute_path .'/administrator/templates/'. $css .'/css/template_css.css' )) {
  62      $css     = 'rhuk_solarflare_ii';
  63  } else if ( $css == '' ) {
  64      $css     = 'rhuk_solarflare_ii';
  65  }
  66  
  67  $iso = split( '=', _ISO );
  68  // xml prolog
  69  echo '<?xml version="1.0" encoding="'. $iso[1] .'"?' .'>';
  70  ?>
  71  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  72  <html xmlns="http://www.w3.org/1999/xhtml">
  73  <head>
  74  <title>Module Preview</title>
  75  <link rel="stylesheet" href="../../templates/<?php echo $css; ?>/css/template_css.css" type="text/css">
  76  <script>
  77  var content = window.opener.document.adminForm.content.value;
  78  var title = window.opener.document.adminForm.title.value;
  79  
  80  content = content.replace('#', '');
  81  title = title.replace('#', '');
  82  content = content.replace('src=images', 'src=../../images');
  83  content = content.replace('src=images', 'src=../../images');
  84  title = title.replace('src=images', 'src=../../images');
  85  content = content.replace('src=images', 'src=../../images');
  86  title = title.replace('src=\"images', 'src=\"../../images');
  87  content = content.replace('src=\"images', 'src=\"../../images');
  88  title = title.replace('src=\"images', 'src=\"../../images');
  89  content = content.replace('src=\"images', 'src=\"../../images');
  90  </script>
  91  <meta http-equiv="Content-Type" content="text/html; <?php echo _ISO; ?>" />
  92  </head>
  93  
  94  <body style="background-color:#FFFFFF">
  95  <table align="center" width="160" cellspacing="2" cellpadding="2" border="0" height="100%">
  96  <tr>
  97      <td class="moduleheading"><script>document.write(title);</script></td>
  98  </tr>
  99  <tr>
 100      <td valign="top" height="90%"><script>document.write(content);</script></td>
 101  </tr>
 102  <tr>
 103      <td align="center"><a href="#" onClick="window.close()">Close</a></td>
 104  </tr>
 105  </table>
 106  </body>
 107  </html>


Généré le : Wed Nov 21 14:43:32 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics