source: temp/test-xoops.ec-cube.net/html/modules/system/admin/version/main.php @ 405

Revision 405, 4.8 KB checked in by root, 20 years ago (diff)
Line 
1<?php
2// $Id: main.php,v 1.4 2005/08/03 12:40:00 onokazu Exp $
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
32if ( !is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->getVar('mid')) || !isset($_GET['mid'])) {
33    exit("Access Denied");
34}
35
36if (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}
47if (!isset($versioninfo) || !is_object($versioninfo)) {
48    exit();
49}
50
51//$css = getCss($theme);
52echo "<html>\n<head>\n";
53echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset="._CHARSET."\"></meta>\n";
54echo "<title>".htmlspecialchars($xoopsConfig['sitename'])."</title>\n";
55
56?>
57<script type="text/javascript">
58<!--//
59scrollID=0;
60vPos=0;
61
62function onWard() {
63   vPos+=2;
64   window.scroll(0,vPos);
65   vPos%=1000;
66   scrollID=setTimeout("onWard()",30);
67   }
68function stop(){
69   clearTimeout(scrollID);
70}
71//-->
72</script>
73<?php
74/*
75if($css){
76    echo "<link rel=\"stylesheet\" href=\"".$css."\" type=\"text/css\">\n\n";
77}
78*/
79echo "</head>\n";
80echo "<body onLoad=\"if(window.scroll)onWard()\" onmouseover=\"stop()\" onmouseout=\"if(window.scroll)onWard()\">\n";
81echo "<div><table width=\"100%\"><tr><td align=\"center\"><br /><br /><br /><br /><br />";
82if ($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}
89if ($modname = $versioninfo->getInfo('name')) {
90    echo "<big><b>".htmlspecialchars($modname)."</b></big>";
91}
92
93$modinfo = array('Version', 'Description', 'Author', 'Credits', 'License');
94foreach ($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}
100echo "<br /><br /><br /><br /><br />";
101echo "<br /><br /><br /><br /><br />";
102echo "<a href=\"javascript:window.close();\">Close</a>";
103echo "<br /><br /><br /><br /><br /><br />";
104echo "</td></tr></table></div>";
105echo "</body></html>";
106?>
Note: See TracBrowser for help on using the repository browser.