PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I'm trying to create an administration page for my phpBB's administration panel, but for some reason my conditional statements are doing NOTHING. Since I know absolutely nothing about PHP, have at look at it and tell me whats wrong
<?php
/***************************************************************************
File: admin_mainsite.php
Created: 11/28/05
Description: phpBB Integrated Site Administration
Notes: [None as of yet ^_~]
***************************************************************************/
define('IN_PHPBB', 1);
if( !empty($setmodules) )
{
$filename = basename(__FILE__);
$module['ZD Site']['Plesk CP'] = $file;
$module['ZD Site']['File Manager'] = "$file?mode=fileman";
$module['ZD Site']['phpMyAdmin'] = "$file?mode=phpMyAdmin";
$module['ZD Site']['Edit Content'] = "$file?mode=contentedit";
$module['ZD Site']['Edit Links'] = "$file?mode=linkedit";
$module['ZD Site']['Admin Notepad'] = "$file?mode=notepad";
$module['ZD Site']['Configuration'] = "$file?mode=baseconfig";
$module['ZD Site']['Utilities'] = "$file?mode=utilitylist";
return;
}
if( $mode == "fileman" )
{
echo 'This is the place for the file manager scripts.';
}
if( $mode == "phpMyAdmin")
{
echo 'This is the place for the phpMyAdmin redirection.';
}
if( $mode == "contentedit")
{
echo 'This is the place for the content editor script.';
}
if( $mode == "linkedit")
{
echo "This is where I figure out how the hell I'm going to do link administration.";
}
if( $mode == "notepad")
{
echo 'Just a simple script to write to a file for a notepad...also tests the editor script.';
}
if( $mode == "baseconfig")
{
echo 'Change basic configuration information for the site.';
}
if( $mode == "utilitylist")
{
echo 'Some basic utilities that will help with site administration.';
}
?>
$mode = $_GET['mode'];
//add the above line to set $mode from request_uri string
define('IN_PHPBB', 1);
if( !empty($setmodules) )
{
$filename = basename(__FILE__);
probably have register_globals = off gotta be explicit.
Well, I finally got the script working, and I appreciate all the help. However, now I'm having a new problem. Does anyone know how to apply the template system to phpBB's ACP module pages? Any suggestions would be much appreciated