本文整理汇总了PHP中MainController::Run方法的典型用法代码示例。如果您正苦于以下问题:PHP MainController::Run方法的具体用法?PHP MainController::Run怎么用?PHP MainController::Run使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MainController
的用法示例。
在下文中一共展示了MainController::Run方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Dispatch
/**
* Dispatch an event to the modules, will call the
* modules with the EventListener() function.
*
* @see http://www.nsslive.net/codon/docs/events
* @param string $eventname
* @param string $origin
* @param list $params list additional parameters after $origin
* @return boolean true by default
*/
public static function Dispatch($eventname, $origin)
{
// if there are parameters added, then call the function
// using those additional params
$params = array();
$params[0] = $eventname;
$params[1] = $origin;
$args = func_num_args();
if ($args > 2) {
for ($i = 2; $i < $args; $i++) {
$tmp = func_get_arg($i);
array_push($params, $tmp);
}
}
# Load each module and call the EventListen function
if (!self::$listeners) {
self::$listeners = array();
}
foreach (self::$listeners as $ModuleName => $Events) {
$ModuleName = strtoupper($ModuleName);
global ${$ModuleName};
# Run if no specific events specified, or if the eventname is there
if (!$Events || in_array($eventname, $Events)) {
self::$lastevent = $eventname;
MainController::Run($ModuleName, 'EventListener', $params);
if (isset(self::$stopList[$eventname]) && self::$stopList[$eventname] == true) {
unset(self::$stopList[$eventname]);
return false;
}
}
}
return true;
}
示例2: define
* @author Nabeel Shahzad
* @copyright Copyright (c) 2008, Nabeel Shahzad
* @link http://www.phpvms.net
* @license http://creativecommons.org/licenses/by-nc-sa/3.0/
*/
/* This is the maintenance cron file, which can run nightly.
You should either point to this file directly in your web-host's control panel
Or add an entry into the crontab file. I recommend running this maybe 2-3am,
*/
define('ADMIN_PANEL', true);
include dirname(dirname(__FILE__)) . '/core/codon.config.php';
Auth::$userinfo->pilotid = 0;
error_reporting(E_ALL);
ini_set('display_errors', 'on');
/* Clear expired sessions */
Auth::clearExpiredSessions();
/* Update any expenses */
FinanceData::updateAllExpenses();
if (Config::Get('PILOT_AUTO_RETIRE') == true) {
/* Find any retired pilots and set them to retired */
PilotData::findRetiredPilots();
CronData::set_lastupdate('find_retired_pilots');
}
if (Config::Get('CLOSE_BIDS_AFTER_EXPIRE') === false) {
SchedulesData::deleteExpiredBids();
CronData::set_lastupdate('check_expired_bids');
}
MaintenanceData::optimizeTables();
MainController::Run('Maintenance', 'resetpirepcount');
MainController::Run('Maintenance', 'resethours');
示例3: error_reporting
<?php
include '../core/codon.config.php';
error_reporting(E_ALL);
ini_set('display_errors', 'on');
$_POST = unserialize('a:50:{s:16:"FsPAskToRegister";s:3:"yes";s:8:"UserName";s:7:"PLS0001";s:8:"Password";s:4:"none";s:11:"CompanyName";s:9:"Pulse Air";s:9:"PilotName";s:12:"Simon Newman";s:8:"FlightId";s:6:"PLS998";s:16:"OnlineNetworkNbr";s:1:"0";s:10:"FlightDate";s:10:"2009-11-21";s:12:"AircraftName";s:26:"B737-600 - Virtual Cockpit";s:12:"AircraftType";s:3:"MEJ";s:13:"NbrPassengers";s:3:"107";s:11:"CargoWeight";s:9:"19998 lbs";s:4:"Mtow";s:10:"144000 lbs";s:19:"StartAircraftWeight";s:10:"142041 lbs";s:17:"EndAircraftWeight";s:10:"135762 lbs";s:17:"StartFuelQuantity";s:8:"20430 kg";s:15:"EndFuelQuantity";s:8:"17545 kg";s:17:"DepartureIcaoName";s:25:"VMMC - Macau Intl - Macau";s:15:"ArrivalIcaoName";s:25:"ZGKL - Liangjiang - China";s:18:"DepartureLocalHour";s:5:"11:21";s:16:"ArrivalLocalHour";s:5:"12:33";s:16:"DepartureGmtHour";s:8:"04:21:00";s:14:"ArrivalGmtHour";s:8:"05:34:00";s:14:"TotalBlockTime";s:8:"01:13:16";s:19:"TotalBlockTimeNight";s:8:"00:00:00";s:16:"TotalAirbornTime";s:8:"01:06:28";s:17:"TotalTimeOnGround";s:8:"00:07:43";s:13:"TotalDistance";s:6:"267 Nm";s:11:"MaxAltitude";s:7:"10006ft";s:11:"CruiseSpeed";s:6:"258 kt";s:15:"CruiseMachSpeed";s:4:"0.40";s:18:"CruiseTimeStartSec";s:3:"206";s:17:"CruiseTimeStopSec";s:4:"3709";s:15:"CruiseFuelStart";s:8:"19705 kg";s:14:"CruiseFuelStop";s:8:"17680 kg";s:12:"LandingSpeed";s:6:"116 kt";s:12:"LandingPitch";s:4:"8.43";s:20:"TouchDownVertSpeedFt";s:7:"-203.08";s:17:"CaptainSentMayday";s:1:"0";s:9:"CrashFlag";s:1:"0";s:12:"FlightResult";s:7:"Perfect";s:17:"PassengersOpinion";s:3:"100";s:21:"PassengersOpinionText";s:142:"-Were in a better mood because they had food.<br>
-Were pleased by the music on ground. A very nice addition to their flying experience.<br>
";s:11:"FailureText";s:0:"";s:14:"CasualtiesText";s:0:"";s:14:"PilotBonusText";s:252:"You made a very nice landing. (+50)<br>
Perfect Flight, no problems and very satisfied passengers. (+150)<br>
You landed at the scheduled airport. (+30)<br>
Bad weather conditions during take-off, but a safe landing and satisfied passengers. (+26)<br>
";s:11:"BonusPoints";s:3:"256";s:17:"PilotPenalityText";s:118:"You authorized food/drink to be served too late in the flight and it was interrupted by arrival procedures. (-50)<br>
";s:14:"PenalityPoints";s:2:"50";s:20:"BitsPenalityDisabled";s:5:"12929";}');
MainController::Run('acars', 'fspax');
示例4: showModule
/**
* ShowModule
* This is an alias to MainController::Run(); calls a function
* in a module. Returns back whatever the called function returns
*
* @param string $ModuleName Module name to call
* @param string $MethodName Function which to call in the module
* @return mixed This is the return value description
*
*/
public function showModule($ModuleName, $MethodName = 'ShowTemplate')
{
return MainController::Run($ModuleName, $MethodName);
}
示例5: unserialize
<?php
include '../core/codon.config.php';
//$_GET = unserialize('s:145:"lat=40.622543&long=-73.786499&GS=0&Alt=16&IATA=VMS4567&pnumber=VMS0001&depaptICAO=KJFK&destaptICAO=KLGA&Ph=1&detailph=1&cargo=0&Regist=&Online=No";');
//MainController::Run('acars', 'fsacars');
# PIREP file
// part 1
$_GET = unserialize('a:18:{s:5:"pilot";s:10:"VMSVMS0001";s:4:"date";s:10:"2010/01/03";s:4:"time";s:8:"18:09:00";s:8:"callsign";s:0:"";s:3:"reg";s:6:"N845MJ";s:6:"origin";s:4:"KJFK";s:4:"dest";s:4:"KBOS";s:3:"alt";s:4:"KBOS";s:9:"equipment";s:4:"E145";s:4:"fuel";s:4:"1638";s:8:"duration";s:5:"00:20";s:8:"distance";s:2:"56";s:7:"version";s:4:"4015";s:4:"more";s:1:"0";s:3:"log";s:889:"[2010/01/03 18:09:00]*Flight IATA:VMS1000*Pilot Number:VMS0001*Company ICAO:VMS*Aircraft Type:E145*PAX:115*Aircraft Registration:N845MJ*Departing Airport: KJFK*Destination Airport: KBOS*Alternate Airport:KBOS*Online: No*Route:DIRECT*Flight Level:180*18:09 Zero fuel Weight: 54844 Lbs, Fuel Weight: 19448 Lbs*18:14 Parking Brakes off*18:14 Com1 Freq=128.30*18:16 VR= 209 Knots*18:16 V2= 212 Knots*18:16 Take-off*18:16 Take off Weight: 73999 Lbs*18:16 Wind: 308? @ 022 Knots Heading: 030?*18:16 POS N40? 38? 13?? W073? 46? 26?? *18:16 N11 89 N12 89*18:16 TOC*18:16 Fuel Weight: 19152 Lb*18:16 Gear Up: 221 Knots*18:19 Flaps:1 at 208 Knots*18:19 Flaps:0 at 202 Knots*18:26 Gear Down: 283 Knots*18:26 Flaps:2 at 283 Knots*18:26 Gear Up: 280 Knots*18:28 Flaps:3 at 177 Knots*18:29 Gear Down: 164 Knots*18:29 Flaps:4 at 163 Knots*18:29 Flaps:5 at 160 Knots*18:31 Wind:303?";s:6:"module";s:5:"acars";s:6:"action";s:7:"fsacars";s:4:"page";s:7:"fsacars";}');
MainController::Run('acars', 'fsacars');
$_GET = unserialize('a:18:{s:5:"pilot";s:10:"VMSVMS0001";s:4:"date";s:10:"2010/01/03";s:4:"time";s:8:"18:09:00";s:8:"callsign";s:0:"";s:3:"reg";s:6:"N845MJ";s:6:"origin";s:4:"KJFK";s:4:"dest";s:4:"KBOS";s:3:"alt";s:4:"KBOS";s:9:"equipment";s:4:"E145";s:4:"fuel";s:4:"1638";s:8:"duration";s:5:"00:20";s:8:"distance";s:2:"56";s:7:"version";s:4:"4015";s:4:"more";s:1:"1";s:3:"log";s:463:"@020 Knots Heading: 084? Ground Speed: 148 Knots Altitude 1148 ft*18:33 TouchDown:Rate -215 ft/min Speed: 119 Knots*18:33 Land*18:33 Wind:308?@023 Knots*18:33 Heading: 111?*18:33 Flight Duration: 00:17 *18:33 Landing Weight: 72688 Lbs*18:33 POS N40? 38? 29?? W073? 48? 06?? *18:34 Parking brakes on*18:34 Block to Block Duration: 00:20 *18:34 Final Fuel: 17810 Lbls*18:34 Spent Fuel: 1638 Lbls*18:34 Flight Length: 56 NM*18:34 TOD Land Length: 56 NM*";s:6:"module";s:5:"acars";s:6:"action";s:7:"fsacars";s:4:"page";s:7:"fsacars";}');
MainController::Run('acars', 'fsacars');
示例6: fileurl
<strong>Miles Flown: </strong><?php
echo StatsData::TotalMilesFlown();
?>
<br />
<strong>Total Schedules: </strong><?php
echo StatsData::TotalSchedules();
?>
<br />
<strong>Flights Today: </strong><?php
echo StatsData::TotalFlightsToday();
?>
</td>
</tr>
</table>
<?php
MainController::Run('Dashboard', 'CheckInstallFolder');
echo $updateinfo;
?>
<h3>Pilot Reports for the Past Week</h3>
<div align="center" style="width=98%">
<div id="reportcounts" align="center" width="400px" >
<img src="<?php
echo fileurl('/lib/images/loading.gif');
?>
" /><br /><br />
Loading...
</div>
</div>
<?php
if (Config::Get('VACENTRAL_ENABLED') == true && $unexported_count > 0) {
?>
示例7: count
MainController::Run('News', 'ShowNewsFront', 5);
// Show the activity feed
MainController::Run('Activity', 'Frontpage', 20);
?>
</div>
<div id="sidebar">
<h3>Recent Reports</h3>
<?php
MainController::Run('PIREPS', 'RecentFrontPage', 5);
?>
<h3>Newest Pilots</h3>
<?php
MainController::Run('Pilots', 'RecentFrontPage', 5);
?>
<h3>Users Online</h3>
<p><i>There have been <?php
echo count($usersonline);
?>
user(s), and <?php
echo count($guestsonline);
?>
guest(s) online in the past <?php
echo Config::Get('USERS_ONLINE_TIME');
?>
minutes.</i></p>
<?php
示例8:
<![CDATA[
]]>
</COMMENT>
<FLIGHTCRITIQUE>
<![CDATA[
Landing lights off during Takeoff | -5.0%
Strobe lights off during Takeoff | -5.0%
Landing lights off below FL100 | -5.0%
Wrong altimeter setting during Landing | -10.0%
Landing lights off during touchdown | -5.0%
Strobe lights off during touchdown | -5.0%
Hard touchdown | -7.5%
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Total Score for this flight | 57.5%
Landing rating | Very Bad
Pilot rating | Moderate
]]>
</FLIGHTCRITIQUE>
<FLIGHTMAPS>
<FlightMapJPG></FlightMapJPG>
<FlightMapWeatherJPG></FlightMapWeatherJPG>
<FlightMapTaxiOutJPG></FlightMapTaxiOutJPG>
<FlightMapTaxiInJPG></FlightMapTaxiInJPG>
<FlightMapVerticalProfileJPG></FlightMapVerticalProfileJPG>
<FlightMapLandingProfileJPG></FlightMapLandingProfileJPG>
</FLIGHTMAPS>
</FLIGHTDATA>';
MainController::Run('FSFK', 'pirep');