* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /** * Provides the GeographMapMosaic class * * @package Geograph * @author Paul Dixon <*****@*****.**> * @version $Revision$ */ /** * Needs the GeographMap class, so we pull that in here */ require_once 'geograph/map.class.php'; include_messages('class_mapmosaic'); /** * Geograph Bounding Box class * * method to pass a rectangle around * * @package Geograph */ class BoundingBox { var $top; var $left; var $height; var $width; } /**
* 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; either version 2 * of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ require_once 'geograph/global.inc.php'; include_messages('usermsg'); init_session(); $smarty = new GeographPage(); $template = 'usermsg.tpl'; //gather what we need $recipient = new GeographUser($_REQUEST['to']); $from_name = isset($_POST['from_name']) ? stripslashes($_POST['from_name']) : $USER->realname; $from_email = isset($_POST['from_email']) ? stripslashes($_POST['from_email']) : $USER->email; $sendcopy = isset($_POST['sendcopy']) ? stripslashes($_POST['sendcopy']) : false; $smarty->assign_by_ref('recipient', $recipient); $smarty->assign_by_ref('from_name', $from_name); $smarty->assign_by_ref('from_email', $from_email); $smarty->assign_by_ref('sendcopy', $sendcopy); $db = NewADOConnection($GLOBALS['DSN']); if (empty($db)) { die('Database connection failed');
* 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; either version 2 * of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ require_once 'geograph/global.inc.php'; include_messages('moversboard'); init_session(); $type = isset($_GET['type']) && preg_match('/^\\w+$/', $_GET['type']) ? $_GET['type'] : 'images'; $smarty = new GeographPage(); $template = 'statistics_moversboard.tpl'; $cacheid = $type; if (!$smarty->is_cached($template, $cacheid)) { ///////////// // in the following code 'geographs' is used a column for legacy reasons, but dont always represent actual geographs.... require_once 'geograph/gridimage.class.php'; require_once 'geograph/gridsquare.class.php'; require_once 'geograph/imagelist.class.php'; $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; $db = NewADOConnection($GLOBALS['DSN']); if (!$db) { die('Database connection failed');
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ require_once 'geograph/global.inc.php'; require_once 'geograph/gridimage.class.php'; require_once 'geograph/gridsquare.class.php'; require_once 'geograph/imagelist.class.php'; require_once 'geograph/map.class.php'; require_once 'geograph/mapmosaic.class.php'; require_once 'geograph/rastermap.class.php'; include_messages('browse'); init_session(); $smarty = new GeographPage(); dieUnderHighLoad(4); customGZipHandlerStart(); $square = new GridSquare(); if (isset($_GET['inner'])) { $template = 'browse_inner.tpl'; } else { $template = 'browse.tpl'; $smarty->assign('prefixes', $square->getGridPrefixes()); $smarty->assign('kmlist', $square->getKMList()); } //we can be passed a gridreference as gridsquare/northings/eastings //or just gridref. So lets initialise our grid square $grid_given = false;
* 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; either version 2 * of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ require_once 'geograph/global.inc.php'; include_messages('ecard'); init_session(); $smarty = new GeographPage(); $template = 'ecard.tpl'; //you must be logged in to send e-cards $USER->mustHavePerm("basic"); //gather what we need $from_name = isset($_POST['from_name']) ? stripslashes($_POST['from_name']) : $USER->realname; $from_email = isset($_POST['from_email']) ? stripslashes($_POST['from_email']) : $USER->email; $to_name = isset($_POST['to_name']) ? stripslashes($_POST['to_name']) : ''; $to_email = isset($_POST['to_email']) ? stripslashes($_POST['to_email']) : ''; $smarty->assign_by_ref('from_name', $from_name); $smarty->assign_by_ref('from_email', $from_email); $smarty->assign_by_ref('to_name', $to_name); $smarty->assign_by_ref('to_email', $to_email); $db = NewADOConnection($GLOBALS['DSN']);
* 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; either version 2 * of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ require_once 'geograph/global.inc.php'; include_messages('leaderboard'); init_session(); $type = isset($_GET['type']) && preg_match('/^\\w+$/', $_GET['type']) ? $_GET['type'] : 'points'; $ri = isset($_GET['ri']) && is_numeric($_GET['ri']) ? intval($_GET['ri']) : 0; $date = isset($_GET['date']) && ctype_lower($_GET['date']) ? $_GET['date'] : 'submitted'; $timerel = isset($_GET['timerel']) && in_array($_GET['timerel'], array('during', 'dbefore', 'dafter', 'between')) ? $_GET['timerel'] : 'during'; if (!empty($_GET['whenYear'])) { if (!empty($_GET['whenMonth'])) { $_GET['when'] = sprintf("%04d-%02d", $_GET['whenYear'], $_GET['whenMonth']); } else { $_GET['when'] = sprintf("%04d", $_GET['whenYear']); } } if (!empty($_GET['when2Year'])) { if (!empty($_GET['when2Month'])) { $_GET['when2'] = sprintf("%04d-%02d", $_GET['when2Year'], $_GET['when2Month']);
* * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ require_once 'geograph/global.inc.php'; require_once 'geograph/gridimage.class.php'; require_once 'geograph/gridsquare.class.php'; require_once 'geograph/imagelist.class.php'; require_once 'geograph/gridimagetroubleticket.class.php'; include_messages('moderation'); init_session(); $db = NewADOConnection($GLOBALS['DSN']); if (!$db) { die('Database connection failed'); } $smarty = new GeographPage(); //doing some moderating? if (isset($_POST['gridimage_id'])) { //user may have an expired session, or playing silly buggers, //either way, we want to check for admin status on the session if ($USER->hasPerm('basic')) { $gridimage_id = intval($_POST['gridimage_id']); $status = $_POST['user_status']; $image = new GridImage(); if ($image->loadFromId($gridimage_id)) {
* Provides the GeographUser class * * @package Geograph * @author Paul Dixon <*****@*****.**> * @version $Revision$ */ /** * Geograph User class * * Provides facilities for inline login and querying permissions * of current user (which might be an anonymous) * * @package Geograph */ require_once 'geograph/gridsquare.class.php'; include_messages('class_user'); class GeographUser { /** * current user_id, 0 for guest user */ var $user_id = 0; /** * registered user? */ var $registered = false; /** * records whether user was automatically logged in via cookie - * there are some operations which should force the user to give * their password for additional security in this event */
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /** * Provides the GridSquare class * * @package Geograph * @author Paul Dixon <*****@*****.**> * @version $Revision$ */ include_messages('class_gridsquare'); /** * GridSquare class * Provides an abstraction of a grid square, providing all the * obvious functions you'd expect */ class GridSquare { /** * internal database handle */ var $db = null; /** * gridsquare_id primary key */ var $gridsquare_id = 0;
* 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. * * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ require_once 'geograph/global.inc.php'; require_once 'geograph/security.inc.php'; include_messages('contact'); init_session(); $smarty = new GeographPage(); if (isset($_POST['msg'])) { //get the inputs $msg = stripslashes(trim($_POST['msg'])); $from = stripslashes(trim($_POST['from'])); $subject = stripslashes(trim($_POST['subject'])); $smarty->assign('msg', $msg); $smarty->assign('from', $from); $smarty->assign('subject', $subject); //ensure we only got one from line if (isValidEmailAddress($from)) { if (strlen($msg)) { if (strlen($subject) == 0) { $subject = 'Re: ' . $_SERVER['HTTP_HOST'];
* * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ require_once 'geograph/global.inc.php'; require_once 'geograph/conversions.class.php'; require_once 'geograph/conversionslatlong.class.php'; require_once 'geograph/gridsquare.class.php'; require_once 'geograph/mapmosaic.class.php'; include_messages('latlong'); init_session(); $conv = new ConversionsLatLong(); $smarty = new GeographPage(); $template = 'latlong.tpl'; $cacheid = ''; if (!isset($_GET['usehermert'])) { $_GET['usehermert'] = 1; } if (!isset($_GET['datum'])) { $_GET['datum'] = '-'; } if (!empty($_GET['To'])) { //to lat/long if ($_GET['datum'] == 'osgb36') { $latlong = $conv->osgb36_to_wgs84($_GET['e'], $_GET['n']);
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /** * Provides the GridImage class * * @package Geograph * @author Paul Dixon <*****@*****.**> * @version $Revision$ */ include_messages('class_gridimage'); /** * GridImage class * Provides an abstraction of a grid image, providing all the * obvious functions you'd expect */ class GridImage { /** * internal db handle */ var $db; /** * image id */ var $gridimage_id;