本文整理汇总了PHP中makeSane函数的典型用法代码示例。如果您正苦于以下问题:PHP makeSane函数的具体用法?PHP makeSane怎么用?PHP makeSane使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了makeSane函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1:
$op=makeSane($_GET['op1']);
if (!in_array($op,array("create_pdf")) ) return;
// $SERVER_URL='';
if ($op=="create_pdf") {
$direct=$_GET['direct']+0;
$remote=$_GET['remote']+0;
if ($userID <=0 || $remote) {
//echo "Not valid user";
// exit;
$userID =makeSane($_GET['userIDnotify']);
$userEmail=makeSane($_GET['userEmailNotify'],2);
unset($_GET['userIDnotify']);
unset($_GET['userEmailNotify']);
} else {
require_once "CL_user.php";
$userEmail=LeoUser::getEmail($userID);
}
unset($_GET['op1']);
unset($_GET['direct']);
unset($_GET['remote']);
$url="http://".urldecode($_GET['url']);
foreach($_GET as $name=>$val ) {
开发者ID:WooSeungho,项目名称:leonardoxc,代码行数:31,代码来源:EXT_helper.php
示例2: while
if ($res <= 0) {
echo "</search>";
return;
}
$i = 0;
while ($row = mysql_fetch_assoc($res)) {
$resWaypoint = new waypoint($row["ID"]);
$resWaypoint->getFromDB();
echo $resWaypoint->exportXML('XML');
$i++;
}
mysql_freeResult($res);
echo "</search>";
} else {
if ($op == 'get_country_takeoffs') {
$countryCode = makeSane(substr($_REQUEST['countryCode'], 0, 2));
if (!$countryCode) {
echo "{ }";
exit;
}
$query = "SELECT * from {$waypointsTable} WHERE type=1000 AND countryCode='{$countryCode}' ORDER BY name ASC";
$res = $db->sql_query($query);
if ($res <= 0) {
echo "<H3>Error in geting takeoffs</H3>\n";
}
while ($row = mysql_fetch_assoc($res)) {
// echo "<option value='".$row['ID']."' >".$row['ID'].' - '.$row['name']."</option>\n";
$row2[$row['ID']] = $row['countryCode'] . ' - ' . $row['name'] . ' [' . $row['ID'] . ']';
}
$str = ' { ';
if ($row2) {
开发者ID:Peter2121,项目名称:leonardoxc,代码行数:31,代码来源:EXT_takeoff.php
示例3: makeSane
$flightID = makeSane($_REQUEST['flightID'], 1);
//echo $_SERVER['QUERY_STRING'];
DEBUG("DL", 1, "Will serve flight {$flightID}<BR>");
$flight = new flight();
$flight->getFlightFromDB($flightID);
$xml = $flight->createGPXfile();
$file_name = $flight->filename . ".xml";
DEBUG("DL", 1, "GPX Filepath= {$file_path}<BR>");
} else {
if ($type == "kml_wpt") {
$waypointID = makeSane($_REQUEST['wptID'], 1);
$xml = makeKMLwaypoint($waypointID);
$file_name = $waypointID . '.kml';
} else {
if ($type == "sites") {
$sites = makeSane($_GET['sites']);
$sitesList = explode(",", $sites);
// $xml='<?xml version="1.0" encoding="'.$langEncodings[$currentlang].'"? >'.
$xml = '<?xml version="1.0" encoding="UTF-8"?>' . '<kml xmlns="http://earth.google.com/kml/2.1">\\n
<Folder>
<name>Leonardo Site List</name>';
foreach ($sitesList as $waypointID) {
list($xml_str, $countryCode) = makeWaypointPlacemark($waypointID, 1);
if (!is_array($takeoffs[$countryCode])) {
$takeoffs[$countryCode] = array();
}
array_push($takeoffs[$countryCode], $xml_str);
}
foreach ($takeoffs as $countryCode => $countrySites) {
$xml .= "<Folder>\n<name>" . $countries[$countryCode] . "</name>\n";
foreach ($countrySites as $siteXml) {
开发者ID:Peter2121,项目名称:leonardoxc,代码行数:31,代码来源:download.php
示例4: makeSane
$countryCodeQuery = 1;
} else {
$pilotsTableQuery = 1;
if (strpos($filter_clause, " countryCode")) {
$countryCodeQuery = 1;
} else {
$countryCodeQuery = 0;
}
}
}
if (!strpos($filter_clause, $pilotsTable . ".Sex") === false) {
$pilotsTableQuery = 1;
}
$where_clause .= $filter_clause;
if ($clubID) {
$add_remove_mode = makeSane($_REQUEST['admClub'], 1);
$queryExtraArray += array("admClub" => $add_remove_mode);
require dirname(__FILE__) . "/INC_club_where_clause.php";
}
if ($countryCodeQuery || $country) {
$where_clause .= " AND {$flightsTable}.takeoffID={$waypointsTable}.ID ";
$extra_table_str .= "," . $waypointsTable;
} else {
$extra_table_str .= "";
}
if ($pilotsTableQuery2 && !$pilotsTableQueryIncluded) {
$where_clause2 = " AND {$flightsTable}.userID={$pilotsTable}.pilotID AND {$flightsTable}.userServerID={$pilotsTable}.serverID ";
$extra_table_str2 .= ",{$pilotsTable}";
}
if ($pilotsTableQuery && !$pilotsTableQuery2 && !$pilotsTableQueryIncluded) {
$where_clause .= " AND {$flightsTable}.userID={$pilotsTable}.pilotID AND {$flightsTable}.userServerID={$pilotsTable}.serverID ";
开发者ID:Peter2121,项目名称:leonardoxc,代码行数:31,代码来源:GUI_list_flights.php
示例5: dirname
//
// $Id: EXT_processKML.php,v 1.6 2010/03/14 20:56:10 manolis Exp $
//
//************************************************************************
require_once dirname(__FILE__) . "/EXT_config_pre.php";
require_once "config.php";
require_once "EXT_config.php";
require_once "CL_flightData.php";
require_once "FN_functions.php";
require_once "FN_UTM.php";
require_once "FN_waypoint.php";
require_once "FN_output.php";
require_once "FN_pilot.php";
require_once "FN_flight.php";
setDEBUGfromGET();
$op = makeSane($_REQUEST['op']);
if (!$op) {
$op = "getKML";
}
if (!in_array($op, array("getKML"))) {
return;
}
$encoding = "iso-8859-1";
if ($op == "getKML") {
require_once dirname(__FILE__) . '/lib/miniXML/minixml.inc.php';
$XML_str = "<result>\n";
$XML_path = $_GET['KMLfile'];
$XML_str .= "<debug>Processing {$XML_path}</debug>\n";
echo "Processing {$XML_path}<br>";
$foundPoints = 0;
$linesArray = file($XML_path);
开发者ID:Peter2121,项目名称:leonardoxc,代码行数:31,代码来源:EXT_processKML.php
示例6: setDEBUGfromGET
function setDEBUGfromGET()
{
global $DBGcat, $DBGlvl;
if ($_GET['DBGcat']) {
$DBGcat = makeSane($_GET['DBGcat']);
}
if ($_GET['DBGlvl']) {
$DBGlvl = makeSane($_GET['DBGlvl'], 1);
}
}
开发者ID:Peter2121,项目名称:leonardoxc,代码行数:10,代码来源:FN_functions.php
示例7: flightComments
echo $imagesHtml;
}
} else {
if ($op == 'comments') {
// $flight=new flight();
// $flight->getFlightFromDB($flightID);
$flightComments = new flightComments($flightID);
$commentRow = $flightComments->getFirstFromDB();
// echo "<table class='short_info' cellpadding='0' cellspacing='0' width='100%'>";
// echo '<tr><td>'.$flight->comments.'</td></tr></table>';
$comment = leoHtml::cutString($commentRow['text'], 300);
//$comment=$commentRow['text'];
echo "<span class='short_info'>" . $comment . '</span>';
} else {
if ($op == 'info_short') {
$extendedInfo = makeSane($_GET['ext'], 1);
$flight = new flight();
$flight->getFlightFromDB($flightID);
if ($CONF_use_utf) {
$CONF_ENCODING = 'utf-8';
} else {
$CONF_ENCODING = $langEncodings[$currentlang];
}
// google map cached
$mapUrl = $flight->createStaticMap(0);
header('Content-type: application/text; charset="' . $CONF_ENCODING . '"', true);
// echo "<pre class='short_info'>";
echo "<table class='short_info' cellpadding='0' cellspacing='0' width='100%'>";
echo "<tr><td valign='top'><img src='{$mapUrl}' width='250'></td><td valign='top'>";
echo "<table class='short_info' cellpadding='0' cellspacing='0' width='100%'>";
echo "<TR><TD width=150>" . _DATE_SORT . "</td><td>" . formatDate($flight->DATE) . "<td></tr>\n";
开发者ID:Peter2121,项目名称:leonardoxc,代码行数:31,代码来源:GUI_EXT_flight_info.php
示例8: refreshParent
<script language="javascript">
function refreshParent() {
topWinRef=top.location.href;
top.window.location.href=topWinRef;
}
</script>
<?php
echo "<div align=center><BR><BR>" . _WAYPOINT_ADDED . "<BR><BR>";
echo "<a href='javascript:refreshParent();'>Update flight takeoff and RETURN </a>";
echo "<br></div>";
} else {
echo "<H3> Error in inserting waypoint info query! </H3>\n";
}
return;
}
$query = "SELECT countryCode from {$waypointsTable} WHERE ID=" . makeSane($_REQUEST['takeoffID'], 1);
$res = $db->sql_query($query);
if ($res <= 0) {
echo "<H3>" . _NO_KNOWN_LOCATIONS . "</H3>\n";
exit;
}
$row = mysql_fetch_assoc($res);
//if (!$row) { echo "##############" ;}
$nearestCountryCode = $row["countryCode"];
mysql_freeResult($res);
//echo $nearestCountryCode."^^";
?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php
echo $CONF_ENCODING;
?>
开发者ID:Peter2121,项目名称:leonardoxc,代码行数:31,代码来源:GUI_EXT_user_waypoint_add.php
示例9: makeSane
require_once "config.php";
require_once "EXT_config.php";
/*require_once "CL_flightData.php";
require_once "FN_functions.php";
require_once "FN_UTM.php";
require_once "FN_waypoint.php";
require_once "FN_output.php";
require_once "FN_pilot.php";
require_once "FN_flight.php";
*/
// setDEBUGfromGET();
$op = makeSane($_REQUEST['op']);
if ($op == 'getCategoriesForCertID') {
$gliderCertID = makeSane($_REQUEST['gliderCertID']);
$showAll = makeSane($_REQUEST['showAll']);
$gliderCat = makeSane($_REQUEST['gliderCat']);
if ($gliderCat != 1) {
$showAll = 1;
}
$str = " { [";
if (!empty($CONF_addflight_js_validation)) {
$str .= " [\"0\", \"-\"],";
if ($CONF['gliderClasses'][$gliderCat]['classes']) {
foreach ($CONF['gliderClasses'][$gliderCat]['classes'] as $gl_id => $gl_type) {
if ($showAll || in_array($gl_id, $CONF_cert_avalable_categories[$gliderCertID])) {
$str .= " [\"{$gl_id}\", \"{$gl_type}\"],";
}
}
}
} else {
if ($CONF['gliderClasses'][$gliderCat]['classes']) {
开发者ID:Peter2121,项目名称:leonardoxc,代码行数:31,代码来源:EXT_ajax_functions.php
示例10: if
?>
</a>
<br><br>
</div>
</td>
</tr>
</table>
<?
closeMain();return;
} // $_GET['rkey'];
if($_POST['registerForm']==1){
$civlid=$_POST['civlid']+0;
$username=makeSane($_POST['username']);
// various queries in order of searching civlid, email through all database to avoid doubles;
if($r=_search($_POST['email'],$civlid,$username,'temp')) {
if ( ($r['user_civlid']==$civlid || $civlid==0) && $r['user_email']==$_POST['email'] ){
$actkey=$r['user_actkey'] ;
$msg= "<p align ='center'>".sprintf(_Pilot_civlid_email_pre_registration,$r['user_name'])."</p>";
print "<p align ='center'>"._Pilot_have_pre_registration."</p>";
$email_body=sprintf(_Pilot_confirm_subscription,$CONF['site']['name'],$r['user_name'],
$_SERVER['SERVER_NAME'],
str_replace('//','/',$_SERVER['SERVER_NAME'].getRelMainDir().'/'.$CONF_mainfile),
$actkey );
LeonardoMail::sendMail('[Leonardo] - Confirmation email',utf8_decode($email_body),$r['user_email'],addslashes($_POST['firstname']));
unset($actkey);
} else if($r['user_email']==$_POST['email'] ){
开发者ID:WooSeungho,项目名称:leonardoxc,代码行数:31,代码来源:GUI_user_register.php
示例11: open_inner_table
document.location=linkStr;
});
});
</script>
<?php
$workTable = "temp_leonardo_gliders";
// $workTable=$flightsTable;
open_inner_table("ADMIN AREA :: Resolve Duplicate takeoffs", 850);
open_tr();
echo "<td align=left>";
if (!L_auth::isAdmin($userID)) {
echo "<br><br>You dont have access to this page<BR>";
exitPage();
}
$admin_op = makeSane($_GET['admin_op']);
?>
<form><BR />
Method:
<select name="compareMethod" id="compareMethod">
<option value="1">Same Name</option>
<option value="2">Soundex Similarity</option>
<option value="3">Location Proximity (very slow)</option>
</select>
Select only takeoffs from country: <input type="text" name='countryCode' id='countryCode' size="5"
value='<?php
echo $_GET['countryCode'];
?>
' /> (give country code)
<input name='intName' id='intName' type="checkbox" value='1' /> Use 'international Name'
</form>
开发者ID:Peter2121,项目名称:leonardoxc,代码行数:31,代码来源:GUI_admin_takeoff_resolve.php
示例12: flight
//
// 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_validation_review.php,v 1.9 2010/03/14 20:56:11 manolis Exp $
//
//************************************************************************
if (L_auth::isAdmin($userID)) {
$flight = new flight();
$flight->getFlightFromDB($flightID);
if ($_REQUEST["changeFlight"]) {
// make changes
$flight->cat = makeSane($_REQUEST["gliderCat"]);
$flight->glider = $_REQUEST["glider"];
$flight->comments = $_REQUEST["comments"];
$flight->linkURL = $_REQUEST["linkURL"];
if (substr($flight->linkURL, 0, 7) == "http://") {
$flight->linkURL = substr($flight->linkURL, 7);
}
if ($_REQUEST['is_private'] == "1") {
$flight->private = 1;
} else {
$flight->private = 0;
}
for ($i = 1; $i <= $CONF_photosPerFlight; $i++) {
$var_name = "photo" . $i . "Filename";
if ($_REQUEST["photo" . $i . "Delete"] == "1") {
// DELETE photo
开发者ID:Peter2121,项目名称:leonardoxc,代码行数:31,代码来源:GUI_validation_review.php
示例13: makeSane
<meta http-equiv="Content-Type" content="text/html; charset=<?php
echo $CONF_ENCODING;
?>
">
<style type="text/css">
body, p, table,tr,td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
body {margin:0px}
</style>
</head>
<?php
$area_id = makeSane($_REQUEST['area_id'], 1);
// echo $area_id;
if ($_POST['updateComment'] == 1) {
// CHANGE waypoint
$Comments = prep_for_DB($_POST['Comments']);
$disabled = makeSane($_POST['disabled'], 1);
$query = "UPDATE {$airspaceTable} SET Comments='{$Comments}' , disabled={$disabled} WHERE id={$area_id}";
// echo $query;
$res = $db->sql_query($query);
# Error checking
if ($res > 0) {
?>
<script language="javascript">
function refreshParent() {
topWinRef=top.location.href;
top.window.location.href=topWinRef;
}
</script>
<?php
echo "<center>" . _THE_CHANGES_HAVE_BEEN_APPLIED . "<br><br>";
echo "<a href='javascript:refreshParent();'>RETURN </a>";
开发者ID:Peter2121,项目名称:leonardoxc,代码行数:31,代码来源:GUI_EXT_airspace_update_comment.php
示例14: pilot
$pilot = new pilot(0, $user_id);
$pilot->deletePilot(1, 1);
exit;
} else {
if ($op == 'edit') {
$user_id = makeSane($_POST['id']);
$sql = "UPDATE {$pilotsTable} SET \n\t\t\tcountryCode='" . makeSane($_POST['countryCode']) . "',\n\t\t\tCIVL_ID='" . makeSane($_POST['CIVL_ID']) . "',\n\t\t\tCIVL_NAME='" . makeSane($_POST['CIVL_NAME'], 2) . "',\n\t\t\tFirstName='" . makeSane($_POST['FirstName'], 2) . "',\n\t\t\tLastName='" . makeSane($_POST['LastName'], 2) . "',\n\t\t\tSex='" . makeSane($_POST['Sex']) . "',\n\t\t\tBirthdate='" . makeSane($_POST['Birthdate']) . "' \n\t\t\tWHERE pilotID={$user_id} AND serverID=0";
if (!$db->sql_query($sql)) {
echo "Error in query : {$sql}<BR>";
}
$sql = "UPDATE " . $CONF['userdb']['users_table'] . " SET \n\t\t\tusername='" . makeSane($_POST['username'], 2) . "',\n\t\t\tuser_email='" . makeSane($_POST['user_email'], 2) . "'\t\t\n\t\t\tWHERE user_id={$user_id} ";
if (!$db->sql_query($sql)) {
echo "Error in query : {$sql}<BR>";
}
// change password ?
$user_password = makeSane($_POST['user_password'], 2);
if ($user_password) {
require_once dirname(__FILE__) . "/CL_user.php";
$res = LeoUser::changePassword($user_id, $user_password);
if ($res > 0) {
echo _PwdChanged;
} else {
echo _PwdChangeProblem;
if ($res == -2) {
printf(': ' . _PwdTooShort, $CONF_password_minlength);
}
}
}
exit;
}
}
开发者ID:Peter2121,项目名称:leonardoxc,代码行数:31,代码来源:EXT_users_db_helper.php
示例15: 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_auth::isAdmin($userID))) {
$flight->deleteFlight();
echo "<br><span class='ok'>" . _THE_FLIGHT_HAS_BEEN_DELETED . "</span><br><br>";
echo "<a href='" . getLeonardoLink(array('op' => 'list_flights')) . "'>" . _RETURN . "</a><br></div>";
} else {
$location = formatLocation(getWaypointName($flight->takeoffID), $flight->takeoffVinicity, $takeoffRadious);
openMain(_CAUTION_THE_FLIGHT_WILL_BE_DELETED, 0, "delete_icon.png");
echo "<div align=center><br><b>" . _PILOT . ": " . $flight->userName . " " . _THE_DATE . ": " . formatDate($flight->DATE) . " " . _TAKEOFF_LOCATION . ": " . $location . "</b> ";
echo "<br><br><a href='" . getLeonardoLink(array('op' => 'delete_flight', 'flightID' => $flightID, 'confirmed' => '1')) . "'>" . _YES . "</a> | <a href='javascript:history.go(-1)'>" . _NO . "</a>";
echo "<br></div>";
closeMain();
}
开发者ID:Peter2121,项目名称:leonardoxc,代码行数:30,代码来源:GUI_flight_delete.php
示例16: setLeonardoPaths
function setLeonardoPaths()
{
global $baseInstallationPath, $baseInstallationPathSet;
global $module_name, $moduleAbsPath, $moduleRelPath;
global $waypointsRelPath, $waypointsAbsPath, $waypointsWebPath;
global $flightsRelPath;
global $CONF_arg_name, $CONF_mainfile, $CONF, $opMode;
global $isExternalFile;
if (!isset($module_name)) {
if (isset($_GET[$CONF_arg_name])) {
$module_name = makeSane($_GET[$CONF_arg_name]);
} else {
$tmpDir = dirname(__FILE__);
$tmpParts = split("/", str_replace("\\", "/", $tmpDir));
$module_name = $tmpParts[count($tmpParts) - 1];
// $module_name="leonardo";
}
}
$moduleRelPath = moduleRelPath($isExternalFile);
// if ($opMode==3 || $opMode==4) $moduleRelPath="./";
// detect if the installation in not on the root
$baseInstallationPath = "";
$moduleRelPathTemp = moduleRelPath(!$isExternalFile);
// compute baseInstallationPath
$parts = explode("/", str_replace($moduleRelPathTemp, '', dirname($_SERVER['SCRIPT_NAME'])));
// print_r($parts);
if (count($parts) > 1) {
for ($i = 0; $i < count($parts); $i++) {
if ($parts[$i] != '') {
$baseInstallationPath .= "/" . $parts[$i];
}
}
}
if (!defined('CONF_MODULE_ARG')) {
if ($CONF['links']['type'] == 3 && $opMode != 2) {
$preDir = $CONF['links']['baseURL'];
} else {
$preDir = $baseInstallationPath;
}
$lnk = $preDir . '/' . $CONF_mainfile . "?{$CONF_arg_name}={$module_name}";
define('CONF_MODULE_ARG', $lnk);
// setModuleArg();
}
if ($CONF['links']['type'] == 3) {
$baseInstallationPath = "";
}
if (0) {
echo "@" . substr($_SERVER['SCRIPT_NAME'], 0, -$queryLen) . "@";
echo "queryLen : {$queryLen}#";
echo "&& _SERVER['SCRIPT_NAME'] : " . $_SERVER['SCRIPT_NAME'] . "&&";
echo dirname($_SERVER['SCRIPT_NAME']);
echo "#moduleRelPath={$moduleRelPath}#moduleRelPathTemp={$moduleRelPathTemp}#";
echo "baseInstallationPath={$baseInstallationPath}#<BR>";
echo "CONF_MODULE_ARG=" . CONF_MODULE_ARG . "<BR>";
}
$moduleAbsPath = dirname(__FILE__);
$flightsRelPath = "flights";
$waypointsRelPath = "waypoints";
$waypointsAbsPath = dirname(__FILE__) . "/" . $waypointsRelPath;
$waypointsWebPath = $moduleRelPath . "/" . $waypointsRelPath;
$flightsAbsPath = dirname(__FILE__) . "/" . $flightsRelPath;
// $flightsWebPath=$moduleRelPath."/".$flightsRelPath;
}
开发者ID:nando,项目名称:leonardoxc,代码行数:63,代码来源:config.php
示例17: makeSane
<?php
require_once "settings.php";
function makeSane($var)
{
return htmlspecialchars(stripcslashes(trim($var)));
}
$senderEmail = filter_var($_POST["Email"], FILTER_SANITIZE_EMAIL);
$senderName = makeSane($_POST["Name"]);
$emailSubject = makeSane($_POST["Subject"]);
$emailMessage = makeSane($_POST["Message"]);
$headers = "From: {$sentFromEmail}" . "\r\n" . "Reply-To: {$senderEmail}" . "\r\n" . "X-Mailer: PHP/" . phpversion();
if ($_POST && !$_POST["Phone"]) {
//Phone is the HoneyPot
if (filter_var($senderEmail, FILTER_VALIDATE_EMAIL)) {
$emailMessageOut = "From: {$senderName} - {$senderEmail} \n" . "Subject: {$emailSubject} \n\n" . "Message: \n" . "---------------- \n" . $emailMessage;
mail($email, $emailSubject, $emailMessageOut, $headers);
}
}
die;
开发者ID:sansitilli,项目名称:youtracktest,代码行数:20,代码来源:core.php
示例18: makeSane
"hash": "' . $row['hash'] . '", ' . '
"pilot" : {
"userID":' . $row['userID'] . ',
"userServerID":' . $row['userServerID'] . ',
"lName":"' . $pilotNames[$pilotID]['lname'] . '",
"fName":"' . $pilotNames[$pilotID]['fname'] . '",
} ' . ' }} ';
$item_num++;
}
}
$RSS_str = '{ "log_item_num": ' . $item_num . ', "log": [ ' . $RSS_str . ' ] } ';
} else {
if ($op == "latest") {
$sync_type = makeSane($_GET['sync_type'], 1);
$getIGCfiles = $sync_type & SYNC_INSERT_FLIGHT_LOCAL;
$zip = makeSane($_GET['use_zip'], 1);
if ($getIGCfiles) {
$zip = 1;
}
$query = "SELECT * FROM {$logTable} WHERE transactionID>={$startID} AND result=1 {$where_clause} ORDER BY transactionID {$limit}";
// echo $query;
$res = $db->sql_query($query);
if ($res <= 0) {
echo "<H3> Error in query! </H3>\n";
exit;
}
$item_num = 0;
$flightsToServe = array();
while ($row = mysql_fetch_assoc($res)) {
$desc = htmlspecialchars($desc);
$actionTime = $row['actionTime'] - date('Z');
开发者ID:Peter2121,项目名称:leonardoxc,代码行数:31,代码来源:sync.php
示例19: dirname
require_once dirname(__FILE__) . "/EXT_config_pre.php";
require_once dirname(__FILE__) . "/config.php";
require_once dirname(__FILE__) . "/EXT_config.php";
require_once dirname(__FILE__) . "/CL_flightScore.php";
require_once dirname(__FILE__) . "/CL_flightData.php";
require_once dirname(__FILE__) . "/FN_functions.php";
require_once dirname(__FILE__) . "/FN_UTM.php";
require_once dirname(__FILE__) . "/FN_waypoint.php";
require_once dirname(__FILE__) . "/FN_output.php";
require_once dirname(__FILE__) . "/FN_pilot.php";
require_once dirname(__FILE__) . "/FN_flight.php";
require_once dirname(__FILE__) . "/templates/" . $PREFS->themeName . "/theme.php";
setDEBUGfromGET();
require_once dirname(__FILE__) . "/language/" . CONF_LANG_ENCODING_TYPE . "/lang-" . $currentlang . ".php";
require_once dirname(__FILE__) . "/language/" . CONF_LANG_ENCODING_TYPE . "/countries-" . $currentlang . ".php";
$flightID = makeSane($_GET['flightID'], 1);
if ($flightID <= 0) {
exit;
}
$flight = new flight();
$flight->getFlightFromDB($flightID);
$flightComments = new flightComments($flight->flightID);
$flightComments->getFromDB();
$commentsEnabled = $flight->commentsEnabled + 0;
// now the access rights :
$moderatorRights = false;
if ($flight->userID == $userID && $flight->userServerID == $userServerID || L_auth::isModerator($userID)) {
$moderatorRights = true;
}
?>
开发者ID:Peter2121,项目名称:leonardoxc,代码行数:30,代码来源:GUI_EXT_flight_comments.wide.php
示例20: foreach
}
$xRow[] = $row;
$gotEntries++;
$item_num++;
}
// print_r($xRow);
if ($tableType != 'deleted') {
$lastActionTm = $actionTm;
$lastActionTimeStr = $actionTimeStr;
}
}
$item_num = 0;
$item_ok = 0;
$max_time = 0;
foreach ($xRow as $row) {
if (makeSane($row['CivlId'], 1) > 0 || $zerocivl) {
if ($max_time < $row['LastTimestamp']) {
$max_time = $row['LastTimestamp'];
}
$row['CommentInternal'] = htmlspecialchars(html_entity_decode($row['checkedBy'], ENT_NOQUOTES, "UTF-8"));
// this should be filled from a $CONF[''] variable... defined in site/config_custom.php
$row['CivlIdApprovedBy'] = $CONF['WXC']['CivlIdApprovedBy'] + 0;
// 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']);
开发者ID:Peter2121,项目名称:leonardoxc,代码行数:31,代码来源:syncWXC2.php
注:本文中的makeSane函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论