Forum Moderators: open
My menu.php file has following code:
[codes]
<?
class menu{
function Process(){
global $session;
$this0>setMenu();
}
function setMenu(){
global $session;
if($session->logged_in){
if($session->isAdmin()){
echo "You are administrator";
?>
<SCRIPT LANGUAGE="JavaScript1.2">
<!--
stm_bm(["menu5df9",820,"","blank.gif",0,"","",0,0,250,0,1000,1,0,0,"","100%",67108955,0,1,2,"default","hand",""],parent.document);
stm_bp("p0",[0,4,0,0,0,0,18,0,100,"",-2,"",-2,50,0,0,"#799BD8","transparent","tclback.gif",3,0,0,"#000000"]);
stm_ai("p0i0",[0,"HOME","","",-1,-1,0,"formlogin.php","_self","","","","tclarrow.gif",18,7,0,"","",0,0,0,0,1,"#FFFFF7",1,"#B5BED6",1,"","tclbackup.gif",2,3,0,0,"#FFFFF7","#000000","#666666","#FFFFFF","bold 8pt Arial","bold 8pt Arial",0,0],100,22);
stm_aix("p0i1","p0i0",[0,"My Account","","",-1,-1,0,"#","_self","","","","tclarrow.gif",18,7,0,"","",0,0,0,0,1,"#FFFFF7",1,"#B5BED6",1,"","tclbackup.gif",3],100,22);
stm_bpx("p1","p0",[0,4,0,0,0,0,18,0,100,"",-2,"",-2,50,0,0,"#799BD8","#EEEEEE","tclbackmove.gif"]);
stm_aix("p1i0","p0i0",[0,"Change Password","","",-1,-1,0,"#","_self","","","","tclarrowblack.gif",18,7,0,"","",0,0,0,0,1,"#FFFFF7",1,"#B5BED6",1,"","",3,3,0,0,"#FFFFF7","#000000","#336699","#000000","8pt Arial","8pt Arial"],100,22);
stm_aix("p1i1","p1i0",[0,"My Admin Panel"],120,22);
stm_ep();
stm_aix("p0i2","p0i1",[0,"PoP Sites"],100,22);
stm_bpx("p2","p1",[]);
stm_aix("p2i0","p1i0",[0,"Add New Odf"],65,22);
stm_aix("p2i1","p1i0",[0,"Add New PoP"],65,22);
stm_ep();
stm_aix("p0i3","p0i1",[0,"Customer"],100,22);
stm_bpx("p3","p1",[]);
stm_aix("p3i0","p1i0",[0,"Add New Customer"],100,22);
stm_aix("p3i1","p1i0",[0,"Update Customer"],145,22);
stm_ep();
stm_aix("p0i4","p0i1",[0,"Circuit"],100,22);
stm_bpx("p4","p1",[]);
stm_aix("p4i0","p1i0",[0,"Add New Circuit"],70,22);
stm_aix("p4i1","p1i0",[0,"Update Circuit Status"],80,22);
stm_ep();
stm_aix("p0i5","p0i1",[0,"View","","",-1,-1,0,""],100,22);
stm_bpx("p5","p1",[]);
stm_aix("p5i0","p1i0",[0,"View Patch Panel","","",-1,-1,0,""],0,22);
stm_aix("p5i1","p5i0",[0,"View Customers"],0,22);
stm_ep();
stm_aix("p0i5","p0i1",[0,"Logout","","",-1,-1,0,"process.php",""],100,22);
stm_bpx("p5","p1",[]);
//-->
</script>
<? } else {
?>
<SCRIPT LANGUAGE="JavaScript1.2">
<!--
stm_bm(["menu5df9",820,"","blank.gif",0,"","",0,0,250,0,1000,1,0,0,"","100%",67108955,0,1,2,"default","hand",""],this);
stm_bp("p0",[0,4,0,0,0,0,18,0,100,"",-2,"",-2,50,0,0,"#799BD8","transparent","tclback.gif",3,0,0,"#000000"]);
stm_ai("p0i0",[0,"HOME","","",-1,-1,0,"#","_blank","","","","tclarrow.gif",18,7,0,"","",0,0,0,0,1,"#FFFFF7",1,"#B5BED6",1,"","tclbackup.gif",2,3,0,0,"#FFFFF7","#000000","#666666","#FFFFFF","bold 8pt Arial","bold 8pt Arial",0,0],100,22);
stm_aix("p0i1","p0i0",[0,"My Account","","",-1,-1,0,"#","_self","","","","tclarrow.gif",18,7,0,"","",0,0,0,0,1,"#FFFFF7",1,"#B5BED6",1,"","tclbackup.gif",3],100,22);
stm_bpx("p1","p0",[0,4,0,0,0,0,18,0,100,"",-2,"",-2,50,0,0,"#799BD8","#EEEEEE","tclbackmove.gif"]);
stm_aix("p1i0","p0i0",[0,"Change Password","","",-1,-1,0,"#","_self","","","","tclarrowblack.gif",18,7,0,"","",0,0,0,0,1,"#FFFFF7",1,"#B5BED6",1,"","",3,3,0,0,"#FFFFF7","#000000","#336699","#000000","8pt Arial","8pt Arial"],100,22);
stm_ep();
stm_aix("p0i2","p0i1",[0,"View","","",-1,-1,0,""],100,22);
stm_bpx("p2","p1",[]);
stm_aix("p2i0","p1i0",[0,"View Patch Panel","","",-1,-1,0,""],0,22);
stm_aix("p2i1","p2i0",[0,"View Customers"],0,22);
stm_ep();
stm_aix("p0i5","p0i1",[0,"Logout","","",-1,-1,0,"process.php"],100,22);
stm_bpx("p5","p1",[]);
stm_em();
stm_ep();
stm_ep();
stm_em();
//-->
</script>
<? }
}
else
echo "you are not logged in";
}
};
$menu= new menu;
?>
[/codes]
I am calling function setmenu from an other webpage to setup these menus on webpage. code seems to be executed till"You are an Administrator" but Java Script is not executed.
I am new to web development and am use to do programming vb and vb.net mostly database programming.
Can Anyone help me in this regard,
thanks and best regards,