C:\$Recycle.Bin\S-1-5-21-3967099092-2644009230-141905953-500\$RU7MSUA\html\admin.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<?php
// $Id: admin.php,v 1.11.6.7 2005/07/26 02:54:11 phppp Exp $
//  ------------------------------------------------------------------------ //
//                XOOPS - PHP Content Management System                      //
//                    Copyright (c) 2000 XOOPS.org                           //
//                       <http://www.xoops.org/>                             //
//  ------------------------------------------------------------------------ //
//  This program is free software; you can redistribute it and/or modify     //
//  it under the terms of the GNU General Public License as published by     //
//  the Free Software Foundation; either version 2 of the License, or        //
//  (at your option) any later version.                                      //
//                                                                           //
//  You may not change or alter any portion of this comment or credits       //
//  of supporting developers from this source code or any supporting         //
//  source code which is considered copyrighted (c) material of the          //
//  original comment or credit authors.                                      //
//                                                                           //
//  This program is distributed in the hope that it will be useful,          //
//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
//  GNU General Public License for more details.                             //
//                                                                           //
//  You should have received a copy of the GNU General Public License        //
//  along with this program; if not, write to the Free Software              //
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
//  ------------------------------------------------------------------------ //

$xoopsOption['pagetype'] = "admin";
require 
"mainfile.php";
include 
XOOPS_ROOT_PATH."/include/cp_functions.php";
/*********************************************************/
/* Admin Authentication                                  */
/*********************************************************/

if ( $xoopsUser ) {
    if ( !
$xoopsUser->isAdmin(-1) ) {
        
redirect_header("index.php",2,_AD_NORIGHT);
        exit();
    }
} else {
    
redirect_header("index.php",2,_AD_NORIGHT);
    exit();
}
$op "list";

if ( !empty(
$_GET['op']) ) {
    
$op $_GET['op'];
}

if ( !empty(
$_POST['op']) ) {
    
$op $_POST['op'];
}

switch (
$op) {
case 
"list":
    
xoops_cp_header();
    
// ###### Output warn messages for security ######
    
if (is_dir(XOOPS_ROOT_PATH."/install/" )) {
        
xoops_error(sprintf(_WARNINSTALL2,XOOPS_ROOT_PATH.'/install/'));
        echo 
'<br />';
    }
    if ( 
is_writable(XOOPS_ROOT_PATH."/mainfile.php" ) ) {
        
xoops_error(sprintf(_WARNINWRITEABLE,XOOPS_ROOT_PATH.'/mainfile.php'));
        echo 
'<br />';
    }
    if (!empty(
$_GET['xoopsorgnews'])) {
        
$rssurl 'http://www.xoops.org/backend.php';
        
$rssfile XOOPS_CACHE_PATH.'/adminnews.xml';
        
$rssdata '';
        if (!
file_exists($rssfile) || filemtime($rssfile) < time() - 86400) {
            require_once 
XOOPS_ROOT_PATH.'/class/snoopy.php';
            
$snoopy = new Snoopy;
            if (
$snoopy->fetch($rssurl)) {
                
$rssdata $snoopy->results;
                if (
false !== $fp fopen($rssfile'w')) {
                    
fwrite($fp$rssdata);
                }
                
fclose($fp);
            }
        } else {
            if (
false !== $fp fopen($rssfile'r')) {
                while (!
feof ($fp)) {
                    
$rssdata .= fgets($fp4096);
                }
                
fclose($fp);
            }
        }
        if (
$rssdata != '') {
            include_once 
XOOPS_ROOT_PATH.'/class/xml/rss/xmlrss2parser.php';
            
$rss2parser = new XoopsXmlRss2Parser($rssdata);
            if (
false != $rss2parser->parse()) {
                echo 
'<table class="outer" width="100%">';
                
$items =& $rss2parser->getItems();
                
$count count($items);
                
$myts =& MyTextSanitizer::getInstance();
                for (
$i 0$i $count$i++) {
                    echo 
'<tr class="head"><td><a href="'.htmlspecialchars($items[$i]['link']).'" target="_blank">';
                    echo 
htmlspecialchars(XoopsLocal::convert_encoding($items[$i]['title'], _CHARSET"UTF-8")).'</a> ('.formatTimestamp(htmlspecialchars($items[$i]['pubdate'])).')</td></tr>';
                    if (
$items[$i]['description'] != "") {
                        echo 
'<tr><td class="odd">'.XoopsLocal::convert_encoding($items[$i]['description'], _CHARSET"UTF-8");
                        if (
$items[$i]['guid'] != "") {
                            echo 
'&nbsp;&nbsp;<a href="'.htmlspecialchars($items[$i]['guid']).'" target="_blank">'._MORE.'</a>';
                        }
                        echo 
'</td></tr>';
                    } elseif (
$items[$i]['guid'] != "") {
                        echo 
'<tr><td class="even" valign="top"></td><td colspan="2" class="odd"><a href="'.htmlspecialchars($items[$i]['guid']).'" target="_blank">'._MORE.'</a></td></tr>';
                    }
                }
                echo 
'</table>';
            } else {
                echo 
$rss2parser->getErrors();
            }
        }
    }
    else {
        
//load admin frontpage blocks
        
$block_handler =& xoops_gethandler('block');
        
//$block_arr =& $block_handler->getAdminBlocks($xoopsUser->getGroups());
        
$block_handler->assignBlocks();
    }
    
xoops_cp_footer();
    break;
default:
    break;
}
?>