XPressME Integration Kit

Trac

source: branches/XPressMU/xpressme_integration_kit/admin/block_check.php

Last change on this file was 232, checked in by toemon, 15 years ago

external追加に伴うフォルダー構成変更

File size: 5.2 KB
Line 
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__ ) ) ) ;
32require_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
37if( 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');
57xoops_cp_header();
58include( './mymenu.php' ) ;
59
60include_once(dirname(__FILE__) . '/../class/check_blocks_class.php');
61
62//BLOCK CHECK
63echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . 'Check ' . $mydirname . ' block table' . "</legend>";
64echo "<div style='padding: 8px;'>";
65
66$xoops_block_check =& xoops_block_check::getInstance();
67
68if ( !$xoops_block_check->is_admin() )
69{
70        include XOOPS_ROOT_PATH.'/footer.php';
71        exit();
72}
73
74switch ( $xoops_block_check->get_op() )
75{
76case "remove_block":
77        echo $xoops_block_check->remove_block();
78        break;
79
80default:
81        if ($xoops_block_check->check_blocks($mydirname)){
82                        echo $xoops_block_check->get_message();
83                        echo "<br /><br />";
84                        echo _AM_XP2_BLOCK_OK ;
85        } else {
86
87                        echo $xoops_block_check->get_message();
88                        echo "<br /><br />\n";
89                        echo _AM_XP2_BLOCK_NG."<br />\n";
90                        echo _AM_XP2_BLOCK_REPAIR_HOWTO."<br />\n";
91                        echo '<form method="POST">'."\n";
92                        echo _AM_XP2_BLOCK_REPAIR_STEP1 .' : '."\n";
93                        echo '<input type="submit" name="mid:'.$xoops_block_check->module_id.'" value="' . _AM_XP2_BLOCK_REMOVE . ': '.$xoops_block_check->module_name.'" />'."<br />\n";
94                        echo '&emsp;&emsp;&emsp;&emsp;&nbsp;';
95                        echo _AM_XP2_BLOCK_REMOVE_NOTE;
96                        echo "</form>\n";
97                        echo "<br />\n";
98                        echo _AM_XP2_BLOCK_REPAIR_STEP2 . ' : ' . _AM_XP2_BLOCK_UPDATE . "<br />\n";
99                        echo '&emsp;&emsp;&emsp;&emsp;&nbsp;';
100                        echo '<a href="'.$xoops_block_check->update_link.'">' .$xoops_block_check->module_name . ' ' . _AM_XP2_TO_MODELE_UPDATE .'</a>';
101                        echo "<br />\n";
102                        echo "<br />\n";
103                       
104                        echo _AM_XP2_BLOCK_REPAIR_STEP3 . ' : ' . _AM_XP2_BLOCK_ADMIN_SETTING . "<br />\n";
105                        echo '&emsp;&emsp;&emsp;&emsp;&nbsp;';
106                        echo '<a href="admin_blocks.php">' .$xoops_block_check->module_name . ' ' . _AM_XP2_BLOCK_TO_SETTING .'</a>';
107                        echo "<br />\n";
108        }
109        break;
110
111}
112
113//if ( $xoops_block_check->get_xoops_version() == '2.1' ) {
114//      $xoopsTpl->assign( 'xoops_contents', $cont );
115//} else {
116//}
117echo "</fieldset>";
118xoops_cp_footer();
119       
120?>
Note: See TracBrowser for help on using the repository browser.