2006-12-02 04:36:16 +00:00
< ? php
/*
2009-11-18 02:07:15 +00:00
* e107 website system
*
2012-05-04 17:56:21 +00:00
* Copyright ( C ) 2008 - 2012 e107 Inc ( e107 . org )
2009-11-18 02:07:15 +00:00
* Released under the terms and conditions of the
* GNU General Public License ( http :// www . gnu . org / licenses / gpl . txt )
*
*
*
2012-05-04 17:56:21 +00:00
* $URL $
* $Id $
2009-11-18 02:07:15 +00:00
*/
2009-08-19 14:39:57 +00:00
if ( isset ( $_GET [ 'configure' ]))
{
//Switch to Front-end
define ( " USER_AREA " , true );
//Switch to desired layout
define ( 'THEME_LAYOUT' , $_GET [ 'configure' ]);
}
2006-12-02 04:36:16 +00:00
require_once ( " ../class2.php " );
2009-01-21 22:04:36 +00:00
if ( ! getperms ( " 2 " ))
2008-12-08 22:21:29 +00:00
{
2006-12-02 04:36:16 +00:00
header ( " location: " . e_BASE . " index.php " );
exit ;
}
2009-08-28 16:11:02 +00:00
2012-05-04 17:56:21 +00:00
//include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
e107 :: coreLan ( 'menus' , true );
e107 :: coreLan ( 'admin' , true );
2009-08-28 16:11:02 +00:00
2012-12-04 16:27:58 +02:00
// FIXME - quick temporarry fix for missing icons on menu administration. We need different core style to be included (forced) here - e.g. e107_web/css/admin/sprite.css
2012-12-17 13:21:43 -08:00
if ( e_IFRAME ) //<-- Check config and delete buttons if modifying
2012-12-04 16:27:58 +02:00
{
2012-12-17 13:21:43 -08:00
//e107::js('core','bootstrap/js/bootstrap.min.js');
//e107::css('core','bootstrap/css/bootstrap.min.css');
2012-12-04 16:27:58 +02:00
e107 :: css ( 'url' , '{e_THEME}/bootstrap/admin_style.css' );
2012-12-17 13:21:43 -08:00
2012-12-04 16:27:58 +02:00
}
2012-05-24 15:54:25 +00:00
if ( strpos ( e_QUERY , 'configure' ) !== FALSE )
{
2012-12-17 13:21:43 -08:00
//e107::js('core', 'colorbox/jquery.colorbox-min.js', 'jquery', 2);
//e107::css('core', 'colorbox/colorbox.css', 'jquery');
2012-05-24 15:54:25 +00:00
2012-12-17 13:21:43 -08:00
//e107::js('core', 'core/jquery.elastic.source.js', 'jquery', 2);
2012-05-24 15:54:25 +00:00
2012-12-17 13:21:43 -08:00
//e107::js('core', 'plupload/plupload.full.js', 'jquery', 2);
//e107::css('core', 'plupload/jquery.plupload.queue/css/jquery.plupload.queue.css', 'jquery');
//e107::js('core', 'plupload/jquery.plupload.queue/jquery.plupload.queue.js', 'jquery', 2);
2012-05-24 15:54:25 +00:00
2012-12-17 13:21:43 -08:00
//e107::css('core', 'chosen/chosen.css', 'jquery');
//e107::js('core', 'chosen/chosen.jquery.min.js', 'jquery', 2);
2012-05-24 15:54:25 +00:00
2012-12-17 13:21:43 -08:00
//e107::css('core', 'password/style.css', 'jquery');
//e107::js('core', 'password/jquery.pwdMeter.js', 'jquery', 2);
2012-05-24 15:54:25 +00:00
//
2012-12-17 13:21:43 -08:00
//e107::js("core", "plupload/customUpload.js","jquery",3);
2012-05-24 15:54:25 +00:00
2012-12-17 13:21:43 -08:00
//e107::js("core", "core/mediaManager.js","jquery",3);
2012-05-24 15:54:25 +00:00
2012-12-17 13:21:43 -08:00
// e107::css('core', 'core/admin.css', 'jquery');
2012-05-24 15:54:25 +00:00
e107 :: js ( 'core' , 'core/admin.jquery.js' , 'jquery' , 4 );
2012-06-03 01:42:05 +00:00
e107 :: css ( 'inline' , " .column { width:100%; padding-bottom: 100px; }
. regularMenu { border : 1 px dotted silver ; margin - bottom : 6 px ; padding - left : 3 px ; padding - right : 3 px }
. menuOptions { padding - top : 7 px ; padding - right : 5 px ; text - align : right ; }
2012-05-24 15:54:25 +00:00
. portlet { margin : 0 1 em 1 em 0 ; }
. portlet - header { margin : 0.3 em ; padding - bottom : 4 px ; padding - left : 0.2 em ; cursor : move }
. portlet - header . ui - icon { float : right ; }
2012-06-03 01:42:05 +00:00
. portlet - content { padding : 7 px ; }
2012-05-24 15:54:25 +00:00
. ui - sortable - placeholder { border : 1 px dotted black ; visibility : visible ! important ; height : 50 px ! important ; }
. ui - sortable - placeholder * { visibility : hidden ; }
" ,'jquery');
}
2006-12-02 04:36:16 +00:00
$e_sub_cat = 'menus' ;
2009-07-10 14:27:31 +00:00
2006-12-02 04:36:16 +00:00
require_once ( e_HANDLER . " file_class.php " );
2009-07-10 14:27:31 +00:00
require_once ( e_HANDLER . " form_handler.php " );
2009-07-11 01:48:40 +00:00
require_once ( e_HANDLER . 'message_handler.php' );
2009-08-16 16:30:56 +00:00
require_once ( e_HANDLER . " menumanager_class.php " );
2009-07-16 02:55:19 +00:00
2009-07-10 14:27:31 +00:00
2009-07-11 01:48:40 +00:00
$rs = new form ;
$frm = new e_form ();
2012-06-03 01:42:05 +00:00
$men = new e_menuManager ( 0 ); // use 1 for dragdrop.
2009-07-10 14:58:17 +00:00
2006-12-02 04:36:16 +00:00
2009-08-19 14:39:57 +00:00
if ( e_AJAX_REQUEST )
{
$men -> menuSaveAjax ();
2009-07-10 14:27:31 +00:00
exit ;
2009-08-19 14:39:57 +00:00
}
2009-07-09 08:31:38 +00:00
2012-05-24 16:11:26 +00:00
if ( isset ( $_GET [ 'configure' ]) || isset ( $_GET [ 'iframe' ]))
2009-08-19 14:39:57 +00:00
{
//No layout parse when in iframe mod
define ( 'e_IFRAME' , true );
}
2009-07-09 11:37:36 +00:00
2009-08-19 14:39:57 +00:00
require_once ( " auth.php " );
2009-07-09 11:37:36 +00:00
2009-07-10 14:27:31 +00:00
if ( $_POST )
{
$e107cache -> clear_sys ( " menus_ " );
}
2009-07-09 11:37:36 +00:00
2012-12-08 15:52:40 +01:00
if ( vartrue ( $message ) != " " )
2009-07-10 14:27:31 +00:00
{
echo $ns -> tablerender ( 'Updated' , " <div style='text-align:center'><b> " . $message . " </b></div><br /><br /> " );
}
2009-07-09 11:37:36 +00:00
2009-08-19 14:39:57 +00:00
//BC - configure and dot delimiter deprecated
if ( ! isset ( $_GET [ 'configure' ]))
2009-07-09 11:37:36 +00:00
{
2009-07-17 02:28:49 +00:00
$men -> menuScanMenus ();
2012-12-08 15:52:40 +01:00
$text = $men -> menuRenderMessage ();
2009-07-11 01:48:40 +00:00
$text .= $men -> menuSelectLayout ();
$text .= $men -> menuVisibilityOptions ();
2012-05-04 17:56:21 +00:00
$text .= $men -> menuInstanceParameters ();
2009-07-11 01:48:40 +00:00
$text .= $men -> menuRenderIframe ();
2013-02-22 21:34:06 -08:00
$ns -> tablerender ( ADLAN_6 . SEP . LAN_MENULAYOUT , $text , 'menus_config' );
2009-07-09 11:37:36 +00:00
}
2009-07-10 14:27:31 +00:00
else // Within the IFrame.
{
$men -> menuRenderPage ();
2009-07-09 08:31:38 +00:00
2009-07-10 14:27:31 +00:00
}
2009-07-09 08:31:38 +00:00
2009-07-10 14:27:31 +00:00
// -----------------------------------------------------------------------------
2009-07-09 08:31:38 +00:00
2006-12-02 04:36:16 +00:00
require_once ( " footer.php " );
2009-07-07 12:54:47 +00:00
2009-07-10 14:27:31 +00:00
// -----------------------------------------------------------------------
2009-07-07 12:54:47 +00:00
2009-07-12 10:11:35 +00:00
function menus_adminmenu ()
{
2009-07-15 09:38:00 +00:00
// See admin_shortcodes_class.php - get_admin_menumanager()
// required there so it can be shared by plugins.
2009-07-10 14:27:31 +00:00
}
2009-07-12 10:11:35 +00:00
2006-12-02 04:36:16 +00:00
?>