Your IP : 216.73.216.40


Current Path : /var/www/html/mmishra/indem/icdp/
Upload File :
Current File : /var/www/html/mmishra/indem/icdp/sitemap.php

<?php

function sitemap($parentid) {
        $tbl = 'webpages';
	$rs = mysql_query("select * from $tbl where visibility='enable' and parentid=$parentid order by hypertext");
		
        if (!mysql_num_rows($rs)) return "";
        else {
		$str = "<dir class='description'>";
        	while ($o = mysql_fetch_object($rs)) {
                	$dropdownmenu = sitemap($o->rowid);
                	if ($dropdownmenu) $str .= "<img src='images/arrow.gif'>$o->hypertext<br> $dropdownmenu<br>";
		 	else	
			$str .= "<img src='images/arrow.gif'><a href='inner.php?conf=$o->pageid'>$o->hypertext ($o->counter)</a>
        		[ dated $o->datecreation, $o->counter times ]<br>
        		<dir class='description'>" . strip_tags(substr($o->pagecontent,0,100)) . "...</dir>";
		}
	}
	$str .= "</dir>";
	
	return $str;
}
echo "<img src='images/arrow.gif'><a href='./'>Home</a><dir>" . sitemap(0) . "</dir>";

?>