Location: PHPKode > projects > Article System > include/modules/admin/class.module_admin.php
<?php

/*
 *	Article System
 *	Online journal management tool written in PHP/MySQL/PostgreSQL.
 *	This code is available at http://sourceforge.net/projects/artsys
 *
 *	Copyright (C) 2001-2005 Jan Hnatek
 *	Distributed under the terms of the GNU General Public License
 *
 *	Date:	  05/08/2005
 *	Version:  0.6   	
 */

###############################################################################

class module_admin extends module {
//-------------------------------//

	function menu () {
		global $config, $section;

		// common buttons
		// don't use linklistto, since we don't have list
		//$B_save =& new button_save ($section, msg("submit"), "linkto");
		//$B_reset =& new button_reset (msg("reset"));
		$B_done = new button_done ($this, msg("done"));
		//$B_img =& new menu_button ($this, "image", msg("insert image"), "image", $config["image_browser_script"]);
		
		// TEMP: testing area
		$B_info = new link_button ($this, "info", "info", "info", "linkto");
		$B_stats = new link_button ($this, "stats", "stats", "stats", "linkto");
		$B_index = new link_button ($this, "index", "index", "index", "linkto");
		$B_idx_build = new link_button ($this, "idx_build", msg("index rebuild"), "build_index", "confirmto", "'".msg('confirm index rebuild')."'");
		// second level menu !!
		$B_idx_one = new link_button ($this, "idx_one", msg("index article"), "build_one_index", "linkto");
		$B_idx_issue = new link_button ($this, "idx_issue", msg("index issue"), "build_issue_index", "linkto");
		$B_idx_done = new link_button ($this, "index", msg("done"), "done", "linkto");
		$B_test = new link_button ($this, "test", "test", "test", "linkto");


		switch ($section) {
			case "stats":	return new section ($this, "stats.php", 	false, array ($B_info, $B_index, $B_stats, $B_test)); break;
			case "index":	return new section ($this, "index.php", 	false, array ($B_idx_build, $B_idx_issue, $B_idx_one, $B_done)); break;
			case "idx_one":	return new section ($this, "idx_one.php", 	false, array ($B_idx_done)); break;
			case "idx_issue": return new section ($this, "idx_issue.php", false, array ($B_idx_done)); break;
			case "idx_build": return new section ($this, "idx_build.php", false, array ($B_idx_done)); break;
			case "test":	return new section ($this, "test.php",		false, array ($B_done)); break;
			//"test"	=> array ("include_template.php",	$B_info, $B_test),
			default:
			case "info":
				$section = "info";
				return new section ($this, "info.php", true, array ($B_info, $B_index, $B_stats, $B_test));
				break;
		}
	}
}

?>
Return current item: Article System