Nighthawk Posted April 18, 2013 Author Report Share Posted April 18, 2013 when u haven´t a problem, then u didn´t need it. But when u want at gifthub. Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted April 18, 2013 Report Share Posted April 18, 2013 have a slight problem when editing schedules after installing the plugin There was an error editing the schedule: Unknown column 'week1' in 'field list' Quote Link to comment Share on other sites More sharing options...
Nighthawk Posted April 18, 2013 Author Report Share Posted April 18, 2013 yes that´s it i think, which version did you own? On gifthub there is v2.1.934-170-g5ca803a I have Version v2.1.934-157-g7ca06a3 I checked it, and its true. In Schedules i can set an parameter week 1-4 I posted a pic of my schedule database Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted April 18, 2013 Report Share Posted April 18, 2013 Version 2.1.v2.1.935 Quote Link to comment Share on other sites More sharing options...
Nighthawk Posted April 18, 2013 Author Report Share Posted April 18, 2013 yes, that is with the security fix, but they didn´t update the beta lol. i must update manually and compare every file in it. Security Fix released for 2.1.x - posted 24 August 2012, 4:00 pm A small patch to fix a security flaw has been released; it applies to version 2.1.934 and below. It doesn't apply to any of the beta versions. Replace the admin/index.php and admin/action.php files. Thanks for Jacob Axford for finding and bringing the flaw to my attention. The updated version is now 2.1.935. Nabeel Beta has some more options in schedule edit Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted April 18, 2013 Report Share Posted April 18, 2013 is the beta that in dev branch on github Quote Link to comment Share on other sites More sharing options...
Nighthawk Posted April 18, 2013 Author Report Share Posted April 18, 2013 https://github.com/phpVMS/phpVMS and the tutorial http://forum.phpvms.net/page/index.html/_/getting-started/beta-versions-r4 Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted April 19, 2013 Report Share Posted April 19, 2013 so I am now on a beta version seems all working but I have to change my schedules since the dont show up when using the week thing Quote Link to comment Share on other sites More sharing options...
Nighthawk Posted April 19, 2013 Author Report Share Posted April 19, 2013 Yes, that´s right. Quote Link to comment Share on other sites More sharing options...
Nighthawk Posted April 19, 2013 Author Report Share Posted April 19, 2013 Hi, found a calculation error (repair cost are too expensive) ops_aircraftrepair.tpl line 13 must be: $repcost=(((((("$aircraft->price" *100)/"$aircraft->cond")/ 100)*("$repdif")/100)*"$repo")/100) *$repmax; Download fixed Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted April 19, 2013 Report Share Posted April 19, 2013 I have modified my fleet page to show condition and unit cost (new) in view http://www.flyeurope-va.org/index.php/vfleettracker 1 Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted April 19, 2013 Report Share Posted April 19, 2013 another discoverage why does the price for sell aircraft increases after two flights purchased the ATR72 for 20000000$ and now it will sell for Sellprice: 20.302.507,36$ any real Airline would be happy if it is that way in reality Quote Link to comment Share on other sites More sharing options...
Nighthawk Posted April 19, 2013 Author Report Share Posted April 19, 2013 You have unload the Cargo ? Joke, i take a look in the evening. Next time your are my Betatester lol Quote Link to comment Share on other sites More sharing options...
wordfly567 Posted April 19, 2013 Report Share Posted April 19, 2013 I installed your mod but the prices of the planes are all at zero cost Quote Link to comment Share on other sites More sharing options...
Nighthawk Posted April 19, 2013 Author Report Share Posted April 19, 2013 You must set it manual in Aircraft edit. There is an xls in #1 with prices. Quote Link to comment Share on other sites More sharing options...
wordfly567 Posted April 19, 2013 Report Share Posted April 19, 2013 yes but when i set and click edit remain 0 Quote Link to comment Share on other sites More sharing options...
Nighthawk Posted April 19, 2013 Author Report Share Posted April 19, 2013 have you inserted the sql? Have you an different database path and not phpvms ? When no, that´s not good. If have the default phpvms path look in your database phpvms_aircrafts if there is an coloumn with name price, bought , rmtime, if it isnt there you must insert the sql included in my package Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted April 19, 2013 Report Share Posted April 19, 2013 could it be that he is on Release Version and not the Beta? Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted April 19, 2013 Report Share Posted April 19, 2013 another discoverage why does the price for sell aircraft increases after two flights purchased the ATR72 for 20000000$ and now it will sell for Sellprice: 20.302.507,36$ any real Airline would be happy if it is that way in reality I think it should be 20.000.000-302.507,36$ Quote Link to comment Share on other sites More sharing options...
Nighthawk Posted April 20, 2013 Author Report Share Posted April 20, 2013 admin/template/ops_aircraftbuysell.tpl Line474 change from <strong>Sellprice: <?php echo number_format((("$aircraft->price" / "$aircraft->cond")*100),2,",","."); echo Config::Get('MONEY_UNIT'); ?></strong> to <strong>Sellprice: <?php echo number_format("$aircraft->price" * ("$aircraft->cond" / 100),2,",","."); echo Config::Get('MONEY_UNIT'); ?></strong> Fixed in download Thanx Txmmy83 ;-) Quote Link to comment Share on other sites More sharing options...
lorlandi Posted April 21, 2013 Report Share Posted April 21, 2013 Our Airline will be happy to be a tester when you release de cargo option in the future. Congratulations for this job and thanks for your time. Regards Quote Link to comment Share on other sites More sharing options...
Nighthawk Posted April 21, 2013 Author Report Share Posted April 21, 2013 this will work with cargo, there isn´t a pax calculation anymore. This was only for aircraft price calculations in the last versions. It will work now with all aircrafts. You need only a phpvms beta version. Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted April 22, 2013 Report Share Posted April 22, 2013 another small thing of cosmetic nature Percentages like 96.9075% doesn't look that perfect when echoeing on fleet pages Quote Link to comment Share on other sites More sharing options...
Nighthawk Posted April 22, 2013 Author Report Share Posted April 22, 2013 wait with it, i have a better solution for it Do you mean something like this?? But isn´t useful for admins... Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted April 22, 2013 Report Share Posted April 22, 2013 That is Great for Fleet page absolutely no Problem with the percentage in Admin as that is only shown to me as Admin I have another Problem when hitting repair I get <�!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 // Variables here $repdif= 100-"$aircraft->cond"; $repo= rand(40, 100); // Add random Repaircost modifier $repmax= 0.2; // Max Repaircosts from Buying Price 1 = 100% , 0.8 = 80% $repcost=(((((("$aircraft->price" *100)/"$aircraft->cond")/ 100)*("$repdif")/100)*"$repo")/100) *$repmax; $repcu= rand(0, 10); // Add random Repairtime modifier $reptime= "$repdif" + "$repcu"; // Repairtime with Random Modifier // VA Money without Balance $vatotal = mysql_query("SELECT SUM(revenue) as revenue_sum FROM phpvms_pireps "); $vtot = mysql_fetch_assoc($vatotal); $vatotal2 = $vtot['revenue_sum']; //Raw $vatotal3 = round($vatotal2, 2); //Round $vatotal4 = number_format($vatotal3, 2, '.', ','); //Format // Fleet Price of all bought Aircrafts $vabal = mysql_query("SELECT SUM(Price) as Balance_sum FROM phpvms_aircraft WHERE bought = 1 "); $vbal = mysql_fetch_assoc($vabal); $vabal2 = $vbal['Balance_sum']; //Raw $vabal3 = round($vabal2, 2); //Round $vabal4 = number_format($vabal3, 2, '.', ','); //Format // Fleet Repair Cost of all Aircrafts $rep1 = mysql_query("SELECT SUM(repvalue) as rep_sum FROM phpvms_aircraft "); $rep2 = mysql_fetch_assoc($rep1); $rep3 = $rep2['rep_sum']; //Raw $rep4 = round($rep3, 2); //Round $rep5 = number_format($rep4, 2, '.', ','); //Format //************************************************ Money Balance here************************************ $Balance = -0; // Va Money Zeroing //******************************************************************************************************* // VA Money with Balance $vabatal = "$vatotal2" - ("$vabal2"+"$Balance") - "$rep3"; $vabaltal2 = number_format(("$vatotal2" - ("$vabal2"+"$Balance") - "$rep3" ), 2, '.', ','); //Raw //echo $vabaltal2; IF ($aircraft->cond <�=0) //Don�t Change this!!!! {$aendern = "UPDATE phpvms_aircraft Set cond = '1' WHERE registration = '{$aircraft->registration}'"; $update = mysql_query($aendern); } ?> <�/br> <�?php ?> <�h1><�?php echo $aircraft->registration; ?> Repair Screen<�/h1> <�img src="/phpvms/admin/lib/images/hangar.png" height="340" width="550" alt="Hangar"> <�br> <�br> <�br> <�br> Current Condition: <�?php // Show the current Condition echo $aircraft->cond; ?> % <�/br> <�?php ?> <�table border=1 id="tabledlist" class="tablesorter2"> <�tr> <�th align="center" >Time<�/th> <�th align="center">Value<�/th> <�/tr> <�/thead> <�tbody> <�td> Time and Date: <�/TD> <�td> <�?php //************************* $RMTIME*********************** $time = date("Y-m-d H:i:s"); print $time; ?> <�/td> <�tr> <�td> Repair will be finished : <�/td> <�td> <�?php $date = time(); // aktuelles Datum //echo date('d.m.Y h:i:s', $date) . " ?> <�?php $stunden = $reptime; // z.B. ein Tag $enddatum = $date + ($stunden * 60 * 60); // Ein Tag sp�ter (stunden * minuten * sekunden) $datstring = date('Y-m-d H:i:s', $enddatum) ; // Datum im DB-Format ?> <�?php $eurodate = date('Y-m-d H:i:s', strtotime($datstring)); // Ins europ�ische Format umwandeln echo "$eurodate "; ?> <�/td> <�/tr> <�br> <�?php //Repair will be finished echo $newtime; ?> <�?php $repcost2= "$aircraft->repvalue" + "$repcost"; ?> <�br> <�br> <�table border=1 id="tabledlist" class="tablesorter"> <�thead> <�tr> <�th align="center" >To Repair<�/th> <�th align="center">Repair Price<�/th> <�th align="center" Repair Options<�/th> <�/tr> <�/thead> <�tbody> <�form action="<�?php echo adminurl('/Buysell/aircraft');?>" method="post"> <�tr> <�td align="center"><�?php echo $repdif ?>%<�/td> <�td align="center"><�?php echo number_format($repcost,2,",","."); echo Config::Get('MONEY_UNIT'); ?><�/td> <�td <�input type="hidden" name="id" value="<�?php echo $aircraft->id;?>" /> <�?php if ( $repcost > $vabaltal2) { ?> <�input name="price" type="hidden" value="<�?php echo $aircraft->price; ?>" /> <�input name="cond" type="hidden" value="100" /> <�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 name="repvalue" type="hidden" value="<�?php echo $repcost2; ?>" /> <�input name="rmtime" type="hidden" value="<�?php echo $eurodate; ?>" /> <�input type="hidden" name="id" value="<�?php echo $aircraft->id;?>" /> <�input name="rep" type="hidden" value="1" /> <�input type="hidden" id="enabled" name="0" /> <�input type="submit" name="submit" value="Repair" /><�/td> <�/form> <�?php } else { echo "Not enough Money"; } ?> <�/tr> <�/tbody> <�/table> <�br> <�br> <�br> <�button class="{button:{icons:{primary:'ui-icon-wrench'}}}" onclick="window.location='<�?php echo adminurl('/operations/buysellaircraft?id='.$aircraft->id);?>';">==>Back<�==<�/button> <�/body> <�/html> Quote Link to comment Share on other sites More sharing options...
Nighthawk Posted April 22, 2013 Author Report Share Posted April 22, 2013 it seems that there is something corrupted?!? � Is it in the ops_aircraftrepair.tpl? It must be (My Settings!!!): <!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 // Variables here $repdif= 100-"$aircraft->cond"; $repo= rand(40, 100); // Add random Repaircost modifier $repmax= 1; // Max Repaircosts from Buying Price 1 = 100% , 0.8 = 80% $repcost=(((((("$aircraft->price" *100)/"$aircraft->cond")/ 100)*("$repdif")/100)*"$repo")/100) *$repmax; $repcu= rand(0, 10); // Add random Repairtime modifier $reptime= "$repdif" + "$repcu"; // Repairtime with Random Modifier // VA Money without Balance $vatotal = mysql_query("SELECT SUM(revenue) as revenue_sum FROM phpvms_pireps "); $vtot = mysql_fetch_assoc($vatotal); $vatotal2 = $vtot['revenue_sum']; //Raw $vatotal3 = round($vatotal2, 2); //Round $vatotal4 = number_format($vatotal3, 2, '.', ','); //Format // Fleet Price of all bought Aircrafts $vabal = mysql_query("SELECT SUM(Price) as Balance_sum FROM phpvms_aircraft WHERE bought = 1 "); $vbal = mysql_fetch_assoc($vabal); $vabal2 = $vbal['Balance_sum']; //Raw $vabal3 = round($vabal2, 2); //Round $vabal4 = number_format($vabal3, 2, '.', ','); //Format // Fleet Repair Cost of all Aircrafts $rep1 = mysql_query("SELECT SUM(repvalue) as rep_sum FROM phpvms_aircraft "); $rep2 = mysql_fetch_assoc($rep1); $rep3 = $rep2['rep_sum']; //Raw $rep4 = round($rep3, 2); //Round $rep5 = number_format($rep4, 2, '.', ','); //Format //************************************************ Money Balance here************************************ $Balance = -2131754575.73; // Va Money Zeroing //******************************************************************************************************* // VA Money with Balance $vabatal = "$vatotal2" - ("$vabal2"+"$Balance") - "$rep3"; $vabaltal2 = number_format(("$vatotal2" - ("$vabal2"+"$Balance") - "$rep3" ), 2, '.', ','); //Raw //echo $vabaltal2; IF ($aircraft->cond <=0) //Don´t Change this!!!! {$aendern = "UPDATE phpvms_aircraft Set cond = '1' WHERE registration = '{$aircraft->registration}'"; $update = mysql_query($aendern); } ?> </br> <?php ?> <h1><?php echo $aircraft->registration; ?> Repair Screen</h1> <img src="/phpvms/admin/lib/images/hangar.png" height="340" width="550" alt="Hangar"> <br> <br> <br> <br> Current Condition: <?php // Show the current Condition echo $aircraft->cond; ?> % </br> <?php ?> <table border=1 id="tabledlist" class="tablesorter2"> <tr> <th align="center" >Time</th> <th align="center">Value</th> </tr> </thead> <tbody> <td> Time and Date: </TD> <td> <?php //************************* $RMTIME*********************** $time = date("Y-m-d H:i:s"); print $time; ?> </td> <tr> <td> Repair will be finished : </td> <td> <?php $date = time(); // aktuelles Datum //echo date('d.m.Y h:i:s', $date) . " ?> <?php $stunden = $reptime; // z.B. ein Tag $enddatum = $date + ($stunden * 60 * 60); // Ein Tag später (stunden * minuten * sekunden) $datstring = date('Y-m-d H:i:s', $enddatum) ; // Datum im DB-Format ?> <?php $eurodate = date('Y-m-d H:i:s', strtotime($datstring)); // Ins europäische Format umwandeln echo "$eurodate "; ?> </td> </tr> <br> <?php //Repair will be finished echo $newtime; ?> <?php $repcost2= "$aircraft->repvalue" + "$repcost"; ?> <br> <br> <table border=1 id="tabledlist" class="tablesorter"> <thead> <tr> <th align="center" >To Repair</th> <th align="center">Repair Price</th> <th align="center" Repair Options</th> </tr> </thead> <tbody> <form action="<?php echo adminurl('/Buysell/aircraft');?>" method="post"> <tr> <td align="center"><?php echo $repdif ?>%</td> <td align="center"><?php echo number_format($repcost,2,",","."); echo Config::Get('MONEY_UNIT'); ?></td> <td <input type="hidden" name="id" value="<?php echo $aircraft->id;?>" /> <?php if ( $repcost > $vabaltal2) { ?> <input name="price" type="hidden" value="<?php echo $aircraft->price; ?>" /> <input name="cond" type="hidden" value="100" /> <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 name="repvalue" type="hidden" value="<?php echo $repcost2; ?>" /> <input name="rmtime" type="hidden" value="<?php echo $eurodate; ?>" /> <input type="hidden" name="id" value="<?php echo $aircraft->id;?>" /> <input name="rep" type="hidden" value="1" /> <input type="hidden" id="enabled" name="0" /> <input type="submit" name="submit" value="Repair" /></td> </form> <?php } else { echo "Not enough Money"; } ?> </tr> </tbody> </table> <br> <br> <br> <button class="{button:{icons:{primary:'ui-icon-wrench'}}}" onclick="window.location='<?php echo adminurl('/operations/buysellaircraft?id='.$aircraft->id);?>';">==>Back<==</button> </body> </html> Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted April 22, 2013 Report Share Posted April 22, 2013 re-downloaded the mod and reuploaded the ops-aircraftrepair.tpl now it works it somehow get corrupted while uploading during install even a huge file size difference 21000+ corrupted to correct 6030 Quote Link to comment Share on other sites More sharing options...
mattsmith Posted April 23, 2013 Report Share Posted April 23, 2013 Where do put the picture of the hanger so it sows up when you click on repair? Quote Link to comment Share on other sites More sharing options...
Nighthawk Posted April 24, 2013 Author Report Share Posted April 24, 2013 "/phpvms/admin/lib/images/hangar.png" In ops_aircraftrepair.tpl you can find this line: <img src="/phpvms/admin/lib/images/hangar.png" height="340" width="550" alt="Hangar"> In the zipped pack it is in the correct path. Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted April 24, 2013 Report Share Posted April 24, 2013 "/phpvms/admin/lib/images/hangar.png" In ops_aircraftrepair.tpl you can find this line: <img src="/phpvms/admin/lib/images/hangar.png" height="340" width="550" alt="Hangar"> In the zipped pack it is in the correct path. hangar image is jpg not png Note: that path only works when you installed phpvms into a folder phpvms! that should be better: <img src="<?php echo SITE_URL?>/admin/lib/images/hangar.jpg" height="340" width="550" alt="Hangar"> 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.