Location: PHPKode > projects > Wifimap > wifimap/index.php
<?
/*****************************
 * 
 * wifimap v 0.3.1
 *
 * copyright 2003 John O'Sullivan <hide@address.com>
 * Based on some code and ideas from phpwirelessmap
 *
 * This file is part of wifimap.
 * wifimap is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * 
 * wifimap is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with wifimap; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 * Licensed under the GNU General Public License
 * See the file COPYING for details
 *
 *****************************/

require("./config.inc.php");

$db_link = mysql_connect($sql_server,$sql_user,$sql_passwd) or die('Not connected : ' . mysql_error());
mysql_select_db($sql_dbname,$db_link) or die('Can\'t use $sql_dbname : ' . mysql_error());

print ("
<html>
<head>
<title>wifimap</title>
</head>
<body>\n");

// Top Menu Bar
// not used for now
//include("./topbar.php");

print("
<h2>Select which map you want to work with</h2>
<hr>
<table cellpadding=5 cellspacing=5>\n");
$query="select * from maps";
$result=mysql_query($query,$db_link);
while($maplist=mysql_fetch_object($result))
{
print("<tr>
<td align=right>$maplist->mapnick</td><td align=left> <a href=\"viewmap.php?mapid=$maplist->id\">".$i18n["View Map"]."</a> </td>
               <td align=left><a href=\"editmap.php?mapid=$maplist->id\">".$i18n["Edit Map"]."</a></td> 
               <td align=left><a href=\"addnode.php?mapid=$maplist->id\">".$i18n["Add Node"]."</a> </td>
               <td align=left><a href=\"editnode.php?mapid=$maplist->id\">".$i18n["Edit Node"]."</a></td>
</tr>\n");
}

print ("
<tr>
<td colspan=6 align=center><a href=\"addmap.php\">Create a new map</a></td>
</tr>
</table>
<hr>

</body>
</html>\n");


Return current item: Wifimap