本文整理汇总了PHP中getLeonardoLink函数的典型用法代码示例。如果您正苦于以下问题:PHP getLeonardoLink函数的具体用法?PHP getLeonardoLink怎么用?PHP getLeonardoLink使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getLeonardoLink函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: flights_find
function flights_find($arg)
{
global $db, $flightsTable;
global $takeoffRadious, $CONF;
require_once "FN_pilot.php";
$sitePass = $arg[0];
$lat = $arg[1];
$lon = -$arg[2];
$limit = $arg[3];
if (!securityCheck($sitePass)) {
return new IXR_Error(4000, 'Access Denied');
}
$firstPoint = new gpsPoint();
$firstPoint->lat = $lat;
$firstPoint->lon = $lon;
// calc TAKEOFF - LANDING PLACES
if (count($waypoints) == 0) {
$waypoints = getWaypoints(0, 1);
}
$takeoffIDTmp = 0;
$minTakeoffDistance = 10000000;
$i = 0;
foreach ($waypoints as $waypoint) {
$takeoff_distance = $firstPoint->calcDistance($waypoint);
if ($takeoff_distance < $minTakeoffDistance) {
$minTakeoffDistance = $takeoff_distance;
$takeoffIDTmp = $waypoint->waypointID;
}
$i++;
}
$nearestWaypoint = new waypoint($takeoffIDTmp);
$nearestWaypoint->getFromDB();
//$nearestWaypoint;
//$minTakeoffDistance;
if ($limit > 0) {
$lim = "LIMIT {$limit}";
} else {
$lim = "";
}
$where_clause = "AND takeoffID={$nearestWaypoint->waypointID}";
$query = "SELECT * FROM {$flightsTable} WHERE private=0 {$where_clause} ORDER BY FLIGHT_POINTS DESC {$lim} ";
//echo $query;
$res = $db->sql_query($query);
if ($res <= 0) {
return new IXR_Error(4000, 'Error in query! ' . $query);
}
$flights = array();
$i = 0;
while ($row = mysql_fetch_assoc($res)) {
$name = getPilotRealName($row["userID"], $row["serverID"]);
$link = htmlspecialchars("http://" . $_SERVER['SERVER_NAME'] . getLeonardoLink(array('op' => 'show_flight', 'flightID' => $row['ID'])));
$this_year = substr($row['DATE'], 0, 4);
$linkIGC = htmlspecialchars("http://" . $_SERVER['SERVER_NAME'] . getRelMainDir() . str_replace("%PILOTID%", getPilotID($row["userServerID"], $row["userID"]), str_replace("%YEAR%", $this_year, $CONF['paths']['igc'])) . '/' . $row['filename']);
//$flightsRelPath."/".$row[userID]."/flights/".$this_year."/".$row[filename] );
if ($row['takeoffVinicity'] > $takeoffRadious) {
$location = getWaypointName($row['takeoffID']) . " [~" . sprintf("%.1f", $row['takeoffVinicity'] / 1000) . " km]";
} else {
$location = getWaypointName($row['takeoffID']);
}
$flights[$i]['pilot'] = htmlspecialchars($name);
$flights[$i]['takeoff'] = htmlspecialchars($location);
$flights[$i]['date'] = $row['DATE'];
$flights[$i]['duration'] = $row['DURATION'];
$flights[$i]['openDistance'] = $row['MAX_LINEAR_DISTANCE'];
$flights[$i]['OLCkm'] = $row['FLIGHT_KM'];
$flights[$i]['OLCScore'] = $row['FLIGHT_POINTS'];
$flights[$i]['OLCtype'] = $row['BEST_FLIGHT_TYPE'];
$flights[$i]['displayLink'] = $link;
$i++;
}
return array($i, $flights);
//return array($i,0);
}
开发者ID:Peter2121,项目名称:leonardoxc,代码行数:73,代码来源:OP_flight.php
示例2: getLeonardoLink
"></p></form></td>
</tr>
</table>
<?php
} else {
?>
<p align="center"><span class="style111"><font face="Verdana, Arial, Helvetica, sans-serif"><?php
echo _YOUR_FLIGHT_HAS_BEEN_SUBMITTED;
?>
</font></span> <br>
<br>
<a href="<?php
echo getLeonardoLink(array('op' => 'show_flight', 'flightID' => $flightID));
?>
"><?php
echo _PRESS_HERE_TO_VIEW_IT;
?>
</a><br>
<em><?php
echo _WILL_BE_ACTIVATED_SOON;
?>
</em>
<hr>
<?php
}
}
}
closeMain();
开发者ID:Peter2121,项目名称:leonardoxc,代码行数:31,代码来源:GUI_flight_add.php
示例3: while
if (!strpos($filter_clause, $pilotsTable) === false) {
$extra_tbl .= " LEFT JOIN {$pilotsTable} ON \n\t\t\t\t\t\t({$flightsTable}.userID={$pilotsTable}.pilotID AND \n\t\t\t\t\t\t{$flightsTable}.userServerID={$pilotsTable}.serverID) ";
}
}
$query = "SELECT * FROM {$flightsTable} {$extra_tbl} WHERE \n\t\t\t\t firstLat>={$south} && firstLat<={$north} && \n\t\t\t\t firstLon>={$west} && firstLon<={$east} {$filter_clause}\n\t\t\t\t ORDER BY FLIGHT_POINTS DESC LIMIT 100 ";
//echo $query;
$res = $db->sql_query($query);
if ($res <= 0) {
echo "<H3> Error in query! {$query} </H3>\n";
exit;
}
$i = 0;
$str = '';
while ($row = mysql_fetch_assoc($res)) {
$name = getPilotRealName($row["userID"], $row["userServerID"], 0, 0, 0);
$link = htmlspecialchars("http://" . $_SERVER['SERVER_NAME'] . getLeonardoLink(array('op' => 'show_flight', 'flightID' => $row['ID'])));
$this_year = substr($row[DATE], 0, 4);
$linkIGC = htmlspecialchars("http://" . $_SERVER['SERVER_NAME'] . getRelMainDir() . str_replace("%PILOTID%", getPilotID($row["userServerID"], $row["userID"]), str_replace("%YEAR%", $this_year, $CONF['paths']['igc'])) . '/' . $row['filename']);
//$flightsRelPath."/".$row[userID]."/flights/".$this_year."/".$row[filename] );
if ($row['takeoffVinicity'] > $takeoffRadious) {
$location = getWaypointName($row['takeoffID']) . " [~" . sprintf("%.1f", $row['takeoffVinicity'] / 1000) . " km]";
} else {
$location = getWaypointName($row['takeoffID']);
}
$flight = new flight();
$flight->getFlightFromDB($row['ID'], 0, $row);
$extendedInfo = 0;
$lineColor = "ff0000";
$exaggeration = 1;
$lineWidth = 2;
$getFlightKML = $flight->getFlightKML() . "&c={$lineColor}&w={$lineWidth}&an={$extendedInfo}";
开发者ID:Peter2121,项目名称:leonardoxc,代码行数:31,代码来源:download.php
示例4: GLatLng
map.enableScrollWheelZoom();
map.setCenter (new GLatLng(lat,lon), 8, <?php
echo $GMapType;
?>
);
//----------------------------------------------------------------------
// Dynamic load of flight tracks
//----------------------------------------------------------------------
var flightLinkTemplate="<a href='<?php
echo htmlspecialchars("http://" . $_SERVER['SERVER_NAME'] . getLeonardoLink(array('op' => 'show_flight', 'flightID' => 'xxx')));
?>
' target='_top'><?php
echo _See_more_details;
?>
</a>";
function createFlightMarker(point, id , pilotName) {
var marker = new GMarker(point,flightTakeoffIcon);
var flightLink=flightLinkTemplate.replace("xxx",id);
GEvent.addListener(marker, "click", function() {
loadFlightTrack(id,point);
flightMarkers[id].openInfoWindowHtml("<img src='img/ajax-loader.gif'>");
$.ajax({ url: 'GUI_EXT_flight_info.php?op=info_short&flightID='+id, dataType: 'html',
success: function(data) {
开发者ID:WooSeungho,项目名称:leonardoxc,代码行数:31,代码来源:EXT_google_maps_browser.php
示例5: listFlights
function listFlights($res, $legend, $queryExtraArray = array(), $sortOrder = "DATE")
{
global $db, $Theme;
global $takeoffRadious;
global $userID, $serverID;
global $NACclubID;
global $clubID, $clubFlights, $clubsList, $add_remove_mode;
global $moduleRelPath;
global $PREFS, $CONF;
global $page_num, $pagesNum, $startNum, $itemsNum;
global $currentlang, $nativeLanguage, $opMode;
global $CONF_photosPerFlight, $CONF_use_validation, $CONF_airspaceChecks;
global $CONF_new_flights_days_threshold;
global $gliderCatList;
$clubIcon = "<img src='" . $moduleRelPath . "/img/icon_club_small.gif' width=12 height=12 border=0 align='absmiddle' >";
$removeFromClubIcon = "<img src='" . $moduleRelPath . "/img/icon_club_remove.gif' width=22 height=12 border=0 align='absmiddle' title='Remove flight from this league'>";
$addToClubIcon = "<img src='" . $moduleRelPath . "/img/icon_club_add.gif' width=12 height=12 border=0 align='absmiddle' title='Add flight to this league'>";
if ($clubID && (L_auth::isClubAdmin($userID, $clubID) || L_auth::isAdmin($userID))) {
?>
<script language="javascript">
function addClubFlight(clubID,flightID) {
$("#updateDiv").load('<?php
echo $moduleRelPath;
?>
/EXT_club_functions.php?op=add&clubID='+clubID+'&flightID='+flightID);
$('#fl_'+flightID).html("<a href=\"#\" onclick=\"removeClubFlight("+clubID+","+flightID+");return false;\"><?php
echo $removeFromClubIcon;
?>
</a>");
}
function removeClubFlight(clubID,flightID) {
$("#updateDiv").load('<?php
echo $moduleRelPath;
?>
/EXT_club_functions.php?op=remove&clubID='+clubID+'&flightID='+flightID);
$('#fl_'+flightID).html("<a href=\"#\" onclick=\"addClubFlight("+clubID+","+flightID+");return false;\"><?php
echo $addToClubIcon;
?>
</a>");
}
</script>
<?php
echo "<div class='tableInfo shadowBox'>You can administer this club ";
if ($clubsList[$clubID]['addManual']) {
if ($add_remove_mode) {
$queryExtraArray['admClub'] = '0';
echo "<a href='" . getLeonardoLink(array('op' => 'list_flights', 'sortOrder' => $sortOrder) + $queryExtraArray) . "'>Return to normal view</a>";
} else {
$queryExtraArray['admClub'] = '1';
echo "<a href='" . getLeonardoLink(array('op' => 'list_flights', 'sortOrder' => $sortOrder) + $queryExtraArray) . "'>Add / remove flights</a>";
}
}
echo "<div id='updateDiv' style='display:block'></div>";
echo "</div>";
}
?>
<table class='listTable' style='clear:both' width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class='SortHeader indexCell' width="25"><?php
echo _NUM;
?>
</td>
<?php
printHeader(60, $sortOrder, "DATE", _DATE_SORT, $queryExtraArray);
printHeader(160, $sortOrder, "pilotName", _PILOT, $queryExtraArray);
printHeader(0, $sortOrder, "takeoffID", _TAKEOFF, $queryExtraArray);
printHeader(40, $sortOrder, "DURATION", _DURATION_HOURS_MIN, $queryExtraArray);
if ($CONF['list_flights']['fields']['scoring'][0] == 'LINEAR_DISTANCE') {
printHeader(60, $sortOrder, "LINEAR_DISTANCE", _LINEAR_DISTANCE, $queryExtraArray);
} else {
printHeader(60, $sortOrder, "SCORE_SPEED", _MEAN_SPEED1, $queryExtraArray);
}
printHeader(60, $sortOrder, "FLIGHT_KM", _OLC_KM, $queryExtraArray);
printHeader(65, $sortOrder, "FLIGHT_POINTS", _OLC_SCORE, $queryExtraArray);
?>
<td width="18" class='SortHeader'> </td>
<td width="50" class='SortHeader'> </td>
<td width="70" class='SortHeader displayCell alLeft'><?php
echo _SHOW;
?>
</td>
</tr>
<?php
$i = 1;
$currDate = "";
while ($row = $db->sql_fetchrow($res)) {
$is_private = $row["private"];
$flightID = $row['ID'];
if ($pilotNames[$row["userServerID"] . '_' . $row["userID"]]) {
$name = $pilotNames[$row["userServerID"] . '_' . $row["userID"]];
} else {
$name = getPilotRealName($row["userID"], $row["userServerID"], 1);
$pilotNames[$row["userServerID"] . '_' . $row["userID"]] = $name;
}
$name = prepare_for_js($name);
//.........这里部分代码省略.........
开发者ID:Peter2121,项目名称:leonardoxc,代码行数:101,代码来源:GUI_list_flights.php
示例6: list
</select>
<input type="button" name="SubmitButton" id="SubmitButton" onclick='addTakeoffToArea()' value="Add takeoff to Area" />
<input type="hidden" name="addTakeoffForm" value="1" /></td>
</tr>
<tr>
<td colspan="2" bgcolor="#E3F2F1"><div id ='resDiv'><BR /><BR /></div></td>
</tr>
</table>
</form>
<h3>List of takeoffs that belong to this area</h3><BR />
<table class='stripeMe' id='takeoffList'>
<?php
list($takeoffs, $takeoffsID) = area::getTakeoffs($areaID);
$i = 0;
foreach ($takeoffs as $name) {
$takeoffID = $takeoffsID[$i];
echo "<tr id='row_{$takeoffID}'><td>{$name}</td><td><div class='removeTakeoff' id='{$takeoffID}'>Remove Takeoff from area</div></td></tr>";
$i++;
}
?>
</table>
<?php
echo "<div align=center><a href='" . getLeonardoLink(array('op' => 'area_admin', 'areaAction' => 'none', 'areaID' => 0)) . "'>RETURN TO LIST</a> </div><BR>";
closeMain();
}
}
}
开发者ID:Peter2121,项目名称:leonardoxc,代码行数:31,代码来源:GUI_area_admin.php
示例7: getLeonardoLink
echo getLeonardoLink(array('op' => 'useCurrent', 'brandID' => '0'));
?>
'><?php
echo _Display_ALL;
?>
</a>
</div>
</td>
</tr>
</table>
<?php
} else {
echo "<ul>\n<li><a href='" . ($catLink = getLeonardoLink(array('op' => 'useCurrent', 'brandID' => '0')) . "'>" . _All_Brands . "</a></li>");
foreach ($brandsListFilter as $brandNameFilter => $brandIDfilter) {
echo "<li><a href='" . ($catLink = getLeonardoLink(array('op' => 'useCurrent', 'brandID' => $brandIDfilter)) . "'>{$brandNameFilter}</a></li>");
}
echo "</ul>\n";
}
?>
</div>
</div>
<div id="newsDropDownID" class="secondMenuDropLayer" >
<div class='closeButton closeLayerButton'></div>
<div class='content' style='padding:5px;'>
<a href='<?php
echo $thisURL;
?>
'><?php
echo leoHtml::img("icon_bookmark.gif", 0, 0, 'absmiddle', _This_is_the_URL_of_this_page, 'icons1');
开发者ID:Peter2121,项目名称:leonardoxc,代码行数:31,代码来源:MENU_second_menu.php
示例8: dirname
//
//************************************************************************
require_once dirname(__FILE__) . '/CL_area.php';
$areaID = makeSane($_GET['areaID'], 1);
openMain(_Flying_Areas, 0, 'icon_takeoff.gif');
?>
<table class=main_text width="564" border="0" align="center" cellpadding="3" cellspacing="1">
<tr>
<td><?php
echo _Name_of_Area;
?>
</td>
<td> </td>
</tr>
<?php
$query = "SELECT * FROM {$areasTable} WHERE areaType=0 ORDER BY name";
// $query="SELECT * FROM $areasTable ORDER BY name";
// echo $query;
$res = $db->sql_query($query);
if ($res <= 0) {
echo "No areas found <BR>";
}
while ($row = $db->sql_fetchrow($res)) {
echo "<tr> \n <td>" . $row['name'] . "</td>\n\t <td> ";
echo "<a href='" . getLeonardoLink(array('op' => 'area_show', 'areaID' => $row['ID'])) . "'>" . _See_area_details . "</a>";
echo "</td></tr> \n";
}
echo "</table>";
closeMain();
return;
开发者ID:Peter2121,项目名称:leonardoxc,代码行数:31,代码来源:GUI_list_areas.php
示例9: exportXML
function exportXML($forceProtocol = '')
{
global $CONF_server_id, $CONF_photosPerFlight, $CONF;
if ($forceProtocol == '') {
if ($CONF['sync']['protocol']['format'] == 'JSON') {
$useJSON = 1;
require_once dirname(__FILE__) . '/lib/json/CL_json.php';
} else {
$useJSON = 0;
}
} else {
if ($forceProtocol == 'XML') {
$useJSON = 0;
} else {
$useJSON = 1;
}
}
$link = htmlspecialchars("http://" . $_SERVER['SERVER_NAME'] . getLeonardoLink(array('op' => 'show_waypoint', 'waypointIDview' => $this->waypointID)));
if (!$useJSON) {
return "<waypoint>\n<id>" . htmlspecialchars($this->waypointID) . "</id>\n<name>" . htmlspecialchars($this->name) . "</name>\n<intName>" . htmlspecialchars($this->intName) . "</intName>\n<location>" . htmlspecialchars($this->location) . "</location>\n<intLocation>" . htmlspecialchars($this->intLocation) . "</intLocation>\n<countryCode>" . htmlspecialchars($this->countryCode) . "</countryCode>\n<type>" . htmlspecialchars($this->type) . "</type>\n<lat>" . htmlspecialchars($this->lat()) . "</lat>\n<lon>" . htmlspecialchars($this->lon()) . "</lon>\n<link>" . htmlspecialchars($this->link) . "</link>\n<displayLink>" . $link . "</displayLink>\n<description>" . htmlspecialchars($this->description) . "</description>\n<modifyDate>" . htmlspecialchars($this->modifyDate) . "</modifyDate>\n</waypoint>";
} else {
return '{
"waypoint": {
"id" : ' . ($this->waypointID + 0) . ',
"name" : "' . json::prepStr($this->name) . '",
"intName" : "' . json::prepStr($this->intName) . '",
"location" : "' . json::prepStr($this->location) . '",
"intLocation" : "' . json::prepStr($this->intLocation) . '",
"countryCode" : "' . json::prepStr($this->countryCode) . '",
"type" : ' . ($this->type + 0) . ',
"lat" : ' . $this->lat() . ',
"lon" : ' . $this->lon() . ',
"link" : "' . json::prepStr($this->link) . '",
"displayLink" : "' . json::prepStr($link) . '",
"description" : "' . json::prepStr($this->description) . '",
"modifyDate" : "' . json::prepStr($this->modifyDate) . '"
}
}';
}
}
开发者ID:Peter2121,项目名称:leonardoxc,代码行数:40,代码来源:CL_gpsPoint.php
示例10: foreach
</td>
</tr>
<tr>
<td colspan=<?php
echo $num_of_cols;
?>
height=8 class="datesColumn" >
<ul class='simpleList'>
<?php
foreach ($clubsList as $clubsItem) {
if ($clubsItem['id'] == $clubID) {
$a_class = "class='boldFont'";
} else {
$a_class = "";
}
echo "<li {$a_class}><a href='#' onclick='showClubDetails(" . $clubsItem['id'] . ")'>\n\t\t\t" . leoHtml::img("icon_info.png", 0, 0, 'absmiddle', _Club . " " . $clubsItem['desc'], 'icons1') . "</a>\n\t\t\t<a {$a_class} href='" . getLeonardoLink(array('op' => 'useCurrent', 'clubID' => $clubsItem['id'], 'nacclubid' => '0', 'nacid' => '0')) . "'>" . $clubsItem['desc'] . "</a></li>\n";
}
?>
</ul>
</td>
</tr>
</TABLE>
<?php
}
?>
</td></tr></table>
<div id='filterResultDiv'></div>
</div>
开发者ID:Peter2121,项目名称:leonardoxc,代码行数:31,代码来源:MENU_clubs.php
示例11: makeSane
//
// $Id: GUI_user_prefs.php,v 1.9 2010/03/14 20:56:11 manolis Exp $
//
//************************************************************************
if (isset($_REQUEST['updatePrefs'])) {
// submit form
$PREFS->themeName = makeSane($_POST['PREFS_themeName'], 0);
$PREFS->itemsPerPage = makeSane($_POST['PREFS_itemsPerPage'], 1);
$PREFS->metricSystem = makeSane($_POST['PREFS_metricSystem']);
$PREFS->language = makeSane($_POST['PREFS_language']);
$_SESSION["lng"] = $PREFS->language;
$PREFS->viewCat = makeSane($_POST['PREFS_viewCat'], 1);
$_SESSION["cat"] = $PREFS->viewCat;
$PREFS->viewCountry = makeSane($_POST['PREFS_viewCountry']);
$_SESSION["country"] = $PREFS->viewCountry;
echo "<div align=center>" . _Your_settings_have_been_updated . "<br><br><a href='" . getLeonardoLink(array('op' => 'list_flights')) . "'>" . _RETURN_TO_FLIGHTS . "</a><br><br></div>";
}
?>
<form name=userPrefs method="POST" >
<?php
openMain(_MENU_MY_SETTINGS, 0, "icon_profile.png");
?>
<table width="100%" border="0" bgcolor="#F4F3F1" cellpadding="3" align="left" class="box main_text" style="background-color:#F4F3F1">
<tr>
<td colspan="3" > </td>
</tr>
<tr>
<td width="284" bgcolor="#E0E2F0"><div align="right"><?php
echo _THEME;
?>
开发者ID:Peter2121,项目名称:leonardoxc,代码行数:31,代码来源:GUI_user_prefs.php
示例12: hideSameFlights
function hideSameFlights()
{
// now is a good time to disable duplicate flights we have found from other servers
// AND are from the same user (using pilot's mapping table to find that out)
// addition: 2008/07/21 we search for all flight no only from same user/server
global $db, $flightsTable;
$query = "SELECT serverID,ID,externalFlightType, FROM {$flightsTable}\n\t\t\t\t\tWHERE hash='" . $this->hash . "' AND userID=" . $this->userID . " AND userServerID=" . $this->userServerID . " ORDER BY serverID ASC, ID ASC";
$query = "SELECT serverID,ID,externalFlightType,userID,userServerID FROM {$flightsTable}\n\t\t\tWHERE hash='" . $this->hash . "' ORDER BY serverID ASC, ID ASC";
// echo $query;
$res = $db->sql_query($query);
if ($res <= 0) {
DEBUG("FLIGHT", 1, "flightData: Error in query: {$query}<br>");
return array();
// no duplicate found
}
// we must disable all flights BUT one
// rules:
// 1. locally submitted flights have priority
// 2. between external flights , the full synced have priority over simple links
// 3. between equal cases the first submitted has priority.
$i = 0;
while ($row = $db->sql_fetchrow($res)) {
$fList[$i] = $row;
$i++;
}
if ($i == 0) {
return array();
// no duplicate found
}
usort($fList, "sameFlightsCmp");
$i = 0;
$msg = '';
foreach ($fList as $i => $fEntry) {
if (0) {
echo "<pre>";
echo "-------------------------<BR>";
print_r($fEntry);
echo "-------------------------<BR>";
echo "</pre>";
}
if ($i == 0) {
// enable
$msg .= " Enabling ";
$query = "UPDATE {$flightsTable} SET private = private & (~0x02 & 0xff ) WHERE ID=" . $fEntry['ID'];
} else {
// disable
$msg .= " Disabling ";
$query = "UPDATE {$flightsTable} SET private = private | 0x02 WHERE ID=" . $fEntry['ID'];
}
$msg .= " <a href='http://" . $_SERVER['SERVER_NAME'] . getLeonardoLink(array('op' => 'show_flight', 'flightID' => $fEntry['ID'])) . "'>Flight " . $fEntry['ID'] . "</a> from <a href='http://" . $_SERVER['SERVER_NAME'] . getLeonardoLink(array('op' => 'pilot_profile', 'pilotIDview' => $fEntry['userServerID'] . '_' . $fEntry['userID'])) . "'>PILOT " . $fEntry['userServerID'] . '_' . $fEntry['userID'] . "</a><BR>\n";
$res = $db->sql_query($query);
# Error checking
if ($res <= 0) {
echo "<H3> Error in query: {$query}</H3>\n";
}
$i++;
}
// now also make a test to see if all flights are from same user (alien mapped to local)
// if not , send a mail to admin to warn him and suggest a new mapping
$pList = array();
foreach ($fList as $i => $fEntry) {
$pList[$fEntry['userServerID'] . '_' . $fEntry['userID']]++;
}
if (count($pList) > 1) {
// more than one pilot involved in this
sendMailToAdmin("Duplicate flights", $msg);
//echo "Duplicate flights".$msg;
}
/*
foreach ($disableFlightsList as $dFlightID=>$num) {
$query="UPDATE $flightsTable SET private = private | 0x02 WHERE ID=$dFlightID ";
$res= $db->sql_query($query);
# Error checking
if($res <= 0){
echo("<H3> Error in query: $query</H3>\n");
}
}
foreach ($enableFlightsList as $dFlightID=>$num) {
$query="UPDATE $flightsTable SET private = private & (~0x02 & 0xff ) WHERE ID=$dFlightID ";
$res= $db->sql_query($query);
# Error checking
if($res <= 0){
echo("<H3> Error in query: $query</H3>\n");
}
}*/
}
开发者ID:Peter2121,项目名称:leonardoxc,代码行数:86,代码来源:CL_flightData.php
示例13: getAddFlightErrMsg
function getAddFlightErrMsg($result, $flightID)
{
$callingURL = "http://" . $_SERVER['SERVER_NAME'];
if (is_array($flightID)) {
$flightID = $flightID[0]['ID'];
}
switch ($result) {
case ADD_FLIGHT_ERR_YOU_HAVENT_SUPPLIED_A_FLIGHT_FILE:
$errMsg = _YOU_HAVENT_SUPPLIED_A_FLIGHT_FILE;
break;
case ADD_FLIGHT_ERR_NO_SUCH_FILE:
$errMsg = _NO_SUCH_FILE;
break;
case ADD_FLIGHT_ERR_FILE_DOESNT_END_IN_IGC:
$errMsg = _FILE_DOESNT_END_IN_IGC;
break;
case ADD_FLIGHT_ERR_THIS_ISNT_A_VALID_IGC_FILE:
$errMsg = _THIS_ISNT_A_VALID_IGC_FILE;
break;
case ADD_FLIGHT_ERR_SAME_DATE_FLIGHT:
$errMsg = _THERE_IS_SAME_DATE_FLIGHT . "<br><br>" . _IF_YOU_WANT_TO_SUBSTITUTE_IT . " " . "<a href='{$callingURL}" . getLeonardoLink(array('op' => 'show_flight', 'flightID' => $flightID)) . "'>" . _DELETE_THE_OLD_ONE . "</a>";
break;
case ADD_FLIGHT_ERR_SAME_FILENAME_FLIGHT:
$errMsg = _THERE_IS_SAME_FILENAME_FLIGHT . "<br><br>" . _IF_YOU_WANT_TO_SUBSTITUTE_IT . " " . "<a href='{$callingURL}" . getLeonardoLink(array('op' => 'show_flight', 'flightID' => $flightID)) . "'>" . _DELETE_THE_OLD_ONE . "</a><br><br>" . _CHANGE_THE_FILENAME;
break;
case ADD_FLIGHT_ERR_SAME_HASH_FLIGHT:
$errMsg = _THERE_IS_SAME_DATE_FLIGHT . " (HASH) <br><br>" . _IF_YOU_WANT_TO_SUBSTITUTE_IT . " " . "<a href='{$callingURL}" . getLeonardoLink(array('op' => 'show_flight', 'flightID' => $flightID)) . "'>" . _DELETE_THE_OLD_ONE . "</a>";
break;
case ADD_FLIGHT_ERR_DATE_IN_THE_FUTURE:
$errMsg = "The date of the flight is in the future<BR>Please use the Year-month-day not the US Year-day-month format";
break;
case ADD_FLIGHT_ERR_OUTSIDE_SUBMIT_WINDOW:
$errMsg = _OUTSIDE_SUBMIT_WINDOW;
break;
}
return $errMsg;
}
开发者ID:Peter2121,项目名称:leonardoxc,代码行数:37,代码来源:FN_flight.php
示例14: foreach
</div>';
$tkStr .= '
</ul>
</div>';
$sel_years = "";
for ($i = date("Y"); $i >= 2000; $i--) {
if ($i == date("Y")) {
$sel = " selected";
} else {
$sel = "";
}
$sel_years .= "<option value='{$i}' {$sel}>{$i}</option>\n";
}
$sel_cat = "";
foreach ($CONF_glider_types as $gl_id => $gl_type) {
if ($gl_id == $CONF_default_cat_view) {
$is_type_sel = "selected";
} else {
$is_type_sel = "";
}
$sel_cat .= "<option {$is_type_sel} value={$gl_id}>" . $gliderCatList[$gl_id] . "</option>\n";
}
if (!$CONF_use_htc_ie_hack) {
$Ltemplate->assign_block_vars('ieHoverJS', array());
}
if ($userID > 0) {
$Ltemplate->assign_block_vars('myMenu', array('LINK_MY_FLIGHTS' => getLeonardoLink(array('op' => 'list_flights', 'pilotID' => $userID, 'takeoffID' => '0', 'country' => '0', 'year' => '0', 'month' => '0', 'season' => '0')), 'LINK_MY_PROFILE' => getLeonardoLink(array('op' => 'pilot_profile', 'pilotIDview' => $userID)), 'LINK_MY_STATS' => getLeonardoLink(array('op' => 'pilot_profile_stats', 'pilotIDview' => $userID)), 'LINK_MY_SETTINGS' => getLeonardoLink(array('op' => 'user_prefs'))));
}
$Ltemplate->assign_vars(array('lgStr' => $lgStr, 'ctStr' => $ctStr, 'tkStr' => $tkStr, 'YEARS_OPTION' => $sel_years, 'CATS_OPTION' => $sel_cat, 'LINK_SITES_GUIDE' => getLeonardoLink(array('op' => 'sites')), 'LINK_SHOW_LAST_ADDED' => getLeonardoLink(array('op' => 'list_flights', 'sortOrder' => 'dateAdded', 'year' => '0', 'month' => '0', 'season' => '0', 'country' => '0', 'takeoffID' => '0', 'pilotID' => '0')), 'LINK_SHOW_PILOTS' => getLeonardoLink(array('op' => 'list_pilots', 'comp' => '0')), 'LINK_SUBMIT_FLIGHT' => getLeonardoLink(array('op' => 'add_flight')), 'SHOW_LEAGUE_URL' => getLeonardoLink(array('op' => 'competition', 'country' => '%country%', 'year' => '%year%', 'month' => '0', 'cat' => '%cat%')), 'SHOW_FLIGHTS_URL' => getLeonardoLink(array('op' => 'list_flights', 'country' => '%country%', 'year' => '%year%', 'month' => '0', 'cat' => '%cat%', 'takeoffID' => '0', 'pilotID' => '0')), 'SHOW_TAKEOFFS_URL' => getLeonardoLink(array('op' => 'list_takeoffs', 'country' => '%country%', 'takeoffID' => '0', 'pilotID' => '0', 'year' => '0', 'month' => '0', 'cat' => '0'))));
$Ltemplate->pparse('body');
$noFooterMenu = 1;
开发者ID:Peter2121,项目名称:leonardoxc,代码行数:31,代码来源:GUI_index_full.php
示例15: MAX
echo _SITE_RECORD;
?>
</b>:
<?php
$query = "SELECT MAX(MAX_LINEAR_DISTANCE) as record_km, ID FROM {$flightsTable} WHERE takeoffID =" . $waypointIDview . " GROUP BY ID ORDER BY record_km DESC ";
$flightNum = 0;
$res = $db->sql_query($query);
if ($res > 0) {
$flightNum = mysql_num_rows($res);
$row = mysql_fetch_assoc($res);
echo "<a href='http://" . $_SERVER['SERVER_NAME'] . getLeonardoLink(array('op' => 'show_flight', 'flightID' => $row['ID'])) . "'>" . formatDistance($row['record_km'], 1) . "</a>";
}
?>
<p>
<strong><?php
echo "<a href='" . getLeonardoLink(array('op' => 'list_flights', 'takeoffID' => $waypointIDview)) . "'>" . _See_flights_near_this_point . " [ " . $flightNum . " ]</a>";
?>
</strong>
</td>
<td rowspan="3" class="col2_in"><p><strong>lat/lon (WGS84):</strong><br>
<?php
echo $wpInfo->lat . " , " . -$wpInfo->lon;
echo "<br>" . $wpInfo->getLatMinDec() . " , " . $wpInfo->getLonMinDec();
echo "<br>" . $wpInfo->getLatDMS() . " , " . $wpInfo->getLonDMS();
echo "<p>";
list($UTM_X, $UTM_Y, $UTMzone, $UTMlatZone) = $wpInfo->getUTM();
echo "<b>UTM:</b> {$UTMzone}{$UTMlatZone} X: " . floor($UTM_X) . " Y: " . floor($UTM_Y);
?>
</td>
<td class="col3_in"><div align="center"><strong><?php
echo "<a href='" . getDownloadLink(array('type' => 'kml_wpt', 'wptID' => $waypointIDview)) . "'>" . _Navigate_with_Google_Earth . "</a>";
开发者ID:Peter2121,项目名称:leonardoxc,代码行数:31,代码来源:GUI_waypoint_show.php
示例16: getLeonardoLink
}
//echo '<td class="datesColumn" valign="top">';
echo $seasonStr;
//echo '</td>';
} else {
if ($CONF['years']['use_calendar_years']) {
for ($i = $CONF['years']['end_year']; $i >= $CONF['years']['start_year']; $i--) {
echo '<tr><td class="datesColumn" valign="top">';
echo "<a href='" . getLeonardoLink(array('op' => 'useCurrent', 'season' => 0, 'year' => $i, 'month' => '0', 'day' => '0')) . "'>{$i}</a>";
echo '</td></tr>';
}
if (!$CONF['years']['dont_show_all_years']) {
echo '<tr><td class="datesColumn" valign="top">';
?>
<a style='text-decoration:underline;' href='<?php
echo getLeonardoLink(array('op' => 'useCurrent', 'season' => '0', 'year' => '0', 'month' => '0', 'day' => '0'));
?>
'><?php
echo _ALL_YEARS;
?>
</a>
<?php
echo '</td></tr>';
}
}
}
?>
</TABLE>
<?php
开发者ID:Peter2121,项目名称:leonardoxc,代码行数:31,代码来源:MENU_dates.php
示例17: convertCat
// disable any private/disabled and airspace invalid flight from WXC score
if ($row['private'] > 0) {
$row['NacStatus'] = "d";
}
//in case of detected airspace violation, pilot might still have approval for that airspace... so we allow sync when word "approved" is set at comment first
if ($row['airspaceCheckFinal'] == "-1" && strtolower(substr($row['airspaceCheckMsg'], 0, 8) != "approved")) {
$row['NacStatus'] = "d";
}
$row['GliderCat'] = convertCat($row['cat'], $row['category']);
if ($row['serverID'] == 0 || $row['serverID'] == $CONF_server_id) {
$isLocal = 1;
} else {
$isLocal = 0;
}
if ($isLocal) {
$row['FlightUrl'] = "http://" . $_SERVER['SERVER_NAME'] . getLeonardoLink(array('op' => 'show_flight', 'flightID' => $row['NacFlightId']));
} else {
if ($row['serverID'] != 0 && !$row['originalURL']) {
if ($CONF['servers']['list'][$row['serverID']]['isLeo'] == 1) {
if (!$row['originalURL']) {
$row['originalURL'] = 'http://' . $CONF['servers']['list'][$row['serverID']]['url'] . '&op=show_flight&flightID=' . $row['original_ID'];
}
}
}
$row['FlightUrl'] = $row['originalURL'];
}
$row['FlightUrl'] = htmlspecialchars($row['FlightUrl']);
$trackPath = getRelMainDir() . str_replace("%PILOTID%", getPilotID($row["userServerID"], $row["userID"]), str_replace("%YEAR%", substr($row['DATE'], 0, 4), $CONF['paths']['igc'])) . '/' . rawurlencode($row['filename']);
$row['IgcUrl'] = "http://" . $_SERVER['SERVER_NAME'] . $trackPath;
// the pilot id is serverid_pilotid to be able to distinguish ids across servers
//0_12345
开发者ID:Peter2121,项目名称:leonardoxc,代码行数:31,代码来源:syncWXC2.php
示例18: floor
if ($countriesNum && 0) {
$percent = floor(100 / $num_of_cols);
for ($r = 0; $r < $num_of_rows; $r++) {
$sortRowClass = $ii % 2 ? "l_row1" : "l_row2";
$ii++;
echo "\n\n<tr class='{$sortRowClass}'>";
for ($c = 0; $c < $num_of_cols; $c++) {
// echo "<td style='width:".$countriesDivWidth."px'>";
echo "<td class='countryList' width='{$percent}%'>";
//compute which to show
//echo "c=$c r=$r i=$i<br>";
$i = $c * $num_of_rows + $r % $num_of_rows;
if ($i < $countriesNum) {
$countryName = $countriesNames[$i];
$countryName = trimText($countryName, 20);
$linkTmp = getLeonardoLink(array('op' => 'useCurrent', 'country' => $countriesCodes[$i]));
echo "<a href='{$linkTmp}'>{$countryName}</a>\n";
/*
if ($currentlang=='hebrew')
echo "<a href='$linkTmp'>(".$countriesFlightsNum[$i].") $countryName</a>\n";
else
echo "<a href='$linkTmp'>$countryName (".$countriesFlightsNum[$i].")</a>\n";
*/
} else {
echo " ";
}
echo "</td>";
}
echo '</tr>';
}
}
开发者ID:Peter2121,项目名称:leonardoxc,代码行数:31,代码来源:MENU_countries.php
示例19: makeSane
<?php
//************************************************************************
// Leonardo XC Server, http://www.leonardoxc.net
//
// Copyright (c) 2004-2010 by Andreadakis Manolis
//
// 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.
//
// $Id: GUI_flight_delete.php,v 1.12 2010/03/14 20:56:11 manolis Exp $
//
//************************************************************************
$flightID = makeSane($_REQUEST["flightID"], 1);
$confirmed = makeSane($_REQUEST["confirmed"]);
$flight = new flight();
$flight->getFlightFromDB($flightID);
if ($confirmed && ($flight->belongsToUser($userID) || L
|
请发表评论