Location: PHPKode > scripts > QuickLinks Module > quicklinks-module/quicklinks_admin.inc.php
<?PHP
/**
 * quicklinks_admin - Displays admin menu and contains admin switches
 * 
 * This is the admin hub of the quicklinks module. All admin
 * operational decisions are made here.
 *    
 * @module quicklinks
 * @package phpWebSite      
 * @author Edward Ritter <hide@address.com>       
 * @version $Id$
 */    

// Include block options class file
include_once ("./mod/$modname/block_set.inc.php");

// Admin Header
$box_title = "$modname Administration";
$box_content = "<div align=\"center\"><a href=\"admin.php\">Site Admin</a> |
	<a href=\"mod.php?mod=$modname&amp;op=".$modname."_admin\">
	$module_long_name Admin</a> |
	<a href=\"mod.php?mod=$modname&amp;op=".$modname."_admin&amp;adminop=options\">
	$module_long_name Options</a></div>";

switch ($adminop) {
	/**
	 * The next three switches are for the block_set class for positioning,
	 * naming, and determining who can view the block. If your module doesn't
     * use a block, you can remove these options.
     */
    case "change_title":
        $blockadmin = new block_admin;
        $box_content .= $blockadmin->change_title($title);
        thememainbox($box_title, $box_content);
        break;
    case "change_position":
        $blockadmin = new block_admin;
        $box_content .= $blockadmin->change_position($position);
        thememainbox($box_title, $box_content);
        break;
    case "view_option":
        $blockadmin = new block_admin;
        $box_content .= $blockadmin->view_option($view);
        thememainbox($box_title, $box_content);
        break;

	// Displays the block options menu
	case "options":
		$blockadmin = new block_admin;
		thememainbox($box_title, $box_content); //displays admin header first
		$blockadmin->block_set(); // displays block options menu 
		break;

	case "add":
		$qlink = new quicklinks;
		$qlink->add($link, $text, $xsize, $ysize);
		break;

	case "modify":
		$qlink = new quicklinks;
		$qlink->modify($id);
		break;

	case "update":
		$qlink = new quicklinks;
		$qlink->update($id, $link, $text, $xsize, $ysize);
		break;

	case "delete":
		$qlink = new quicklinks;
		$qlink->delete($id);
		break;     

	default:
		$qlink = new quicklinks;
		thememainbox($box_title, $box_content);
		$qlink->admin();
		break;
		
}

?>
Return current item: QuickLinks Module