Beispiel #1
0
function use_offers()
{
    change_site();
}
<?php

// change_site.php
// allows a site owner or an the administrator to change site details
// or another user to view the site details
if (!isset($inIndex) || !$inIndex) {
    include "../../redirect.php";
} elseif (!($locationid = $objUtil->checkGetKey('location'))) {
    throw new Exception(LangException011b);
} elseif (!$objLocation->getLocationPropertyFromId($locationid, 'name')) {
    throw new Exception("Location not found in change_instrument.php, please contact the developers with this message:" . $eyepieceid);
} else {
    change_site();
}
function change_site()
{
    global $baseURL, $locationid, $loggedUser, $objLocation, $objPresentations, $objUtil, $objContrast;
    $disabled = " disabled=\"disabled\"";
    if ($loggedUser && $objUtil->checkAdminOrUserID($objLocation->getLocationPropertyFromId($locationid, 'observer', ''))) {
        $disabled = "";
    }
    $latitude = $objLocation->getLocationPropertyFromId($locationid, 'latitude');
    $longitude = $objLocation->getLocationPropertyFromId($locationid, 'longitude');
    $lm = $objLocation->getLocationPropertyFromId($locationid, 'limitingMagnitude');
    $sb = $objLocation->getLocationPropertyFromId($locationid, 'skyBackground');
    echo "<h4>" . stripslashes($objLocation->getLocationPropertyFromId($locationid, 'name')) . "</h4>";
    echo "<hr />";
    echo "<a href=\"http://clearoutside.com/forecast/" . round($latitude, 2) . "/" . round($longitude, 2) . "\">\n\t\t\t\t<img src=\"http://clearoutside.com/forecast_image_small/" . round($latitude, 2) . "/" . round($longitude, 2) . "/forecast.png\" /></a>";
    echo "<br /><br />";
    echo "<form>\n\t\t\t<div class=\"form-inline\">\n\t         <input type=\"text\" class=\"form-control\" id=\"address\" onkeypress=\"searchKeyPress(event);\" placeholder=\"" . stripslashes($objLocation->getLocationPropertyFromId($locationid, 'name')) . "\" autofocus></input>\n             <input type=\"button\" class=\"btn btn-success\" id=\"btnSearch\" value=\"" . LangSearchLocations0 . "\" onclick=\"codeAddress();\" ></input>\n\t        </div>\n\t      </form>";
    echo "<div id=\"map\"></div>";