2006-12-02 04:36:16 +00:00
< ? php
/*
2009-11-18 02:07:15 +00:00
* e107 website system
*
2016-12-05 22:47:34 +00:00
* Copyright ( C ) 2008 - 2016 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 )
*
*/
2009-08-19 14:39:57 +00:00
if ( isset ( $_GET [ 'configure' ]))
{
//Switch to Front-end
2013-07-12 03:21:27 -07:00
$_GET [ 'configure' ] = preg_replace ( '[^a-z0-9_-]' , '' , $_GET [ 'configure' ]);
2009-08-19 14:39:57 +00:00
define ( " USER_AREA " , true );
//Switch to desired layout
define ( 'THEME_LAYOUT' , $_GET [ 'configure' ]);
2016-04-10 14:10:39 -07:00
define ( 'e_DEBUG' , false );
define ( 'E107_DEBUG_LEVEL' , 0 );
if ( function_exists ( 'xdebug_disable' ))
{
xdebug_disable ();
}
@ ini_set ( 'display_errors' , 0 );
error_reporting ( 0 );
2017-01-03 17:57:00 -08:00
define ( 'e_MENUMANAGER_ACTIVE' , true );
2009-08-19 14:39:57 +00:00
}
2017-01-02 14:04:14 -08:00
else
{
define ( 'e_ADMIN_AREA' , true );
2017-01-03 17:57:00 -08:00
define ( 'e_MENUMANAGER_ACTIVE' , false );
2017-01-02 14:04:14 -08:00
}
2009-08-19 14:39:57 +00:00
2006-12-02 04:36:16 +00:00
require_once ( " ../class2.php " );
2017-01-02 19:13:48 -08:00
2017-01-03 17:57:00 -08:00
if ( e_MENUMANAGER_ACTIVE === false )
2017-01-02 19:13:48 -08:00
{
if ( e_DEBUG_MENUMANAGER === true )
{
e107 :: css ( 'inline' , '
body { overflow : hidden }
' );
}
else
{
e107 :: js ( 'footer-inline' , "
2017-01-03 17:57:00 -08:00
$ ( '#menu_iframe' ) . attr ( 'scrolling' , 'no' );
2017-01-02 19:13:48 -08:00
$ ( '#menu_iframe' ) . load ( function () {
// $('#menu_iframe').bind('load', function() {
var height = this . contentWindow . document . body . offsetHeight + 400 + 'px' ;
// $(this).css('overflow-y','visible');
$ ( this ) . css ( 'height' , height );
// alert(this.style.height);
});
" );
}
2017-01-03 17:57:00 -08:00
e107 :: css ( 'inline' , "
. menu - manager - items { padding - right : 15 px }
. menu - manager - items div . item { padding : 5 px ; margin : 5 px 0 ; border : 1 px solid rgba ( 255 , 255 , 255 , 0.3 ); border - radius : 3 px ; cursor : move }
. menu - manager - sticky {
position : fixed ;
padding - left : 15 px ;
padding - right : 15 px ;
left : 0 ;
top : 60 px ;
z - index : 100 ;
border - top : 0 ;
- moz - transition : fadeIn . 4 s ;
- o - transition : fadeIn . 4 s ;
- webkit - transition : fadeIn . 4 s ;
transition : fadeIn . 4 s ;
}
2017-01-02 19:13:48 -08:00
2017-01-04 11:28:10 -08:00
iframe #menu_iframe { overflow-x:hidden; width: 100%; height: 90vh; border-width: 3px; padding:0 }
2017-01-02 19:13:48 -08:00
2017-01-03 17:57:00 -08:00
. menu - selector ul li {
background - color : rgba ( 255 , 255 , 255 , 0.1 );
padding : 5 px 30 px ;
padding - right : 2 px ;
margin - bottom : 2 px ;
}
2017-01-02 19:13:48 -08:00
2017-01-03 17:57:00 -08:00
. menu - selector ul li : nth - child ( odd ){ background - color : rgba ( 0 , 0 , 0 , 0.2 ) }
2009-08-28 16:11:02 +00:00
2017-01-03 17:57:00 -08:00
. menu - selector { height : 330 px ; display : block ; padding - bottom : 50 px ; overflow - y : scroll ; margin - bottom : 10 px }
2013-05-09 00:24:02 -07:00
2017-01-03 17:57:00 -08:00
. menu - selector input : checked + span { color : white ; }
2013-05-09 00:24:02 -07:00
2017-01-03 17:57:00 -08:00
@ media all and ( min - height : 1000 px ) {
2009-08-28 16:11:02 +00:00
2017-01-03 17:57:00 -08:00
. menu - selector { height : 550 px }
}
2016-04-09 18:54:11 -07:00
2017-01-04 11:28:10 -08:00
@ media all and ( max - height : 800 px ) {
. menu - selector { height : 250 px }
iframe #menu_iframe { height: 87vh }
. menu - selector ul li { font - size : 0.8 em }
}
2017-01-03 17:57:00 -08:00
ul . dropdown - menu . e - mm - selector { padding : 10 px ; margin - top : - 2 px ; margin - right :- 2 px ; }
2017-01-02 19:13:48 -08:00
2017-01-03 17:57:00 -08:00
" );
2017-01-02 19:13:48 -08:00
2016-04-10 14:10:39 -07:00
}
2016-04-09 18:54:11 -07:00
2017-01-01 18:47:43 -08:00
2017-01-03 17:57:00 -08:00
if ( ! getperms ( " 2 " ))
{
e107 :: redirect ( 'admin' );
exit ;
}
2017-01-02 19:13:48 -08:00
2017-01-03 08:31:45 -08:00
2017-01-02 19:13:48 -08:00
2017-01-01 18:47:43 -08:00
2017-01-03 17:57:00 -08:00
e107 :: coreLan ( 'menus' , true );
e107 :: coreLan ( 'admin' , true );
2017-01-02 14:04:14 -08:00
2016-04-09 18:54:11 -07:00
2012-12-17 13:21:43 -08:00
2012-12-04 16:27:58 +02:00
2016-04-10 14:10:39 -07:00
2017-01-03 17:57:00 -08:00
if ( e_MENUMANAGER_ACTIVE === true || vartrue ( $_GET [ 'enc' ]))
2012-05-24 15:54:25 +00:00
{
2016-04-10 14:10:39 -07:00
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');
2013-03-02 21:07:42 -08:00
// e107::js('core', 'core/admin.jquery.js', 'jquery', 4);
2016-04-13 16:43:19 -07:00
// e107::js('core','bootstrap/js/bootstrap-tooltip.js');
2016-04-10 14:10:39 -07:00
2013-03-02 21:07:42 -08:00
// e107::css('core','bootstrap/css/bootstrap.min.css');
2013-05-10 05:30:07 -07:00
2016-01-12 15:44:54 -08:00
$JSMODAL = <<< TEMPL
$ ( function () {
$ ( '.e-modal-menumanager' ) . on ( 'click' , function ( e )
{
e . preventDefault ();
if ( $ ( this ) . attr ( 'data-cache' ) == 'false' )
{
window . parent . $ ( '#uiModal' ) . on ( 'shown.bs.modal' , function () {
$ ( this ) . removeData ( 'bs.modal' );
});
}
var url = $ ( this ) . attr ( 'href' );
var caption = $ ( this ) . attr ( 'data-modal-caption' );
var height = 600 ;
if ( caption === undefined )
{
caption = '' ;
}
window . parent . $ ( '.modal-body' ) . html ( '<div class="well"><iframe id="e-modal-iframe" width="100%" height="' + height + 'px" frameborder="0" scrolling="auto" style="display:block;background-color:transparent" allowtransparency="true" src="' + url + '"></iframe></div>' );
window . parent . $ ( '.modal-caption' ) . html ( caption + ' <i id="e-modal-loading" class="fa fa-spin fa-spinner"></i>' );
window . parent . $ ( '.modal' ) . modal ( 'show' );
window . parent . $ ( " #e-modal-iframe " ) . on ( " load " , function () {
window . parent . $ ( '#e-modal-loading' ) . hide ();
});
});
2013-05-10 05:30:07 -07:00
2016-01-12 15:44:54 -08:00
});
TEMPL ;
2013-05-10 05:30:07 -07:00
2016-01-12 15:44:54 -08:00
e107 :: js ( 'inline' , $JSMODAL );
2013-05-10 05:30:07 -07:00
2013-03-02 21:07:42 -08:00
e107 :: js ( 'inline' , "
$ ( function () {
2016-01-12 15:44:54 -08:00
// Visibility/Instance Options etc.
2013-03-02 21:07:42 -08:00
$ ( '.e-menumanager-option' ) . on ( 'click' , function (){
var link = $ ( this ) . attr ( 'href' );
2013-03-03 04:46:57 -08:00
var caption = $ ( this ) . attr ( 'data-modal-caption' );
2013-03-02 21:07:42 -08:00
window . parent . $ ( '#uiModal .modal-caption' ) . text ( caption );
window . parent . $ ( '#uiModal .modal-body' ) . load ( link , function (){
2016-04-13 16:43:19 -07:00
window . parent . $ ( '.modal-body :input' ) . on ( 'change' , function (){
2013-03-02 21:07:42 -08:00
var target = window . parent . $ ( '#e-save-form' ) . attr ( 'action' );
var data = window . parent . $ ( '#e-save-form' ) . serialize ();
2016-01-12 15:44:54 -08:00
2013-11-21 19:42:12 -08:00
// alert(data);
2016-01-12 15:44:54 -08:00
// alert(target);
2013-03-02 21:07:42 -08:00
$ . post ( target , data , function ( ret )
{
2016-03-26 10:14:57 -07:00
// alert('Posted: '+ret);
// console.log('Posted: '+ ret);
if ( ret == '' )
{
return false ;
}
2013-03-02 21:07:42 -08:00
var a = $ . parseJSON ( ret );
2016-01-12 15:44:54 -08:00
2013-03-02 21:07:42 -08:00
if ( a . error )
{
alert ( a . msg );
}
});
});
});
window . parent . $ ( '#uiModal' ) . modal ( 'show' );
2013-05-16 16:23:24 -07:00
2013-03-02 21:07:42 -08:00
return false ;
}) ;
// Delete Button (Remove Menu) Function
$ ( '.e-menumanager-delete' ) . on ( 'click' , function ( e ){
e . preventDefault ();
var area = 'remove' ;
var remove = $ ( this ) . attr ( 'id' );
var opt = remove . split ( '-' );
var hidem = '#block-' + opt [ 1 ] + '-' + opt [ 2 ];
$ ( hidem ) . hide ( 'slow' );
// alert(hidem);
$ . ajax ({
type : 'POST' ,
url : 'menus.php' ,
data : { removeid : remove , area : area , mode : 'delete' }
}) . done ( function ( data ) {
2013-05-16 16:23:24 -07:00
2013-03-02 21:07:42 -08:00
var a = $ . parseJSON ( data );
if ( a . error )
{
alert ( a . msg );
}
});
});
});
2016-01-12 15:44:54 -08:00
2013-03-02 21:07:42 -08:00
" );
2012-05-24 15:54:25 +00:00
2012-06-03 01:42:05 +00:00
e107 :: css ( 'inline' , " .column { width:100%; padding-bottom: 100px; }
2013-03-03 12:23:59 -08:00
2013-04-14 18:41:53 -07:00
#core-menumanager-main th {color: silver; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size:14px; font-weight: bold; line-height:24px; background-color:#2F2F2F }
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 ; }
2017-01-03 17:57:00 -08:00
i . S16 {
background : url ( " .e_THEME. " bootstrap3 / images / adminicons_16 . png ) no - repeat top left ;
2017-01-04 11:47:07 -08:00
display : inline - block ; width : 17 px ; height : 16 px ;
2017-01-03 17:57:00 -08:00
* margin - right : . 3 em ;
line - height : 14 px ;
vertical - align : text - top ;
}
i . e - search - 16 { background - position : - 1344 px 0 ; width : 16 px ; height : 16 px ; }
i . e - delete - 16 { background - position : - 525 px 0 ; width : 16 px ; height : 16 px ; }
i . e - configure - 16 { background - position : - 378 px 0 ; width : 16 px ; height : 16 px ; }
i . e - edit - 16 { background - position : - 609 px 0 ; width : 16 px ; height : 16 px ; }
2017-01-04 11:47:07 -08:00
. e - mm - icon - search {
2013-04-14 19:28:15 -07:00
display : inline - block ;
width : 14 px ;
height : 14 px ;
margin - top : 1 px ;
line - height : 14 px ;
vertical - align : text - top ;
background - image : url ( '".e_JS."bootstrap/img/glyphicons-halflings.png' );
background - position : 14 px 14 px ;
background - repeat : no - repeat ;
}
2013-03-02 21:07:42 -08:00
2017-01-04 11:47:07 -08:00
. e - mm - icon - search {
2013-04-14 19:28:15 -07:00
background - position : - 48 px 0 ;
}
2017-01-04 11:47:07 -08:00
/*
. e - mm - icon - align - justify {
2013-05-10 05:30:07 -07:00
background - position : - 336 px - 48 px ;
}
2017-01-04 11:47:07 -08:00
*/
2013-03-02 21:07:42 -08:00
/* A little bit of bootstrap styling - loading /bootstrap.css could break some themes */
. menu - btn {
display : inline - block ;
padding : 4 px 12 px ;
margin - bottom : 0 px ;
font - size : 14 px ;
line - height : 20 px ;
color : rgb ( 51 , 51 , 51 );
text - align : center ;
text - shadow : 0 px 1 px 1 px rgba ( 255 , 255 , 255 , 0.75 );
vertical - align : middle ;
cursor : pointer ;
background - color : rgb ( 245 , 245 , 245 );
background - image : linear - gradient ( to bottom , rgb ( 255 , 255 , 255 ), rgb ( 230 , 230 , 230 ));
background - repeat : repeat - x ;
border - width : 1 px ;
border - style : solid ;
- moz - border - top - colors : none ;
- moz - border - right - colors : none ;
- moz - border - bottom - colors : none ;
- moz - border - left - colors : none ;
border - image : none ;
border - color : rgba ( 0 , 0 , 0 , 0.1 ) rgba ( 0 , 0 , 0 , 0.1 ) rgb ( 179 , 179 , 179 );
border - radius : 4 px 4 px 4 px 4 px ;
box - shadow : 0 px 1 px 0 px rgba ( 255 , 255 , 255 , 0.2 ) inset , 0 px 1 px 2 px rgba ( 0 , 0 , 0 , 0.05 );
}
. menu - btn : hover , . menu - btn : focus , . menu - btn : active , . menu - btn . active , . menu - btn . disabled , . menu - btn [ disabled ] {
color : rgb ( 51 , 51 , 51 );
background - color : rgb ( 230 , 230 , 230 );
}
. menu - btn : hover , . menu - btn : focus {
color : rgb ( 51 , 51 , 51 );
text - decoration : none ;
background - position : 0 px - 15 px ;
transition : background - position 0.1 s linear 0 s ;
}
. menu - btn - primary {
color : rgb ( 255 , 255 , 255 );
text - shadow : 0 px - 1 px 0 px rgba ( 0 , 0 , 0 , 0.25 );
background - color : rgb ( 0 , 109 , 204 );
background - image : linear - gradient ( to bottom , rgb ( 0 , 136 , 204 ), rgb ( 0 , 68 , 204 ));
background - repeat : repeat - x ;
border - color : rgba ( 0 , 0 , 0 , 0.1 ) rgba ( 0 , 0 , 0 , 0.1 ) rgba ( 0 , 0 , 0 , 0.25 );
}
2013-05-10 05:30:07 -07:00
. btn - mini {
padding : 0 px 2 px ;
font - size : 10.5 px ;
border - radius : 3 px 3 px 3 px 3 px ;
}
2013-03-02 21:07:42 -08:00
. tbox { text - align : left }
. menuOptions {
2013-04-14 19:28:15 -07:00
padding - top : 7 px ;
padding - right : 5 px ;
text - align : left ;
opacity : 0 ;
transition : opacity . 25 s ease - in - out ;
- moz - transition : opacity . 25 s ease - in - out ;
- webkit - transition : opacity . 25 s ease - in - out ;
2013-03-03 04:46:57 -08:00
2013-03-02 21:07:42 -08:00
}
2013-04-14 19:28:15 -07:00
. menuOptions : hover {
opacity : 1 ;
}
2013-04-14 20:19:10 -07:00
. menuOptions > select { max - width : 100 % }
. menu - options - buttons { }
2013-03-03 04:46:57 -08:00
#menu-manage-actions { width:50%; vertical-align:top; text-align:center; padding:15px }
2013-03-02 21:07:42 -08:00
select . menu - btn { text - align : left }
2013-04-14 18:41:53 -07:00
2013-03-02 21:07:42 -08:00
2013-04-14 18:41:53 -07:00
label { font - family : 'Helvetica Neue' , Helvetica , Arial , sans - serif ; color : black ; line - height : 14 px }
label . input { margin - right : 10 px ; }
2013-03-02 21:07:42 -08:00
2013-03-03 01:24:54 -08:00
#core-menumanager-main { width:100%; margin-left:auto; margin-right:auto }
2013-03-02 21:07:42 -08:00
2013-03-03 01:24:54 -08:00
table . table { width : 95 % ; margin - left : auto ; margin - right : auto ; }
2013-03-02 21:07:42 -08:00
2013-03-03 01:24:54 -08:00
label . selection - row { padding : 6 px ; cursor : pointer ; width : 90 % }
table . table tbody > tr > td { }
2013-03-06 23:01:16 -08:00
table . table tbody > tr > td label {
display : block ;
cursor : pointer ;
font - size : 14 px ;
line - height : 2 em ;
padding - left : 15 px ;
2013-04-14 18:41:53 -07:00
font - family : 'Helvetica Neue' , Helvetica , Arial , sans - serif ;
color : black ;
2013-03-06 23:01:16 -08:00
}
2013-04-14 18:41:53 -07:00
table . table tbody > tr > td label > input { margin - left : 5 px ; margin - right : 10 px ; float : left ; }
2013-03-02 21:07:42 -08:00
. table - striped tbody > tr : nth - child ( 2 n + 1 ) > td , . table - striped tbody > tr : nth - child ( 2 n + 1 ) > th {
background - color : rgb ( 249 , 249 , 249 );
}
2013-03-03 01:24:54 -08:00
. menu - panel {
min - height : 20 px ;
padding : 19 px ;
margin - bottom : 20 px ;
background - color : rgb ( 245 , 245 , 245 );
border : 1 px solid rgb ( 227 , 227 , 227 );
2013-04-14 18:41:53 -07:00
border - radius : 5 px ;
2013-03-03 01:24:54 -08:00
box - shadow : 0 px 1 px 1 px rgba ( 0 , 0 , 0 , 0.05 ) inset ;
2013-04-14 18:41:53 -07:00
color : #2F2F2F;
font - size : 13 px ;
font - family : 'Helvetica Neue' , Helvetica , Arial , sans - serif ;
2013-03-03 01:24:54 -08:00
}
2017-01-01 18:47:43 -08:00
2013-03-03 01:24:54 -08:00
. menu - panel - header
{
2013-04-14 17:06:02 -07:00
display : block ;
padding : 10 px ;
font - size : 13 px ;
font - weight : bold ;
2013-04-14 18:41:53 -07:00
font - family : 'Helvetica Neue' , Helvetica , Arial , sans - serif ;
2013-04-14 17:06:02 -07:00
line - height : 20 px ;
border - radius : 5 px ;
text - transform : uppercase ;
margin - bottom : 10 px ;
background - color : rgb ( 0 , 136 , 204 );
color : white ;
2013-03-03 01:24:54 -08:00
}
2013-05-10 04:38:04 -07:00
ul . unstyled , ol . unstyled {
margin - left : 0 px ;
list - style : none outside none ;
}
. pull - right { float : right }
. pull - left { float : left }
2013-05-10 05:45:40 -07:00
. menuOption { opacity : 0.2 }
. menuOption : hover { opacity : 1 }
. sortable li { border - radius : 4 px }
. sortable li : hover { background - color : silver ; box - shadow : 3 px 3 px 3 px silver }
2016-04-09 16:12:08 -07:00
. regularMenu { cursor : move ; border - bottom : 1 px dotted silver ; margin - bottom : 6 px ; padding - left : 3 px ; padding - right : 3 px ; padding - top : 10 px ; padding - bottom : 10 px ; background - color : #E0EBF1; border-radius: 5px; }
. regularMenu span { padding : 3 px ; font - weight : bold ; color : #2F2F2F;text-align:left; }
2013-05-10 04:38:04 -07:00
. ui - draggable { background - color : rgb ( 245 , 245 , 245 ); min - width : 100 px ;}
2016-04-09 18:54:11 -07:00
. regularMenu : hover { background - color : #B1D7EA; }
2012-05-24 15:54:25 +00:00
" ,'jquery');
2017-01-03 17:57:00 -08:00
// e107::js('footer',"http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/jquery-ui.min.js");
// e107::css('url', "http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/themes/base/jquery-ui.css");
2016-04-10 17:52:30 -07:00
e107 :: js ( 'footer-inline' , '
$ ( function ()
{
// post the form back to this script.
var saveData = function ( areaid )
{
var formid = " #form- " + areaid ;
var form = $ ( formid );
var data = form . serialize ();
$ . ajax ({
type : " POST " ,
url : " menus.php " ,
data : data
}) . done ( function ( msg )
{
$ ( " .menuOption " ) . show ();
// alert("POSTED: "+ msg );
});
}
2017-01-03 17:57:00 -08:00
/*
2016-04-10 17:52:30 -07:00
$ ( " .sortable " ) . sortable ({
connectWith : $ ( " #area-1,#area-2,#area-3,#area-4,#area-5 " ),
revert : true ,
cursor : " move " ,
distance : 20 ,
// containment: $(".sortable"),
update : function ( ev , ui )
{
var areaid = $ ( this ) . attr ( " id " );
saveData ( areaid );
}
});
2017-01-03 17:57:00 -08:00
2016-04-10 17:52:30 -07:00
$ ( " .draggable " , window . top . document ) . click ( function ()
{
alert ( " hi there " );
2017-01-03 17:57:00 -08:00
});
2016-04-10 17:52:30 -07:00
// http://jsfiddle.net/DT764/2/
2016-04-16 08:16:42 -07:00
2016-04-10 17:52:30 -07:00
$ ( " .draggable " , window . top . document ) . draggable ({
// connectToSortable: ".sortable",
helper : " clone " ,
// appendTo: $(this), // ".sortable", // "#area-1", //FIXME Needs to be a specific area.
// revert: "invalid",
2016-04-16 08:16:42 -07:00
containment : " document " ,
2016-04-10 17:52:30 -07:00
// delay: 0,
// revertDuration: 100,
cursor : " move " ,
iframeFix : true ,
// containment: false,
stop : function ( e , ui ) { //TODO Rename layout and area in the hidden fields to that of the where the menu was dropped.
// Figure out positioning magic to determine if e.ui.position is in the iframe
// var what = $(this).parent().attr("id");
// $(".sortable").draggable( "disable" );
alert ( what );
}
2016-04-16 08:16:42 -07:00
});
2017-01-03 17:57:00 -08:00
*/
2016-04-10 17:52:30 -07:00
// $( "ul, li", window.top.document ).disableSelection();
$ ( " .deleteMenu " ) . on ( " click " , function ()
{
var deleteId = $ ( this ) . attr ( " data-delete " );
var area = $ ( this ) . attr ( " data-area " );
$ ( " # " + deleteId ) . hide ( " slow " , function (){
$ ( " # " + deleteId ) . remove ();
});
// $("#"+deleteId).remove();
// alert(deleteId + " " + area);
saveData ( area );
});
});
' );
2013-05-10 05:45:40 -07:00
2012-05-24 15:54:25 +00:00
}
2016-04-10 14:10:39 -07:00
else
{
e107 :: js ( 'footer-inline' , "
$ ( document ) . ready ( function () {
2012-05-24 15:54:25 +00:00
2016-04-10 14:10:39 -07:00
var stickyNavTop = $ ( '.e-scroll-fixed' ) . offset () . top - 60 ; // grab the initial top offset of the navigation
var stickyNav = function (){
var scrollTop = $ ( window ) . scrollTop (); // our current vertical position from the top
if ( scrollTop > stickyNavTop ) {
$ ( '.e-scroll-fixed' ) . addClass ( 'menu-manager-sticky visible col-lg-2 col-md-3' );
} else {
$ ( '.e-scroll-fixed' ) . removeClass ( 'menu-manager-sticky visible col-lg-2 col-md-3' );
}
};
stickyNav ();
$ ( window ) . scroll ( function () { // and run it again every time you scroll
stickyNav ();
});
2017-01-02 19:13:48 -08:00
2017-01-03 17:57:00 -08:00
});
2016-04-10 14:10:39 -07:00
2016-04-10 17:52:30 -07:00
2016-04-10 14:10:39 -07:00
" );
}
2013-05-10 04:38:04 -07:00
2012-05-24 15:54:25 +00:00
2017-01-02 19:13:48 -08:00
/*
2013-05-09 03:27:32 -07:00
if ( $_SERVER [ 'E_DEV_MENU' ] == 'true' )
2013-05-09 00:24:02 -07:00
{
if ( isset ( $_GET [ 'configure' ]) || isset ( $_GET [ 'iframe' ]))
{
//No layout parse when in iframe mod
define ( 'e_IFRAME' , true );
}
$mn = new e_layout ;
//e107::js('core','jquery.scoped.js','jquery');
// e107::css('url',e_THEME.'jayya/style.css');
require_once ( " auth.php " );
require_once ( " footer.php " );
exit ;
2017-01-02 19:13:48 -08:00
} */
2013-05-09 00:24:02 -07:00
2013-05-09 03:27:32 -07:00
// if($_SERVER['E_DEV_MENU'] == 'true')
//{
2017-01-02 14:04:14 -08:00
2013-05-09 00:24:02 -07:00
function e_help ()
{
2017-01-02 14:04:14 -08:00
if ( e_DEBUG_MENUMANAGER !== true )
2013-05-09 03:27:32 -07:00
{
2016-04-10 14:10:39 -07:00
return null ;
}
2013-05-09 03:27:32 -07:00
2013-05-09 22:24:23 -07:00
2017-01-02 14:04:14 -08:00
return e_menu_layout :: menuSelector ();
$text = '
< ul class = " nav nav-tabs " >
< li class = " active " >< a href = " #plugins " data - toggle = " tab " > '.ADLAN_CL_7.' </ a ></ li >
< li >< a href = " #custom " data - toggle = " tab " > '.LAN_CUSTOM.' </ a ></ li >
</ ul >
< div class = " tab-content " > ' ;
2013-05-09 03:27:32 -07:00
2017-01-02 14:04:14 -08:00
$text .= "
< div class = 'active tab-pane' id = 'plugins' >
< div id = 'menu-manager-item-list' class = 'menu-manager-items' style = 'height:400px;overflow-y:scroll' > " ;
$c = 500 ; // start high to prevent overwriting of keys after we drag and drop.
foreach ( $p as $menu => $folder )
{
$text .= " <div id=' { $menu } ' class='item draggable regularMenu' style='cursor:move'> " ;
// $text .= str_replace("_menu","",$menu);
$defaults = array (
'name' => $menu ,
'path' => $folder ,
'class' => '0'
);
$text .= e_layout :: renderMenuOptions ( $defaults , 'layout' , 'area' , $c );
$text .= " </div> " ;
$c ++ ;
}
$text .= " </div>
</ div >
< div class = 'tab-pane' id = 'custom' > " ;
if ( $sql -> select ( 'page' , '*' , " menu_name !='' ORDER BY menu_name " ))
{
$text .= " <div id='menu-manager-item-list' class='menu-manager-items' style='height:400px;overflow-y:scroll'> " ;
while ( $row = $sql -> fetch ())
{
$text .= " <div id=' " . $row [ 'page_id' ] . " ' class='item draggable regularMenu' style='cursor:move'> " ;
// $text .= $row['menu_name'];
$defaults = array (
'name' => $row [ 'menu_name' ],
'path' => $row [ 'page_id' ],
'class' => '0'
);
$text .= e_layout :: renderMenuOptions ( $defaults , 'layout' , 'area' , $c );
$text .= " </div> " ;
}
$text .= " </div> " ;
}
$text .= " </div>
</ div > " ;
return array ( 'caption' => MENLAN_57 , 'text' => $text );
}
//}
// new v2.1.4
class e_menu_layout
{
function __construct ()
{
}
static function getLayouts ( $theme = null )
{
if ( empty ( $theme ))
{
$theme = e107 :: pref ( 'core' , 'sitetheme' );
}
$HEADER = null ;
$FOOTER = null ;
$LAYOUT = null ;
$CUSTOMHEADER = null ;
$CUSTOMFOOTER = null ;
$file = e_THEME . $theme . " /theme.php " ;
if ( ! is_readable ( $file ))
{
return false ;
}
2017-01-03 11:02:09 -08:00
e107 :: set ( 'css_enabled' , false );
e107 :: set ( 'js_enabled' , false );
2017-01-02 14:04:14 -08:00
require ( $file );
2017-01-03 11:02:09 -08:00
e107 :: set ( 'css_enabled' , true );
e107 :: set ( 'js_enabled' , true );
2017-01-02 14:04:14 -08:00
$head = array ();
$foot = array ();
if ( isset ( $LAYOUT ) && is_array ( $LAYOUT )) // $LAYOUT is a combined $HEADER,$FOOTER.
{
foreach ( $LAYOUT as $key => $template )
{
if ( $key == '_header_' || $key == '_footer_' || $key == '_modal_' )
{
continue ;
}
if ( strpos ( $template , '{---}' ) !== false )
{
list ( $hd , $ft ) = explode ( " { ---} " , $template );
$head [ $key ] = isset ( $LAYOUT [ '_header_' ]) ? $LAYOUT [ '_header_' ] . $hd : $hd ;
$foot [ $key ] = isset ( $LAYOUT [ '_footer_' ]) ? $ft . $LAYOUT [ '_footer_' ] : $ft ;
}
else
{
e107 :: getMessage () -> addDebug ( 'Missing "{---}" in $LAYOUT["' . $key . '"] ' );
}
}
unset ( $hd , $ft );
}
if ( is_string ( $CUSTOMHEADER ))
{
$head [ 'legacyCustom' ] = $CUSTOMHEADER ;
}
elseif ( is_array ( $CUSTOMHEADER ))
{
foreach ( $CUSTOMHEADER as $k => $v )
{
$head [ $k ] = $v ;
}
}
if ( is_string ( $HEADER ))
{
$head [ 'legacyDefault' ] = $HEADER ;
}
elseif ( is_array ( $HEADER ))
{
foreach ( $HEADER as $k => $v )
{
$head [ $k ] = $v ;
}
}
if ( is_string ( $CUSTOMFOOTER ))
{
$foot [ 'legacyCustom' ] = $CUSTOMFOOTER ;
}
elseif ( is_array ( $CUSTOMFOOTER ))
{
foreach ( $CUSTOMFOOTER as $k => $v )
{
$foot [ $k ] = $v ;
}
}
if ( is_string ( $FOOTER ))
{
$foot [ 'legacyDefault' ] = $FOOTER ;
}
elseif ( is_array ( $FOOTER ))
{
foreach ( $FOOTER as $k => $v )
{
$foot [ $k ] = $v ;
}
}
$layout = array ();
foreach ( $head as $k => $v )
{
$template = $head [ $k ] . " \n { ---} " . $foot [ $k ];
$layout [ 'templates' ][ $k ] = $template ;
$layout [ 'menus' ][ $k ] = self :: countMenus ( $template );
}
return $layout ;
}
private static function countMenus ( $template )
{
if ( preg_match_all ( " / \ { MENU=([ \ d] { 1,3})(:[ \ w \ d]*)? \ }/ " , $template , $matches ))
{
sort ( $matches [ 1 ]);
return $matches [ 1 ];
}
return array ();
}
static function menuSelector ()
{
2017-01-01 18:47:43 -08:00
// $p = e107::getPref('e_menu_list'); // new storage for xxxxx_menu.php list.
2013-05-09 00:24:02 -07:00
$sql = e107 :: getDb ();
2017-01-01 18:47:43 -08:00
$frm = e107 :: getForm ();
$done = array ();
$pageMenu = array ();
$pluginMenu = array ();
$sql -> select ( " menus " , " menu_name, menu_id, menu_pages, menu_path " , " 1 ORDER BY menu_name ASC " );
while ( $row = $sql -> fetch ())
{
if ( in_array ( $row [ 'menu_name' ], $done ))
{
continue ;
}
$done [] = $row [ 'menu_name' ];
if ( is_numeric ( $row [ 'menu_path' ]))
{
$pageMenu [] = $row ;
}
else
{
$pluginMenu [] = $row ;
}
}
$tab1 = '<div class="menu-selector"><ul class="list-unstyled">' ;
foreach ( $pageMenu as $row )
{
2017-01-02 19:13:48 -08:00
$menuInf = ( ! is_numeric ( $row [ 'menu_path' ])) ? ' (' . substr ( $row [ 'menu_path' ], 0 , - 1 ) . ')' : " (# " . $row [ 'menu_path' ] . " ) " ;
2017-01-03 08:31:45 -08:00
$tab1 .= " <li> " . $frm -> checkbox ( 'menuselect[]' , $row [ 'menu_id' ], '' , array ( 'label' => " <span> " . $row [ 'menu_name' ] . " <small> " . $menuInf . " </small></span> " )) . " </li> " ;
2017-01-01 18:47:43 -08:00
}
$tab1 .= '</ul></div>' ;
$tab2 = '<div class="menu-selector"><ul class=" list-unstyled">' ;
foreach ( $pluginMenu as $row )
{
2017-01-02 19:13:48 -08:00
$menuInf = ( ! is_numeric ( $row [ 'menu_path' ])) ? ' (' . substr ( $row [ 'menu_path' ], 0 , - 1 ) . ')' : " (# " . $row [ 'menu_path' ] . " ) " ;
2017-01-03 08:31:45 -08:00
$tab2 .= " <li> " . $frm -> checkbox ( 'menuselect[]' , $row [ 'menu_id' ], '' , array ( 'label' => " <span> " . $row [ 'menu_name' ] . " <small> " . $menuInf . " </small></span> " )) . " </li> " ;
2017-01-01 18:47:43 -08:00
}
$tab2 .= '</ul></div>' ;
$tabs = array (
2017-01-02 19:13:48 -08:00
'custom' => array ( 'caption' => '<i title="' . MENLAN_49 . '" class="S16 e-custom-16"></i>' , 'text' => $tab1 ),
'plugin' => array ( 'caption' => '<i title="' . ADLAN_CL_7 . '" class="S16 e-plugins-16"></i>' , 'text' => $tab2 )
2017-01-01 18:47:43 -08:00
);
2017-01-02 14:04:14 -08:00
$defLayout = e107 :: getRegistry ( 'core/e107/menu-manager/curLayout' );;
$text = '<form id="e-mm-selector" action="' . e_ADMIN_ABS . 'menus.php?configure=' . $defLayout . '" method="post" target="e-mm-iframe">' ;
$text .= " <input type='hidden' id='curLayout' value=' " . $defLayout . " ' /> " ;
2017-01-01 18:47:43 -08:00
//TODO FIXME parse the theme file (or store it somewhere) to get the number of menu areas for each layout. ie. $menu_areas below.
2017-01-02 14:04:14 -08:00
$layouts = self :: getLayouts ();
// $text .= print_a($layouts['menus'],true);
2017-01-01 18:47:43 -08:00
$text .= '
2017-01-01 18:57:02 -08:00
< div class = " dropdown pull-right " >
2017-01-01 18:47:43 -08:00
2017-01-02 14:04:14 -08:00
< a class = " btn btn-default btn-sm e-mm-selector " title = " Activate " > '.LAN_GO." ".e107::getParser()->toGlyph(' fa - chevron - right ').' </ a > ' ;
2017-01-01 18:47:43 -08:00
2017-01-02 14:04:14 -08:00
foreach ( $layouts [ 'menus' ] as $name => $areas )
{
$text .= '<ul class="dropdown-menu e-mm-selector ' . $name . '" >' ;
2017-01-01 18:57:02 -08:00
2017-01-02 14:04:14 -08:00
foreach ( $areas as $menu_act )
{
2017-01-03 11:02:09 -08:00
$text .= " <li><input type='submit' class='btn btn-primary btn-block' name='menuActivate[ " . trim ( $menu_act ) . " ]' value=' " . MENLAN_13 . " " . trim ( $menu_act ) . " ' /></li> \n " ;
2017-01-02 14:04:14 -08:00
}
2017-01-01 18:47:43 -08:00
2017-01-02 14:04:14 -08:00
$text .= '</ul>' ;
}
2017-01-01 18:47:43 -08:00
2017-01-02 14:04:14 -08:00
$text .= '
2017-01-01 18:47:43 -08:00
</ div > ' ;
2017-01-01 18:57:02 -08:00
$text .= $frm -> tabs ( $tabs );
2017-01-01 18:47:43 -08:00
$text .= '</form>' ;
2017-01-02 19:13:48 -08:00
$tp = e107 :: getParser ();
$caption = MENLAN_22 ;
;
$diz = " The Menu-Manager allows you to place and arrange your menus within your theme template. Hover over the sub-areas to modify existing menu items. " ;
$caption .= " <span class='pull-right'><a class='e-tip' title= \" " . $tp -> toAttribute ( $diz ) . " \" > " . ADMIN_INFO_ICON . " </a></span> " ;
return array ( 'caption' => $caption , 'text' => $text );
2017-01-01 18:47:43 -08:00
2017-01-02 14:04:14 -08:00
}
2017-01-01 18:47:43 -08:00
2017-01-02 14:04:14 -08:00
}
2017-01-01 18:47:43 -08:00
2013-05-09 00:24:02 -07:00
// XXX Menu Manager Re-Write with drag and drop and multi-dimensional array as storage. ($pref)
// TODO Get Drag & Drop Working with the iFrame
// TODO Sorting, visibility, parameters and delete.
2013-05-09 17:51:06 -07:00
// TODO Get THIS http://jsbin.com/odiqi3 working with iFrames!! XXX XXX
2013-05-09 00:24:02 -07:00
class e_layout
{
private $menuData = array ();
2013-05-09 22:24:23 -07:00
private $iframe = false ;
2013-05-10 05:30:07 -07:00
private $cnt = 0 ;
2013-05-09 00:24:02 -07:00
function __construct ()
{
$pref = e107 :: getPref ();
$ns = e107 :: getRender ();
2013-05-09 22:24:23 -07:00
// $this->convertMenuTable();
$this -> menuData = e107 :: getPref ( 'menu_layouts' );
2013-05-09 17:51:06 -07:00
if ( e_AJAX_REQUEST )
{
2013-05-10 04:38:04 -07:00
2013-05-09 22:24:23 -07:00
if ( varset ( $_POST [ 'data' ]))
{
$this -> processPost ();
2013-05-09 17:51:06 -07:00
}
2013-05-16 16:23:24 -07:00
if ( vartrue ( $_GET [ 'enc' ]))
{
$string = base64_decode ( $_GET [ 'enc' ]);
parse_str ( $string , $_GET );
}
if ( vartrue ( $_GET [ 'vis' ]))
{
$text = $this -> renderVisibilityOptions ();
}
// print_a($_GET);
if ( vartrue ( $_GET [ 'parmsId' ]))
{
$text = $this -> renderInstanceParameters ();
}
if ( vartrue ( $_POST [ 'mode' ]))
{
2013-11-21 19:42:12 -08:00
// print_r($_POST);
2013-05-16 16:23:24 -07:00
// $men->setMenuId($this->menuId);
$text = $this -> menuSaveAjax ( $_POST [ 'mode' ]);
}
echo $text ;
2013-05-09 17:51:06 -07:00
exit ;
}
2013-05-09 22:24:23 -07:00
2013-05-10 04:38:04 -07:00
2013-05-09 00:24:02 -07:00
if ( vartrue ( $_GET [ 'configure' ])) //ie Inside the IFRAME.
{
2013-05-10 04:38:04 -07:00
global $HEADER , $FOOTER , $CUSTOMHEADER , $CUSTOMFOOTER , $style ;
$this -> HEADER = $HEADER ;
$this -> FOOTER = $FOOTER ;
$this -> CUSTOMHEADER = $CUSTOMHEADER ;
$this -> CUSTOMFOOTER = $CUSTOMFOOTER ;
$this -> style = $style ;
unset ( $HEADER , $FOOTER , $CUSTOMHEADER , $CUSTOMFOOTER , $style );
2013-05-10 05:30:07 -07:00
require_once ( e_CORE . " templates/admin_icons_template.php " );
2013-05-10 04:38:04 -07:00
2013-05-09 04:22:42 -07:00
2013-05-09 17:51:06 -07:00
/*
2013-05-09 04:22:42 -07:00
e107 :: js ( 'inline' , "
win = document . getElementById ( 'menu_iframe' ) . contentWindow ;
win . jQuery ( dragelement , parent . document ) . draggable ({
connectToSortable : $ ( '#sortable' )
});
" ,'jquery');
2013-05-09 17:51:06 -07:00
*/
2013-05-10 04:38:04 -07:00
2015-02-14 23:34:15 -08:00
$this -> curLayout = vartrue ( $_GET [ 'configure' ], $pref [ 'sitetheme_deflayout' ]);
2017-01-02 14:04:14 -08:00
$this -> renderLayout ( $this -> curLayout );
2013-05-09 04:22:42 -07:00
2013-05-10 04:38:04 -07:00
2013-05-09 04:22:42 -07:00
2013-05-09 00:24:02 -07:00
}
else // Parent - ie. main admin page.
{
2013-05-10 04:38:04 -07:00
e107 :: css ( 'inline' , "
. menuOption { display : none }
" );
$theme = e107 :: getPref ( 'sitetheme' );
require_once ( e_THEME . $theme . " /theme.php " );
$this -> HEADER = $HEADER ;
$this -> FOOTER = $FOOTER ;
$this -> CUSTOMHEADER = $CUSTOMHEADER ;
$this -> CUSTOMFOOTER = $CUSTOMFOOTER ;
$this -> style = $style ;
2013-05-09 00:24:02 -07:00
// XXX HELP _ i don't work with iFrames.
2013-05-09 17:51:06 -07:00
// $("#sortable")
//$("iframe").contents().find(".sortable")
2013-05-09 20:16:39 -07:00
/*
2013-05-09 04:22:42 -07:00
e107 :: js ( 'inline' , '
$ ( function ()
{
2013-05-09 17:51:06 -07:00
$ ( " .sortable " ) . sortable ({
2013-05-09 00:24:02 -07:00
revert : true
});
2013-05-09 04:22:42 -07:00
2013-05-09 17:51:06 -07:00
2013-05-09 20:16:39 -07:00
$ ( " iframe " ) . load ( function (){
var frameid = $ ( " #iframe-default " ) . contents () . find ( " .sortable " ) . attr ( " id " )
$ ( " .draggable " ) . draggable ({
connectToSortable : " # " + frameid ,
helper : " clone " ,
revert : " invalid " ,
cursor : " move " ,
iframeFix : true
});
2013-05-09 17:51:06 -07:00
});
2013-05-09 20:16:39 -07:00
// $( "ul, li" ).disableSelection();
2013-05-09 00:24:02 -07:00
2013-05-09 04:22:42 -07:00
});
2013-05-09 17:51:06 -07:00
2013-05-09 04:22:42 -07:00
',' jquery ' );
2013-05-09 20:16:39 -07:00
*/
2013-05-09 00:24:02 -07:00
2013-05-09 17:51:06 -07:00
2013-05-09 00:24:02 -07:00
$this -> scanForNew ();
$this -> renderInterface ();
}
}
2013-05-10 04:38:04 -07:00
/**
* Save Menu Pref
*/
2013-05-09 22:24:23 -07:00
protected function processPost ()
2013-05-09 00:24:02 -07:00
{
2013-05-10 04:38:04 -07:00
$cnf = e107 :: getConfig ( 'core' );
$existing = $cnf -> get ( 'menu_layouts' );
2013-05-09 17:51:06 -07:00
2013-05-10 04:38:04 -07:00
$data = $_POST [ 'data' ];
2013-05-09 22:24:23 -07:00
$layout = $_POST [ 'layout' ];
$area = $_POST [ 'area' ];
2013-05-09 17:51:06 -07:00
2013-05-09 22:24:23 -07:00
$save = array ();
2013-05-10 04:38:04 -07:00
2013-05-09 22:24:23 -07:00
foreach ( $_POST [ 'data' ][ 'layout' ][ 'area' ] as $v ) // reset key values.
2013-05-09 00:24:02 -07:00
{
2013-05-10 04:38:04 -07:00
$save [] = $v ;
2013-05-09 00:24:02 -07:00
}
2013-05-09 22:24:23 -07:00
// $save[$layout][$area] = $_POST['data']['layout']['area'];
2013-05-10 05:30:07 -07:00
echo " \n LAYOUT= " . $layout . " \n " ;
echo " AREA= " . $area . " \n " ;
2013-11-21 19:42:12 -08:00
//print_r($save);
2013-05-09 00:24:02 -07:00
2013-05-10 04:38:04 -07:00
e107 :: getConfig ( 'core' ) -> setPref ( 'menu_layouts/' . $layout . " / " . $area , $save ) -> save ();
2013-05-09 00:24:02 -07:00
}
/**
* Substitute all { MENU = X } and Render output .
*/
private function renderLayout ( $layout = '' )
2013-05-10 04:38:04 -07:00
{
$ALL = $this -> getHeadFoot ();
2013-05-09 00:24:02 -07:00
2013-05-10 04:38:04 -07:00
$HEADER = $ALL [ 'HEADER' ];
$FOOTER = $ALL [ 'FOOTER' ];
2013-05-09 00:24:02 -07:00
2013-05-10 04:38:04 -07:00
$tp = e107 :: getParser ();
2013-05-09 00:24:02 -07:00
$head = preg_replace_callback ( " / \ { MENU=([ \ d] { 1,3})(:[ \ w \ d]*)? \ }/ " , array ( $this , 'renderMenuArea' ), $HEADER [ THEME_LAYOUT ]);
$foot = preg_replace_callback ( " / \ { MENU=([ \ d] { 1,3})(:[ \ w \ d]*)? \ }/ " , array ( $this , 'renderMenuArea' ), $FOOTER [ THEME_LAYOUT ]);
2013-05-10 04:38:04 -07:00
global $style ;
$style = $this -> style ;
2015-04-01 11:52:50 -07:00
echo $tp -> parseTemplate ( $head );
2013-05-09 00:24:02 -07:00
// echo "<div>MAIN CONTENT</div>";
2015-04-01 11:52:50 -07:00
echo $tp -> parseTemplate ( $foot );
2013-05-09 00:24:02 -07:00
}
/**
* Render { MENU = X }
*/
private function renderMenuArea ( $matches )
{
2013-05-09 17:51:06 -07:00
$frm = e107 :: getForm ();
2013-05-09 00:24:02 -07:00
$area = $matches [ 1 ];
// return print_a($this->menuData,true);
$text = " <div class='menu-panel'> " ;
2016-12-05 22:47:34 +00:00
$text .= " <div class='menu-panel-header' title= \" " . MENLAN_34 . " \" > " . MENLAN_14 . " " . $area . " </div> \n " ;
2013-05-10 05:30:07 -07:00
$text .= $frm -> open ( 'form-area-' . $area , 'post' , e_SELF );
2015-07-13 13:09:52 -07:00
$text .= " <ul id='area- " . $area . " ' class='sortable unstyled list-unstyled'>
2013-05-10 05:30:07 -07:00
< li >& nbsp ; </ li > " ;
2013-05-10 04:38:04 -07:00
2013-05-09 00:24:02 -07:00
if ( vartrue ( $this -> menuData [ THEME_LAYOUT ]) && is_array ( $this -> menuData [ THEME_LAYOUT ][ $area ]))
{
foreach ( $this -> menuData [ THEME_LAYOUT ][ $area ] as $val )
{
2013-05-09 20:16:39 -07:00
$text .= $this -> renderMenu ( $val , THEME_LAYOUT , $area , $count );
2013-05-10 05:30:07 -07:00
$this -> cnt ++ ;
2013-05-09 00:24:02 -07:00
}
2013-05-10 05:30:07 -07:00
2013-05-09 22:24:23 -07:00
}
2013-05-09 00:24:02 -07:00
2013-05-10 05:30:07 -07:00
$text .= " </ul> " ;
2013-05-09 00:24:02 -07:00
$text .= " </div> " ;
2013-05-09 17:51:06 -07:00
// $text .= $frm->button('submit','submit','submit','submit');
2013-05-09 22:24:23 -07:00
$text .= $frm -> hidden ( 'layout' , THEME_LAYOUT );
$text .= $frm -> hidden ( 'area' , $area );
2013-05-09 17:51:06 -07:00
$text .= $frm -> close ();
2013-05-09 00:24:02 -07:00
return $text ;
}
2013-05-09 20:16:39 -07:00
private function renderMenu ( $row , $layout , $area , $count )
2013-05-09 00:24:02 -07:00
{
// return print_a($row,true);
2013-05-09 23:59:37 -07:00
$frm = e107 :: getForm ();
2013-05-10 05:30:07 -07:00
$uniqueId = " menu_ " . $frm -> name2id ( $row [ 'path' ]) . '_' . $this -> cnt ;
2013-05-09 23:52:05 -07:00
2013-05-10 05:30:07 -07:00
$TEMPLATE = '<li class="regularMenu" id="' . $uniqueId . '"> ' . $this -> renderMenuOptions ( $row , $layout , $area , $this -> cnt , $uniqueId ) . ' </ li >
2013-05-09 17:51:06 -07:00
' ; // TODO perhaps a simple counter for the id
2013-05-09 00:24:02 -07:00
return $TEMPLATE ;
}
2013-05-09 17:51:06 -07:00
2013-05-09 20:16:39 -07:00
/**
* @ param $row ( array of data from $pref [ 'menu_layouts' ]
* @ param $layout . eg . 'default' or 'home'
* @ param number $area as in { MENU = x }
* @ param incrementor number .
*/
2013-05-10 05:30:07 -07:00
public function renderMenuOptions ( $row , $layout , $area , $c , $uniqueId = 'xxx' )
2013-05-09 17:51:06 -07:00
{
$frm = e107 :: getForm ();
2013-05-10 05:30:07 -07:00
// $text = "<i class='icon-align-justify'></i> ";
2016-02-07 22:25:12 -08:00
$text = str_replace ( " _menu " , " " , $row [ 'name' ]);
2013-05-10 05:30:07 -07:00
2013-05-09 22:24:23 -07:00
// $layout = 'layout';
// $area = 'area';
2013-05-09 17:51:06 -07:00
//TODO Delete, Config etc.
//$data[$layout][$location][] = array('name'=>$row['menu_name'],'class'=>$row['menu_class'],'path'=>$row['menu_path'],'pages'=>$row['menu_pages'],'parms'=>$row['menu_parms']);
// $area = 'area_'.$area;
2013-05-09 22:24:23 -07:00
// 'layout' and 'area' will later be substituted.
2013-05-16 16:23:24 -07:00
$text .= $frm -> hidden ( 'data[layout][area][' . $c . '][name]' , $row [ 'name' ], array ( 'id' => 'name-' . $area . '-' . $c ) );
$text .= $frm -> hidden ( 'data[layout][area][' . $c . '][class]' , $row [ 'class' ], array ( 'id' => 'class-' . $area . '-' . $c ) );
$text .= $frm -> hidden ( 'data[layout][area][' . $c . '][path]' , $row [ 'path' ], array ( 'id' => 'path-' . $area . '-' . $c ) );
$text .= $frm -> hidden ( 'data[layout][area][' . $c . '][pages]' , $row [ 'pages' ], array ( 'id' => 'pages-' . $area . '-' . $c ) );
$text .= $frm -> hidden ( 'data[layout][area][' . $c . '][parms]' , $row [ 'parms' ], array ( 'id' => 'parms-' . $area . '-' . $c ) );
2013-05-09 22:24:23 -07:00
2013-05-16 16:23:24 -07:00
$visibilityLink = e_SELF . " ?enc= " . base64_encode ( 'lay=' . $layout . '&vis=' . $area . '-' . $c . '&iframe=1&class=' . $row [ 'class' ] . '&pages=' . $row [ 'pages' ]);
2013-05-10 05:30:07 -07:00
2013-05-10 05:45:40 -07:00
$text .= " <a href='#' class='menuOption menu-btn menu-btn-mini menu-btn-danger deleteMenu pull-right' data-area='area- " . $area . " ' data-delete=' " . $uniqueId . " '>×</a> " ; // $('.hello').remove();
2013-05-10 05:30:07 -07:00
2015-07-02 14:33:04 +01:00
$text .= '<a class="menuOption e-menumanager-option menu-btn pull-right" data-modal-caption="' . LAN_VISIBILITY . '" href="' . $visibilityLink . '" title="' . LAN_VISIBILITY . '"><i class="icon-search"></i></a>' ;
2013-05-10 05:30:07 -07:00
/*
$text .= ' < span class = " menu-options-buttons " >
2015-07-02 14:33:04 +01:00
< a class = " e-menumanager-option menu-btn " data - modal - caption = " '.LAN_VISIBILITY.' " href = " '. $visibilityLink .' " title = " '.LAN_VISIBILITY.' " >< i class = " S16 e-search-16 " ></ i ></ a > ' ;
2013-05-09 22:24:23 -07:00
2013-05-10 05:30:07 -07:00
if ( $conf )
{
$text .= '<a class="menu-btn" target="_top" href="' . e_SELF . '?lay=' . $layout . '&mode=conf&path=' . urlencode ( $conf ) . '&id=' . $menu_id . ' "
title = " Configure menu " >< i class = " S16 e-configure-16 " ></ i ></ a > ' ;
}
$editLink = e_SELF . " ?enc= " . base64_encode ( 'lay=' . $layout . '&parmsId=' . $menu_id . '&iframe=1' );
$text .= '<a data-modal-caption="Configure parameters" class="e-menumanager-option menu-btn e-tip" target="_top" href="' . $editLink . '" title="Configure parameters"><i class="S16 e-edit-16" ></i></a>' ;
$text .= '<a title="' . LAN_DELETE . '" id="remove-' . $menu_id . '-' . $menu_location . '" class="e-tip delete e-menumanager-delete menu-btn" href="' . e_SELF . '?configure=' . $layout . '&mode=deac&id=' . $menu_id . ' " ><i class= " S16 e - delete - 16 " ></i></a>
</ span > ' ;
*/
2013-05-09 22:24:23 -07:00
2013-05-09 17:51:06 -07:00
return $text ;
}
2016-01-12 15:44:54 -08:00
/*
2013-05-16 16:23:24 -07:00
function menuSaveAjax ( $mode = null )
{
2016-01-12 15:44:54 -08:00
2013-05-16 16:23:24 -07:00
if ( $mode == 'visibility' )
{
$ret = $this -> menuSaveVisibility ();
2013-11-21 19:42:12 -08:00
// echo json_encode($ret);
2013-05-16 16:23:24 -07:00
return ;
}
if ( $mode == 'parms' )
{
2016-01-12 15:44:54 -08:00
// echo "hi there";
$ret = array ( 'msg' => 'hi there' , 'error' => true );
// $ret = $this->menuSaveParameters();
echo json_encode ( $ret );
2013-05-16 16:23:24 -07:00
return ;
}
2013-11-21 19:42:12 -08:00
// print_r($_POST);
2013-05-16 16:23:24 -07:00
return ;
2013-05-09 17:51:06 -07:00
2013-05-16 16:23:24 -07:00
}
2016-01-12 15:44:54 -08:00
*/
2013-05-09 00:24:02 -07:00
/**
* Scan Plugin folders for new _menu files .
*/
private function scanForNew ()
{
$fl = e107 :: getFile ();
$fl -> dirFilter = array ( '/' , 'CVS' , '.svn' , 'languages' );
$files = $fl -> get_files ( e_PLUGIN , " _menu \ .php $ " , 'standard' , 2 );
$data = array ();
foreach ( $files as $file )
{
2016-02-07 22:25:12 -08:00
if ( $file == 'e_menu.php' )
{
continue ;
}
2013-05-10 00:13:32 -07:00
$valid_menu = false ;
if ( file_exists ( $file [ 'path' ] . '/plugin.xml' ) || file_exists ( $file [ 'path' ] . '/plugin.php' ))
{
2013-05-30 00:35:38 -07:00
// if (e107::isInstalled($file['path'])) //FIXME need a check that doesn't exlude page, news and others that don't require installation.
2013-05-10 00:13:32 -07:00
{
$valid_menu = TRUE ; // Whether new or existing, include in list
}
}
else // Just add the menu anyway
{
$valid_menu = TRUE ;
}
2013-05-09 00:24:02 -07:00
2013-05-10 00:13:32 -07:00
$path = trim ( str_replace ( e_PLUGIN , " " , $file [ 'path' ]), " / " );
if ( $valid_menu )
2013-05-09 00:24:02 -07:00
{
$fname = str_replace ( " .php " , " " , $file [ 'fname' ]);
$data [ $fname ] = $path ;
}
}
$config = e107 :: getConfig ( 'core' );
$config -> set ( 'e_menu_list' , $data );
$config -> save ();
}
2013-05-16 16:23:24 -07:00
private function renderVisibilityOptions ()
{
if ( ! vartrue ( $_GET [ 'vis' ])) return ;
// print_a($_GET);
2015-06-02 14:25:39 -07:00
$tp = e107 :: getParser ();
2013-05-16 16:23:24 -07:00
$sql = e107 :: getDb ();
$ns = e107 :: getRender ();
$frm = e107 :: getForm ();
require_once ( e_HANDLER . " userclass_class.php " );
/*
if ( ! $sql -> select ( " menus " , " * " , " menu_id= " . intval ( $_GET [ 'vis' ])))
{
$this -> menuAddMessage ( " Couldn't Load Menu " , E_MESSAGE_ERROR );
return ;
}
$row = $sql -> fetch ();
*/
$listtype = substr ( $_GET [ 'pages' ], 0 , 1 );
$menu_pages = substr ( $_GET [ 'pages' ], 2 );
$menu_pages = str_replace ( " | " , " \n " , $menu_pages );
2013-05-09 00:24:02 -07:00
2013-05-16 16:23:24 -07:00
$text = " <div>
< form class = 'form-horizontal' id = 'e-save-form' method = 'post' action = '".e_SELF."?lay=".$this->curLayout."&iframe=1' >
< fieldset >
< legend > " . MENLAN_7. " " . $row['menu_name'] . " </ legend >
< table class = 'table adminform' >
< tr >
< td >
2016-12-20 20:26:00 +00:00
" .LAN_VISIBLE_TO. " " .
2013-05-16 16:23:24 -07:00
r_userclass ( 'menu_class' , intval ( $_GET [ 'class' ]), " off " , " public,member,guest,admin,main,classes,nobody " ) . "
</ td >
</ tr >
< tr >< td >< div class = 'radio' >
" ;
$checked = ( $listtype == 1 ) ? " checked='checked' " : " " ;
2015-06-02 14:25:39 -07:00
$text .= $frm -> radio ( 'listtype' , 1 , $checked , array ( 'label' => $tp -> toHtml ( MENLAN_26 , true ), 'class' => 'e-save' ));
2013-05-16 16:23:24 -07:00
$text .= " <br /> " ;
// $text .= "<input type='radio' class='e-save' {$checked} name='listtype' value='1' /> ".MENLAN_26."<br />";
$checked = ( $listtype == 2 ) ? " checked='checked' " : " " ;
2015-06-02 14:25:39 -07:00
$text .= $frm -> radio ( 'listtype' , 2 , $checked , array ( 'label' => $tp -> toHtml ( MENLAN_27 , true ), 'class' => 'e-save' ));
2013-05-16 16:23:24 -07:00
// $text .= "<input type='radio' class='e-save' {$checked} name='listtype' value='2' /> ".MENLAN_27."<br />";
$text .= " </div>
< div class = 'row' style = 'padding:10px' >
< div class = 'pull-left span3' >
< textarea name = 'pagelist' class = 'e-save span3' cols = '60' rows = '8' class = 'tbox' > " . $menu_pages . " </ textarea >
</ div >
2015-07-13 19:09:30 -07:00
< div class = ' span4 col-md-4' >< small > " .MENLAN_28. " </ small ></ div >
2013-05-16 16:23:24 -07:00
</ div ></ td ></ tr >
</ table > " ;
$text .= $frm -> hidden ( 'mode' , 'visibility' );
$text .= $frm -> hidden ( 'menu_id' , $_GET [ 'vis' ]); // is NOT an integer
/*
$text .= "
< div class = 'buttons-bar center' > " ;
$text .= $frm -> admin_button ( 'class_submit' , MENLAN_6 , 'update' );
</ div > " ;
*/
$text .= "
</ fieldset >
</ form >
</ div > " ;
return $text ;
//$caption = MENLAN_7." ".$row['menu_name'];
//$ns->tablerender($caption, $text);
//echo $text;
}
/**
* This one will be greatly extended , allowing menus to offer UI and us
* settings per instance later ( $parm variable available for menus - same as shortcode ' s $parm )
2016-01-12 15:44:54 -08:00
* @ see menuInstanceParameters () in menumanager_class . php
2013-05-16 16:23:24 -07:00
*/
2016-01-12 15:44:54 -08:00
/*
2013-05-16 16:23:24 -07:00
private function renderInstanceParameters ()
{
if ( ! vartrue ( $_GET [ 'parmsId' ])) return ;
$id = intval ( $_GET [ 'parmsId' ]);
$frm = e107 :: getForm ();
$sql = e107 :: getDb ();
if ( ! $sql -> select ( " menus " , " * " , " menu_id= " . $id ))
{
$this -> menuAddMessage ( " Couldn't Load Menu " , E_MESSAGE_ERROR );
return ;
};
$row = $sql -> fetch ();
2015-05-01 17:54:44 +02:00
2013-05-16 16:23:24 -07:00
$text = " <div style='text-align:center;'>
< form id = 'e-save-form' method = 'post' action = '".e_SELF."?lay=".$this->curLayout."' >
< fieldset id = 'core-menus-parametersform' >
2015-05-01 17:54:44 +02:00
< legend > " .MENLAN_44. " " . $row['menu_name'] . " </ legend >
2013-05-16 16:23:24 -07:00
< table class = 'table adminform' >
< tr >
< td >
2016-01-12 15:44:54 -08:00
" .MENLAN_45. " </ td >< td >
" . $frm->text ('menu_parms', $row['menu_parms'] , 900, 'class=e-save '). "
2013-05-16 16:23:24 -07:00
</ td >
</ tr >
</ table > " ;
2016-01-12 15:44:54 -08:00
2013-05-16 16:23:24 -07:00
2016-01-12 15:44:54 -08:00
// $text .= "
// <div class='buttons-bar center'>";
// $text .= $frm->admin_button('parms_submit', LAN_SAVE, 'update');
// $text .= "<input type='hidden' name='menu_id' value='".$id."' />
// </div>";
2013-05-16 16:23:24 -07:00
2016-01-12 15:44:54 -08:00
2013-05-16 16:23:24 -07:00
$text .= $frm -> hidden ( 'mode' , 'parms' );
$text .= $frm -> hidden ( 'menu_id' , $id );
$text .= "
</ fieldset >
</ form >
</ div > " ;
return $text ;
}
2016-01-12 15:44:54 -08:00
*/
2013-05-09 00:24:02 -07:00
/**
* Render the main area with TABS and iframes .
*/
private function renderInterface ()
{
$ns = e107 :: getRender ();
$tp = e107 :: getParser ();
2013-05-10 04:38:04 -07:00
$frm = e107 :: getForm ();
2013-05-09 00:24:02 -07:00
$TEMPL = $this -> getHeadFoot ();
2013-05-10 04:38:04 -07:00
2013-05-09 00:24:02 -07:00
$layouts = array_keys ( $TEMPL [ 'HEADER' ]);
2013-05-09 17:51:06 -07:00
e107 :: js ( 'inline' , '
$ ( function ()
{
$ ( " .draggable " ) . draggable ({
connectToSortable : $ ( " .sortable " ),
helper : " clone " ,
revert : " invalid " ,
cursor : " move " ,
iframeFix : true ,
refreshPositions : true
});
}) '
);
2013-05-09 00:24:02 -07:00
$text = '<ul class="nav nav-tabs">' ;
$active = ' class="active" ' ;
foreach ( $layouts as $title )
{
$text .= '<li ' . $active . '><a href="#' . $title . '" data-toggle="tab">' . $title . '</a></li>' ;
$active = '' ;
}
$text .= '</ul>' ;
$active = 'active' ;
$text .= '
< div class = " tab-content " > ' ;
foreach ( $layouts as $title )
{
$text .= '
< div class = " tab-pane '. $active .' " id = " '. $title .' " >
2013-05-09 17:51:06 -07:00
< iframe id = " iframe-'. $frm->name2id ( $title ).' " class = " well " width = " 100% " scrolling = " no " style = " width: 100%; height: 6933px; border: 0px none; " src = " '.e_ADMIN_ABS.'menus.php?configure='. $title .' " ></ iframe >
2013-05-09 00:24:02 -07:00
</ div > ' ;
$active = '' ;
}
$text .= '</div>' ;
// $ns->frontend = false;
2016-12-20 20:26:00 +00:00
$ns -> tablerender ( MENLAN_55 , $text );
2013-05-09 00:24:02 -07:00
}
2013-05-10 04:38:04 -07:00
private function getHeadFoot ()
2013-05-09 00:24:02 -07:00
{
2013-05-10 04:38:04 -07:00
2013-05-09 00:24:02 -07:00
$H = array ();
$F = array ();
2013-05-10 04:38:04 -07:00
if ( is_string ( $this -> HEADER ))
2013-05-09 00:24:02 -07:00
{
2013-05-10 04:38:04 -07:00
$H [ 'default' ] = $this -> HEADER ;
$F [ 'default' ] = $this -> FOOTER ;
2013-05-09 00:24:02 -07:00
}
else
{
2013-05-10 04:38:04 -07:00
$H = $this -> HEADER ;
$F = $this -> FOOTER ;
2013-05-09 00:24:02 -07:00
}
2013-05-10 04:38:04 -07:00
2013-05-09 00:24:02 -07:00
// 0.6 / 0.7-1.x
2013-05-10 04:38:04 -07:00
if ( isset ( $this -> CUSTOMHEADER ) && isset ( $this -> CUSTOMHEADER ))
2013-05-09 00:24:02 -07:00
{
2013-05-10 04:38:04 -07:00
if ( ! is_array ( $this -> CUSTOMHEADER ))
2013-05-09 00:24:02 -07:00
{
2013-05-10 04:38:04 -07:00
$H [ 'legacyCustom' ] = $this -> CUSTOMHEADER ;
$F [ 'legacyCustom' ] = $this -> CUSTOMFOOTER ;
2013-05-09 00:24:02 -07:00
}
else
{
2013-05-10 04:38:04 -07:00
foreach ( $this -> CUSTOMHEADER as $k => $v )
{
$H [ $k ] = $v ;
}
foreach ( $this -> CUSTOMFOOTER as $k => $v )
2013-05-09 00:24:02 -07:00
{
2013-05-10 04:38:04 -07:00
$F [ $k ] = $v ;
}
2013-05-09 00:24:02 -07:00
}
}
2013-05-10 04:38:04 -07:00
2013-05-09 00:24:02 -07:00
return array ( 'HEADER' => $H , 'FOOTER' => $F );
}
//$ns = e107::getRender();
}
//include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
2012-05-24 15:54:25 +00:00
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-08-16 16:30:56 +00:00
require_once ( e_HANDLER . " menumanager_class.php " );
2009-07-16 02:55:19 +00:00
2013-02-27 17:18:33 +01:00
$rs = new form ;
$frm = e107 :: getForm ();
$men = new e_menuManager ( 0 ); // use 1 for dragdrop.
$mes = e107 :: getMessage ();
2006-12-02 04:36:16 +00:00
2009-08-19 14:39:57 +00:00
if ( e_AJAX_REQUEST )
{
2013-03-02 21:07:42 -08:00
if ( vartrue ( $_GET [ 'enc' ]))
{
$string = base64_decode ( $_GET [ 'enc' ]);
parse_str ( $string , $_GET );
// print_a($_GET);
}
// print_a($_POST);
if ( vartrue ( $_GET [ 'vis' ]))
{
$text = $men -> menuVisibilityOptions ();
}
// print_a($_GET);
if ( vartrue ( $_GET [ 'parmsId' ]))
{
$text = $men -> menuInstanceParameters ();
}
if ( vartrue ( $_POST [ 'mode' ]))
{
// print_r($_POST);
// $men->setMenuId($this->menuId);
$text = $men -> menuSaveAjax ( $_POST [ 'mode' ]);
}
echo $text ;
2009-07-10 14:27:31 +00:00
exit ;
2013-03-02 21:07:42 -08:00
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 )
{
2015-02-15 16:07:27 -08:00
e107 :: getCache () -> clear_sys ( " menus_ " );
2009-07-10 14:27:31 +00:00
}
2009-07-09 11:37:36 +00:00
2013-02-27 17:18:33 +01:00
//FIXME still used in e_HANDLER.menumanager_class.php
2013-05-09 00:24:02 -07:00
2017-01-02 19:13:48 -08:00
2013-05-09 00:24:02 -07: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
{
2013-05-13 00:34:21 -04:00
// $men->menuScanMenus(); // - Runs 2x - Is already called by menuModify() in menumanager_class.php
2012-12-08 15:52:40 +01:00
$text = $men -> menuRenderMessage ();
2016-04-09 18:54:11 -07:00
// $text .= $men->menuSelectLayout();
2009-07-11 01:48:40 +00:00
$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 ();
2016-04-09 18:54:11 -07:00
echo $text ;
// $ns -> tablerender(ADLAN_6.SEP.LAN_MENULAYOUT, e107::getMessage()->render(). $text, 'menus_config');
2009-07-09 11:37:36 +00:00
}
2009-07-10 14:27:31 +00:00
else // Within the IFrame.
{
2017-01-02 19:13:48 -08:00
2009-07-10 14:27:31 +00:00
$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
2013-05-09 00:24:02 -07:00
2009-07-10 14:27:31 +00:00
// -----------------------------------------------------------------------------
2009-07-09 08:31:38 +00:00
2017-01-02 19:13:48 -08: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
2013-05-09 00:24:02 -07:00
2009-07-12 10:11:35 +00:00
function menus_adminmenu ()
{
2015-04-01 23:01:04 -07:00
// See admin_shortcodes.php - sc_admin_menumanager()
2009-07-15 09:38:00 +00:00
// 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
?>