</td>
<td align="left">
	<div id="BookmarkButton" ></div></td>
<td>
  <?php 
echo "<div id='rssButton'>" . leoHtml::img("rss.gif", 0, 0, 'absmiddle', '', 'icons1') . leoHtml::img("icon_arrow_down.gif", 0, 0, '', '', 'icons1') . "</div>";
?>
</td>
</tr>
</table>

<div style='clear:both'></div>

<div id='rssBox'>
	<a href='<?php 
echo moduleRelPath();
?>
/rss.php?op=comments&flightID=<?php 
echo $flightID;
?>
'><?php 
echo _RSS_for_the_comments;
?>
</a>
</div>

<div id='translateBox'>
	<?php 
echo _Translate_to;
?>
<BR />
Ejemplo n.º 2
0
            }
            DEBUG("DL", 1, "Will serve flight {$flightID}<BR>");
            $flight = new flight();
            $flight->getFlightFromDB($flightID);
            // $getFlightKML=$flight->getFlightKML()."&c=$c&ex=$ex&w=$w&an=$an";
            $getFlightKML = "http://" . str_replace('//', '/', $_SERVER['SERVER_NAME'] . "/{$baseInstallationPath}/" . $flight->getKMLRelPath(0));
            $KMLlineColor = "ff" . substr($c, 4, 2) . substr($c, 2, 2) . substr($c, 0, 2);
            $xml = '<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2"
 xmlns:gx="http://www.google.com/kml/ext/2.2">
 ' . "<NetworkLinkControl>\n  <Update>\n    <targetHref>" . str_replace("&", "&amp;", $getFlightKML) . "</targetHref>\n    <Change>\n      <Style targetId='#Track1'>\t  \t\t\t\t\t\n\t\t<LineStyle>\n\t\t  <color>{$KMLlineColor}</color>\n\t\t  <width>{$w}</width>\n\t\t</LineStyle>\n\t </Style>\n\t <Style targetId='#Track2'>\t  \t\t\t\t\t\n\t\t<LineStyle>\n\t\t  <color>{$KMLlineColor}</color>\n\t\t  <width>{$w}</width>\n\t\t</LineStyle>\n\t </Style>\n    </Change>\n  </Update>\n</NetworkLinkControl>\n</kml>";
            //echo $xml;
            //exit;
        } else {
            if ($type == "kml_trk") {
                $moduleRelPath = moduleRelPath(0);
                $waypointsWebPath = $moduleRelPath . "/" . $waypointsRelPath;
                $flightID = makeSane($_REQUEST['flightID'], 1);
                //echo $_SERVER['QUERY_STRING'];
                $w = makeSane($_GET['w'], 1);
                $c = makeSane($_GET['c']);
                $ex = makeSane($_GET['ex'], 1);
                $an = makeSane($_GET['an'], 1);
                if (!$w) {
                    $w = 2;
                }
                if (!$c) {
                    $c = "ff0000";
                }
                if (!$ex) {
                    $ex = 1;
Ejemplo n.º 3
0
    global $module_name, $CONF_use_own_template, $CONF;
    if ($CONF['links']['type'] == 3) {
        return $CONF['links']['baseURL'];
    }
    if ($forUtilityFiles) {
        // for EXT_ files
        return "./";
    } else {
        if ($CONF_use_own_template) {
            return "./";
        } else {
            return "components/{$module_name}";
        }
    }
}
$moduleRelPath = moduleRelPath($isExternalFile);
// bridge to the users table of different forum/portal/cms systems
$CONF['userdb']['users_table'] = 'jos_users';
$CONF['userdb']['user_id_field'] = 'id';
$CONF['userdb']['username_field'] = 'username';
$CONF['userdb']['password_field'] = 'password';
$CONF['userdb']['email_field'] = 'user_email';
$CONF['userdb']['use_leonardo_real_names'] = 1;
// if  $CONF['userdb']['use_leonardo_real_names']=0;
// then the following will be used to extract real names from the 'aplication' DB
$CONF['userdb']['has_realnames'] = 1;
$CONF['userdb']['user_real_name_field'] = 'name';
$CONF['userdb']['has_seperate_last_first_name'] = 0;
$CONF['userdb']['user_last_name_field'] = '';
$CONF['userdb']['user_first_name_field'] = '';
// bridge to the login system of different forum/portal/cms systems
Ejemplo n.º 4
0
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;
}
Ejemplo n.º 5
0
 $res = $db->sql_query($query);
 if ($res <= 0) {
     echo "<H3> Error in query: {$query}</H3>\n";
     return;
 }
 $pilots = array();
 while ($row = $db->sql_fetchrow($res)) {
     if ($row['countryCode']) {
         $flag = strtolower($row['countryCode']);
     } else {
         $flag = 'unknown';
     }
     $flagIcon = "<img src='" . moduleRelPath() . "/img/fl/{$flag}.gif' border=0> ";
     //$flagIcon="<img class='fl fl.sprite-$tmpLang' src='".moduleRelPath()."/img/space.gif' border=0> ";
     if ($row['Sex'] == 'F') {
         $sexIcon = "<img src='" . moduleRelPath() . "/img/icon_female.gif' border=0> ";
     } else {
         $sexIcon = '';
     }
     $name = $row['FirstName'] . ' ' . $row['LastName'];
     $name = str_replace($pilotName, "<b>{$pilotName}</b>", $name);
     $pilotName = strtoupper($pilotName[0]) . substr($pilotName, 1);
     $name = str_replace($pilotName, "<b>{$pilotName}</b>", $name);
     $pilotName0 = strtolower($pilotName0);
     $d1 = levenshtein($pilotName0, strtolower($row['FirstName'] . ' ' . $row['LastName']));
     $d2 = levenshtein($pilotName0, strtolower($row['LastName'] . ' ' . $row['FirstName']));
     $d3 = levenshtein($pilotName0, strtolower($row['FirstName']));
     $d4 = levenshtein($pilotName0, strtolower($row['LastName']));
     $dmax = max(array($d1, $d2, $d3, $d4));
     // similar_text (strtolower($lastIntName),strtolower($row2['intName']),&$nameDistanceFromPrevious2);
     $html = $row['FirstName'] . ' ' . $row['LastName'] . '|' . $flagIcon . $sexIcon . $name . '|' . $row['serverID'] . 'u' . $row['pilotID'] . "\n";
Ejemplo n.º 6
0
function getPilotStatsRelFilename($pilotID, $num)
{
    global $moduleRelPath, $CONF;
    return moduleRelPath() . '/' . str_replace("%PILOTID%", $pilotID, $CONF['paths']['pilot']) . "/PilotStats_{$num}.png";
    //return $moduleRelPath."/flights/".$pilotID."/PilotStats_$num.png";
}
Ejemplo n.º 7
0
// $Id: GUI_EXT_filter.php,v 1.3 2010/03/21 22:51:58 manolis Exp $
//
//************************************************************************
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_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__) . '/CL_filter.php';
require_once dirname(__FILE__) . "/language/" . CONF_LANG_ENCODING_TYPE . "/countries-" . $currentlang . ".php";
$moduleRelPath = moduleRelPath();
require_once dirname(__FILE__) . '/CL_dialogfilter.php';
$dlgfilters = array();
$dlgfilters['pilots_incl'] = new dialogfilter('pilot', 'FILTER_pilots_incl');
/**
 * By suffixing _excl to the FILTER_xx variable, the dialogfilter excludes the selection from the query
 * Example:
 * $dlgfilters['pilots_excl']=new dialogfilter('pilot', 'FILTER_pilots_excl');
 */
if (!empty($CONF_use_NAC)) {
    if (!empty($CONF_NAC_list)) {
        foreach ($CONF_NAC_list as $nacid => $nacdata) {
            if (!empty($nacdata['use_clubs'])) {
                $key = 'nacclubs' . $nacid . '_incl';
                $dlgfilters[$key] = new dialogfilter('nacclub', 'FILTER_' . $key, $nacid);
            }
Ejemplo n.º 8
0
		// echo "a|$query|0";
		//return;
		$res= $db->sql_query($query);
		
		if($res <= 0){   
			echo("<H3> Error in query: $query</H3>\n");
			return;			 
		} 
		while($row= $db->sql_fetchrow($res) ){
			if ($row['countryCode']) $flag=	strtolower($row['countryCode']);
			else $flag='unknown';
			
			$flagIcon="<img src='".moduleRelPath()."/img/fl/$flag.gif' border=0> ";
			//$flagIcon="<img class='fl fl.sprite-$tmpLang' src='".moduleRelPath()."/img/space.gif' border=0> ";
			
			if ($row['Sex']=='F') $sexIcon="<img src='".moduleRelPath()."/img/icon_female.gif' border=0> ";
			else $sexIcon='';
			
			
			$name=$row['FirstName'].' '.$row['LastName'];
			$name=str_replace($pilotName,"<b>$pilotName</b>",$name);
			$pilotName=strtoupper($pilotName{0}).substr($pilotName,1);
			$name=str_replace($pilotName,"<b>$pilotName</b>",$name);

			$pilotName0=strtolower($pilotName0);
			
			$d1=levenshtein ($pilotName0,strtolower($row['FirstName'].' '.$row['LastName'] )  ); 
			$d2=levenshtein ($pilotName0,strtolower($row['LastName'].' '.$row['FirstName'])); 
			$d3=levenshtein ($pilotName0,strtolower($row['FirstName'])); 
			$d4=levenshtein ($pilotName0,strtolower($row['LastName']));
$flight = new flight();
$flight->getFlightFromDB($flightID);
if (!$flight->belongsToUser($userID) && !L_auth::isModerator($userID)) {
    echo "go away";
    return;
}
if ($_POST['setTimes'] == 1) {
    // set new bounds !!!
    $startTime = makeSane($_REQUEST['timeTextSecs1'], 1);
    // in secs
    $endTime = makeSane($_REQUEST['timeTextSecs2'], 1);
    $flight->forceBounds = 1;
    // must be in these time bounds
    $flight->START_TIME = $startTime;
    $flight->END_TIME = $endTime;
    $waypointsWebPath = moduleRelPath(0) . "/" . $waypointsRelPath;
    $flight->getFlightFromIGC($flight->getIGCFilename(), 0);
    $flight->deleteSecondaryFiles();
    $flight->updateTakeoffLanding();
    $flight->getMapFromServer();
    $flight->updateCharts(1);
    $flight->putFlightToDB(1);
    // 1== UPDATE
    $flight->computeScore();
    ?>
		  <script language="javascript">
			  function refreshParent() {
				  topWinRef=top.location.href;
				  top.window.location.href=topWinRef;
			  }
		  </script>