I want to add "Airlines" into the aircraft form,and I could enter airlines for the aircraft when aircrafts are added/edited
So I have edited admin/templates/ops_aircraftform.tpl , admin/modules/Operations/Operations.php and core/common/Operationsdata.class.php,I also insert a new field in the database,and the new field display on the form successfully,but it's still write "1" into database
I added follow codes in the ops_aircraftform.tpl
<dt>* Airlines</dt>
<dd><input name="whos" type="text" value="<?php echo $aircraft->airlines; ?>" /></dd>
here is the codes I added in the Operations.php
$data = array(
'airlines'=>$this->post>airlines,//here
'icao'=>$this->post->icao,
'name'=>$this->post->name,
'fullname'=>$this->post->fullname,
and the Operationsdata.class.php
public static function addAircaft($data)
{
$data['airlines'] = DB::escape(strtoupper($data['whos']));
$data['icao'] = DB::escape(strtoupper($data['icao']));
...........
$sql = "INSERT INTO ".TABLE_PREFIX."aircraft (`airlines`,
`icao`, `name`, `fullname`, `registration`, `downloadlink`,
`imagelink`, `range`, `weight`, `cruise`,
`maxpax`, `maxcargo`, `minrank`, `ranklevel`, `enabled`)
VALUES (
'{$data['airlines']}','{$data['icao']}', '{$data['name']}', '{$data['fullname']}', '{$data['registration']}',
'{$data['downloadlink']}', '{$data['imagelink']}', '{$data['range']}', '{$data['weight']}',
'{$data['cruise']}', '{$data['maxpax']}', '{$data['maxcargo']}', {$data['minrank']},
{$rank_level}, {$data['enabled']})";
..........
The part of edit aircraft is omitted
What should I do now?
I am sorry for my poor English
Thanks a lot