Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by DisposableHero

  1. "Time Out" is a server limit and can be adjusted. Most probably you are hitting php execution time limits. There are several repeated notes/replies about NOT using beta4, even the download page itself it says not to use it and gives a link to latest development (DEV) builds. Good luck on your new install.
  2. Upload/FTP location : yoursite.com/public/assets/img/new_image.png URL / Usage address : yoursite.com/assets/img/new_image.png Notice the difference with "public", which is the document root hence must be removed from the url.
  3. Mostly styling is done by editing CSS files of themes. No one can explain you things from the universe started with big bang to today. Even though somebody gives you the location or path to default theme's stylesheet file you still will need some more info. https://www.w3schools.com/htmL/html_css.asp W3Schools may be a good location to start reading, provides nice examples and tries to explain things at dummies level step by step. Landing Page : home.blade.php (or dashboard/index.blade.php for logged in users) Default Theme Stylesheet : ./public/assets/frontend/css/styles.css
  4. What is "Operating Costs" ? There is no such field, if you are talking about Subfleet level "Cost Per Hour" it works fine. Also other cost related areas do work well too. Time Out = Happens when the file is big enough to trigger your server's limit. It may be a size limit or uploading time limit (both related to your server's php settings). Won't Recognize Url = You need to check some basic docs (mostly about Laravel blade) to understand the path logic, also you need to double check your typo Example; Upload your file via FTP to ; yoursite/public/uploads/my-repaint.zip URL for download will be something like ; yoursite.com/uploads/my-repaint.zip Notice the difference in the path, you upload to public folder but it is not mentioned in the url 'cause it is the document root. Outside visitors (including you) can not reach files/images outside of that document root folder with URL's, so upload your files under that public folder for linking (use sub-folders under it if you need)
  5. Hi, To use a different language you need to change the locale setting from env.php because this is not a module setting and effects your phpvms v7 installation. APP_LOCALE=en is the default, you can change that to; APP_LOCALE=it for Italian and save your env.php , then go to admin -> maintenance , clean ALL CACHE or APP CACHE for this change to be recognized.
  6. Use latest beta version please. Current stable ("non-beta") version may act weird with MsFs and FBW A320 Mod (and maybe with other aircraft of MsFs)
  7. My pleasure, hope manual import trick helps you out By the way, even after a successful import, pilots need to reset their passwords to be able to login to v7. So it will take almost the same time (maybe less) for them to re-register
  8. Check your v7 database @miniarma, probably your users table is not imported correctly and "name" fields are empty. I saw people using migration without errors you described, specially not with airports or users part. Why it is generating such errors on your side is strange.
  9. You need to provide some more info for our "suggestions" Unfortunately, this really means nothing. Yes, there is an error you are facing but what it is ? This gives no idea at all. https://docs.phpvms.net/help#information-required https://docs.phpvms.net/help#logs https://docs.phpvms.net/help#enable-debug-and-debugging Without proper error details, we really can't help you much...
  10. The problem is with starting the flight Acars stucks at "Pushback" 'cause engine state does not get recognized with MsFs + FBW Airbus A320 NEO (maybe with others too). So for acars flight never leaves "Pushback" and end flight is not possible, nothing being recorded/recognized during that state. As expected, it never detects the landing in the first place to offer "End Flight". Had to manually change pirep states/fuel values etc from db for tonight's flights and then told my pilots to manually send/file their pireps via web. Just for your info.
  11. Great to see it working You can remove the name from the select 'cause you do not need to send it to SimBrief. <select id="dropdown" onChange="ChangeFormValues()"> When you submit a form, everything you gave a name will be passed with its value (if it is enabled of course). We can not disable the dropdown here 'cause we need it, but we can avoid sending it to SimBrief by removing the name="" tag Just a little trick for you.
  12. I think you can filter the json in your second dropdown, so a second call to database would not be needed / required at all. Once you create the json object from mysql results, what you need to to is ; 1. Show only the ICAO values of that json object in your first dropdown (group them by icao, so there will be only one B738) 2. And when user selects an ICAO type, use onChange() with JavaScript to show/display your second dropdown while passing the user's ICAO Type selection, here you need to show Registrations only which have the selected ICAO type by using the same json object. At this point you will have two values in your hand; ICAO, from the first dropdown and REGISTRATION from second one. Then you can pass those values to your SimBrief form. Hope you can manage to finish this and have a working solution. Since you are not using live database calls, you may not need Ajax at all and all this can be done with plain JavaScript. (even you do not need JQuery to do all the above)
  13. My pleasure and thanks for kind thoughts, considered as if I had that drink
  14. Imagine a scenario, in which pilot lands with -673 feet/minute. ( absolute value is 673 , using abs() makes it easier to handle things logically ) It will pass the first "if" check we put in 'cause we are checking anything above -500 feet/minute. Then it will reach the multiplier part, here our new $amount will be calculated like this $amount = 250 * (673 / 500) , means simply $amount = 250 * 1.346 , result will be rounded so it will be 337 ($ or Eur, your selected currency) The next step will prepare the proper Expense array to pass back, charge_to_user is true, this means that the amount will be taken from pilot's pocket In another flight, another pilot lands with -499 feet/minute, then nothing will happen and no expense will be charged to pilot 'cause it will be captured by the "if" check and it can not proceed further. Now, after the example above and basic explanation here, it is up to you and your imagination + skills
  15. There is no such expense type called Hard Landing and the transaction group you defined is wrong, also the Hard Landing([...]); will mean nothing for the code etc etc. The images you added in above message is not visible, even when I click I see a thumbnail of them, nothing readable <?php namespace App\Listeners; use App\Contracts\Listener; use App\Events\Expenses; class HardLanding_ChargePilot extends Listener { public function handle(Expenses $event) { $expenses = []; $amount = 250; // Do your check here, return an empty array if it is ok/below your check limit (no expense needed) if (abs($event->pirep->landing_rate) < 500) { return $expenses; } // You can even increase the punishment here by getting a ratio // So the harder they land, the higher the punishment $amount = round($amount * (abs($event->pirep->landing_rate) / 500)); // Prepare a New Expense here $expenses[] = new Expense([ 'type' => ExpenseType::FLIGHT, // This must be FLIGHT for a pirep related pilot charged expense 'amount' => $amount, // No need to add two more digitis, 150 is 150$ or 150Eur etc. 'transaction_group' => 'Hard Landing', // This is the group name, visible at financial report 'name' => 'Hard Landing Fee For Pirep='.$event->pirep->id, // Name is visible like a memo 'multiplier' => false, // or true (to use Subfleet GH Multiplier) 'charge_to_user' => true, // true to charge pilot, false to charge company ]); // If you wish you can create another expense here like the one above... // And finally return all new expenses you prepared return $expenses; } } As the example above, you need to follow some basic logic and do checks. If you do not follow standards it will either not work at all (errors out and causes problems) or at best it will not be applied by phpvms v7. Anyway, if you want to code your expenses or have modules/widgets etc you need to study phpvms first, to learn how it works, what it needs/expects.
  16. Sounds like the Hard Landing expense you wrote is not checking the landing rate and charging the pilot always. Which is not good of course I do not know how you coded it or did found an example and used it as it is without modifications. So without seeing the expense you are using I can not help much. For the first question, I kindly do not advise messing up with core code so I will not point you to some core files/filenames You can however, try the second/third alternatives by using the same expense logic you used for the hard landing with some enhancements to achieve what you want
  17. Not much The basics of server side / client side limitations still apply but we are much flexible there at server side (with php + laravel) I do not know if it is possible with php 5.x series but you may consider using JSON objects in that page too. Build the resultset once with php, convert it to a json object, then use it with javascript so show a dropdown for ICAO Types and then another one for Registrations
  18. In basic terms, for php this is happening ; $resultSet = "SELECT icao, registration FROM phpvms_aircraft"; > Returns a nice result $resultSet2 = "SELECT registration FROM phpvms_aircraft WHERE icao='<input type="hidden" id="typo" readonly>'"; > Returns nothing Because $avion = '<input type="hidden" id="typo" readonly>'
  19. This is happening because you are mixing up two different languages here and expecting them to work together always. PHP is a server side language, means that anything you write with it runs *BEFORE* you see the actual result/page. While on the other hand, JavaScript runs at client side, meaning that you will see it working *AFTER* the page is rendered/loaded. So what is happening in your code; 1. When you want to use that page, php code runs *before* you see it and generates the $resultset. At this moment, also the second php code block runs for $resultset2 but returns nothing because $avion has no value yet, simply it is null. 2. Page loads, you see the dropdown menu filled with $resultset data. You select one of them, and at that moment your JavaScript upIcao() start working and assigns a value to typo (which is also the $avion) Here at this exact moment, you expect for php code to pick/see that change and run again. But this can not happen, it is against the design logic of it. So for php $avion is still empty and will remain empty, no matter how many times you change your selection it will have no effect for php 'cause it worked and stopped before you even see the that dropdown items. What you can do; 1. Alter your code to select all aircraft registrations you have with php, make it ready to be used when the page loads. Then filter those results with your Javascript upIcao() and show a filtered second dropdown according to the selection of first dropdown. 2. Or you can make use of JavaScript/AJAX calls, which basically enables the use of php along with JavaScript (simple terms: it will run a php/mysql code when you change the first dropdown and then display you the results). You can find some nice examples for that and implement your own code. Hope this helps
  20. Something like this (a little bit cleaner of yours and tried to correct the form elements <?php require_once ("/Connections/db.php"); mysqli_select_db($db, $database_db); $resultSet = "SELECT icao, registration FROM phpvms_aircraft"; ?> <select name="type" id="typo" onChange="upicao()"> <?php $resultSet = mysqli_query($db, $resultSet) or die(mysqli_error($db)); while ($rows = $resultSet->fetch_assoc()) { $icao = $rows['icao']; $reg = $rows['registration']; echo '<option value="'.$icao.'">'.$icao.' '.$reg.'</option>'; } ?> </select> <?php $avion = '<input type="hidden" id="typo" readonly>'; ?> <script type="text/javascript"> function upicao() { var select = document.getElementById('typo'); var option = select.options[select.selectedIndex]; document.getElementById('typo').value = option.value; } </script> <?php if (isset($avion)) { require_once ("/Connections/db.php"); mysqli_select_db($db, $database_db); $resultSet2 = "SELECT registration FROM phpvms_aircraft WHERE icao='".$avion."'"; ?> <b>Registro</b> (opcional):&nbsp; <input name="reg" id="regist"> <?php $resultSet2 = mysqli_query($db, $resultSet2) or die(mysqli_error($db)); while ($rows = $resultSet2->fetch_assoc()) { $reg = $rows['registration']; echo '<option value="'.$reg.'">'.$reg.'</option>'; } } ?>
  21. Does the above code works ? I mean did you somehow tried to dump the form values at some point to see if it is working properly (assigning values to names etc). echo '<option value="'.$reg.'">'.$reg.'</option>'; I think the html form tags should be like <option value="E-ABCD">E-ABCD</option>, I did not tried to use them like you did with <option value=E-ABCD>E-ABCD</option> Same applies to your ICAO Type selection code too (if this is the case of course)
  22. And of course, for both alternative and third solution there should be some checks and corrections (to handle rejected pirep situations, like taking the same amount back from the pilot if the pirep gets rejected after being accepted once). So the first solution is the safest way to do it 'cause phpVMS v7 will handle all the transactions (and accept/reject/accept cases). Second and third solutions may look nicer but both needs extra attention to detail.
  23. It is not possible without writing your own code. Currently phpVMS v7 offers two ways to pay pilots; 1. By flight time 2. By each flight (fixed amount) What you need is a your own code, which basically will have two separate parts/actions; 1. Listen pirep events to get the amount of cargo they carried (pirep->fares and fare->count). Calculate the "pilot pay" for that amount/flight. 2. Send back that amount to phpVMS v7 as "pilot pay" for that pirep. For the first, you do not need to alter core code, you can do that without problems by event listeners. But for the second part, you need to alter core code to get and process your calculated pilot pay (which makes tracking updates hard). Alternatively, you can do the first part but skip the second part by paying the amount directly to pilot account after the calculation. This does not need altering core code, but no one will see the calculated pilot pay in pirep transactions, it may be only visible in admin / finances. Pilots will see increase in their current balance of course, but no details will be there. Or as a third solution, you can do the first part and change the second part a little bit. By sending that pilot pay "pilot bonus" as an "expense" (which is already built in to v7 core code so no need to alter it). While sending in the expense to v7, you need to credit the pilot account at the same time, so everyone will see it clearly when looking through pirep transactions. This probably be the nicest solution without altering the core code; 1a. Listen pirep events to get the amount of cargo they carried (pirep->fares and fare->count). Calculate the "pilot bonus" for that amount/flight. 1b. Send back that amount to phpVMS v7 as an additional "expense" for that pirep, credit pilot with the same amount. (This solution can be done in a single custom expense code) Hope this helps
  • Create New...