Location: PHPKode > scripts > phpRetrieve > phpRetrieve/navigatorReports.php
<?php

	//echo "	<div >
	//			<a class='button' href='ex.html' onclick='this.blur();' title='Switch to Table view' ><span><b>Tables</b></span></a>
	//			<a class='button' href='ex.html' onclick='this.blur();' title='Switch to Report view'><span><b>Reports</b></span></a>
	//		</div>
	//		<br /><br />
	//	";

	echo "<div><b>Reports</b> &nbsp;<a href='index.php?navView=Table'>(<u>show tables</u>)</a></div>";
	
	//Get list of reports
	$ite=new RecursiveDirectoryIterator("Reports/");

	$bytestotal=0;
	$nbfiles=0;
	foreach (new RecursiveIteratorIterator($ite) as $filename=>$cur) {
		
		$xtn = substr($filename,-7);
		$readHeader = 'Y'; $readQuery = 'N'; 
		if($xtn == "rpt.php"){
			$rptName = "???";
			$show = "Y";
			Include($filename);
			if($rptShare == "No" && ($rptOwner != $_SESSION['session_currentUser'])){ $show = "N"; }
			
			if($show == "Y"){
			
				$img = "report.png";
				if($rptShare == "No"){ $img = "reportL.png"; }
				if($rptShare == "ReadOnly"){ $img = "reportR.png"; }
				if($_SESSION['session_rptName'] != $rptName){
			
					echo "<a href=\"loadQuery.php?rpt=".$filename."\" title=\"".$rptName."\">
							&nbsp;&nbsp;<img src=\"".$img."\" style=\"border: none;\" />&nbsp;".$rptName."</a><br /> \n";
				}
				else {
					echo "<a href=\"loadQuery.php?rpt=".$filename."\" title=\"".$rptName."\">
							<img src=\"".$img."\" style=\"border: none;\" />&nbsp;".$rptName."</a><br /> \n";
					if($rptTable != "n/a"){
						echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src=\"attribute.png\" style=\"margin: 0; border: none;\" />&nbsp;<span><small style='color: blue;'>table : ".$rptTable."</small></span><br/>";
					}
					echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src=\"attribute.png\" style=\"margin: 0; border: none;\" />&nbsp;<span><small style='color: blue;'>owner : ".$rptOwner."</small></span><br/>";
					echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src=\"attribute.png\" style=\"margin: 0; border: none;\" />&nbsp;<span><small style='color: blue;'>share : ".$rptShare."</small></span><br/>";
					echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src=\"attribute.png\" style=\"margin: 0; border: none;\" />&nbsp;<span><small style='color: blue;'>created : ".$rptCreated."</small></span><br/>";
				
						
				}
			}
			
		}
	}

	
	
	
	?>
Return current item: phpRetrieve