SourceTec Software

It is currently Mon Apr 21, 2014 2:01 am

All times are UTC + 8 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Thu Jul 09, 2009 8:33 pm 
Offline
Member

Joined: Thu Jul 09, 2009 8:30 pm
Posts: 2
Table Structure:

USE `menu`;

/*Table structure for table `m1` */

DROP TABLE IF EXISTS `m1`;

CREATE TABLE `m1` (
`MMenuL1_ID` int(11) NOT NULL AUTO_INCREMENT,
`MMenuL1_Position` int(11) DEFAULT NULL,
`MMenuL1_Label` varchar(22) DEFAULT NULL,
`MMenuL1_URL` varchar(250) DEFAULT NULL,
PRIMARY KEY (`MMenuL1_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

/*Data for the table `m1` */

insert into `m1`(`MMenuL1_ID`,`MMenuL1_Position`,`MMenuL1_Label`,`MMenuL1_URL`) values (1,NULL,'Dreamweaver',NULL),(2,NULL,'Photoshop',NULL),(3,NULL,'Flash',NULL);

/*Table structure for table `m2` */

DROP TABLE IF EXISTS `m2`;

CREATE TABLE `m2` (
`MMenuL2_ID` int(11) NOT NULL AUTO_INCREMENT,
`MMenuL1_ID` int(11) NOT NULL,
`MMenuL2_Position` int(11) DEFAULT NULL,
`MMenuL1_Label` varchar(22) DEFAULT NULL,
`MMenuL2_Label` varchar(22) DEFAULT NULL,
`MMenuL2_URL` varchar(250) DEFAULT NULL,
PRIMARY KEY (`MMenuL2_ID`),
KEY `FK_m2` (`MMenuL1_ID`),
CONSTRAINT `FK_m2` FOREIGN KEY (`MMenuL1_ID`) REFERENCES `m1` (`MMenuL1_ID`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

/*Data for the table `m2` */

insert into `m2`(`MMenuL2_ID`,`MMenuL1_ID`,`MMenuL2_Position`,`MMenuL1_Label`,`MMenuL2_Label`,`MMenuL2_URL`) values (1,1,NULL,'PHP',NULL,NULL),(2,2,NULL,'Style',NULL,NULL),(3,3,NULL,'Action',NULL,NULL);

/*Table structure for table `m3` */

DROP TABLE IF EXISTS `m3`;

CREATE TABLE `m3` (
`MMenuL3_ID` int(11) NOT NULL AUTO_INCREMENT,
`MMenuL2_ID` int(11) NOT NULL,
`MMenuL3_Position` int(11) DEFAULT NULL,
`MMenuL2_Label` varchar(22) DEFAULT NULL,
`MMenuL3_Label` varchar(22) DEFAULT NULL,
`MMenuL3_URL` varchar(250) DEFAULT NULL,
PRIMARY KEY (`MMenuL3_ID`),
KEY `FK_m3` (`MMenuL2_ID`),
CONSTRAINT `FK_m3` FOREIGN KEY (`MMenuL2_ID`) REFERENCES `m2` (`MMenuL2_ID`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

/*Data for the table `m3` */

insert into `m3`(`MMenuL3_ID`,`MMenuL2_ID`,`MMenuL3_Position`,`MMenuL2_Label`,`MMenuL3_Label`,`MMenuL3_URL`) values (1,1,NULL,'Array',NULL,NULL),(2,2,NULL,'Brush',NULL,NULL),(3,3,NULL,'Script',NULL,NULL);

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;





Menu Structure:
<?
$dbhost = "localhost"; // DB Host name
$dbusername = "root"; // DB User
$dbpass = "xxx"; // DB User password
$dbname = "menu"; // DB Name
$query = "select * from m1";
$connection = mysql_connect($dbhost, $dbusername, $dbpass);
$resultCat = mysql_db_query($dbname, $query);
$numrowsCat = mysql_num_rows($resultCat);

for ($i = 0; $i < $numrowsCat; $i++)
{
$rowCat = mysql_fetch_array($resultCat);
$MMenuL1_Label = $rowCat["MMenuL1_Label"];
$MMenuL1_URL = $rowCat["Link"];
?>
stIT("p0i0",["<?=$MMenuL1_Label?>","<?=$MMenuL1_URL?>","_self","","","defIcon_f.gif","defIcon_uf.gif",18,18,"9pt 'Arial'","#000000","none","transparent","","no-repeat","9pt 'Arial'","#000000","underline","transparent","","no-repeat","9pt 'Arial'","#FFFFFF","none","#000099","","no-repeat","9pt 'Arial'","#FFFFFF","underline","#000099","","no-repeat",1,1,"left","middle",0,0,"","","","",0,0,0]);
stBS("p1",[,0],"p0");
<?
$queryProL1 = "select * from m2 where MMenuL2_ID=".$rowCat["MMenuL1_ID"];
$resultProL1 = mysql_db_query($dbname, $queryProL1);
$numrowsProL1 = mysql_num_rows($resultProL1);

for ($j = 0; $j<$numrowsProL1; $j++)
{
$rowProL1 = mysql_fetch_array($resultProL1);
$MMenuL2_Label = $rowProL1["MMenuL1_Label"];
$MMenuL2_URL = $rowProL1["MMenuL2_URL"];
?>
stIT("p1i0",["<?=$MMenuL2_Label?>","<?=$MMenuL2_URL?>","_self","","","defIcon_f.gif","defIcon_uf.gif",18,18,"9pt 'Arial'","#000000","none","transparent","","no-repeat","9pt 'Arial'","#000000","underline","transparent","","no-repeat","9pt 'Arial'","#FFFFFF","none","#000099","","no-repeat","9pt 'Arial'","#FFFFFF","underline","#000099","","no-repeat",1,1,"left","middle",0,0,"","","","",0,0,0]);
stBS("p2",[,0],"p0");
<?
$queryProL2 = "select * from m3 where MMenuL1_ID=".$rowProL1["MMenuL1_ID"];
$MMenuL3_Label = mysql_db_query($dbname, $queryProL2);
$MMenuL3_URL = mysql_num_rows($resultProL2);

for ($k = 0; $k<$numrowsProL2; $k++)
{
$rowProL2 = mysql_fetch_array($resultProL2);
$MMenuL3_Label= $rowProL2["MMenuL3_Label"];
$MMenuL3_URL = $rowProL2["MMenuL3_URL"];
?>
stIT("p2i0",["<?=$MMenuL3_Label?>","<?=$MMenuL3_URL?>","_self","","","defIcon_c.gif","defIcon_c.gif",18,18,"9pt 'Arial'","#000000","none","transparent","","no-repeat","9pt 'Arial'","#000000","underline","transparent","","no-repeat","9pt 'Arial'","#FFFFFF","none","#000099","","no-repeat","9pt 'Arial'","#FFFFFF","underline","#000099","","no-repeat",1,1,"left","middle",0,0,"","","","",0,0,0]);

<?
}
?>
stES();

<?
}
?>
stES();
<?
}
?>
stES();
stEM();
//-->
</script>


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 10, 2009 6:15 am 
Offline
Guru

Joined: Wed Jan 31, 2007 4:21 am
Posts: 1116
im not even going to bother to start looking until you tell me what error your getting.


Top
 Profile  
 
 Post subject: Hi there
PostPosted: Fri Jul 10, 2009 5:25 pm 
Offline
Member

Joined: Thu Jul 09, 2009 8:30 pm
Posts: 2
I'm sorry I'din't specifiy the problem. My problem is I se the menu, and submenu, but ther must be some, error to see sub-submenu, I can't figure out what!!
menu----
submenu---
sub-submenu-----
Thanks lot


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 12, 2009 5:56 am 
Offline
Guru

Joined: Wed Jan 31, 2007 4:21 am
Posts: 1116
WTF?? just give us the url and .pgt file. then we might be able to work out what your on about.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 8 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group