当前位置: 首页>>代码示例>>PHP>>正文


PHP GeographPage::display方法代码示例

本文整理汇总了PHP中GeographPage::display方法的典型用法代码示例。如果您正苦于以下问题:PHP GeographPage::display方法的具体用法?PHP GeographPage::display怎么用?PHP GeographPage::display使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GeographPage的用法示例。


在下文中一共展示了GeographPage::display方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: isset

<?php

/**
 * $Project: GeoGraph $
 * $Id$
 * 
 * GeoGraph geographic photo archive project
 * This file copyright (C) 2005 Barry Hunter (geo@barryhunter.co.uk)
 * 
 * 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';
init_session();
$USER->mustHavePerm("basic");
$u = isset($_GET['u']) && is_numeric($_GET['u']) ? intval($_GET['u']) : $USER->user_id;
$smarty = new GeographPage();
$smarty->assign('user_id', $u);
$smarty->display('explore_timeline.tpl');
开发者ID:s-a-r-id,项目名称:geograph-project,代码行数:30,代码来源:timeline.php

示例2: GeographPage

 * 
 * 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';
init_session();
$USER->mustHavePerm("admin");
$smarty = new GeographPage();
$db = NewADOConnection($GLOBALS['DSN']);
$smarty->display('_std_begin.tpl');
flush();
if (isset($_GET['getExtendedStats'])) {
    $a = $memcache->getExtendedStats();
    $a = array_reverse($a);
    print "<h2>Overview Memcache Statistics</h2>";
    print "<table border=1 cellspacing=0>";
    if (isset($_GET['r'])) {
        print "<tr>";
        print "<th>server</th>";
        foreach ($a as $name => $row) {
            print "<th>{$name}</th>";
        }
        print "</tr>";
        $keys = array_keys($a);
        $keys = array_keys($a[$keys[0]]);
开发者ID:s-a-r-id,项目名称:geograph-project,代码行数:31,代码来源:memcache.php

示例3: GeographPage

 * 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';
init_session();
$smarty = new GeographPage();
if (empty($_GET['page']) || preg_match('/[^\\w\\.\\,-]/', $_GET['page'])) {
    $smarty->display('static_404.tpl');
    exit;
}
$isadmin = $USER->hasPerm('moderator') ? 1 : 0;
$template = 'article_article.tpl';
$cacheid = 'articles|' . $_GET['page'];
$cacheid .= '|' . $USER->hasPerm('moderator') ? 1 : 0;
$cacheid .= '-' . (isset($_SESSION['article_urls']) && in_array($_GET['page'], $_SESSION['article_urls']) ? 1 : 0);
if (isset($_SESSION[$_GET['page']])) {
    $cacheid .= '-' . $_SESSION[$_GET['page']];
}
if (!empty($_GET['epoch']) && preg_match('/^[\\w]+$/', $_GET['epoch'])) {
    $cacheid .= "--" . $_GET['epoch'];
} else {
    $_GET['epoch'] = '';
}
开发者ID:s-a-r-id,项目名称:geograph-project,代码行数:31,代码来源:article.php

示例4: GeographPage

 * 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';
init_session();
$USER->mustHavePerm("admin");
$smarty = new GeographPage();
$db = NewADOConnection($GLOBALS['DSN']);
$from = isset($_POST['from']) ? $_POST['from'] : $CONF['photo_hashing_secret'];
$to = isset($_POST['to']) ? $_POST['to'] : $CONF['photo_hashing_secret'];
//do some processing?
if (isset($_POST['go'])) {
    //this takes a long time, so we output a header first of all
    $smarty->display('_std_begin.tpl');
    echo "<h3><a href=\"hashchanger.php\">&lt;&lt;</a> Changing image hashes...</h3>";
    flush();
    set_time_limit(3600 * 24);
    $recordSet =& $db->Execute("select * from gridimage");
    while (!$recordSet->EOF) {
        $image = new GridImage();
        $image->loadFromRecordset($recordSet);
        $CONF['photo_hashing_secret'] = $from;
        $oldfile = $image->_getFullpath();
        if ($oldfile != '/photos/error.jpg' && file_exists($_SERVER['DOCUMENT_ROOT'] . $oldfile)) {
            $CONF['photo_hashing_secret'] = $to;
            $image->storeImage($_SERVER['DOCUMENT_ROOT'] . $oldfile, true);
            $newfile = $image->_getFullpath();
            echo "<li>renamed {$oldfile}<br>to {$newfile}</li>";
            flush();
开发者ID:s-a-r-id,项目名称:geograph-project,代码行数:31,代码来源:hashchanger.php

示例5: elseif

if (isset($_REQUEST['inner'])) {
    $cacheid = 'iframe';
    $smarty->assign('inner', 1);
} else {
    $cacheid = '';
}
if (isset($_REQUEST['picasa'])) {
    $cacheid .= 'picasa';
    $smarty->assign('picasa', 1);
} elseif (isset($_REQUEST['submit2'])) {
    $cacheid .= 'submit2';
    $smarty->assign('submit2', 1);
}
if (!empty($_REQUEST['grid_reference'])) {
    $square = new GridSquare();
    $ok = $square->setByFullGridRef($_REQUEST['grid_reference']);
    if ($ok) {
        $smarty->assign('grid_reference', $grid_reference = $_REQUEST['grid_reference']);
        $smarty->assign('success', 1);
    } else {
        $smarty->assign('errormsg', $square->errormsg);
    }
}
$smarty->assign('lat0', $CONF['gmcentre'][0]);
$smarty->assign('lon0', $CONF['gmcentre'][1]);
$smarty->assign('latmin', $CONF['gmlatrange'][0][0]);
$smarty->assign('latmax', $CONF['gmlatrange'][0][1]);
$smarty->assign('lonmin', $CONF['gmlonrange'][0][0]);
$smarty->assign('lonmax', $CONF['gmlonrange'][0][1]);
$smarty->display('submitmap.tpl', $cacheid);
开发者ID:s-a-r-id,项目名称:geograph-project,代码行数:30,代码来源:submitmap.php

示例6: GeographPage

 * 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/map.class.php';
require_once 'geograph/mapmosaic.class.php';
require_once 'geograph/image.inc.php';
init_session();
$USER->mustHavePerm("admin");
$smarty = new GeographPage();
$db = NewADOConnection($GLOBALS['DSN']);
if (isset($_GET['check2'])) {
    set_time_limit(3600 * 24);
    //this takes a long time, so we output a header first of all
    $smarty->display('_std_begin.tpl');
    echo "<h3><a href=\"recreatemaps.php\">&lt;&lt;</a> Checking Missing GD images...</h3>";
    flush();
    $base =& $_SERVER['DOCUMENT_ROOT'];
    $size = 40;
    $sql = "select gridsquare_id,grid_reference from gridsquare where imagecount>0";
    $recordSet =& $db->Execute($sql);
    while (!$recordSet->EOF) {
        $sql2 = "select * from gridimage where gridsquare_id={$recordSet->fields['gridsquare_id']} " . "and moderation_status<>'rejected' order by moderation_status+0 desc,seq_no limit 1";
        $recordSet2 =& $db->Execute($sql2);
        if ($recordSet2->fields['gridimage_id']) {
            $image = new GridImage();
            $image->fastInit($recordSet2->fields);
            $yz = sprintf("%02d", floor($this->gridimage_id / 1000000));
            $ab = sprintf("%02d", floor($this->gridimage_id % 1000000 / 10000));
            $cd = sprintf("%02d", floor($image->gridimage_id % 10000 / 100));
开发者ID:s-a-r-id,项目名称:geograph-project,代码行数:31,代码来源:recreatemissingmaps.php

示例7: UploadManager

    require_once 'geograph/gridsquare.class.php';
}
require_once 'geograph/uploadmanager.class.php';
init_session();
$uploadmanager = new UploadManager();
//display preview image?
if (isset($_GET['preview'])) {
    $uploadmanager->outputPreviewImage($_GET['preview']);
    exit;
}
list($usec, $sec) = explode(' ', microtime());
$GLOBALS['STARTTIME'] = (double) $usec + (double) $sec;
$square = new GridSquare();
$smarty = new GeographPage();
if (!$USER->hasPerm("basic")) {
    $smarty->display('static_submit_intro.tpl');
    exit;
}
if (isset($_SESSION['tab'])) {
    $selectedtab = $_SESSION['tab'];
} else {
    $selectedtab = 1;
}
$step = isset($_POST['step']) ? intval($_POST['step']) : 1;
if (!empty($_FILES['jpeg_exif']) && $_FILES['jpeg_exif']['error'] != UPLOAD_ERR_NO_FILE) {
    //Submit Step 1a..
    switch ($_FILES['jpeg_exif']['error']) {
        case 0:
            if (!filesize($_FILES['jpeg_exif']['tmp_name'])) {
                $smarty->assign('error', 'Sorry, no file was received - please try again');
            } elseif ($uploadmanager->processUpload($_FILES['jpeg_exif']['tmp_name'])) {
开发者ID:s-a-r-id,项目名称:geograph-project,代码行数:31,代码来源:submit.php

示例8: GeographPage

<?php

/**
 * $Project: GeoGraph $
 * $Id: faq.php 15 2005-02-16 12:23:35Z lordelph $
 * 
 * GeoGraph geographic photo archive project
 * This file copyright (C) 2005 Paul Dixon (paul@elphin.com)
 * 
 * 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';
init_session();
$smarty = new GeographPage();
$smarty->display('activities.tpl');
开发者ID:s-a-r-id,项目名称:geograph-project,代码行数:27,代码来源:index.php

示例9: GeographPage

<?php

/**
 * $Project: GeoGraph $
 * $Id$
 * 
 * GeoGraph geographic photo archive project
 * This file copyright (C) 2005 Paul Dixon (paul@elphin.com)
 * 
 * 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';
init_session();
$USER->logout();
$smarty = new GeographPage();
$smarty->display('logout.tpl');
开发者ID:s-a-r-id,项目名称:geograph-project,代码行数:28,代码来源:logout.php

示例10: NewADOConnection

if (!$smarty->is_cached('explore.tpl')) {
    if (!$db) {
        $db = NewADOConnection($GLOBALS['DSN']);
        if (!$db) {
            die('Database connection failed');
        }
    }
    $countylist = array();
    $recordSet =& $db->Execute("SELECT reference_index,county_id,name FROM loc_counties WHERE n > 0");
    while (!$recordSet->EOF) {
        $countylist[$CONF['references'][$recordSet->fields[0]]][$recordSet->fields[1]] = $recordSet->fields[2];
        $recordSet->MoveNext();
    }
    $recordSet->Close();
    $smarty->assign_by_ref('countylist', $countylist);
    $topicsraw = $db->GetAssoc("select gp.topic_id,concat(topic_title,' [',count(*),']') as title,forum_name from gridimage_post gp\n\t\tinner join geobb_topics using (topic_id)\n\t\tinner join geobb_forums using (forum_id)\n\t\tgroup by gp.topic_id \n\t\thaving count(*) > 4\n\t\torder by geobb_topics.forum_id desc,topic_title");
    $topics = array("1" => "Any Topic");
    $options = array();
    foreach ($topicsraw as $topic_id => $row) {
        if ($last != $row['forum_name'] && $last) {
            $topics[$last] = $options;
            $options = array();
        }
        $last = $row['forum_name'];
        $options[$topic_id] = $row['title'];
    }
    $topics[$last] = $options;
    $smarty->assign_by_ref('topiclist', $topics);
}
$smarty->display('explore.tpl');
开发者ID:s-a-r-id,项目名称:geograph-project,代码行数:30,代码来源:index.php

示例11: RasterMap

    if ($image2->moderation_status != 'rejected') {
        $rastermap2 = new RasterMap($image2->grid_square);
        if ($image2->view_direction > -1) {
            $smarty->assign('view_direction2', $image2->view_direction % 90 == 0 ? strtoupper(heading_string($image2->view_direction)) : ucwords(heading_string($image2->view_direction)));
        }
        list($lat, $long) = $conv->gridsquare_to_wgs84($image2->grid_square);
        $smarty->assign('lat2', $lat);
        $smarty->assign('long2', $long);
        list($latdm, $longdm) = $conv->wgs84_to_friendly($lat, $long);
        $smarty->assign('latdm2', $latdm);
        $smarty->assign('longdm2', $longdm);
        $smarty->assign_by_ref('image2', $image2);
        $smarty->assign_by_ref('rastermap2', $rastermap2);
    }
    $updates = array();
    $updates['user_id'] = $USER->user_id;
    $updates['compare_pair_id'] = $pair['compare_pair_id'];
    $updates['ua'] = $_SERVER['HTTP_USER_AGENT'];
    $db->Execute('REPLACE INTO compare_done SET `ipaddr` = INET_ATON(\'' . getRemoteIP() . '\'),`' . implode('` = ?,`', array_keys($updates)) . '` = ?', array_values($updates));
} elseif (isset($_GET['again']) && !isset($_GET['t'])) {
    $pair = $db->getRow("\r\n\t\tDELETE FROM compare_done\r\n\t\tWHERE {$where}", $a);
    header("Location: " . $_SERVER['PHP_SELF'] . (isset($_GET['v']) ? '?v' : ''));
    exit;
}
if (isset($_GET['v'])) {
    $tamplate = 'activities_compare_v.tpl';
} else {
    $tamplate = 'activities_compare.tpl';
}
$smarty->display($tamplate);
开发者ID:s-a-r-id,项目名称:geograph-project,代码行数:30,代码来源:compare.php

示例12: unset

            //it worked!
            break;
        }
        if (!empty($game->image)) {
            unset($game->image);
        }
        if (!empty($game->rastermap)) {
            unset($game->rastermap);
        }
        $keys = array_keys($game->images);
    }
    $game->points = 5;
    if ($USER->hasPerm("basic") && isset($_REQUEST['rater'])) {
        $smarty->assign('rater', 1);
    }
} else {
    $smarty->assign('message', 'no images left');
    if (!empty($game->image)) {
        unset($game->image);
    }
    if (!empty($game->rastermap)) {
        unset($game->rastermap);
    }
}
$smarty->assign('gameToken', $game->getToken(3600));
if (!empty($_SESSION['thisGamePoints']) && $_SESSION['thisGameImageID'] == $game->image->gridimage_id) {
    $game->points = $_SESSION['thisGamePoints'];
}
$smarty->assign_by_ref('game', $game);
$smarty->display('games_place-memory.tpl');
开发者ID:s-a-r-id,项目名称:geograph-project,代码行数:30,代码来源:place-memory.php

示例13: explode

                $db->Execute($sql);
                //correct the temp value
                $message .= "<p>Updating '<i>-" . $_POST['new' . $c] . "</i>' to '<b>" . $_POST['new' . $c] . "</b>'.</p>";
                $sql = "UPDATE gridimage SET `imageclass` = " . $db->Quote($_POST['new' . $c]) . " WHERE `imageclass` = '-" . $_POST['new' . $c] . "'";
                $db->Execute($sql);
                $sql = "UPDATE gridimage_search SET `imageclass` = " . $db->Quote($_POST['new' . $c]) . " WHERE `imageclass` = " . $db->Quote("-" . $_POST['new' . $c]);
                $db->Execute($sql);
                //we already have done the swap so dont want it to happen on the next iteration
                $skip[$_POST['new' . $c]]++;
            } else {
                $message .= "<p>Updating '<i>" . $_POST['old' . $c] . "</i>' to '<b>" . $_POST['new' . $c] . "</b>'.</p>";
                $sql = "UPDATE gridimage SET `imageclass` = " . $db->Quote($_POST['new' . $c]) . " WHERE `imageclass` = " . $db->Quote($_POST['old' . $c]);
                $db->Execute($sql);
                $sql = "UPDATE gridimage_search SET `imageclass` = " . $db->Quote($_POST['new' . $c]) . " WHERE `imageclass` = " . $db->Quote($_POST['old' . $c]);
                $db->Execute($sql);
            }
        }
    }
    $message .= "<p>All values updated</p>";
    $smarty->assign('message', $message);
}
$where = '';
if (!empty($_REQUEST['q'])) {
    $a = explode(' ', preg_replace("/[^ \\w'\\(\\)]+/", '', $_REQUEST['q']));
    $where = " AND (imageclass LIKE '%" . implode("%' OR imageclass LIKE '%", $a) . "%' )";
    $smarty->assign('q', implode(" ", $a));
}
$arr = $db->GetAssoc("select imageclass,count(*) from gridimage where moderation_status != 'rejected' {$where} group by imageclass");
$smarty->assign('arr', $arr);
$smarty->display('admin_categories.tpl');
开发者ID:s-a-r-id,项目名称:geograph-project,代码行数:30,代码来源:categories.php

示例14: GeographPage

 * 
 * 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/map.class.php';
require_once 'geograph/mapmosaic.class.php';
require_once 'geograph/image.inc.php';
init_session();
$smarty = new GeographPage();
$db = NewADOConnection($GLOBALS['DSN']);
if (isset($_POST['inv'])) {
    $square = new GridSquare();
    $grid_ok = $square->setGridRef($_POST['gridref']);
    if ($grid_ok) {
        $x = $square->x;
        $y = $square->y;
        require_once 'geograph/mapmosaic.class.php';
        $mosaic = new GeographMapMosaic();
        $mosaic->expirePosition($x, $y);
        $smarty->assign('gridref', $_POST['gridref']);
    } else {
        $smarty->assign('errormsg', $square->errormsg);
    }
}
$smarty->assign('invalid_maps', $db->GetOne("select count(*) from mapcache where age > 0 and type_or_user >= 0"));
$smarty->display('recreatemaps.tpl');
开发者ID:s-a-r-id,项目名称:geograph-project,代码行数:30,代码来源:recreatemaps.php

示例15: gridsquare

                $eastings = $matches[2];
                $northings = $matches[3];
                $sql = "select * from gridprefix where prefix='{$gridsquare}' limit 1";
                $prefix = $db->GetRow($sql);
                if (count($prefix)) {
                    $x = $prefix['origin_x'] + $eastings;
                    $y = $prefix['origin_y'] + $northings;
                    $sql = "insert into gridsquare(x,y,percent_land,grid_reference,reference_index,point_xy) " . "values({$x},{$y},{$percent},'{$gridref}',{$prefix['reference_index']},GeomFromText('POINT({$x} {$y})') )";
                    $db->Execute($sql);
                    $gridsquare_id = $db->Insert_ID();
                    $smarty->assign('status', "New gridsquare {$gridref} created with new land percentage of {$percent} %");
                    $db->Execute("REPLACE INTO mapfix_log SET user_id = {$USER->user_id}, gridsquare_id = {$gridsquare_id}, new_percent_land='{$percent}', old_percent_land='{$sq['percent_land']}',created=now(),comment=" . $db->Quote($_GET['comment']));
                    if ($isadmin) {
                        require_once 'geograph/mapmosaic.class.php';
                        $mosaic = new GeographMapMosaic();
                        $mosaic->expirePosition($x, $y, 0, true);
                    }
                } else {
                    $smarty->assign('gridref_error', "Error, please try again later");
                }
            }
            $smarty->assign('percent_land', $percent);
        }
    } else {
        $smarty->assign_by_ref('gridref', strip_tags($_GET['gridref']));
        $smarty->assign('gridref_error', "Bad or unknown grid reference");
    }
    $smarty->assign('gridref_ok', $ok ? 1 : 0);
}
$smarty->display('mapfixer.tpl');
开发者ID:s-a-r-id,项目名称:geograph-project,代码行数:30,代码来源:mapfixer.php


注:本文中的GeographPage::display方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。