1
0
mirror of https://github.com/e107inc/e107.git synced 2025-02-24 08:42:56 +01:00

60 lines
1.4 KiB
PHP
Raw Normal View History

2006-12-02 04:36:16 +00:00
<?php
/*
* e107 website system
*
* Copyright (C) 2008-2015 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*/
2006-12-02 04:36:16 +00:00
if(!defined('e107_INIT')){ exit; }
if (!getperms("2"))
{
2006-12-02 04:36:16 +00:00
header("location:".e_BASE."index.php");
exit;
2006-12-02 04:36:16 +00:00
}
$sql = e107::getDb();
2013-04-14 19:28:15 -07:00
$tp = e107::getParser();
$frm = e107::getForm();
if(isset($_POST['reset']))
{
for($mc=1;$mc<=5;$mc++)
{
$sql->select("menus","*", "menu_location='".$mc."' ORDER BY menu_order");
2006-12-02 04:36:16 +00:00
$count = 1;
$sql2 = new db;
while(list($menu_id, $menu_name, $menu_location, $menu_order) = $sql->fetch())
{
$sql2 ->update("menus", "menu_order='$count' WHERE menu_id='$menu_id' ");
2006-12-02 04:36:16 +00:00
$count++;
}
$text = "<b>Menus reset in database</b><br /><br />";
}
}
else
{
2006-12-02 04:36:16 +00:00
unset($text);
}
2013-04-14 19:28:15 -07:00
$text = "The Menu-Manager allows you to place and arrange your menus within your theme template.
2013-04-14 19:28:15 -07:00
[u]Hover[/u] over the sub-areas to modify existing menu items.
If you find the menus are not updating correctly, clicking the refresh button below may help.
2013-04-14 19:28:15 -07:00
[html]
2006-12-02 04:36:16 +00:00
<form method='post' id='menurefresh' action='".$_SERVER['PHP_SELF']."'>
<div>
".$frm->admin_button('reset','Refresh','cancel')."</div>
2006-12-02 04:36:16 +00:00
</form>
[br]
2015-11-16 20:08:46 +01:00
".e107::getParser()->toGlyph('search')." indicates that the menu's visibility has been modified.
2013-04-14 19:28:15 -07:00
[/html]
2006-12-02 04:36:16 +00:00
";
$text = $tp->toHtml($text, true);
$ns->tablerender("Menu Manager Help", $text);