Closed Thread Icon

Topic awaiting preservation: Need some help / PHP / Jetbox .... (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=29280" title="Pages that link to Topic awaiting preservation: Need some help / PHP / Jetbox .... (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Need some help / PHP / Jetbox .... <span class="small">(Page 1 of 1)</span>\

 
YoYoFREAK
Paranoid (IV) Mad Scientist

From: Cali
Insane since: Jun 2001

posted posted 06-13-2007 04:03

Hey Guys I'm in need of some help with a cms i'm trying to work out.

I'm using something called Jetbox 2.1 and I'm having issues with a file named opentree.php


My problem is that when I click on one of the submenu items on the left, when it goes to the subpage, it drops the menu it had before...

See sample here: http://thesteelbox.com/jet/index.php/item/287

I chose jetbox initially because it seemed to be the most flexible for me as I'm primarily frontend / interface designer.

Any help would be really appreciated, i've already tried sourceforge for help and also the original developer but no help so I was kinda hoping to find an answer here?


Opentree.php reads...

code:
<?
//opentree
opentree($item);
addbstack('', 'Home');
$t->set_var("breadcrum", $breadcrumstack);



//opentree content
function opentree($item){
	global $wfqadd,  $t, $primarray, $absolutepathfull, $absolutepath, $treestack, $sitename, $eval_result;
	$t->set_file("block", "main_tpl.html");
	if ($item){
		backtrackopentree($item);
		$t->set_var("breadcrum", $treestack);
		$treeq = "SELECT struct.*, opentree.*, struct.id AS structid, opentree.id as opentree_id FROM struct, opentree WHERE opentree.id=struct.content_id ".$wfqadd." AND struct.container_id=11 AND struct.id=".$item;
		$treer = mysql_prefix_query($treeq) or die(mysql_error());
		if ($treearray = mysql_fetch_array($treer)){

			$opent = new Template("./");
			// decode page content
			$decodedcontent = unserialize($treearray["content"]);

			$sqlselecttemplate = "SELECT *  FROM opentempl WHERE opentempl.id='".$treearray["t_id"]."'";
			$resulttemplate = mysql_prefix_query ($sqlselecttemplate) or die (mysql_error());
			if ($resultarraytemplate = mysql_fetch_array($resulttemplate)){
				$opent->set_file("block", $resultarraytemplate["t_file"]);
				// decode template data
				$decodedtemplateconfig = unserialize(stripslashes($resultarraytemplate["t_data"]));
				// field 0
				// namefield 2
				while (list($val, $var)= each($decodedtemplateconfig)){
					$opent->set_var(array ($var[0]=> stripslashes($decodedcontent[$var[0]]),$var[0]."name"=> $var[2]));
				}
				$opent->set_var(array ("pagetitle"=> $treearray["page_title"]));
				$opent->parse("b", "block");
			}
			// Navigation
			$treecq = "SELECT struct.*, opentree.*, struct.id AS structid, opentree.id as opentree_id FROM struct, opentree WHERE opentree.p_id=".$treearray["opentree_id"]." ".$wfqadd." AND struct.container_id=11 AND struct.content_id=opentree.id  ORDER BY position ASC";
			$treecr = mysql_prefix_query($treecq) or die(mysql_error());
			$treeccount = mysql_num_rows($treecr);
			if ($treeccount>-1){
				while ($treecarray = mysql_fetch_array($treecr)){
					$nav.="<a href=\"".$absolutepathfull."item/".$treecarray["structid"]."\">".$treecarray["nav_title"]."</a><br>";
				}
			}
		}
		$t->set_var("itemtitle", $treearray["page_title"]);
		$t->set_var("pagetitle", $sitename." - ".$treearray["page_title"]);
		$t->set_var("pagekeywords", $treearray["keywords"]);
		$t->set_var("pagedescription", $treearray["description"]);
		$t->set_var("robots", $treearray["robot"]);
		$t->set_var("leftnav", $nav);
		
		$content=$opent->get("b");
		$t->set_var("containera",$content);
	}
}
function html2specialchars($str){
   $trans_table = array_flip(get_html_translation_table(HTML_ENTITIES));
   return strtr($str, $trans_table);
}
function function_date($a){
	global $eval_result;
	//echo "Asdasdas";
	$eval_result=date("d-M-Y");
}

//Used to track back the full hierarchy of the currently displayed tree page
//current item and back
function backtrackopentree($item){
	global $wfqadd,  $treestack, $absolutepathfull, $breadcrumstack;
	$treeq = "SELECT struct.*, opentree.*, struct.id AS structid, opentree.id as opentree_id FROM struct, opentree WHERE opentree.id=struct.content_id ".$wfqadd." AND struct.container_id=11 AND struct.id=".$item;
	$treer = mysql_prefix_query($treeq) or die(mysql_error());
	if ($treearray = mysql_fetch_array($treer)){
		addbstack($treearray["structid"], $treearray["nav_title"]);
		$treecq = "SELECT struct.*, opentree.*, struct.id AS structid, opentree.id as opentree_id FROM struct, opentree WHERE opentree.id=".$treearray["p_id"]." ".$wfqadd." AND struct.container_id=11 AND struct.content_id=opentree.id";
		$treecr = mysql_prefix_query($treecq) or die(mysql_error());
		$treeccount = mysql_num_rows($treecr);
		if ($treecarray = mysql_fetch_array($treecr)){
			if($treecarray["p_id"]<>''){
				backtrackopentree($treecarray["structid"]);
			}
		}
	}
}
?>



Thanks
YoYo

!YoYoFREAKZ! // !

CPrompt
Maniac (V) Inmate

From: there...no..there.....
Insane since: May 2001

posted posted 06-13-2007 22:58

are the pages using an include statement to put those buttons in the first page?

Seems to me that there is just a missing include("opentree.php"); in the other pages. It doesn't even show up.

What's the code on the page you posted and one of the other pages look like right there?

code:
<div class="sub-page-button">
<a href="index.php/item/291">Company History</a><br><a href="index.php/item/288">Our Mission Statement</a><br><a href="index.php/item/290">Company Profile</a><br><a href="index.php/item/292">Management</a><br><a href="index.php/item/293">Careers</a><br><a href="index.php/item/294">Careers</a><br><a href="index.php/item/295">Contact Us</a><br>
</div>



is what I have on the page you posted up there, but the other pages just have :

code:
<div class="sub-page-button">
</div>



Which looks like the menu is just not being included.

Later,

C:\

YoYoFREAK
Paranoid (IV) Mad Scientist

From: Cali
Insane since: Jun 2001

posted posted 06-14-2007 06:03

Cprompts,

From what I can tell its not a missing include... I think its reading from one of the id's in the mysql database (where the pages are stored) to determine whether or not its shown on the subsequent subpages.

I only have these subpages setup on the backend through the backend to show up underneath the "biocare" submenu structure.

If possible, could I send you the admin username / pass to login for you to have a look?

I'm willing to pay hourly for somebody to help me figure it out as well.

Let me know

!YoYoFREAKZ! // !

CPrompt
Maniac (V) Inmate

From: there...no..there.....
Insane since: May 2001

posted posted 06-14-2007 19:01

well, what is the code at that point? It has to have some type of include or sql query there or something. I was looking for what the difference is. I don't really want the admin user/pass But how about the code on each of those pages at that point. All I can see if the html

Later,

C:\

« BackwardsOnwards »

Show Forum Drop Down Menu