/* LibreSSL - CAcert web application Copyright (C) 2004-2008 CAcert Inc. This program 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; version 2 of the License. This program 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 this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ ?> $ccid = array_key_exists('ccid',$_REQUEST)?intval($_REQUEST['ccid']):0; $regid = array_key_exists('regid',$_REQUEST)?intval($_REQUEST['regid']):0; $locid = array_key_exists('locid',$_REQUEST)?intval($_REQUEST['locid']):0; $name = array_key_exists('name',$_REQUEST)?mysql_escape_string($_REQUEST['name']):""; if($ccid > 0 && $_REQUEST['action'] == "add") { ?>
} if($regid > 0 && $_REQUEST['action'] == "edit") { $query = "select * from `regions` where `id`='$regid' order by `name`"; $row = mysql_fetch_assoc(mysql_query($query)); $name = $row['name']; ?> } if($regid > 0 && $_REQUEST['action'] == "add") { ?> } if($locid > 0 && $_REQUEST['action'] == "edit") { $query = "select * from `locations` where `id`='$locid'"; $row = mysql_fetch_assoc(mysql_query($query)); if($name == "") $name = $row['name']; if(!array_key_exists('longitude',$_REQUEST) || $_REQUEST['longitude'] == "") $_REQUEST['longitude'] = $row['long']; if(!array_key_exists('latitude',$_REQUEST) || $_REQUEST['latitude'] == "") $_REQUEST['latitude'] = $row['lat']; ?> } if($locid > 0 && $_REQUEST['action'] == "aliases") { $query = "select * from `localias` where `locid`='$locid'"; $res = mysql_query($query); $rc = mysql_num_rows($res); ?>=_("Location Aliases")?> - =_("Add")?> | |
=$row['name']?> | =_("Delete")?> |