Location: PHPKode > projects > ANJEL > com_anjel/toolbar.anjel.php
<?php
/* $Id: toolbar.anjel.php 3 2005-09-27 23:29:40Z schmalls $ */
/**
 * toolbar.anjel.php
 * 
 * <p>Creates an administrative toolbar for the ANJEL backend.</p>
 * 
 * @package ANJEL
 * @subpackage backend
 * @copyright © 2004-2005 Schmalls / Joshua Thompson / All Rights Reserved
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
 * @author Schmalls / Joshua Thompson <hide@address.com>
 * @version 0.6.0
 * @since 0.4.3
 * @link http://www.schmalls.com
 */

 /**
  * Makes sure this is included by a parent file
  */
 defined('_VALID_MOS') or die('Direct Access to this location is not allowed.');

 /**
  * Include required files
  */
 require_once( $mainframe->getPath( 'toolbar_html' ) );
 require_once( $mainframe->getPath( 'toolbar_default' ) );
 
 // get parameters
 $action = mosGetParam($_REQUEST, 'act', '');
 $task = mosGetParam($_REQUEST, 'task', '');
 $listid = mosGetParam($_REQUEST, 'listid', 0);
 
 // switch by action
 switch ($action) {
	 case ('unregistered') :
	 	// switch by task
	 	switch ($task) {
			case ('import') :
				menunewsletter :: IMPORT();
				break;
			case ('doExport') :
				break;
			case ('export') :
				menunewsletter :: EXPORT();
				break;
			case ('new') :
				menunewsletter :: NEWSUBSCRIBER();
				break;
			default :
				menunewsletter :: UNREGISTERED();
				break;
	 	} // end switch
	 	break;
	 case ('registered') :
	 	// switch by task
	 	switch ($task) {
			case ('new') :
				menunewsletter :: NEWSUBSCRIBER();
				break;
			default :
	 			menunewsletter :: REGISTERED();
				break;
	 	} // end switch
	 	break;
	 case ('newsletter') :
	 	// switch by task
	 	switch ($task) {
			case ('new') :
				menunewsletter :: NEWNEWSLETTER('');
				break;
			case ('edit') :
				menunewsletter :: EDITNEWSLETTER('');
				break;
			default:
				menunewsletter :: NEWSLETTER();
				break;
	 	} // end switch
	 	break;
	 case ('mailing') :
	 	// switch by task
	 	switch ($task) {
			case ('edit') :
				menunewsletter :: NEWMAILING('');
				break;
			case ('preview') :
				menunewsletter :: PREVIEWMAILING('edit');
				break;
			case ('show') :
				menunewsletter :: SHOW_MAILINGS();
				break;
			case ('view') :
				menunewsletter :: CANCEL_ONLY('show');
				break;
			case ('publish') :
				menunewsletter :: CANCEL_ONLY('');
				break;
			default :
				menunewsletter :: MAILING();
				break;
	 	} // end switch
	 	break;
	 case ('configuration') :
	 	// switch by task
	 	switch ($task) {
			case ('save') :
				break;
			default :
				menunewsletter :: CONFIGURATION();
				break;
	 	} // end switch
	 	break;
	 case ('statistics') :
	 	// switch by task
	 	switch ($task) {
			case ('show') :
				menunewsletter :: CANCEL_ONLY('cancel');
				break;
			default :
				// check if list id was supplied
				if ($listid != 0) {
					// if so, show statistics menu
					menunewsletter :: STATISTICS();
				} else {
					// if not, show mailing menu
					menunewsletter :: MAILING();
				} // end if
				break;
	 	} // end switch
	 	break;
	 case ('update') :
	 	// switch by task
	 	switch ($task) {
			case ('doUpdate'):
				menunewsletter :: CANCEL_ONLY('');
				break;
			default :
				menunewsletter :: UPDATE();
				break;
	 	} // end switch
	 	break;
	 default :
	 
	 	break; 
 } // end switch
 
?>
Return current item: ANJEL