Example #1
0
 public function show($param = null, $template = null)
 {
     if (!$template) {
         $path = Router::GetPath();
         $template = trim($path, '/');
         $template .= Template::DEFAULT_TEMPLATE_SUFFIX;
     }
     $param = $param ? $param : array();
     $this->params = $this->params ? $this->params : array();
     $param = array_merge($this->params, $param);
     $this->params = $param;
     Template::Show($template, $param);
 }
Example #2
0
 public function create_vatsim_data($find, $type, $callsign)
 {
     if ($this->section == null) {
         $this->get_vatsim_data();
     }
     foreach ($this->section as $row) {
         $row_info = explode(":", $row);
         if (ereg("^{$type}", $row_info[3])) {
             if (ereg("^{$callsign}", $row_info[0])) {
                 Template::Set('row_info', $row_info);
                 Template::Show('vatsim.tpl');
             }
         }
     }
 }
Example #3
0
function post_module_load()
{
    /* Misc tasks which need to get done */
    /* If the setting to auto-retired pilots is on, then do that
       and only check every 24 hours
       */
    if (Config::Get('USE_CRON') == false) {
        if (Config::Get('PILOT_AUTO_RETIRE') == true) {
            $within_timelimit = CronData::check_hoursdiff('find_retired_pilots', '24');
            if ($within_timelimit === false) {
                PilotData::findRetiredPilots();
                CronData::set_lastupdate('find_retired_pilots');
            }
        }
        if (Config::Get('CLOSE_BIDS_AFTER_EXPIRE') === false) {
            $within_timelimit = CronData::check_hoursdiff('check_expired_bids', '24');
            if ($within_timelimit === false) {
                SchedulesData::deleteExpiredBids();
                CronData::set_lastupdate('check_expired_bids');
            }
        }
        /* Expenses, make sure they're all populated */
        $within_timelimit = CronData::check_hoursdiff('populate_expenses', 18);
        if ($within_timelimit === false) {
            FinanceData::updateAllExpenses();
            CronData::set_lastupdate('populate_expenses');
        }
        /* And finally, clear expired sessions */
        Auth::clearExpiredSessions();
    }
    if (Config::Get('TWITTER_AIRLINE_ACCOUNT') != '') {
        $within_timelimit = CronData::check_hoursdiff('twitter_update', '3');
        if ($within_timelimit === false) {
            ActivityData::readTwitter();
            CronData::set_lastupdate('twitter_update');
        }
    }
    // @TODO: Clean ACARS records older than one month
    if (Config::Get('MAINTENANCE_MODE') == true && !Auth::LoggedIn() && !PilotGroups::group_has_perm(Auth::$usergroups, FULL_ADMIN)) {
        Template::Show('maintenance.tpl');
        die;
    }
    return true;
}
<?php

if (!defined('IN_PHPVMS') && IN_PHPVMS !== true) {
    die;
}
?>
<h3><?php 
echo $title;
?>
</h3>
<?php 
Template::Show('finance_header.tpl');
?>
<table width="600px" class="balancesheet" cellpadding="0" cellspacing="0">

	<tr class="balancesheet_header">
		<td align="" colspan="2">Cash and Sales</td>
	</tr>
	<tr>
		<td align="right">Gross Revenue Flights: <br />
			Total number of flights: <?php 
echo $month_data->total;
?>
		</td>
		<td align="right" valign="top"><?php 
echo FinanceData::FormatMoney($month_data->gross);
?>
</td>
	</tr>
	
	<tr>
Example #5
0
<?php

include dirname(__FILE__) . '/loader.inc.php';
if (!DB::init($_POST['DBASE_TYPE'])) {
    Template::Set('message', 'There was an error initializing the database');
    Template::Show('error.tpl');
    return false;
}
$ret = DB::connect($_POST['DBASE_USER'], $_POST['DBASE_PASS'], $_POST['DBASE_NAME'], $_POST['DBASE_SERVER']);
if ($ret == false) {
    Template::Set('message', DB::error());
    Template::Show('error.tpl');
    return false;
}
if (!DB::select($_POST['DBASE_NAME'])) {
    Template::Set('message', DB::error());
    Template::Show('error.tpl');
    return false;
}
Template::Set('message', 'Database connection is ok!');
Template::Show('success.tpl');
Example #6
0
include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'includes' . DIRECTORY_SEPARATOR . 'loader.inc.php';
if (!DB::init($_POST['DBASE_TYPE'])) {
    Template::Set('message', 'There was an error initializing the database');
    Template::Show('error');
    return false;
}
try {
    $ret = @DB::connect($_POST['DBASE_USER'], $_POST['DBASE_PASS'], $_POST['DBASE_NAME'], $_POST['DBASE_SERVER']);
} catch (exception $e) {
    Template::Set('message', 'Error: ' . $e->error);
    Template::Show('error');
    return false;
}
/*
if($ret == false) {
	Template::Set('message', DB::error());
	Template::Show('error');
	return false;
}
*/
/** I dont know why this is here, Help me out guys. */
if (!DB::select($_POST['DBASE_NAME'])) {
    Template::Set('message', DB::error());
    Template::Show('error');
    return false;
}
/** =============================================== */
Template::Set('message', 'Database connection is ok!');
Template::Show('success');
	<dt>Password: *</dt>
	<dd><input id="password" type="password" name="password1" value="" /></dd>

	<dt>Enter your password again: *</dt>
	<dd><input type="password" name="password2" value="" />
		<?php 
if ($password_error != '') {
    echo '<p class="error">' . $password_error . '</p>';
}
?>
	</dd>

	<?php 
//Put this in a seperate template. Shows the Custom Fields for registration
Template::Show('registration_customfields.tpl');
?>

	<dt>reCaptcha</dt>
	<dd>
            <?php 
if (isset($captcha_error)) {
    echo '<p class="error">' . $captcha_error . '</p>';
}
?>
            <div class="g-recaptcha" data-sitekey="<?php 
echo $sitekey;
?>
"></div>
            <script type="text/javascript" src="https://www.google.com/recaptcha/api.js?hl=<?php 
echo $lang;
Example #8
0
<?php

/*
 * Imports trough JimberLibs
 */
$debug = 1;
require_once 'lib/JimberLibs.php';
libadd("lib.Jimber");
libadd("lib.Jimber.Data.MySQL");
//requireLogin(0);
/*
 * Start of page specific stuff
 */
$tpl = new Template("templates/page.tpl");
$tpl->DefineBlock("PAGEBLOCK");
$tpl->DefineBlock("CONTENTBLOCK");
$tpl->setVars("PAGEBLOCK", "CONTENT", $tpl->ParseBlock("CONTENTBLOCK"));
$page = $tpl->ParseBlock("PAGEBLOCK");
$tpl->Show($page);
Example #9
0
	<br class="clearfloat" />
	<div id="footer">
	<p>
		"<?php 
echo randquote();
?>
"
		<br /> 
		Copyright &copy; 2007 - <?php 
echo date('Y');
?>
 
		<a href="http://www.phpvms.net/" target="_new">phpVMS</a>, 
		<a href="http://www.nsslive.net" target="_new">nsslive.net</a>
		<br />
		<a href="<?php 
echo SITE_URL;
?>
/admin/index.php/dashboard/about">License & About</a> | 
		Version <?php 
echo PHPVMS_VERSION;
?>
	</p>
  </div>
</div>
<?php 
Template::Show('core_footer.php');
?>
</body>
</html>
Example #10
0
	<h3 >Options</h3>
	<ul class="menu" style="padding: 0px">
		<li><a href="<?php 
echo SITE_URL;
?>
/admin/index.php/dashboard" class="menu">
				<img src="<?php 
echo SITE_URL;
?>
/admin/lib/layout/images/dashboard_icon.png" />Dashboard
			</a>
		</li>
	</ul>
	<ul id="slidermenu" class="menu">
	<?php 
Template::Show('core_navigation.php');
?>
	</ul>
	<ul class="menu">
		<li><a style="border-top: none" href="<?php 
echo SITE_URL;
?>
/index.php">View Your Site</a></li>
		<li><a href="<?php 
echo SITE_URL;
?>
/index.php/Login/logout">Log Out</a></li>
	</ul>
		
  </div>
  <div id="mainContent">
Example #11
0
                break;
            }
            SettingsData::saveSetting('PHPVMS_VERSION', INSTALLER_VERSION);
            echo '<div align="center" style="font-size: 18px;"><br />
					<a href="install.php?page=sitesetup">Continue to the next step</a>
				  </div>';
        }
        break;
    case 'sitesetup':
        Template::Show('s2_site_setup');
        break;
    case 'complete':
        if ($_POST['action'] == 'submitsetup') {
            if ($_POST['firstname'] == '' || $_POST['lastname'] == '' || $_POST['email'] == '' || $_POST['password'] == '' || $_POST['vaname'] == '' || $_POST['vacode'] == '') {
                Template::Set('message', 'You must fill out all of the fields');
                Template::Show('s2_site_setup');
                break;
            }
            $_POST['SITE_NAME'] = $_POST['vaname'];
            if (!Installer::SiteSetup()) {
                Template::Set('message', Installer::$error);
                Template::Show('s2_site_setup');
            } else {
                Installer::RegisterInstall(INSTALLER_VERSION);
                Template::Show('s3_setup_finished');
            }
        }
        break;
}
Template::Show('footer');
Example #12
0
<?php

$debug = 1;
require_once '../JPFLibs.php';
libadd("lib.JPF");
$redirect = URLEncrypter::Decrypt($_GET['redirect']);
$tpl = new Template("lib/JPF/templates/AreYouSure.tpl");
$tpl->DefineBlock("SUREBLOCK");
$tpl->SetVars("SUREBLOCK", "REDIRECT", $redirect);
$htm = $tpl->ParseBlock("SUREBLOCK");
$tpl->Show($htm);
Example #13
0
		href="<?php 
    echo SITE_URL;
    ?>
/admin/action.php/operations/viewmap?type=pirep&id=<?php 
    echo $pirep->pirepid;
    ?>
">Route</button>-->

</div>
<br />
<?php 
    # If there was an error, don't allow the PIREP to go through
    if ($pirep->aircraft == '') {
        $error = true;
        Template::Set('message', 'No aircraft for this PIREP. You must edit and assign before you can accept it.');
        Template::Show('core_error.tpl');
    }
    ?>
<table id="details_dialog_<?php 
    echo $pirep->pirepid;
    ?>
" 
	style="display:none; border-left: 3px solid #FF6633; margin-top: 3px;padding-left: 3px;" width="100%">
<tr>
	<td><strong>Client: </strong> <?php 
    echo $pirep->source;
    ?>
</td>
	<td><strong>Aircraft: </strong>
			<?php 
    if ($pirep->aircraft == '') {
Example #14
0
 public function pilotgrouptab($pilotid)
 {
     $this->setGroupsData($pilotid);
     Template::Show('pilots_groups.tpl');
     Template::Show('pilots_addtogroup.tpl');
 }
Example #15
0
                break;
            }
            SettingsData::saveSetting('PHPVMS_VERSION', INSTALLER_VERSION);
            echo '<div align="center" style="font-size: 18px;"><br />
					<a href="install.php?page=sitesetup">Continue to the next step</a>
				  </div>';
        }
        break;
    case 'sitesetup':
        Template::Show('s2_site_setup.tpl');
        break;
    case 'complete':
        if ($_POST['action'] == 'submitsetup') {
            if ($_POST['firstname'] == '' || $_POST['lastname'] == '' || $_POST['email'] == '' || $_POST['password'] == '' || $_POST['vaname'] == '' || $_POST['vacode'] == '') {
                Template::Set('message', 'You must fill out all of the fields');
                Template::Show('s2_site_setup.tpl');
                break;
            }
            $_POST['SITE_NAME'] = $_POST['vaname'];
            if (!Installer::SiteSetup()) {
                Template::Set('message', Installer::$error);
                Template::Show('s2_site_setup.tpl');
            } else {
                Installer::RegisterInstall(INSTALLER_VERSION);
                Template::Show('s3_setup_finished.tpl');
            }
        }
        break;
}
Template::Show('footer.tpl');
Example #16
0
 public function render($tpl)
 {
     Template::Show($tpl);
 }
if (PilotGroups::group_has_perm(Auth::$usergroups, MODERATE_PIREPS)) {
    ?>
    
	<div id="pireps">
	<?php 
    Template::Show('pireps_list.tpl');
    ?>
	</div>
    <?php 
}
if (PilotGroups::group_has_perm(Auth::$usergroups, FULL_ADMIN)) {
    ?>
    
	<div id="resetpass">
    <?php 
    Template::Show('pilots_options.tpl');
    ?>
	</div>
    <?php 
}
?>
    
</div>
</div>

<script type="text/javascript">
$("#tabcontainer").tabs();
/*
$("#pilotgroupslink").bind('click', function(e) {
    $.get("<?php 
echo adminaction('/pilotadmin/pilotgrouptab/' . $pilotinfo->pilotid);
Example #18
0
		<?php 
}
/* End the else */
?>
		</div>
	</div>
	
	<div id="topNav">
		<ul class="nav">
			<?php 
/*	You can modify this template into a table or something, by default
			it's list elements inside of a UL. Here's a link with some info:
			
			http://articles.sitepoint.com/article/css-anthology-tips-tricks-4/2
		 */
Template::Show('core_navigation.tpl');
?>
		</ul>
	</div>
	
	<div id="bodytext">
	
	<?php 
/*	This will insert all of the "meat" of the page in there - the template
		which is generated, depending on which page you're on. To change these
		templates, check out the docs on the site. They're under the /core/templates
		folder, and to change them, copy them into the folder of your skin (the
		folder this file is in right now.
	 */
echo $page_content;
?>
<?php

if (!defined('IN_PHPVMS') && IN_PHPVMS !== true) {
    die;
}
Template::Show('finance_header.php');
?>
<h3><?php 
echo $title;
?>
</h3>
<table width="600px" class="balancesheet" cellpadding="0" cellspacing="0">

	<tr class="balancesheet_header">
		<td align="" colspan="2">Cash and Sales</td>
	</tr>
	<tr>
		<td align="right">Gross Revenue Flights: <br />
			Total number of flights: <?php 
echo $month_data->total;
?>
		</td>
		<td align="right" valign="top"><?php 
echo FinanceData::FormatMoney($month_data->gross);
?>
</td>
	</tr>
	
	<tr>
		<td align="right">Pilot Payments: </td>
		<td align="right"> <?php