本文整理汇总了PHP中makeSane函数的典型用法代码示例。如果您正苦于以下问题:PHP makeSane函数的具体用法?PHP makeSane怎么用?PHP makeSane使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了makeSane函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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 ) {
示例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) {
示例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) {
示例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 ";
示例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);
示例6: setDEBUGfromGET
function setDEBUGfromGET()
{
global $DBGcat, $DBGlvl;
if ($_GET['DBGcat']) {
$DBGcat = makeSane($_GET['DBGcat']);
}
if ($_GET['DBGlvl']) {
$DBGlvl = makeSane($_GET['DBGlvl'], 1);
}
}
示例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";
示例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;
?>
示例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']) {
示例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'] ){
示例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>
示例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
示例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>";
示例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;
}
}
示例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();
}