Nighthawk Posted April 1, 2012 Author Report Share Posted April 1, 2012 The Sql batch file is in the .zip of this project, when u want to use this mod u must add lines/ colomns in your database. The simpliest way is to make a sql batch file that make the changes. I use navicat for this. It´s very simple to handle to me because i have more then one database on my servers ;-). Navicat is free for homeuse. In navicat is an option "run sql batch file", u choose the file and whoops all changes are done Quote Link to comment Share on other sites More sharing options...
Jacques Posted April 3, 2012 Report Share Posted April 3, 2012 Yes, but somewhere there is a code that calculate the aircraft useage. With this installation there is a table added named "cond" for aircraft condition. And after installation, and all the aircraft are brought, the conditions are not all 100%. Some of my aircraft are 95% even. So where is that condition calculated? Hi Jakes, I think the landing rate needs to come from the pirep sending. and than change the cond. line in the aircraft sql. i think thats the way but i dont know the code for it.... so after receiving a pirep (and accept it?) than it should alter the cond line witch come with this pakkage.. Greets Quote Link to comment Share on other sites More sharing options...
Nighthawk Posted April 4, 2012 Author Report Share Posted April 4, 2012 @Jacques: Yes , that is the way i want to go, but i find the right thing... Quote Link to comment Share on other sites More sharing options...
Nighthawk Posted April 5, 2012 Author Report Share Posted April 5, 2012 My Aircraft Buying mod is now on Github: https://Nighthawk666...-Buying-mod.git We all can work on this, to advance this mod. Quote Link to comment Share on other sites More sharing options...
Industrialshadow Posted April 10, 2012 Report Share Posted April 10, 2012 hi i see this on the page when i pess the options buttons <�!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <�html><�head> <�meta content="text/html; charset=unicode" http-equiv=Content-Type> <�meta name=GENERATOR content="MSHTML 9.00.8112.16430"> <�/head> <�body> <�?php // Here are the Calculations // 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"); // Condition for used Plane $userd= rand(60, 85); // Price Calculation for used Plane $acprice2="$aircraft->weight"*"$aircraft->maxpax"*("$aircraft->cruise"/100)*("$aircraft->range"*0.7 /"$aircraft->cruise"); // Condition for retired Plane $retrd= rand(25, 55); // Price for retired Plane $acprice3="$aircraft->weight"*"$aircraft->maxpax"*("$aircraft->cruise"/100)*("$aircraft->range"*0.7 /"$aircraft->cruise"); //Price for leasing Plane $lease=(("$acprice1"*"$newrd")/100)/60; $leasname="$aircraft->registration"; $leastype=M; $leasev=FinanceData::AddExpense($leasname->post->name, $lease->post->cost, $leastype->post->type); //Bought vars $boughty= 1; $lease= 2; $sellrdm= rand(750, 950); $sellprice= ("$aircraft->price"*"$sellrdm")/1000; if($aircraft->bought ==0) { // Show these if it is not bought or leased ?> <�h1><�?php echo $aircraft->registration; ?> Buy Screen<�/h1> <�img src="<�?php echo $aircraft->imagelink; ?>" height="140" width="140"> <�br><�br><�br><�br> <�table border=0 id="tabledlist" class="tablesorter"> <�thead> <�tr> <�th align="center">Status<�/th> <�th align="center">Condition<�/th> <�th align="center" >Price<�/th> <�th align="center">Buy<�/th> <�/tr> <�/thead> <�tbody> <�form action="<�?php echo adminurl('/Buysell/aircraft');?>" method="post"> <�tr> <�td align="center">New<�/td> <�td align="center"><�?php echo $newrd ?>%<�/td> <�td align="center"><�?php echo number_format((("$acprice1"*"$newrd")/100),2,",","."); echo Config::Get('MONEY_UNIT'); ?> <�/td> <�td align="center"><�input type="hidden" name="id" value="<�?php echo $aircraft->id;?>" /> <�input name="price" type="text" value="<�?php echo ((("$acprice1"*"$newrd")/100)); ?>" /> <�input name="cond" type="hidden" value="<�?php echo $newrd; ?>" /> <�input type="hidden" name="action" value="<�?php echo $action;?>" /> <�input name="icao" type="hidden" value="<�?php echo $aircraft->icao; ?>" /> <�input name="name" type="hidden" value="<�?php echo $aircraft->name; ?>" /> <�input name="fullname" type="hidden" value="<�?php echo $aircraft->fullname; ?>" /> <�input name="registration" type="hidden" value="<�?php echo $aircraft->registration; ?>" /> <�input name="maxcargo" type="hidden" value="<�?php echo $aircraft->maxcargo; ?>" /> <�input name="downloadlink" type="hidden" value="<�?php echo $aircraft->downloadlink; ?>" /> <�input name="imagelink" type="hidden" value="<�?php echo $aircraft->imagelink; ?>" /> <�input name="maxpax" type="hidden" value="<�?php echo $aircraft->maxpax; ?>" /> <�input name="weight" type="hidden" value="<�?php echo $aircraft->weight; ?>" /> <�input name="bought" type="hidden" value="<�?php echo $boughty; ?>" /> <�input name="range" type="hidden" value="<�?php echo $aircraft->range; ?>" /> <�input name="cruise" type="hidden" value="<�?php echo $aircraft->cruise; ?>" /> <�input name="minrank" type="hidden" value="<�?php echo $aircraft->minrank; ?>" /> <�input type="hidden" id="enabled" name="enabled" value="1" /> <�input type="submit" name="submit" value="Buy" /><�/td> <�/form> <�/tr> <�?php // Leasing ?> <�form action="<�?php echo adminurl('/Buysell/aircraft'); ?>" method="post"> <�tr> <�td align="center">Leasing<�/td> <�td align="center"><�?php echo $newrd ?>%<�/td> <�td align="center"><�?php echo number_format(((("$acprice1"*"$newrd")/100)/60),2,",","."); echo Config::Get('MONEY_UNIT'); ?> per Month <�/td> <�td align="center"><�input type="hidden" name="id" value="<�?php echo $aircraft->id;?>" /> <�input name="price" type="text" value="<�?php echo (((("$acprice1"*"$newrd")/100)/60)); ?>" /> <�input name="cond" type="hidden" value="<�?php echo $newrd; ?>" /> <�input type="hidden" name="action" value="<�?php echo $action;?>" /> <�input name="icao" type="hidden" value="<�?php echo $aircraft->icao; ?>" /> <�input name="name" type="hidden" value="<�?php echo $aircraft->name; ?>" /> <�input name="fullname" type="hidden" value="<�?php echo $aircraft->fullname; ?>" /> <�input name="registration" type="hidden" value="<�?php echo $aircraft->registration; ?>" /> <�input name="maxcargo" type="hidden" value="<�?php echo $aircraft->maxcargo; ?>" /> <�input name="downloadlink" type="hidden" value="<�?php echo $aircraft->downloadlink; ?>" /> <�input name="imagelink" type="hidden" value="<�?php echo $aircraft->imagelink; ?>" /> <�input name="maxpax" type="hidden" value="<�?php echo $aircraft->maxpax; ?>" /> <�input name="weight" type="hidden" value="<�?php echo $aircraft->weight; ?>" /> <�input name="bought" type="hidden" value="<�?php echo $lease; ?>" /> <�input name="range" type="hidden" value="<�?php echo $aircraft->range; ?>" /> <�input name="cruise" type="hidden" value="<�?php echo $aircraft->cruise; ?>" /> <�input name="minrank" type="hidden" value="<�?php echo $aircraft->minrank; ?>" /> <�input name="financename" type="text" value="Leasing <�?php echo $aircraft->registration; ?>" /> <�input name="cost" type="hidden" value="<�?php echo $lease; ?>" /> <�input name="type" type="hidden" value="M" /> <�input type="hidden" id="enabled" name="enabled" value="1" /> <�input type="submit" name="submit" value="Lease" /> <�/td> <�/form> <�/tr> <�/tbody> <�/table> For Leasing go <�br> <�br> <�br> <�button class="{button:{icons:{primary:'ui-icon-wrench'}}}" onclick="window.location='<�?php echo adminurl('/Buysell/aircraft');?>';">==>Back<�==<�/button> <�button class="{button:{icons:{primary:'ui-icon-wrench'}}}" onclick="window.location='<�?php echo adminurl('/finance/addexpense');?>';">==>Add Expense<�==<�/button> <�?php } else { // Show these if it is bought ?> <�h1><�?php echo $aircraft->registration; ?> Options Screen<�/h1> <�img src="<�?php echo $aircraft->imagelink; ?>" height="140" width="140"> <�br><�br><�br><�br> <�h3><�?php echo $aircraft->registration; ?> Current Aircraft<�/h2> Aircraft Name: <�?php // Show the current Condition echo $aircraft->fullname; ?> <�br> Registration: <�?php // Show the current Condition echo $aircraft->registration; ?> <�br> Max Range: <�?php // Show the current Condition echo $aircraft->range; echo Config::Get('UNITS'); ?> <�br> Weight: <�?php // Show the current Condition echo $aircraft->weight; echo Config::Get('CARGO_UNITS'); ?> <�br> Cruising Speed: <�?php // Show the current Condition echo $aircraft->cruise; ?> kts <�br> Max Passengers: <�?php // Show the current Condition echo $aircraft->maxpax; ?> <�br> Minimum Rank: <�?php // Show the current Condition echo $aircraft->ranklevel; ?> <�br> Buying Price: <�?php // Show the current Condition echo number_format($aircraft->price,2,",","."); echo Config::Get('MONEY_UNIT'); ?> <�br> Condition: <�?php // Show the current Condition echo $aircraft->cond; ?> % <�br> Va Money: <�?php // Show the current Condition $Vas = FinanceData::calculateFinances($month_info); foreach($Vas as $Va) {echo "{$month_info->revenue}";} ?> <�br> <�br> <�?php // Enable Button is now here ?> <�form action="<�?php echo adminurl('/Buysell/aircraft');?>" method="post"> <�dt>Enabled?<�/dt> <�?php $checked = ($aircraft->enabled==1 || !$aircraft)?'checked':''; ?> <�input type="checkbox" id="enabled" name="enabled" value="1" <�?php echo $checked ?> /> <�input name="price" type="hidden" value="<�?php echo $aircraft->price; ?>" /> <�input name="cond" type="hidden" value="<�?php echo $aircraft->cond; ?>" /> <�input type="hidden" name="action" value="<�?php echo $action;?>" /> <�input name="icao" type="hidden" value="<�?php echo $aircraft->icao; ?>" /> <�input name="name" type="hidden" value="<�?php echo $aircraft->name; ?>" /> <�input name="fullname" type="hidden" value="<�?php echo $aircraft->fullname; ?>" /> <�input name="registration" type="hidden" value="<�?php echo $aircraft->registration; ?>" /> <�input name="maxcargo" type="hidden" value="<�?php echo $aircraft->maxcargo; ?>" /> <�input name="downloadlink" type="hidden" value="<�?php echo $aircraft->downloadlink; ?>" /> <�input name="imagelink" type="hidden" value="<�?php echo $aircraft->imagelink; ?>" /> <�input name="maxpax" type="hidden" value="<�?php echo $aircraft->maxpax; ?>" /> <�input name="weight" type="hidden" value="<�?php echo $aircraft->weight; ?>" /> <�input name="bought" type="hidden" value="<�?php echo $aircraft->bought; ?>" /> <�input name="range" type="hidden" value="<�?php echo $aircraft->range; ?>" /> <�input name="cruise" type="hidden" value="<�?php echo $aircraft->cruise; ?>" /> <�input name="minrank" type="hidden" value="<�?php echo $aircraft->minrank; ?>" /> <�input type="hidden" name="id" value="<�?php echo $aircraft->id;?>" /> <�input type="submit" name="submit" value="Enable" /><�/td> <�/form> <�br> <�?php // Sell Function is here ?> <�?php if ($aircraft->bought ==1) { ?> <�br> <�form action="<�?php echo adminurl('/Buysell/aircraft');?>" method="post"> <�input name="price" type="hidden" value="0" /> <�input name="cond" type="hidden" value="0" /> <�input type="hidden" name="action" value="<�?php echo $action;?>" /> <�input name="icao" type="hidden" value="<�?php echo $aircraft->icao; ?>" /> <�input name="name" type="hidden" value="<�?php echo $aircraft->name; ?>" /> <�input name="fullname" type="hidden" value="<�?php echo $aircraft->fullname; ?>" /> <�input name="registration" type="hidden" value="<�?php echo $aircraft->registration; ?>" /> <�input name="maxcargo" type="hidden" value="<�?php echo $aircraft->maxcargo; ?>" /> <�input name="downloadlink" type="hidden" value="<�?php echo $aircraft->downloadlink; ?>" /> <�input name="imagelink" type="hidden" value="<�?php echo $aircraft->imagelink; ?>" /> <�input name="maxpax" type="hidden" value="<�?php echo $aircraft->maxpax; ?>" /> <�input name="weight" type="hidden" value="<�?php echo $aircraft->weight; ?>" /> <�input name="bought" type="hidden" value="0" /> <�input name="range" type="hidden" value="<�?php echo $aircraft->range; ?>" /> <�input name="cruise" type="hidden" value="<�?php echo $aircraft->cruise; ?>" /> <�input name="minrank" type="hidden" value="<�?php echo $aircraft->minrank; ?>" /> <�input type="hidden" name="id" value="<�?php echo $aircraft->id;?>" /> <�?php $checked = ($aircraft->enabled==1 || !$aircraft)?'CHECKED':''; ?> <�input type="hidden" id="enabled" name="enabled" value="0" /> <�input type="submit" name="submit" value="Sell" /><�/td> <�/form> <�br> <�strong>Sellprice: <�?php echo number_format($sellprice,2,",","."); echo Config::Get('MONEY_UNIT'); ?><�/strong> <�?php } ?> <�?php // Unlease Function is here ?> <�?php if ($aircraft->bought ==2) { ?> <�br> <�form action="<�?php echo adminurl('/Buysell/aircraft');?>" method="post"> <�input name="price" type="hidden" value="0" /> <�input name="cond" type="hidden" value="0" /> <�input type="hidden" name="action" value="<�?php echo $action;?>" /> <�input name="icao" type="hidden" value="<�?php echo $aircraft->icao; ?>" /> <�input name="name" type="hidden" value="<�?php echo $aircraft->name; ?>" /> <�input name="fullname" type="hidden" value="<�?php echo $aircraft->fullname; ?>" /> <�input name="registration" type="hidden" value="<�?php echo $aircraft->registration; ?>" /> <�input name="maxcargo" type="hidden" value="<�?php echo $aircraft->maxcargo; ?>" /> <�input name="downloadlink" type="hidden" value="<�?php echo $aircraft->downloadlink; ?>" /> <�input name="imagelink" type="hidden" value="<�?php echo $aircraft->imagelink; ?>" /> <�input name="maxpax" type="hidden" value="<�?php echo $aircraft->maxpax; ?>" /> <�input name="weight" type="hidden" value="<�?php echo $aircraft->weight; ?>" /> <�input name="bought" type="hidden" value="0" /> <�input name="range" type="hidden" value="<�?php echo $aircraft->range; ?>" /> <�input name="cruise" type="hidden" value="<�?php echo $aircraft->cruise; ?>" /> <�input name="minrank" type="hidden" value="<�?php echo $aircraft->minrank; ?>" /> <�input type="hidden" name="id" value="<�?php echo $aircraft->id;?>" /> <�?php $checked = ($aircraft->enabled==1 || !$aircraft)?'CHECKED':''; ?> <�input type="hidden" id="enabled" name="enabled" value="0" /> <�input type="submit" name="submit" value="Unlease" /><�/td> <�/form> <�br> <�?php } ?> <�br> <�br> <�?php if($aircraft->cond <�=99) { ?> <�button class="{button:{icons:{primary:'ui-icon-wrench'}}}" onclick="window.location='<�?php echo adminurl('/Buysell/repairaircraft?id='.$aircraft->id);?>';">Repair<�/button> <�?php } else {echo "Full repaired";} ?> <�br> <�br> <�br> <�br> <�button class="{button:{icons:{primary:'ui-icon-wrench'}}}" onclick="window.location='<�?php echo adminurl('/Buysell/aircraft');?>';">==>Back<�==<�/button> <�?php } ?> <�/body> i have try the option with text no working I need help Quote Link to comment Share on other sites More sharing options...
Nighthawk Posted April 11, 2012 Author Report Share Posted April 11, 2012 U have changed(or only opened) with an software that changes the code automatically! Notepad++ is free and my favourite Editor. You can found it here: http://notepad-plus-plus.org/ My Hint : I have an USB Stick with many portable tools on it called Liberkey Its a useful Toolsuite Quote Link to comment Share on other sites More sharing options...
Industrialshadow Posted April 11, 2012 Report Share Posted April 11, 2012 ah ok yeah i have used Dreamweaver..... Now i hav deinstalled and reinstalled. its working. Another Question. Any News about the FInances to bring it up when i buy a Aircraft thats decrease the va money? Quote Link to comment Share on other sites More sharing options...
Nighthawk Posted April 11, 2012 Author Report Share Posted April 11, 2012 Some People are working to get the condition function to work... Look here: http://forum.phpvms.net/topic/7037-landing-rates-and-condition/ Quote Link to comment Share on other sites More sharing options...
thomas2360 Posted May 28, 2012 Report Share Posted May 28, 2012 Hello everyone ! I've a little problem. I installed this module but now when I want to edit my schedules, there's an error : " There was an error editing the schedule: Unknown column 'week1' in 'field list' ". That comes from your module because before I didn't have any problem. Can you help me, please? Thank you ! Thomas Quote Link to comment Share on other sites More sharing options...
Nighthawk Posted May 30, 2012 Author Report Share Posted May 30, 2012 Hi, sorry, but have installed the beta phpvms? Schedules and pireps are the same like before my mod, there is nothing changed in it. Quote Link to comment Share on other sites More sharing options...
Vitoscoo Posted June 17, 2012 Report Share Posted June 17, 2012 Hey man, i'm having a little problem, when i buy the aircraft, show this: There was an error editing the aircraft. can u help me? Quote Link to comment Share on other sites More sharing options...
Nighthawk Posted June 17, 2012 Author Report Share Posted June 17, 2012 First to know is that u must!!! have installed the beta of phpvms. The next is have you filled out ALL fields ? have u inserted the sql file correct? take an look in your database /phpvms_aircrafts there must be an colomn with the name cond and some more... Quote Link to comment Share on other sites More sharing options...
JustinRomaine Posted June 23, 2012 Report Share Posted June 23, 2012 when i use the link to download it i keep getting an error saying its crupt or something plz help thnks Quote Link to comment Share on other sites More sharing options...
carlosuc99 Posted June 24, 2012 Report Share Posted June 24, 2012 Can you make a video "How I install de mod???? I can´t install the mod Quote Link to comment Share on other sites More sharing options...
carlosuc99 Posted June 25, 2012 Report Share Posted June 25, 2012 Hi; I want to set real airbus and boeing prices. The system calculate very high prices. How can I put real prices in the lastest version? I want to put real prices for 100% aircrafts, but if the aircraft isn´t perfect the price I inserted they will be slower than 100% price. It is possible????? Quote Link to comment Share on other sites More sharing options...
Nighthawk Posted June 29, 2012 Author Report Share Posted June 29, 2012 -For Manual Price input change in /phpvms/admin/templates/ops_buysellaircraft.tpl on line 58 "hidden" into "text" <input name="price" type="hidden" value="<?php echo number_format ((("$acprice1"*"$newrd")/100),2,",","."); ?>" /> <input name="price" type="text" value="<?php echo number_format ((("$acprice1"*"$newrd")/100),2,",","."); ?>" /> Quote Link to comment Share on other sites More sharing options...
cgentil Posted July 12, 2012 Report Share Posted July 12, 2012 Warning: Division by zero in /home/public_html/admin/templates/ops_aircraftbuysell.tpl on line 17 I had this erros Quote Link to comment Share on other sites More sharing options...
cgentil Posted July 12, 2012 Report Share Posted July 12, 2012 Where and how I put this? -Add in your phpvms/core/app.config.php where # Constants for 'paysource' column in ledger define('PAYSOURCE_PIREP', 1); the line: define('Payment', 2); and add where # Constants for 'paytype' column in ledge define('PILOT_PAY_HOURLY', 1); define('PILOT_PAY_SCHEDULE', 2); define('PILOT_PAY_FIXED', 3); the line: define('Payment', 4); In my app config I dont see anything like this Quote Link to comment Share on other sites More sharing options...
Nighthawk Posted July 15, 2012 Author Report Share Posted July 15, 2012 Did u have the beta installed? It works only with the beta !!! It´s important to read the Readme, if not, there will problems! Quote Link to comment Share on other sites More sharing options...
carlosuc99 Posted August 26, 2012 Report Share Posted August 26, 2012 The aircraft condition is similar when I bought the aircraft and I have four flights with this aircraft. Any Ideas??? Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted August 27, 2012 Report Share Posted August 27, 2012 Wear factor/usage based Condition alter is Not implemented yet! Hope that Info Helps ;-) Quote Link to comment Share on other sites More sharing options...
atlantica Posted September 6, 2012 Report Share Posted September 6, 2012 HI, My problem, i'm download and install add on, i'm not option maintenance, not prices and not possible change prices in /phpvms/admin/templates/ops_buysellaircraft.tpl because writing chinese . Before flight the % damage is no change (i'm land to -460fpm). Thanks for your reponse sorry my bad english Bruno Quote Link to comment Share on other sites More sharing options...
atlantica Posted September 10, 2012 Report Share Posted September 10, 2012 You are not aswer??????????? Please, please thanks Quote Link to comment Share on other sites More sharing options...
Nighthawk Posted September 10, 2012 Author Report Share Posted September 10, 2012 It is still NOT ready yet. This function must be rewritten. The condition of an aircraft is only an random generated Placeholder, nothing else. Quote Link to comment Share on other sites More sharing options...
mattia Posted September 25, 2012 Report Share Posted September 25, 2012 i get this error when buying aircraft: There was an error editing the aircraft and how to create the ledger table ?? thanks for help Quote Link to comment Share on other sites More sharing options...
Nighthawk Posted September 29, 2012 Author Report Share Posted September 29, 2012 Please read the "Readme" ! Quote Link to comment Share on other sites More sharing options...
Nighthawk Posted September 29, 2012 Author Report Share Posted September 29, 2012 Question: When i send a Form, i want to open a little new window with a new form, how i can do that? That helps me to finish the financial modul! Quote Link to comment Share on other sites More sharing options...
mitcheinfo Posted October 6, 2012 Report Share Posted October 6, 2012 Hello where I can download version 0.91 as the link does not work, thanks. Quote Link to comment Share on other sites More sharing options...
Nighthawk Posted October 7, 2012 Author Report Share Posted October 7, 2012 Try it again, i moved my Server to new Hardware.... Quote Link to comment Share on other sites More sharing options...
mitcheinfo Posted October 8, 2012 Report Share Posted October 8, 2012 I can spend the new direction, this is not going http://www.ts666-airways.de.vu/,tanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.