mirror of
https://github.com/e107inc/e107.git
synced 2025-08-06 14:46:56 +02:00
Merge branch 'master' of https://github.com/e107inc/e107
This commit is contained in:
79
class2.php
79
class2.php
@@ -780,27 +780,30 @@ if (!class_exists('e107table', false))
|
||||
class e107table
|
||||
{
|
||||
|
||||
public $eMenuCount = 0;
|
||||
public $eMenuArea;
|
||||
public $eMenuTotal = array();
|
||||
public $eSetStyle;
|
||||
public $eMenuCount = 0;
|
||||
public $eMenuArea;
|
||||
public $eMenuTotal = array();
|
||||
public $eSetStyle;
|
||||
private $themeClass = '';
|
||||
private $adminThemeClass = '';
|
||||
public $frontend = null;
|
||||
|
||||
|
||||
function __construct()
|
||||
{
|
||||
// $this->themeClass = e107::getPref('sitetheme')."_theme"; // disabled at the moment.
|
||||
$this->adminThemeClass = e107::getPref('admintheme')."_admintheme"; // Check for a class.
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $caption
|
||||
* @param $text
|
||||
* @param $mode
|
||||
* @param $caption string caption text
|
||||
* @param $text body text
|
||||
* @param $mode unique identifier
|
||||
* @param $return boolean : return the html instead of echo it.
|
||||
* @return null
|
||||
*/
|
||||
function tablerender($caption, $text, $mode = 'default', $return = false)
|
||||
public function tablerender($caption, $text, $mode = 'default', $return = false)
|
||||
{
|
||||
|
||||
/*
|
||||
# Render style table
|
||||
# - parameter #1: string $caption, caption text
|
||||
# - parameter #2: string $text, body text
|
||||
# - return null
|
||||
# - scope public
|
||||
*/
|
||||
$override_tablerender = e107::getSingleton('override', e_HANDLER.'override_class.php')->override_check('tablerender');
|
||||
|
||||
if ($override_tablerender)
|
||||
@@ -820,8 +823,9 @@ if (!class_exists('e107table', false))
|
||||
{
|
||||
$this->eMenuCount++;
|
||||
}
|
||||
|
||||
ob_start();
|
||||
tablestyle($caption, $text, $mode, array('menuArea'=>$this->eMenuArea, 'menuCount'=>$this->eMenuCount, 'menuTotal'=>varset($this->eMenuTotal[$this->eMenuArea]), 'setStyle'=>$this->eSetStyle));
|
||||
$this->tablestyle($caption, $text, $mode);
|
||||
$ret=ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
@@ -834,11 +838,50 @@ if (!class_exists('e107table', false))
|
||||
{
|
||||
$this->eMenuCount++;
|
||||
}
|
||||
tablestyle($caption, $text, $mode, array('menuArea'=>$this->eMenuArea,'menuCount'=>$this->eMenuCount,'menuTotal'=>varset($this->eMenuTotal[$this->eMenuArea]),'setStyle'=>$this->eSetStyle));
|
||||
|
||||
$this->tablestyle($caption, $text, $mode);
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Output the styled template.
|
||||
* @param $caption
|
||||
* @param $text
|
||||
* @param $mode
|
||||
*/
|
||||
private function tablestyle($caption, $text, $mode)
|
||||
{
|
||||
|
||||
if(class_exists($this->adminThemeClass) && ($this->frontend == false))
|
||||
{
|
||||
$thm = new $this->adminThemeClass();
|
||||
}
|
||||
elseif(class_exists($this->themeClass)) // disabled at the moment.
|
||||
{
|
||||
$thm = new $this->themeClass();
|
||||
}
|
||||
|
||||
if(is_object($thm))
|
||||
{
|
||||
$thm->tablestyle($caption, $text, $mode, array('menuArea'=>$this->eMenuArea, 'menuCount'=>$this->eMenuCount, 'menuTotal'=>varset($this->eMenuTotal[$this->eMenuArea]), 'setStyle'=>$this->eSetStyle));
|
||||
}
|
||||
else
|
||||
{
|
||||
tablestyle($caption, $text, $mode, array('menuArea'=>$this->eMenuArea,'menuCount'=>$this->eMenuCount,'menuTotal'=>varset($this->eMenuTotal[$this->eMenuArea]),'setStyle'=>$this->eSetStyle));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
//#############################################################
|
||||
|
||||
|
@@ -21,8 +21,10 @@ if (!defined('ADMIN_AREA'))
|
||||
//avoid PHP warning
|
||||
define("ADMIN_AREA", TRUE);
|
||||
}
|
||||
define("USER_AREA", FALSE);
|
||||
|
||||
if(!defined('USER_AREA'))
|
||||
{
|
||||
define("USER_AREA", FALSE);
|
||||
}
|
||||
e107::getDb()->db_Mark_Time('(Header Top)');
|
||||
|
||||
// Admin template
|
||||
@@ -154,13 +156,14 @@ if (isset($pref['del_unv']) && $pref['del_unv'] && $pref['user_reg_veri'] != 2)
|
||||
//
|
||||
|
||||
// HTML 5 default.
|
||||
if(!defined('XHTML4'))
|
||||
//if(!defined('XHTML4'))
|
||||
{
|
||||
echo "<!doctype html>\n";
|
||||
echo "<html".(defined("TEXTDIRECTION") ? " dir='".TEXTDIRECTION."'" : "").(defined("CORE_LC") ? " lang=\"".CORE_LC."\"" : "").">\n";
|
||||
echo "<head>\n";
|
||||
echo "<meta charset='utf-8' />\n";
|
||||
}
|
||||
/*
|
||||
else // XHTML
|
||||
{
|
||||
echo(defined("STANDARDS_MODE") ? "" : "<?xml version='1.0' encoding='utf-8' "."?".">\n")."<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">\n";
|
||||
@@ -171,6 +174,9 @@ else // XHTML
|
||||
echo(defined("CORE_LC")) ? "<meta http-equiv='content-language' content='".CORE_LC."' />\n" : "";
|
||||
echo "<meta http-equiv='content-type' content='text/html; charset=utf-8' />\n";
|
||||
}
|
||||
*
|
||||
*/
|
||||
|
||||
echo "<meta name=\"viewport\" content=\"width=device-width; initial-scale=1; maximum-scale=1\" />\n"; // Works better for iOS but still has some issues.
|
||||
// echo (defined("VIEWPORT")) ? "<meta name=\"viewport\" content=\"".VIEWPORT."\" />\n" : "";
|
||||
|
||||
@@ -207,14 +213,14 @@ if (isset($eplug_css) && $eplug_css)
|
||||
|
||||
|
||||
|
||||
if(e107::getPref('admincss') == "admin_dark.css")
|
||||
if(e107::getPref('admincss') == "admin_dark.css" && !vartrue($_GET['configure']))
|
||||
{
|
||||
$e_js->coreCSS('bootstrap/css/darkstrap.css');
|
||||
|
||||
}
|
||||
|
||||
//NEW - Iframe mod
|
||||
if (!defsettrue('e_IFRAME') && isset($pref['admincss']) && $pref['admincss'])
|
||||
if (!defsettrue('e_IFRAME') && isset($pref['admincss']) && $pref['admincss'] && !vartrue($_GET['configure']))
|
||||
{
|
||||
$css_file = file_exists(THEME.'admin_'.$pref['admincss']) ? 'admin_'.$pref['admincss'] : $pref['admincss'];
|
||||
//echo "<link rel='stylesheet' href='".$css_file."' type='text/css' />\n";
|
||||
@@ -223,13 +229,13 @@ if (!defsettrue('e_IFRAME') && isset($pref['admincss']) && $pref['admincss'])
|
||||
}
|
||||
elseif (isset($pref['themecss']) && $pref['themecss'])
|
||||
{
|
||||
$css_file = file_exists(THEME.'admin_'.$pref['themecss']) ? 'admin_'.$pref['themecss'] : $pref['themecss'];
|
||||
$css_file = (file_exists(THEME.'admin_'.$pref['themecss']) && !vartrue($_GET['configure'])) ? 'admin_'.$pref['themecss'] : $pref['themecss'];
|
||||
//echo "<link rel='stylesheet' href='".$css_file."' type='text/css' />\n";
|
||||
$e_js->themeCSS($css_file);
|
||||
}
|
||||
else
|
||||
{
|
||||
$css_file = file_exists(THEME.'admin_style.css') ? 'admin_style.css' : 'style.css';
|
||||
$css_file = (file_exists(THEME.'admin_style.css') && !vartrue($_GET['configure'])) ? 'admin_style.css' : 'style.css';
|
||||
//echo "<link rel='stylesheet' href='".$css_file."' type='text/css' />\n";
|
||||
$e_js->themeCSS($css_file);
|
||||
}
|
||||
@@ -436,7 +442,7 @@ echo "</head>
|
||||
<body".$body_onload.">\n";
|
||||
|
||||
echo getModal();
|
||||
echo getAlert();
|
||||
// echo getAlert();
|
||||
|
||||
function getModal($caption = '', $type='')
|
||||
{
|
||||
@@ -529,7 +535,7 @@ if ($e107_popup != 1)
|
||||
//removed check strpos(e_SELF.'?'.e_QUERY, 'menus.php?configure') === FALSE
|
||||
parse_admin($ADMIN_HEADER);
|
||||
}
|
||||
else
|
||||
elseif(!vartrue($_GET['configure']))
|
||||
{
|
||||
e107::css("inline","body { padding:0px } "); // default padding for iFrame-only.
|
||||
}
|
||||
|
@@ -453,7 +453,7 @@ function multilang_prefs()
|
||||
|
||||
//XXX Remove later.
|
||||
// Enable only for developers - SetEnv E_ENVIRONMENT develop
|
||||
if(!isset($_SERVER['E_ENVIRONMENT']) || $_SERVER['E_ENVIRONMENT'] !== 'develop')
|
||||
if(!isset($_SERVER['E_DEV_LANGUAGE']) || $_SERVER['E_DEV_LANGUAGE'] !== 'true')
|
||||
{
|
||||
$lanlist = array('English');
|
||||
$mes->addInfo("Alpha version currently supports only the English language. After most features are stable and English terms are optimized - translation will be possible.");
|
||||
|
@@ -23,19 +23,13 @@ if (!getperms("2"))
|
||||
exit;
|
||||
}
|
||||
|
||||
//include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
|
||||
|
||||
|
||||
|
||||
e107::coreLan('menus', true);
|
||||
e107::coreLan('admin', true);
|
||||
|
||||
// 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
|
||||
if(e_IFRAME) //<-- Check config and delete buttons if modifying
|
||||
{
|
||||
|
||||
//e107::js('core','bootstrap/js/bootstrap.min.js');
|
||||
//e107::css('core','bootstrap/css/bootstrap.min.css');
|
||||
e107::css('url','{e_THEME}/bootstrap/admin_style.css');
|
||||
|
||||
}
|
||||
|
||||
if(strpos(e_QUERY, 'configure') !== FALSE || vartrue($_GET['enc']))
|
||||
{
|
||||
@@ -316,6 +310,391 @@ if(strpos(e_QUERY, 'configure') !== FALSE || vartrue($_GET['enc']))
|
||||
|
||||
|
||||
|
||||
if($_SERVER['E_ENV_MENUS'] == 'developer')
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
if($_SERVER['E_ENV_MENUS'] == 'developer')
|
||||
{
|
||||
function e_help()
|
||||
{
|
||||
$p = e107::getPref('e_menu_list'); // new storage for xxxxx_menu.php list.
|
||||
$sql = e107::getDb();
|
||||
|
||||
$text = '
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#plugins" data-toggle="tab">Plugins</a></li>
|
||||
<li><a href="#custom" data-toggle="tab">Custom</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">';
|
||||
|
||||
$text .= "
|
||||
<div class='active tab-pane' id='plugins'>
|
||||
<ul>";
|
||||
|
||||
foreach($p as $menu => $folder)
|
||||
{
|
||||
$text .= "<li id='{$folder}' class='draggable' style='cursor:move'>".str_replace("_menu","",$menu)."</li>";
|
||||
}
|
||||
|
||||
$text .= "</ul>
|
||||
</div>
|
||||
|
||||
<div class='tab-pane' id='custom'>";
|
||||
|
||||
if($sql->select('page','*',"menu_name !='' ORDER BY menu_name"))
|
||||
{
|
||||
$text .= "<ul>";
|
||||
while($row = $sql->fetch())
|
||||
{
|
||||
$text .= "<li id='".$row['page_id']."' class='draggable' style='cursor:move'>".$row['menu_name']."</li>";
|
||||
}
|
||||
|
||||
$text .= "</ul>";
|
||||
}
|
||||
|
||||
$text .= "</div>
|
||||
|
||||
</div>";
|
||||
|
||||
return array('caption'=>'Menu Items','text'=>$text);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 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.
|
||||
|
||||
class e_layout
|
||||
{
|
||||
private $menuData = array();
|
||||
|
||||
function __construct()
|
||||
{
|
||||
$pref = e107::getPref();
|
||||
$ns = e107::getRender();
|
||||
$this->convertMenuTable();
|
||||
|
||||
|
||||
if(vartrue($_GET['configure'])) //ie Inside the IFRAME.
|
||||
{
|
||||
$this->curLayout = varsettrue($_GET['configure'], $pref['sitetheme_deflayout']);
|
||||
$this->renderLayout($this->curLayout);
|
||||
}
|
||||
else // Parent - ie. main admin page.
|
||||
{
|
||||
|
||||
// XXX HELP _ i don't work with iFrames.
|
||||
|
||||
e107::js('inline','
|
||||
$(function() {
|
||||
$( "#sortable" ).sortable({
|
||||
revert: true
|
||||
});
|
||||
$( ".draggable" ).draggable({
|
||||
connectToSortable: "#sortable",
|
||||
helper: "clone",
|
||||
revert: "invalid",
|
||||
cursor: "move",
|
||||
// iframeFix: true,
|
||||
|
||||
start: function(ev,ui)
|
||||
{
|
||||
},
|
||||
drag: function(ev,ui)
|
||||
{
|
||||
|
||||
},
|
||||
stop: function(ev, ui)
|
||||
{
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
$( "ul, li" ).disableSelection();
|
||||
|
||||
// Not Working.
|
||||
$("#menu_iframe").load(function(){
|
||||
$("#menu_iframe").contents().find("#sortable").droppable({
|
||||
accept: ".drag",
|
||||
drop: function( event, ui ) {
|
||||
var html = "<div class=\'droptrue\'>"+ ui.draggable.html() + "</div>";
|
||||
//alert(html);
|
||||
$(this).append(html);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
');
|
||||
|
||||
$this->scanForNew();
|
||||
|
||||
$this->renderInterface();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Convert from e107_menu table to $pref format.
|
||||
*/
|
||||
function convertMenuTable()
|
||||
{
|
||||
$sql = e107::getDb();
|
||||
$sql->select('menus','*','menu_location !=0 ORDER BY menu_location,menu_order');
|
||||
$data = array();
|
||||
|
||||
while($row = $sql->fetch())
|
||||
{
|
||||
$layout = vartrue($row['menu_layout'],'default');
|
||||
$location = $row['menu_location'];
|
||||
$data[$layout][$location][] = array('name'=>$row['menu_name'],'class'=>$row['menu_class'],'path'=>$row['menu_path'],'pages'=>$row['menu_pages'],'parms'=>$row['menu_parms']);
|
||||
}
|
||||
|
||||
$this->menuData = ($data);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Substitute all {MENU=X} and Render output.
|
||||
*/
|
||||
private function renderLayout($layout='')
|
||||
{
|
||||
|
||||
global $HEADER,$FOOTER,$style; // included by theme file in class2.
|
||||
|
||||
$tp = e107::getParser();
|
||||
|
||||
$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]);
|
||||
|
||||
echo $tp->parsetemplate($head);
|
||||
// echo "<div>MAIN CONTENT</div>";
|
||||
echo $tp->parsetemplate($foot);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Render {MENU=X}
|
||||
*/
|
||||
private function renderMenuArea($matches)
|
||||
{
|
||||
|
||||
$area = $matches[1];
|
||||
|
||||
// return print_a($this->menuData,true);
|
||||
$text = "<div class='menu-panel'>";
|
||||
$text .= "<div class='menu-panel-header' title=\"".MENLAN_34."\">Area ".$area."</div>";
|
||||
|
||||
|
||||
if(vartrue($this->menuData[THEME_LAYOUT]) && is_array($this->menuData[THEME_LAYOUT][$area]))
|
||||
{
|
||||
$text .= "<ul id='sortable' class='unstyled'>";
|
||||
|
||||
foreach($this->menuData[THEME_LAYOUT][$area] as $val)
|
||||
{
|
||||
$text .= $this->renderMenu($val);
|
||||
|
||||
}
|
||||
|
||||
$text .= "</ul>";
|
||||
}
|
||||
|
||||
$text .= "</div>";
|
||||
|
||||
return $text;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private function renderMenu($row)
|
||||
{
|
||||
// return print_a($row,true);
|
||||
$TEMPLATE = '<li class="regularMenu" id="block-1-1"> '.$row['name'].' </li>'; // TODO perhaps a simple counter for the id
|
||||
|
||||
return $TEMPLATE;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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)
|
||||
{
|
||||
$path = trim(str_replace(e_PLUGIN,"",$file['path']),"/");
|
||||
|
||||
if(e107::isInstalled($path))
|
||||
{
|
||||
$fname = str_replace(".php","",$file['fname']);
|
||||
$data[$fname] = $path;
|
||||
}
|
||||
}
|
||||
|
||||
$config = e107::getConfig('core');
|
||||
$config->set('e_menu_list',$data);
|
||||
$config->save();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Render the main area with TABS and iframes.
|
||||
*/
|
||||
private function renderInterface()
|
||||
{
|
||||
$ns = e107::getRender();
|
||||
$tp = e107::getParser();
|
||||
|
||||
$TEMPL = $this->getHeadFoot();
|
||||
|
||||
$layouts = array_keys($TEMPL['HEADER']);
|
||||
|
||||
$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.'">
|
||||
<iframe id="menu_iframe" class="well" width="100%" scrolling="no" style="width: 100%; height: 6933px; border: 0px none;" src="'.e_ADMIN_ABS.'menus.php?configure='.$title.'"></iframe>
|
||||
</div>';
|
||||
|
||||
$active = '';
|
||||
}
|
||||
|
||||
$text .= '</div>';
|
||||
|
||||
// $ns->frontend = false;
|
||||
|
||||
$ns->tablerender("Menu Layout",$text);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private function getHeadFoot($_MLAYOUT=null)
|
||||
{
|
||||
$theme = e107::getPref('sitetheme');
|
||||
|
||||
$H = array();
|
||||
$F = array();
|
||||
|
||||
require(e_THEME.$theme."/theme.php");
|
||||
|
||||
|
||||
if(is_string($HEADER))
|
||||
{
|
||||
$H['default'] = $HEADER;
|
||||
$F['default'] = $FOOTER;
|
||||
}
|
||||
else
|
||||
{
|
||||
$H = $HEADER;
|
||||
$F = $FOOTER;
|
||||
}
|
||||
|
||||
|
||||
// 0.6 / 0.7-1.x
|
||||
if(isset($CUSTOMHEADER) && isset($CUSTOMHEADER))
|
||||
{
|
||||
if(!is_array($CUSTOMHEADER))
|
||||
{
|
||||
$H['legacyCustom'] = $CUSTOMHEADER;
|
||||
$F['legacyCustom'] = $CUSTOMFOOTER;
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach($CUSTOMHEADER as $k=>$v)
|
||||
{
|
||||
$H[$k] = $v;
|
||||
$F[$k] = $v;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($_MLAYOUT)
|
||||
{
|
||||
// return array('HEADER'=>$H[$_MLAYOUT], 'FOOTER'=>$F[$_MLAYOUT]);
|
||||
}
|
||||
|
||||
|
||||
return array('HEADER'=>$H, 'FOOTER'=>$F);
|
||||
}
|
||||
|
||||
//$ns = e107::getRender();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
|
||||
|
||||
|
||||
// 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
|
||||
if(e_IFRAME) //<-- Check config and delete buttons if modifying
|
||||
{
|
||||
|
||||
//e107::js('core','bootstrap/js/bootstrap.min.js');
|
||||
//e107::css('core','bootstrap/css/bootstrap.min.css');
|
||||
e107::css('url','{e_THEME}/bootstrap/admin_style.css');
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$e_sub_cat = 'menus';
|
||||
|
||||
@@ -380,6 +759,18 @@ if($_POST)
|
||||
|
||||
|
||||
//FIXME still used in e_HANDLER.menumanager_class.php
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (vartrue($message) != "")
|
||||
{
|
||||
echo $ns -> tablerender('Updated', "<div style='text-align:center'><b>".$message."</b></div><br /><br />");
|
||||
@@ -402,6 +793,19 @@ if($_POST)
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
require_once("footer.php");
|
||||
@@ -409,6 +813,34 @@ require_once("footer.php");
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function menus_adminmenu()
|
||||
{
|
||||
|
||||
|
@@ -868,15 +868,19 @@ class db_verify
|
||||
$prefix .= "lan_".$language."_";
|
||||
// $mes->addDebug("<h2>Retrieving Language Table Data: ".$prefix . $tbl."</h2>");
|
||||
}
|
||||
|
||||
mysql_query('SET SQL_QUOTE_SHOW_CREATE = 1');
|
||||
|
||||
$sql = e107::getDb();
|
||||
$sql->gen('SET SQL_QUOTE_SHOW_CREATE = 1');
|
||||
// mysql_query('SET SQL_QUOTE_SHOW_CREATE = 1');
|
||||
$qry = 'SHOW CREATE TABLE `' . $prefix . $tbl . "`";
|
||||
|
||||
|
||||
$z = mysql_query($qry);
|
||||
// $z = mysql_query($qry);
|
||||
$z = $sql->gen($qry);
|
||||
if($z)
|
||||
{
|
||||
$row = mysql_fetch_row($z);
|
||||
// $row = mysql_fetch_row($z);
|
||||
$row = $sql->fetch(MYSQL_NUM);
|
||||
//return $row[1];
|
||||
return stripslashes($row[1]).';'; // backticks needed.
|
||||
// return str_replace("`", "", stripslashes($row[1])).';';
|
||||
|
@@ -1,12 +1,9 @@
|
||||
<?php
|
||||
if ( ! defined('e107_INIT')) { exit(); }
|
||||
|
||||
define('STANDARDS_MODE', TRUE);
|
||||
// define("VIEWPORT","width=device-width, initial-scale=1.0");
|
||||
define("VIEWPORT","width=1080");
|
||||
define("SEP"," <i class='icon-play e-breadcrumb'></i> ");
|
||||
|
||||
e107::lan('theme');
|
||||
// e107::lan('theme');
|
||||
e107::js('core','bootstrap/js/bootstrap.min.js');
|
||||
e107::css('core','bootstrap/css/bootstrap.min.css');
|
||||
e107::css('core','bootstrap/css/bootstrap-responsive.min.css');
|
||||
@@ -48,174 +45,170 @@ else
|
||||
$no_core_css = TRUE;
|
||||
|
||||
|
||||
function tablestyle($caption, $text, $mode)
|
||||
class bootstrap_admintheme
|
||||
{
|
||||
global $style;
|
||||
|
||||
$class = '';
|
||||
|
||||
|
||||
|
||||
|
||||
if(is_string($mode) && $mode == 'admin_help') $class = ' '.str_replace('_', '-', $mode);
|
||||
function tablestyle($caption, $text, $mode)
|
||||
{
|
||||
global $style;
|
||||
|
||||
$class = '';
|
||||
|
||||
if($mode == 'e_help')
|
||||
{
|
||||
$style = 'admin_menu';
|
||||
}
|
||||
|
||||
if($mode == 'core-infopanel_latest' || $mode == 'core-infopanel_status')
|
||||
{
|
||||
//return;
|
||||
echo '
|
||||
<!-- Start Mode: '.$mode.' -->
|
||||
<li class="span6 '.$mode.'" >
|
||||
|
||||
<div class="well" style="padding:10px;min-height:220px;" >
|
||||
<div class="nav-header">'.$caption.'</div>
|
||||
<!-- Content Start -->
|
||||
'.$text.'
|
||||
<!-- Content End -->
|
||||
</div>
|
||||
|
||||
</li>
|
||||
<!-- End Mode: '.$mode.' -->
|
||||
';
|
||||
return;
|
||||
}
|
||||
|
||||
if($mode == 'personalize')
|
||||
{
|
||||
echo '
|
||||
<!-- Mode: '.$mode.' -->
|
||||
<div class="well" style="padding:10px">
|
||||
<div class="nav-header">'.$caption.'</div>
|
||||
<!-- Content Start -->
|
||||
'.$text.'
|
||||
<!-- Content End -->
|
||||
</div>
|
||||
<!-- End Mode: '.$mode.' -->
|
||||
';
|
||||
|
||||
|
||||
if(is_string($mode) && $mode == 'admin_help') $class = ' '.str_replace('_', '-', $mode);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if($style == 'core-infopanel')
|
||||
{
|
||||
echo '
|
||||
<!-- Start Style: '.$style.' -->
|
||||
if($mode == 'e_help')
|
||||
{
|
||||
$style = 'admin_menu';
|
||||
}
|
||||
|
||||
<li class="span12">
|
||||
|
||||
<div class="well" >
|
||||
<div class="nav-header">'.$caption.'</div>
|
||||
<!-- Content Start -->
|
||||
'.$text.'
|
||||
<!-- Content End -->
|
||||
</div>
|
||||
|
||||
</li>
|
||||
<!-- End Style: '.$style.' -->
|
||||
';
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if(deftrue('e_IFRAME'))
|
||||
{
|
||||
echo '
|
||||
<div class="block">
|
||||
<div class="block-text">
|
||||
if($mode == 'core-infopanel_latest' || $mode == 'core-infopanel_status')
|
||||
{
|
||||
//return;
|
||||
echo '
|
||||
<!-- Start Mode: '.$mode.' -->
|
||||
<li class="span6 '.$mode.'" >
|
||||
|
||||
<div class="well" style="padding:10px;min-height:220px;" >
|
||||
<div class="nav-header">'.$caption.'</div>
|
||||
<!-- Content Start -->
|
||||
'.$text.'
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
return;
|
||||
}
|
||||
<!-- Content End -->
|
||||
</div>
|
||||
|
||||
</li>
|
||||
<!-- End Mode: '.$mode.' -->
|
||||
';
|
||||
return;
|
||||
}
|
||||
|
||||
if(trim($caption) == '')
|
||||
{
|
||||
$style = 'no_caption';
|
||||
}
|
||||
|
||||
|
||||
switch(varset($style, 'admin_content'))
|
||||
{
|
||||
|
||||
case 'admin_menu' :
|
||||
if($mode == 'personalize')
|
||||
{
|
||||
echo '
|
||||
<!-- Mode: '.$mode.' -->
|
||||
<div class="well" style="padding:10px">
|
||||
<div class="nav-header">'.$caption.'</div>
|
||||
<!-- Content Start -->
|
||||
'.$text.'
|
||||
<!-- Content End -->
|
||||
</div>
|
||||
<!-- End Mode: '.$mode.' -->
|
||||
';
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if($style == 'core-infopanel')
|
||||
{
|
||||
echo '
|
||||
<!-- Start Style: '.$style.' -->
|
||||
|
||||
<li class="span12">
|
||||
|
||||
<div class="well" >
|
||||
<div class="nav-header">'.$caption.'</div>
|
||||
<!-- Content Start -->
|
||||
'.$text.'
|
||||
<!-- Content End -->
|
||||
</div>
|
||||
|
||||
</li>
|
||||
<!-- End Style: '.$style.' -->
|
||||
';
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if(deftrue('e_IFRAME'))
|
||||
{
|
||||
echo '
|
||||
<div class="block">
|
||||
<div class="block-text">
|
||||
'.$text.'
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if(trim($caption) == '')
|
||||
{
|
||||
$style = 'no_caption';
|
||||
}
|
||||
|
||||
|
||||
switch(varset($style, 'admin_content'))
|
||||
{
|
||||
|
||||
case 'admin_menu' :
|
||||
echo '
|
||||
<div class="well sidebar-nav" >
|
||||
<div class="nav-header">'.$caption.'</div>
|
||||
'.$text.'
|
||||
</div>
|
||||
';
|
||||
break;
|
||||
|
||||
case 'site_info' :
|
||||
echo '
|
||||
<div class="well sidebar-nav" >
|
||||
<div class="nav-header">'.$caption.'</div>
|
||||
'.$text.'
|
||||
</div>
|
||||
';
|
||||
break;
|
||||
|
||||
case 'site_info' :
|
||||
echo '
|
||||
<div class="well sidebar-nav" >
|
||||
<div class="nav-header">'.$caption.'</div>
|
||||
<p style="padding:10px">
|
||||
'.$text.'
|
||||
</p>
|
||||
</div>
|
||||
';
|
||||
break;
|
||||
/*
|
||||
case 'admin_content':
|
||||
echo '
|
||||
<div class="block">
|
||||
<h2 class="caption">'.$caption.'</h2>
|
||||
<div class="block-text">
|
||||
'.$text.'
|
||||
<div class="nav-header">'.$caption.'</div>
|
||||
<p style="padding:10px">
|
||||
'.$text.'
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
break;
|
||||
*/
|
||||
|
||||
case 'no_caption' :
|
||||
echo '
|
||||
<div class="block">
|
||||
<div class="block-text">
|
||||
'.$text.'
|
||||
';
|
||||
break;
|
||||
/*
|
||||
case 'admin_content':
|
||||
echo '
|
||||
<div class="block">
|
||||
<h2 class="caption">'.$caption.'</h2>
|
||||
<div class="block-text">
|
||||
'.$text.'
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
echo '
|
||||
<div class="block">
|
||||
<h4 class="caption">'.$caption.'</h4>
|
||||
<div class="block-text">
|
||||
'.$text.'
|
||||
';
|
||||
break;
|
||||
*/
|
||||
|
||||
case 'no_caption' :
|
||||
echo '
|
||||
<div class="block">
|
||||
<div class="block-text">
|
||||
'.$text.'
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
break;
|
||||
';
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
echo '
|
||||
<div class="block">
|
||||
<h4 class="caption">'.$caption.'</h4>
|
||||
<div class="block-text">
|
||||
'.$text.'
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$HEADER = '';
|
||||
$FOOTER = '';
|
||||
|
||||
|
||||
define('ICONMAIL', 'email_16.png');
|
||||
define('ICONPRINT', 'print_16.png');
|
||||
define('ICONSTYLE', 'border: 0px');
|
||||
define('COMMENTLINK', LAN_THEME_2);
|
||||
define('COMMENTOFFSTRING', LAN_THEME_1);
|
||||
define('PRE_EXTENDEDSTRING', '<br /><br />');
|
||||
define('EXTENDEDSTRING', LAN_THEME_3);
|
||||
define('POST_EXTENDEDSTRING', '<br />');
|
||||
define('TRACKBACKSTRING', LAN_THEME_4);
|
||||
define('TRACKBACKBEFORESTRING', ' | ');
|
||||
/*
|
||||
|
||||
$sc_style['NEWSIMAGE']['pre'] = '<div style="float: left; margin-right: 15px">';
|
||||
$sc_style['NEWSIMAGE']['post'] = '</div>';
|
||||
@@ -245,4 +238,6 @@ $NEWSSTYLE = '
|
||||
</table>
|
||||
</div>
|
||||
';
|
||||
|
||||
*/
|
||||
?>
|
Reference in New Issue
Block a user