<?
/*****************************
*
* 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());
$query="INSERT INTO nodes (mapid, name, password, absolutex, absolutey, status, admin, url) VALUES('$mapid', '$nodename', '$password', '$absolutex', '$absolutey', '$status', '$email', '$url')";
mysql_query($query,$db_link) or die('Could not add to database : ' . mysql_error());
print("<html>
<head>
<meta http-equiv=\"refresh\" content=\"1; URL=addnode.php?mapid=$mapid&xorig=$xorig&yorig=$yorig&zoom=$zoom\">
</head>
<body>
Thank you for this new data.<p>
You will be shown the updated map in 1 second.
</body>
</html>\n");
?>