Hi,
As i have embeded submenus in some of the Add/Edit pages,
each time there is a manual change or recompilation,
i have to search all pages with embeded submenu modifications
and re-do the modifitaion again this is getting very very tedious.
I spend 60% of my time trying to locate the codes each time
there is changes. I have 5 main entries generated by phprunner,
and around 20 submenu entries using embeded menu codes.
So i decided not to create any menu using phprunner and rely
on a single external script which will be a master menu that links
to any pages i want.
I place the menu script in header.php and and copy the relevant files
downloaded from dynamic drive website. Now my master menu
can be accessible by any pages at anytime. Just a single file to maintain
for the menus i have.
This look better now and i am happy
that if this work, i no longer need to maintain the submenu codes in the
phprunner generated pages.
Below is my complete header.php code simpliefied with a few menu entires,
which already work. What i did is replace the header.php with this one below
and remove all menu items in phprunner and generate pages. It works.
The problem is, the menu is visible when the user is at the login screen.
I need a way to turn off the menu when user is not logged in and turn on
when he is in. There should be an if else within the header.php to hide and show
the menu section like this but it does not work, i think syntax is wrong or phprunner variables
is not right, i tried this below but not working:
IF $_SESSION["UserID"] > 0
{
<li><a href="1_list.php" title="Account" rel="dropmenu1_a"><span>Account</span></a></li>
<li><a href="2_list.php" title="Service Centre" rel="dropmenu2_a"><span>Service Center</span></a></li>
<li><a href="3_list.php" title="Phonebook" rel="dropmenu3_a"><span>Phonebook</span></a></li>
}
Please kindly advise.
--- my complete header.php ---
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Slashdot's Menu</title>
<script type="text/javascript" src="dropdowntabfiles/dropdowntabs.js">
/***
- Drop Down Tabs Menu- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
- This notice MUST stay intact for legal use
- Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
/
</script>
<literal>
<link rel="stylesheet" type="text/css" href="sdmenu/sdmenu.css" />
<script type="text/javascript" src="sdmenu/sdmenu.js">
/
- Slashdot Menu script- By DimX
- Submitted to Dynamic Drive DHTML code library: http://www.dynamicdrive.com
- Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***/
</script>
<script type="text/javascript">
// <![CDATA[
var myMenu;
window.onload = function() {
myMenu = new SDMenu("my_menu");
myMenu.init(); };
// ]]>
</script>
</li>
</head>
<body>
<form action="#" style="font-family: sans-serif; font-size: .8em" onsubmit="return false">
</form>
<!-- CSS for Drop Down Tabs Menu #1 -->
<link rel="stylesheet" type="text/css" href="dropdowntabfiles/ddcolortabs.css" />
<body>
<div id="colortab" class="ddcolortabs">
<ul>
<li><a href="1_list.php" title="Account" rel="dropmenu1_a"><span>Account</span></a></li>
<li><a href="2_list.php" title="Service Centre" rel="dropmenu2_a"><span>Service Center</span></a></li>
<li><a href="3_list.php" title="Phonebook" rel="dropmenu3_a"><span>Phonebook</span></a></li>
</ul>
</div>
<div class="ddcolortabsline"> </div>
<!--1st drop down menu -->
<div id="dropmenu1_a" class="dropmenudiv_a">
<a href="1_1_list.php">Account</a>
</div>
<!--2nd drop down menu -->
<div id="dropmenu2_a" class="dropmenudiv_a" style="width: 150px;">
<a href="2_1_list.php">News</a>
</div>
<!--3rd drop down menu -->
<div id="dropmenu3_a" class="dropmenudiv_a" style="width: 150px;">
<a href="3_1_list.php">Phonebook</a>
</div>
<script type="text/javascript">
//SYNTAX: tabdropdown.init("menu_id", [integer OR "auto"])
tabdropdown.init("colortab", 3)
</script>
</body>
</html>