
Txmmy83
Members-
Posts
493 -
Joined
-
Last visited
Content Type
Profiles
Forums
phpVMS Resources
Downloads
Everything posted by Txmmy83
-
what I meant with amend is the placement of the following php code parts important parts are: <?php echo $page_htmlhead; ?> <?php Template::Show('core_htmlhead.tpl'); ?> </head> <body> <?php $page_htmlreq; ?> and for the Content <?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; ?> best way to start a template from scratch by clicking 'website or blog' which is the first icon on row 1 on start screen if you use Artisteer 3.1 here is my layout.tpl zipped which you can use as referrence layout.zip
-
gives that error Fatal error: Call to undefined method Aircraft_Condition::__constructor() in /home/flyeurop/public_html/core/modules/Aircraft_Condition/Aircraft_Condition.php on line 6
-
to use artisteer templates with phpVMS you have to save the artisteer template in html and need to manually amend the index.html via dreamweaver or any other suitable html editor it sounds bit difficult but it is easier than it sounds rename the index.html to layout.tpl after you made the changes making backup of the original 'unedited' template would be a good idea in case something goes wrong! I use a Artisteer Template for my own VA http://www.flyeurope-va.org
-
what post do you mean #32? if yes! getting that error with the code Fatal error: Call to undefined method CodonModule::__constructor() in /home/flyeurop/public_html/core/modules/Aircraft_Condition/Aircraft_Condition.php on line 9
-
getting a Fatal error: Can't use function return value in write context in /home/flyeurop/public_html/core/modules/Aircraft_Condition/Aircraft_Condition.php on line 34
-
//Figure out the $cond that needs to be placed into the if(($pirepinfo->landingrate > -1)&& ($pirepinfo->landingrate <-2000)) $cond = $aircraft->cond -20; but not completly sure and if you look at this example from activity module if(!$activities) { $activities = array(); } could it be that we left out some { } so that the if never takes effect? best regards Thomas
-
unfortunately I have less to null expirience in writing functions PS: it does still not update the cond column so will try again now! changed one thing
-
what is it expected to do now? when a PIREP is filed I think cond column is also involved in aircraft price calculation have to look what file type is expected
-
'cond' column is there when Nighthawks addon is installed 'cond' column is varchar(15) as I have now looked up in DB which I think is another Problem since it looks like we compare apples with stones cond- a value wont work since a varchar works more like a extended version of string type?
-
maybe the reason why it doesnt set is in that code from OperationsData.class public static function editAircraft($data) { $data['icao'] = DB::escape(strtoupper($data['icao'])); $data['name'] = DB::escape(strtoupper($data['name'])); $data['registration'] = DB::escape(strtoupper($data['registration'])); $data['range'] = ($data['range'] == '') ? 0 : $data['range']; $data['weight'] = ($data['weight'] == '') ? 0 : $data['weight']; $data['cruise'] = ($data['cruise'] == '') ? 0 : $data['cruise']; $data['range'] = str_replace(',', '', $data['range']); $data['weight'] = str_replace(',', '', $data['weight']); $data['cruise'] = str_replace(',', '', $data['cruise']); $data['maxpax'] = str_replace(',', '', $data['maxpax']); $data['maxcargo'] = str_replace(',', '', $data['maxcargo']); $data['price'] = ($data['price'] == '') ? 0 : $data['price']; $data['bought'] = ($data['bought'] == '') ? 0 : $data['bought']; $data['cond'] = ($data['cond'] == '') ? 0 : $data['cond']; $data['rep'] = ($data['rep'] == '') ? 0 : $data['rep']; if (empty($data['minrank'])) { $data['minrank'] = 0; } if ($data['enabled'] === true || $data['enabled'] == '1') $data['enabled'] = 1; else $data['enabled'] = 0; if ($data['minrank'] > 0) { $data['ranklevel'] = RanksData::getRankLevel($data['minrank']); } else { $data['ranklevel'] = 0; } $sql = "UPDATE " . TABLE_PREFIX . "aircraft SET "; $sql .= DB::build_update($data); $sql .= " WHERE `id`={$data['id']}"; /*$sql = "UPDATE " . TABLE_PREFIX."aircraft SET `icao`='{$data['icao']}', `name`='{$data['name']}', `fullname`='{$data['fullname']}', `registration`='{$data['registration']}', `downloadlink`='{$data['downloadlink']}', `imagelink`='{$data['imagelink']}', `range`='{$data['range']}', `weight`='{$data['weight']}', `cruise`='{$data['cruise']}', `maxpax`='{$data['maxpax']}', `maxcargo`='{$data['maxcargo']}', `minrank`={$data['minrank']}, `ranklevel`={$rank_level}, `enabled`={$data['enabled']}, `bought`={$data['bought']}, `cond`={$data['cond']},`rep`={$data['rep']} WHERE `id`={$data['id']}";*/ $res = DB::query($sql); if (DB::errno() != 0) return false; CodonCache::delete('all_aircraft'); CodonCache::delete('all_aircraft_enabled'); CodonCache::delete('all_aircraft_search'); CodonCache::delete('all_aircraft_search_enabled'); return true; } best regards Thomas
-
default name of datafield for registration in PIREP is Aircraft it gives an Int Value example: my ATR72 registration IEA0004 has Int value 195 this number equals the datafield ID in Aircraft Tab in DB
-
if I add that to Aircraft_Condition.php in modules folder I get that error: Parse error: syntax error, unexpected ';', expecting T_FUNCTION in /home/flyeurop/public_html/core/modules/Aircraft_Condition/Aircraft_Condition.php on line 40 the error is now fixed missed the closing } or did I miss something? guys if we get that Project to work it will enhance Nighthawks great mod by 1000%
-
dont exactly know what the error is but from what I see in the error warning it gets a String but wants a Function as return value how does Aircraft_Condition.php look like?
-
you could try adding a custom pirep field for landing rate maybe it is possible to hand over that value to the datafield in DB where do you but this function?
-
what is the filename PIREPAdmin.php? and where have no expirience messing around with the PIREP functions thanks in advance! Thomas
-
Johan the condition table has nummeric int value not % Instead of: $cond = $cond -7% try using: $cond = $cond -7 etc. but even then I am not sure if it is possible to modify the kACARS_Free.php free to do what you want
-
found it it is in ops_aircraftbuysell.tpl starting line 14 // Condition for new Plane $newrd= rand(95, 100); // Price Calculation for new Plane $acprice1="$aircraft->weight"*"$aircraft->maxpax"*("$aircraft->cruise"/100)*("$aircraft->range"*0.7 /"$aircraft->cruise");
-
wear factor is not yet implemented!
-
the airport icao lookup doesn't work at the moment or at least it is maybe only terrible slow but I think you can still add an airport (search wikipedia in the info you find coordinates a click on it gives you LAT LON to work with phpVMS) you can use to set manually
-
thank you very much
-
I expirienced the same especially if you use inline style definitions when someone modify later which I wanted to do by myself layout will mix up I don't have a better solution at the moment as direct edit on the server which is a bit of a problem when an airline hand that task away to its hub manager or whatever the position in a VA is called (since hand over of FTP and server login data = not good idea! only do if you really trust in your hub manager and even then I as admin would think twice if I want to give a member that much competence!)
-
yes please post the codes I am interested too
-
i think their have to be a second elseif for the "on time" with something like ($actualtime <= $schedtime) best regards Thomas
-
or in case you want restore it anytime later <!-- <li><a href="<?php echo url('/finances');?>">View VA Finances</a></li> --> that just comment it out and it would not show up!
-
Parkho, you get an reputation point from me too but a question is there a public function that gives all tail-registration for aircraft type (icao) ?