[ Index ]
 

Code source de XOOPS 2.0.17.1

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

/htdocs/modules/system/admin/version/ -> main.php (source)

   1  <?php
   2  // $Id: main.php 2 2005-11-02 18:23:29Z skalpa $

   3  //  ------------------------------------------------------------------------ //

   4  //                XOOPS - PHP Content Management System                      //

   5  //                    Copyright (c) 2000 XOOPS.org                           //

   6  //                       <http://www.xoops.org/>                             //

   7  //  ------------------------------------------------------------------------ //

   8  //  This program is free software; you can redistribute it and/or modify     //

   9  //  it under the terms of the GNU General Public License as published by     //

  10  //  the Free Software Foundation; either version 2 of the License, or        //

  11  //  (at your option) any later version.                                      //

  12  //                                                                           //

  13  //  You may not change or alter any portion of this comment or credits       //

  14  //  of supporting developers from this source code or any supporting         //

  15  //  source code which is considered copyrighted (c) material of the          //

  16  //  original comment or credit authors.                                      //

  17  //                                                                           //

  18  //  This program is distributed in the hope that it will be useful,          //

  19  //  but WITHOUT ANY WARRANTY; without even the implied warranty of           //

  20  //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //

  21  //  GNU General Public License for more details.                             //

  22  //                                                                           //

  23  //  You should have received a copy of the GNU General Public License        //

  24  //  along with this program; if not, write to the Free Software              //

  25  //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //

  26  //  ------------------------------------------------------------------------ //

  27  // Author: Kazumi Ono (AKA onokazu)                                          //

  28  // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //

  29  // Project: The XOOPS Project                                                //

  30  // ------------------------------------------------------------------------- //

  31  
  32  if ( !is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->getVar('mid')) || !isset($_GET['mid'])) {
  33      exit("Access Denied");
  34  }
  35  
  36  if (intval($_GET['mid'])) {
  37      $module_handler =& xoops_gethandler('module');
  38      $versioninfo =& $module_handler->get(intval($_GET['mid']));
  39  } else {
  40      $mid = str_replace('..', '', trim($_GET['mid']));
  41      if (file_exists(XOOPS_ROOT_PATH.'/modules/'.$mid.'/xoops_version.php')) {
  42          $module_handler =& xoops_gethandler('module');
  43          $versioninfo =& $module_handler->create();
  44          $versioninfo->loadInfo($mid);
  45      }
  46  }
  47  if (!isset($versioninfo) || !is_object($versioninfo)) {
  48      exit();
  49  }
  50  
  51  //$css = getCss($theme);

  52  echo "<html>\n<head>\n";
  53  echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset="._CHARSET."\"></meta>\n";
  54  echo "<title>".htmlspecialchars($xoopsConfig['sitename'])."</title>\n";
  55  
  56  ?>
  57  <script type="text/javascript">
  58  <!--//
  59  scrollID=0;
  60  vPos=0;
  61  
  62  function onWard() {
  63     vPos+=2;
  64     window.scroll(0,vPos);
  65     vPos%=1000;
  66     scrollID=setTimeout("onWard()",30);
  67     }
  68  function stop(){
  69     clearTimeout(scrollID);
  70  }
  71  //-->

  72  </script>
  73  <?php
  74  /*

  75  if($css){

  76      echo "<link rel=\"stylesheet\" href=\"".$css."\" type=\"text/css\">\n\n";

  77  }

  78  */
  79  echo "</head>\n";
  80  echo "<body onLoad=\"if(window.scroll)onWard()\" onmouseover=\"stop()\" onmouseout=\"if(window.scroll)onWard()\">\n";
  81  echo "<div><table width=\"100%\"><tr><td align=\"center\"><br /><br /><br /><br /><br />";
  82  if ($modimage = $versioninfo->getInfo('image')) {
  83      $modimage_path = '/modules/'.$versioninfo->getInfo('dirname').'/'.$modimage;
  84      $modimage_realpath = str_replace("\\", "/", realpath(XOOPS_ROOT_PATH.$modimage_path));
  85      if (0 === strpos($modimage_realpath, XOOPS_ROOT_PATH) && is_file($modimage_realpath)) {
  86          echo "<img src='".XOOPS_URL.$modimage_path."' border='0' /><br />";
  87      }
  88  }
  89  if ($modname = $versioninfo->getInfo('name')) {
  90      echo "<big><b>".htmlspecialchars($modname)."</b></big>";
  91  }
  92  
  93  $modinfo = array('Version', 'Description', 'Author', 'Credits', 'License');
  94  foreach ($modinfo as $info) {
  95      if ($info_output = $versioninfo->getInfo(strtolower($info))) {
  96          echo "<br /><br /><u>$info</u><br />";
  97          echo htmlspecialchars($info_output);
  98      }
  99  }
 100  echo "<br /><br /><br /><br /><br />";
 101  echo "<br /><br /><br /><br /><br />";
 102  echo "<a href=\"javascript:window.close();\">Close</a>";
 103  echo "<br /><br /><br /><br /><br /><br />";
 104  echo "</td></tr></table></div>";
 105  echo "</body></html>";
 106  ?>


Généré le : Sun Nov 25 11:44:32 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics