Location: PHPKode > projects > Phpman > phpman-2.0a_RC2/inc_smalltoc.php
<?php
/**
* Small TOC
* @package phpman
* @copyright (c) 2004 Samuel Suter
* @author Samuel Suter <hide@address.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
* @version 1.0
**/
?>
<p align="center">
<?php
$table = new mlsDBtable("#__languages","language_ID",$database);
$table->select('','isocode','ASC');
$rows = $table->_db->loadRowsCustom('isocode','isocode');
foreach($rows as $k => $v) {
	echo "[";
	if($k != $_GET["lang"]) {
		echo "<a href=\"?manual_ID=".$_GET["manual_ID"]."&page_ID=".$_GET["page_ID"]."&lang=".$k."\">";
	}
	echo $k;
	if($k != $_GET["lang"]) {
		echo "</a>";
	}
	echo "]";
}
?>
</p>

<img src="up3.gif"> <a class="bigtoc" href="index.php?lang=<?=$_GET["lang"]?>"><?=$lang->back_to_index?></a><br>
<hr>
<?php if($_REQUEST["manual_ID"] || $_REQUEST["page_ID"]) { ?>
<img src="up2.gif"> <a class="bigtoc" href="?manual_ID=<?=$manual_data["manual_ID"]; ?>&lang=<?=$_GET["lang"]?>"><?=$manual_data["title"]; ?></a><br>
<hr>
<?php
/** Print link to parent */
$query = "SELECT `page_ID` FROM `#__pages` WHERE `root_ID`='".$manual_data["root_ID"]."' AND `lft`<'".$page_data["lft"]."' AND `rgt`>'".$page_data["rgt"]."' ORDER BY `lft` DESC LIMIT 1";
$database->setQuery($query);
$temp = $database->loadRowAssoc();
$parent_data = getPageLang($temp["page_ID"],$_GET["lang"]);
if($parent_data["page_ID"] != $manual_data["root_ID"] AND count($parent_data) > 0 AND $parent_data["title"] != "") {
	?>
	<img src="up1.gif"> <a class="bigtoc" href="?page_ID=<?=$parent_data["page_ID"]; ?>&lang=<?=$_GET["lang"]?>"><?=$parent_data["title"]; ?></a><br>
	<hr>
	<?php
}
?>
<table border="0" cellspacing="2" cellpadding="2" width="100%">
<?php
printSmalltoc();
?>
</table>
<?php } ?>
Return current item: Phpman