Good day,
I have the following code, but get the following error:
Parse error: syntax error, unexpected T_VARIABLE in /home/jdsarcco/public_html/uvsaaf/core/modules/Aircraft_Condition/Aircraft_Condition.php on line 35
here is the code:
[code]<?php
/**
- phpVMS - Virtual Airline Administration Software
- Copyright © 2008 Nabeel Shahzad
- For more information, visit www.phpvms.net
- Forums: http://www.phpvms.net/forum
- Documentation: http://www.phpvms.net/docs
- phpVMS is licenced under the following license:
- Creative Commons Attribution Non-commercial Share Alike (by-nc-sa)
- View license.txt in the root, or visit http://creativecommons.org/licenses/by-nc-sa/3.0/
- @author Johan Jacobs
- @copyright Copyright © 2012, Johan Jacobs
- @link http://www.fsworld.co.za
-
@license http://creativecommons.org/licenses/by-nc-sa/3.0/
*/
class Aircraft_Condition extends CodonModule
// Register our module to listen for events
{
public function __index()
{
CodonEvent::addListener(‘Aircraft_Condition’);
}
// Example:
public function EventListener($eventinfo)
{
if($eventinfo[0] == 'pirep_filed'
//Retrieve the aircraft info based on the aircraft id stored in the pirep row
$aircraft = OperationsData::getAircraftInfo($pirepinfo->aircraftid);
}
//Figure out the $cond that needs to be placed into the
//if($pirepinfo->landingrate > -200 && $pirepinfo->landingrate <-500)
//$cond = $aircraft->cond -20;
//update the 'cond' column using the aircraft id for row identification
//$update = OperationsData::editAircraft(array('id'=>$pirepinfo->aircraftid, 'cond'=>$cond));
//}
}[/code]
Can someone point out my mistake, and pehaps explain briefly waht the T - function and T variables mean?
Best regards,
Jakes