Exemple #1
0
function afmng_widget_status($args)
{
    extract($args);
    echo $before_widget;
    echo $before_title . 'Status' . $after_title;
    $ltpl = new LTemplate();
    $ltpl->render(afmng_get_tplfile('tpl.StatusWidget.php'));
    echo $after_widget;
}
Exemple #2
0
function CreateMenu($path, $depth, $template, $title)
{
    $TPL = new LTemplate();
    include_once GC_IPATH . "_base/site-index.php";
    $AllLinks = array();
    reset($SIndex);
    while ($SSite = current($SIndex)) {
        if (substr(key($SIndex), 0, strlen($path)) == $path) {
            $Link['Name'] = extractName(key($SIndex));
            $Link['File'] = GC_WEBPATH . 'show.php?p=' . key($SIndex);
            $AllLinks[] = $Link;
        }
        next($SIndex);
    }
    $TPL->set('Title', $title);
    $TPL->setBlock('Links', $AllLinks);
    $TPL->render($template);
}
Exemple #3
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');
Exemple #4
0
/**
* Render the User Manager Page
*/
function afmng_menu_usermng()
{
    if (afmng_check_post()) {
        afmng_menu_usermng_postback();
    }
    $ltpl = new LTemplate();
    $ltpl->users = afmng_db_get_users();
    $ltpl->caps = afmngdb::$caps;
    //render page
    $ltpl->render(afmng_get_tplfile('tpl.UserMng.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_show.php,v 1.111 2012/09/17 22:33:49 manolis Exp $
//
//************************************************************************
require_once $LeoCodeBase . "/CL_image.php";
require_once $LeoCodeBase . "/CL_template.php";
$Ltemplate = new LTemplate($LeoCodeBase . '/templates/' . $PREFS->themeName);
global $flightsTable, $deletedFlightsTable;
if ($_GET['deleted'] && L_auth::isAdmin($userID)) {
    $flightsTable = $deletedFlightsTable;
    $deletedFlights = 1;
}
$flightID += 0;
$flight = new flight();
if (!$flight->getFlightFromDB($flightID)) {
    echo "<br><div align='center'>No such flight exists</div><br><BR>";
    return;
}
//echo $flight->private." & ".$flight->flightIsViewableByUser($userID)." $$";
if ($flight->private && $flight->private != 4 && !$flight->belongsToUser($userID) && !L_auth::isAdmin($userID)) {
    echo "<br><div align=center><h3>" . _FLIGHT_IS_PRIVATE . "</h3></div><br><BR>";
    return;
<?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_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++;
}
//
// 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) {
Exemple #8
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_sites.php,v 1.12 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' => '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) {
function ErrorHandler($errno, $errstr, $errfile, $errline)
{
    $TPL = new LTemplate();
    switch ($errno) {
        case E_ERROR:
            $TPL->set('ERRORTYPE', 'ERROR');
            break;
        case E_WARNING:
            $TPL->set('ERRORTYPE', 'WARNING');
            break;
        case E_PARSE:
            $TPL->set('ERRORTYPE', 'PARSING ERROR');
            break;
        default:
            return;
    }
    $TPL->set('ERRORSTR', $errstr);
    $TPL->set('ERRORFILE', $errfile);
    $TPL->set('ERRORLINE', $errline);
    $TPL->render(GC_PDEFTPL . 'error.tpl');
    exit;
}
Exemple #10
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_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;
Exemple #11
0
			<?php 
            }
        } 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];
                        }
Exemple #12
0
	/*	Description: Main file for Admin Backend
	/*************************************/
//TODO Change Constant
if (!defined('PC_ISADMIN')) {
    exit;
}
//global includes
include_once GC_PLIB . 'ltemplate.inc';
include_once GC_PLIB . 'libSession.inc';
include_once GC_IPATH . 'functions.php';
//admin includes
include_once GC_PADMIN . 'page-alias.php';
include_once GC_PADMIN . 'admin-functions.php';
////////////////////////////
//Objects
$TPL = new LTemplate();
$Session = new Session();
/////////////////////////////
//  check Session
if (!checkSession()) {
    $TPL->render($SPages['login']);
    exit;
}
if ($_GET['action'] == 'logout') {
    $Session->destroy();
    $TPL->render($SPages['login']);
    exit;
}
//////////////////////////////
//?p=site&s=/news
//TODO check for not available pages