<?PHP
/**
* index - holds switches for the quicklinks module
*
* This is the hub of the quicklinks module. All operational
* decisions are made here.
*
* @module quicklinks
* @package phpWebSite
* @author Edward Ritter <hide@address.com>
* @version $Id: index.php,v 1.7 2002/09/04 23:55:11 esritter Exp $
*/
/**
* These variables are used during installation of the module.
*/
$modname = 'quicklinks'; // set this to the short name for your module (its subdirectory)
$module_long_name = 'Quicklinks'; // Name of module as known by users
$module_icon = "$modname.gif"; // small icon file for the module on global admin menu
$admin_only = 0; // set to 1 if this is for admins only
$user_only = 0; // set to 1 if this is for users only
$misc_info = "Quicklinks v1.1 by ES Ritter (hide@address.com)"; // usually version, author info
$block_display_position = 1; // default position is left.
// Include necessary core files
if (!isset ($mainfile)) include ('mainfile.php');
include_once ('config.php');
include_once ('open_session.php');
/* Include class file. Module specific functions are included in it. */
include_once ("./mod/$modname/$modname.inc.php");
// Display header
include_once ('header.php');
// Admin only operations
if ($admintest == $security_hash) {
switch($op) {
case "install":
include_once ("./mod/$modname/".$modname."_install.inc.php");
if (!$box_content) {
$box_content = "<p>\"$modname\" was successfully installed.</p>
<p><a href=\"admin.php\">Return to Site Administration</a></p>";
}
$box_title = "$module_long_name Install";
thememainbox($box_title, $box_content);
break;
case "uninstall" :
include_once ("./mod/$modname/".$modname."_uninstall.inc.php");
if (!$box_content) {
$box_content = "<p>\"$modname\" was successfully uninstalled.</p>
<p><a href=\"admin.php\">Return to Site Administration</a></p>";
}
$box_title = "$module_long_name Uninstall";
thememainbox($box_title, $box_content);
break;
case $modname . "_admin" :
include_once ("./mod/$modname/".$modname."_admin.inc.php");
break;
/* DO NOT INCLUDE A DEFAULT CASE! Otherwise, it will not continue
to the user's operations switch below. */
}
} else {
/* Displayed when trying to use the above switches without being logged
in as an admin. */
$box_title = "Unauthorized Access";
$box_content = "<p class=\"onebiggerred\">You need to be logged in as
an admin to perform this operation.</p>";
thememainbox($box_title, $box_content);
}
switch ($op) {
default:
if (!$op)
break;
}
// Display footer
include_once ('footer.php');
?>