31
I think it has something to do with my admin.php file because that is where it stops when I click on the admin menu so I am adding my admin.php file below in hopes that it will help find a solution:
Admin.php:
$xoopsOption['pagetype'] = "admin";
include "mainfile.php";
include XOOPS_ROOT_PATH."/include/cp_functions.php";
/*********************************************************/
/* Admin Authentication */
/*********************************************************/
if ( $xoopsUser ) {
if ( !$xoopsUser->isAdmin() ) {
redirect_header("index.php",2,_AD_NORIGHT);
exit();
}
} else {
redirect_header("index.php",2,_AD_NORIGHT);
exit();
}
$op = "list";
if ( !empty($HTTP_GET_VARS['op']) ) {
$op = $HTTP_GET_VARS['op'];
}
if ( !empty($HTTP_POST_VARS['op']) ) {
$op = $HTTP_POST_VARS['op'];
}
if (!file_exists(XOOPS_CACHE_PATH.'/adminmenu.php') && $op != 'generate') {
xoops_header();
xoops_confirm(array('op' => 'generate'), 'admin.php', _AD_PRESSGEN);
xoops_footer();
exit();
}
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 '';
}
if ( is_writable(XOOPS_ROOT_PATH."/mainfile.php" ) ) {
xoops_error(sprintf(_WARNINWRITEABLE,XOOPS_ROOT_PATH.'/mainfile.php'));
echo '';
}
if (!empty($HTTP_GET_VARS['xoopsorgnews'])) {
/*
$rssurlfile = XOOPS_CACHE_PATH.'/adminnewsurl.xml';
$rssurldata = '';
if (!file_exists($rssurlfile) || filemtime($rssurlfile) < time() - 86400) {
if (false !== $fp = fopen('https://xoops.org/backendurl.xml', 'r')) {
while (!feof ($fp)) {
$rssurldata .= fgets($fp, 4096);
}
fclose($fp);
if (false !== $fp = fopen($rssurlfile, 'w')) {
fwrite($fp, $rssurldata);
}
fclose($fp);
}
} else {
if (false !== $fp = fopen($rssurlfile, 'r')) {
while (!feof ($fp)) {
$rssurldata .= fgets($fp, 4096);
}
fclose($fp);
}
}
*/
$rssurl = 'https://xoops.org/backend.php';
/*
if ($rssurldata != '') {
include_once XOOPS_ROOT_PATH.'/class/xml/rpc/xmlrpcparser.php';
$rpcparser = new XoopsXmlRpcParser($rssurldata);
if (false != $rpcparser->parse()) {
$params =& $rpcparser->getParam();
$langcode = _LANGCODE;
if (!is_array($params[0]) || !isset($params[0][$langcode])) {
$rssurl = 'https://xoops.org/backend.php';
} else {
$rssurl = $params[0][$langcode];
}
} else {
echo $rpcparser->getErrors();
}
}
*/
$rssfile = XOOPS_CACHE_PATH.'/adminnews.xml';
$rssdata = '';
if (!file_exists($rssfile) || filemtime($rssfile) < time() - 86400) {
if (false !== $fp = fopen($rssurl, 'r')) {
while (!feof ($fp)) {
$rssdata .= fgets($fp, 4096);
}
fclose($fp);
if (false !== $fp = fopen($rssfile, 'w')) {
fwrite($fp, $rssdata);
}
fclose($fp);
}
} else {
if (false !== $fp = fopen($rssfile, 'r')) {
while (!feof ($fp)) {
$rssdata .= fgets($fp, 4096);
}
fclose($fp);
}
}
if ($rssdata != '') {
include_once XOOPS_ROOT_PATH.'/class/xml/rss/xmlrss2parser.php';
$rss2parser = new XoopsXmlRss2Parser($rssdata);
if (false != $rss2parser->parse()) {
echo '';
$items =& $rss2parser->getItems();
$count = count($items);
for ($i = 0; $i < $count; $i++) {
echo ' '; echo $items[$i]['title'].' ('.$items[$i]['pubdate'].') ';
if ($items[$i]['description'] != "") {
echo ' '.$items[$i]['description']; if ($items[$i]['guid'] != "") { echo ' '._MORE.''; } echo ' ';
} elseif ($items[$i]['guid'] != "") {
echo ' '._MORE.' ';
}
}
echo ' ';
} else {
echo $rss2parser->getErrors();
}
}
}
xoops_cp_footer();
break;
case 'generate':
xoops_module_write_admin_menu(xoops_module_get_admin_menu());
redirect_header('admin.php', 1, _AD_LOGINADMIN);
break;
default:
break;
}
?>