1 | <?php
|
---|
2 | // $Id: xoops_version.php,v 1.8 2005/06/03 01:35:02 phppp 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: phppp (D.J.) //
|
---|
28 | // URL: http://xoopsforge.com, http://xoops.org.cn //
|
---|
29 | // ------------------------------------------------------------------------- //
|
---|
30 | //include_once 'cp_functions.php';
|
---|
31 | $mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
|
---|
32 | require_once '../../../include/cp_header.php' ;
|
---|
33 | //require_once '../include/gtickets.php' ;
|
---|
34 | //define( '_MYMENU_CONSTANT_IN_MODINFO' , '_MI_TELLAFRIEND_MODNAME' ) ;
|
---|
35 |
|
---|
36 | // branch for altsys
|
---|
37 | if( defined( 'XOOPS_TRUST_PATH' ) && ! empty( $_GET['lib'] ) ) {
|
---|
38 | $mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
|
---|
39 | $mydirpath = dirname( dirname( __FILE__ ) ) ;
|
---|
40 |
|
---|
41 | // common libs (eg. altsys)
|
---|
42 | $lib = preg_replace( '/[^a-zA-Z0-9_-]/' , '' , $_GET['lib'] ) ;
|
---|
43 | $page = preg_replace( '/[^a-zA-Z0-9_-]/' , '' , @$_GET['page'] ) ;
|
---|
44 |
|
---|
45 | if( file_exists( XOOPS_TRUST_PATH.'/libs/'.$lib.'/'.$page.'.php' ) ) {
|
---|
46 | include XOOPS_TRUST_PATH.'/libs/'.$lib.'/'.$page.'.php' ;
|
---|
47 | } else if( file_exists( XOOPS_TRUST_PATH.'/libs/'.$lib.'/index.php' ) ) {
|
---|
48 | include XOOPS_TRUST_PATH.'/libs/'.$lib.'/index.php' ;
|
---|
49 | } else {
|
---|
50 | die( 'wrong request' ) ;
|
---|
51 | }
|
---|
52 | exit ;
|
---|
53 | }
|
---|
54 |
|
---|
55 | //include_once('./menu.php');
|
---|
56 | //include_once('./../../../include/cp_header.php');
|
---|
57 | xoops_cp_header();
|
---|
58 | include( './mymenu.php' ) ;
|
---|
59 |
|
---|
60 | include_once(dirname(__FILE__) . '/../class/check_blocks_class.php');
|
---|
61 |
|
---|
62 | //BLOCK CHECK
|
---|
63 | echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . 'Check ' . $mydirname . ' block table' . "</legend>";
|
---|
64 | echo "<div style='padding: 8px;'>";
|
---|
65 |
|
---|
66 | $xoops_block_check =& xoops_block_check::getInstance();
|
---|
67 |
|
---|
68 | if ( !$xoops_block_check->is_admin() )
|
---|
69 | {
|
---|
70 | include XOOPS_ROOT_PATH.'/footer.php';
|
---|
71 | exit();
|
---|
72 | }
|
---|
73 |
|
---|
74 | switch ( $xoops_block_check->get_op() )
|
---|
75 | {
|
---|
76 | case "remove_all_block":
|
---|
77 | echo $xoops_block_check->remove_all_block();
|
---|
78 | break;
|
---|
79 | case "remove_block":
|
---|
80 | echo $xoops_block_check->remove_block();
|
---|
81 | break;
|
---|
82 | default:
|
---|
83 | if ($xoops_block_check->check_blocks($mydirname)){
|
---|
84 | echo $xoops_block_check->get_message();
|
---|
85 | echo "<br /><br />";
|
---|
86 | echo _AM_XP2_BLOCK_OK ;
|
---|
87 | } else {
|
---|
88 |
|
---|
89 | echo $xoops_block_check->get_message();
|
---|
90 | echo "<br /><br />\n";
|
---|
91 | echo _AM_XP2_BLOCK_NG."<br />\n";
|
---|
92 | echo _AM_XP2_BLOCK_REPAIR_HOWTO."<br />\n";
|
---|
93 | echo '<form method="POST">'."\n";
|
---|
94 | echo _AM_XP2_BLOCK_REPAIR_STEP1 .' : <br />'."\n";
|
---|
95 | echo '     ';
|
---|
96 | echo '<input type="submit" name="mid:'.$xoops_block_check->module_id.'" value="' . _AM_XP2_NG_BLOCK_REMOVE . ': '.$xoops_block_check->module_name.'" />'."<br />\n";
|
---|
97 | echo '    ' . _AM_XP2_BLOCK_OR . '<br />'."\n";
|
---|
98 | echo '     ';
|
---|
99 | echo '<input type="submit" name="amid:'.$xoops_block_check->module_id.'" value="' . _AM_XP2_BLOCK_REMOVE . ': '.$xoops_block_check->module_name.'" />'."<br />\n";
|
---|
100 | echo '<br />'."\n";
|
---|
101 | echo '    ' . _AM_XP2_BLOCK_REMOVE_NOTE;
|
---|
102 | echo "</form>\n";
|
---|
103 | echo "<br />\n";
|
---|
104 | echo _AM_XP2_BLOCK_REPAIR_STEP2 . ' : ' . _AM_XP2_BLOCK_UPDATE . "<br />\n";
|
---|
105 | echo '     ';
|
---|
106 | echo '<a href="'.$xoops_block_check->update_link.'">' .$xoops_block_check->module_name . ' ' . _AM_XP2_TO_MODELE_UPDATE .'</a>';
|
---|
107 | echo "<br />\n";
|
---|
108 | echo "<br />\n";
|
---|
109 |
|
---|
110 | echo _AM_XP2_BLOCK_REPAIR_STEP3 . ' : ' . _AM_XP2_BLOCK_ADMIN_SETTING . "<br />\n";
|
---|
111 | echo '     ';
|
---|
112 | echo '<a href="admin_blocks.php">' .$xoops_block_check->module_name . ' ' . _AM_XP2_BLOCK_TO_SETTING .'</a>';
|
---|
113 | echo "<br />\n";
|
---|
114 | }
|
---|
115 | break;
|
---|
116 |
|
---|
117 | }
|
---|
118 |
|
---|
119 | //if ( $xoops_block_check->get_xoops_version() == '2.1' ) {
|
---|
120 | // $xoopsTpl->assign( 'xoops_contents', $cont );
|
---|
121 | //} else {
|
---|
122 | //}
|
---|
123 | echo "</fieldset>";
|
---|
124 | xoops_cp_footer();
|
---|
125 |
|
---|
126 | ?> |
---|