Location: PHPKode > projects > Wiki-Map > htdocs/admin/index.php
<HTML>
<HEAD>
<TITLE>Admin panel for WikiMap</TITLE>
</HEAD>
<? include ('../openDB.php');?>
<BODY>
<TABLE><TR><TD valign=top>
<UL>
<LI><A HREF=addfaq.php>Add FAQ</A>
</UL>
</TD><TD>
<TABLE>
<?
$sql = "SELECT * FROM waypoints WHERE (DATEDIFF( CURDATE(), `datestamp`) < 10 )";
$result = mysql_query($sql);
if (!$result){
			echo '** Query falied ** <BR>'.mysql_error().'<BR>\n';
			exit;
	}

while ($r=mysql_fetch_row($result)){
	echo "<TR><TD><A href=pedit.php?id=$r[0]>Edit</A></TD>";
	echo "<TD><A href=pdel.php?id=$r[0]>Del</A></TD>";
	echo "<TD><A href=/?x=$r[9]&y=$r[10]&z=$r[6]&mark=1 title=$r[1]>";
	echo "$r[1]</A></TD><TD>$r[4]</TD><TD>$r[5]";
	echo "</TD><TD>$r[6]</TD></TR>";
}

?>
</TABLE>
</TD><TD valign=top>
<?
$sql = "SELECT * FROM waypoints";
$result = mysql_query($sql);
if (!$result){
			echo '** Query falied ** <BR>'.mysql_error().'<BR>\n';
			exit;
	}
$npoints = mysql_num_rows($result);

$sql = "SELECT * FROM user";
$result = mysql_query($sql);
if (!$result){
			echo '** Query falied ** <BR>'.mysql_error().'<BR>\n';
			exit;
	}
$nuser = mysql_num_rows($result);

echo "Total points: $npoints<br>";
echo "Total users: $nuser<br>";
?>
</TD></TR></TABLE>
<A href='http://www.wikimap.biz:2082/tmp/wikimap/webalizer/index.html'>
Webtraffic
</A>
<A href='addfaq.php'>Add FAQ</A>
</BODY>
</HTML>
Return current item: Wiki-Map