summaryrefslogtreecommitdiff
path: root/menu_sort.php
blob: 8f217c58bf4efd1bee705aa23f878425720ce847 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
/**
 * @author   xing <xing@synapse.plus.com>
 * @version  $Revision: 1.6 $
 * @package  nexus
 * @subpackage functions
 */

/**
* required setup
*/
require_once( '../kernel/setup_inc.php' );
global $gBitSystem;
require_once( NEXUS_PKG_PATH.'Nexus.php');
include_once( NEXUS_PKG_PATH.'menu_lookup_inc.php' );

$gBitSystem->verifyPermission( 'p_nexus_create_menus' );

if( empty( $_REQUEST['menu_id'] ) ) {
	header( 'Location:'.NEXUS_PKG_URL.'index.php' );
}

// if someone wants to move and item, move it.
if( isset( $_REQUEST['move_item'] ) && isset( $_REQUEST['item_id'] ) ) {
	if( $_REQUEST['move_item'] == 'w' ) {
		$gNexus->moveItemWest( $_REQUEST['item_id'] );
	} elseif( $_REQUEST['move_item'] == 'n' ) {
		$gNexus->moveItemNorth( $_REQUEST['item_id'] );
	} elseif( $_REQUEST['move_item'] == 's' ) {
		$gNexus->moveItemSouth( $_REQUEST['item_id'] );
	} elseif( $_REQUEST['move_item'] == 'e' ) {
		$gNexus->moveItemEast( $_REQUEST['item_id'] );
	}
	header( 'Location: '.NEXUS_PKG_URL.'menu_sort.php?menu_id='.$_REQUEST['sort_menu'].'&tab='.$_REQUEST['tab'] );
	die;
}

if( isset( $_REQUEST['tab'] ) ) {
	$gBitSmarty->assign( $_REQUEST['tab'].'TabSelect', 'tdefault' );
}

// this is the module filename
$gBitSmarty->assign( 'nexus_file', strtolower( 'mod_'.preg_replace( "/ /", "_", $gNexus->mInfo['title'] ).'_'.$gNexus->mInfo['menu_id'].'.tpl' ) );

$gBitSystem->setBrowserTitle( 'Nexus Menus' );
$gBitSystem->display( 'bitpackage:nexus/menu_sort.tpl' , NULL, array( 'display_mode' => 'display' ));
?>