Пример #1
0
<?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_footer.php,v 1.6 2010/03/14 20:56:11 manolis Exp $
//
//************************************************************************
require_once dirname(__FILE__) . '/CL_template.php';
$Ltemplate = new LTemplate(dirname(__FILE__) . '/templates/' . $PREFS->themeName);
$Ltemplate->set_filenames(array('body' => 'footer.html'));
$Ltemplate->pparse('body');
Пример #2
0
    echo "<br><div align=center><h3>" . _FLIGHT_IS_PRIVATE . "</h3></div><br><BR>";
    return;
}
//debug
//$mapUrl=$flight->createStaticMap(1);
$flight->incViews();
//show limited info to non friends
if ($flight->private == 4 && !$flight->flightIsViewableByUser($userID)) {
    require dirname(__FILE__) . '/GUI_flight_show_ext.php';
    return;
}
if ($flight->externalFlightType & SYNC_INSERT_FLIGHT_LINK) {
    require dirname(__FILE__) . '/GUI_flight_show_ext.php';
    return;
}
$Ltemplate->set_filenames(array('body' => 'flight_show.html'));
$geUrl = getDownloadLink(array('type' => 'kml_trk', 'flightID' => $flightID, 'lang' => $lng));
// $moduleRelPath."/download.php?lang=$lng&type=kml_trk";
$clientIP = getClientIpAddr();
$directIGCLink = 1;
if ($flight->belongsToUser($userID) || L_auth::isModerator($userID) || L_auth::canDownloadIGC($clientIP)) {
    $directIGCLink = 1;
    $base_name = md5(basename($flight->getIGCRelPath()));
    $_SESSION['di' . $base_name] = 1;
    // echo 'downloadigc'+$base_name;
    $igcLink = "<a href='" . $flight->getIGCRelPath() . "' >IGC</a>";
} else {
    $directIGCLink = 0;
    $igcLink = " <a href='javascript:nop()' onClick='toggleIgcDownload();return false;' id='IgcDownloadPos'>IGC</a>";
}
//experiment with google static maps
Пример #3
0
//************************************************************************
// 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_index_full.php,v 1.13 2010/03/14 20:56:11 manolis Exp $
//
//************************************************************************
require_once dirname(__FILE__) . "/CL_template.php";
$Ltemplate = new LTemplate(dirname(__FILE__) . '/templates/' . $PREFS->themeName);
$Ltemplate->set_filenames(array('body' => 'index_full.html'));
list($countriesCodes, $countriesNames, $countriesFlightsNum) = getCountriesList();
$countriesNum = count($countriesNames);
require_once dirname(__FILE__) . "/FN_areas.php";
$i = 0;
foreach ($countriesNames as $countryName) {
    $continentNum = $countries2continent[$countriesCodes[$i]];
    $lgStrings[$continentNum] .= "<li><a href='javascript:jumpToLeague(\"" . $countriesCodes[$i] . "\") '>{$countryName} </a></li>\n";
    $ctStrings[$continentNum] .= "<li><a href='javascript:jumpToFlights(\"" . $countriesCodes[$i] . "\") '>{$countryName} </a></li>\n";
    $tkStrings[$continentNum] .= "<li><a href='javascript:jumpToTakeoffs(\"" . $countriesCodes[$i] . "\") '>{$countryName} </a></li>\n";
    $Ltemplate->assign_block_vars('lg', array('link' => "javascript:jumpToLeague('" . $countriesCodes[$i] . "')", 'name' => $countryName));
    $Ltemplate->assign_block_vars('ct', array('link' => "javascript:jumpToFlights('" . $countriesCodes[$i] . "')", 'name' => $countryName, 'flNum' => $countriesFlightsNum[$i]));
    $Ltemplate->assign_block_vars('tk', array('link' => "javascript:jumpToTakeoffs('" . $countriesCodes[$i] . "')", 'name' => $countryName));
    $i++;
}
$lgStr = '<div class="vnav">
Пример #4
0
// 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_admin_sites.php,v 1.4 2010/03/14 20:56:11 manolis Exp $
//
//************************************************************************
$pilotsList = array();
$pilotsID = array();
list($takeoffs, $takeoffsID) = getTakeoffList();
list($countriesCodes, $countriesNames) = getCountriesList();
require_once dirname(__FILE__) . "/CL_template.php";
$Ltemplate = new LTemplate(dirname(__FILE__) . '/templates/' . $PREFS->themeName);
$Ltemplate->set_filenames(array('body' => 'admin_sites.html'));
$COUNTRIES_OPTION_LIST = "";
for ($k = 0; $k < count($countriesCodes); $k++) {
    $sel = $countriesCodes[$k] == $FILTER_country1_select ? "selected" : "";
    $COUNTRIES_OPTION_LIST .= "<option value='" . $countriesCodes[$k] . "' {$sel}>" . $countriesNames[$k] . " (" . $countriesCodes[$k] . ")</option>\n";
}
$TAKEOFF_OPTION_LIST = "";
for ($k = 0; $k < count($takeoffs); $k++) {
    $sel = $takeoffsID[$k] == $FILTER_takeoff1_select ? "selected" : "";
    $TAKEOFF_OPTION_LIST .= "<option value='" . $takeoffsID[$k] . "' {$sel}>" . $takeoffs[$k] . "</option>\n";
}
$countriesNum = count($countriesNames);
require_once dirname(__FILE__) . "/FN_areas.php";
$i = 0;
foreach ($countriesNames as $countryName) {
    $continentNum = $countries2continent[$countriesCodes[$i]];
Пример #5
0
//
// 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_header.php,v 1.19 2012/01/16 07:21:22 manolis Exp $
//
//************************************************************************
require_once dirname(__FILE__) . '/CL_template.php';
$Ltemplate = new LTemplate(dirname(__FILE__) . "/templates/" . $PREFS->themeName);
//	$Ltemplate ->set_filenames(array(
//		'body' => 'header.html')
//	);
$Ltemplate->set_filenames(array('overall_header' => 'tpl/overall_header.html'));
if ($CONF_use_utf) {
    define('CONF_LANG_ENCODING_TYPE', 'utf8');
    $CONF_ENCODING = 'utf-8';
} else {
    define('CONF_LANG_ENCODING_TYPE', 'iso');
    $CONF_ENCODING = $langEncodings[$currentlang];
}
if (!is_array($lang)) {
    $lang = array();
}
$lang['ENCODING'] = $CONF_ENCODING;
$Ltemplate->assign_vars(array('STYLE_LINK' => $moduleRelPath . "/templates/" . $PREFS->themeName . "/style.css", 'IMG_PATH' => $moduleRelPath . "/templates/" . $PREFS->themeName . "/img/"));
if (!$userID) {
    $Ltemplate->assign_block_vars('SWITCH_ANON_USER', array());
} else {
Пример #6
0
            }
        } else {
            $url = !empty($HTTP_POST_VARS['redirect']) ? str_replace('&amp;', '&', htmlspecialchars($HTTP_POST_VARS['redirect'])) : getLeonardoLink(array('op' => $CONF_main_page));
            redirect(append_sid($url, true));
        }
    }
} else {
    //
    // Do a full login page dohickey if
    // user not already logged in
    //
    if (!$userdata['session_logged_in'] || isset($HTTP_GET_VARS['admin']) && $userdata['session_logged_in'] && $userdata['user_level'] == ADMIN) {
        $page_title = $lang['Login'];
        require_once dirname(__FILE__) . "/CL_template.php";
        $Ltemplate = new LTemplate(dirname(__FILE__) . '/templates/' . $PREFS->themeName);
        $Ltemplate->set_filenames(array('body' => 'tpl/login.html'));
        if (isset($HTTP_POST_VARS['redirect']) || isset($HTTP_GET_VARS['redirect'])) {
            $forward_to = $HTTP_SERVER_VARS['QUERY_STRING'];
            if (preg_match("/^redirect=([a-z0-9\\.#\\/\\?&=\\+\\-_]+)/si", $forward_to, $forward_matches)) {
                $forward_to = !empty($forward_matches[3]) ? $forward_matches[3] : $forward_matches[1];
                $forward_match = explode('&', $forward_to);
                if (count($forward_match) > 1) {
                    $forward_page = '';
                    for ($i = 1; $i < count($forward_match); $i++) {
                        if (!ereg("sid=", $forward_match[$i])) {
                            if ($forward_page != '') {
                                $forward_page .= '&';
                            }
                            $forward_page .= $forward_match[$i];
                        }
                    }