mirror of
https://github.com/e107inc/e107.git
synced 2025-08-10 08:34:09 +02:00
All $menu_prefs now use non-serialised access, latest pref handler
This commit is contained in:
@@ -17,16 +17,27 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/clock_menu/clock_menu.php,v $
|
||||
| $Revision: 1.2 $
|
||||
| $Date: 2009-11-19 10:10:54 $
|
||||
| $Author: marj_nl_fr $
|
||||
| $Revision: 1.3 $
|
||||
| $Date: 2009-12-28 21:36:13 $
|
||||
| $Author: e107steved $
|
||||
+---------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Clock display menu plugin
|
||||
*
|
||||
* Handles the display of a clock/calendar in a menu
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage clock
|
||||
* @version $Id: clock_menu.php,v 1.3 2009-12-28 21:36:13 e107steved Exp $;
|
||||
*/
|
||||
|
||||
//FIXME looks pretty much to be 0.6 compatible
|
||||
if (!defined('e107_INIT')) { exit(); }
|
||||
include_lan(e_PLUGIN.'/clock_menu/languages/'.e_LANGUAGE.'.php');
|
||||
$menu_pref = e107::getConfig('menu')->getPref('');
|
||||
|
||||
global $menu_pref;
|
||||
$indexArray = array('clock_dateprefix','clock_format','clock_datesuffix1','clock_datesuffix2','clock_datesuffix3','clock_datesuffix4');
|
||||
foreach($indexArray as $ind)
|
||||
{
|
||||
@@ -36,7 +47,7 @@ foreach($indexArray as $ind)
|
||||
}
|
||||
}
|
||||
|
||||
$ec_dir = e_PLUGIN."clock_menu/";
|
||||
$ec_dir = e_PLUGIN.'clock_menu/';
|
||||
|
||||
$text = "\n\n<!-- ### clock ### //-->\n<div id='Clock'> </div>\n";
|
||||
if (!isset($clock_flat) || !$clock_flat) {
|
||||
|
@@ -9,29 +9,41 @@
|
||||
* Plugin Administration - Comment menu
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/clock_menu/config.php,v $
|
||||
* $Revision: 1.4 $
|
||||
* $Date: 2009-11-18 01:05:23 $
|
||||
* $Author: e107coders $
|
||||
* $Revision: 1.5 $
|
||||
* $Date: 2009-12-28 21:36:13 $
|
||||
* $Author: e107steved $
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* e107 Clock display menu plugin
|
||||
*
|
||||
* Handles the display of a clock/calendar in a menu
|
||||
*
|
||||
* @package e107_plugins
|
||||
* @subpackage clock
|
||||
* @version $Id: config.php,v 1.5 2009-12-28 21:36:13 e107steved Exp $;
|
||||
*/
|
||||
|
||||
$eplug_admin = TRUE;
|
||||
require_once("../../class2.php");
|
||||
if (!getperms("1"))
|
||||
require_once('../../class2.php');
|
||||
if (!getperms('1'))
|
||||
{
|
||||
header("location:".e_BASE."index.php");
|
||||
header('location:'.e_BASE.'index.php');
|
||||
exit ;
|
||||
}
|
||||
require_once(e_ADMIN."auth.php");
|
||||
include_lan(e_PLUGIN."clock_menu/languages/admin/".e_LANGUAGE.".php");
|
||||
require_once(e_HANDLER."form_handler.php");
|
||||
require_once(e_ADMIN.'auth.php');
|
||||
include_lan(e_PLUGIN.'clock_menu/languages/admin/'.e_LANGUAGE.'.php');
|
||||
require_once(e_HANDLER.'form_handler.php');
|
||||
$rs = new form;
|
||||
$menu_pref = e107::getConfig('menu')->getPref('');
|
||||
|
||||
if (isset($_POST['update_menu']))
|
||||
{
|
||||
$temp = array();
|
||||
while (list($key, $value) = each($_POST))
|
||||
{
|
||||
if ($key != "update_menu")
|
||||
if ($key != 'update_menu')
|
||||
{
|
||||
$temp[$key] = $value;
|
||||
}
|
||||
@@ -42,10 +54,14 @@ if (isset($_POST['update_menu']))
|
||||
}
|
||||
if ($admin_log->logArrayDiffs($temp,$menu_pref,'MISC_05'))
|
||||
{
|
||||
$tmp = addslashes(serialize($menu_pref));
|
||||
$sql->db_Update("core", "e107_value='{$tmp}' WHERE e107_name='menu_pref' ");
|
||||
$menuPref = e107::getConfig('menu');
|
||||
foreach ($temp as $k => $v)
|
||||
{
|
||||
$menuPref->setPref($k, $v);
|
||||
}
|
||||
$menuPref->save(false, true, false);
|
||||
}
|
||||
$ns->tablerender("", "<div style=\"text-align:center\"><b>".CLOCK_AD_L1."</b></div>");
|
||||
$ns->tablerender('', "<div style=\"text-align:center\"><b>".CLOCK_AD_L1.'</b></div>');
|
||||
}
|
||||
|
||||
$text = "<div style='text-align:center'>
|
||||
|
Reference in New Issue
Block a user