Jump to content

servetas

Moderators
  • Posts

    1726
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by servetas

  1. servetas

    LOGIN

    Who is your web hosting provider? Can you share with us your website url? Your web hosting provider is the person/company that you are paying for the hosting of your website once per month or year etc.
  2. Share with us your virtual airline url and we will be able to understand where is your website based on
  3. If you have issues with phpVMS, you can always share your questions with the community. I am personally trying to do my best in order to help as much as I can most of the members of the community. I did not understand your question exactly. If you delete phpVMS, you are going to you all of your virtual airline pireps, pilots registered, schedules etc. Could you please share with us your virtual airline url?
  4. Your web hosting provider should be able to reset or resend to you your cPanel password.
  5. This requires custom javascript coding. I do not know if it is something easy to do.
  6. The original code has something like this too: <tr> <td>Select An Airline:</td> <td> <select class="search" name="airline"> <option value="">All</option> <?php foreach ($airlines as $airline) {echo '<option value="'.$airline->code.'">'.$airline->name.'</option>';} ?> </select> </td> </tr> Did you remove "class="search"" from the dropdown menu?
  7. Did you try to add different echoes in your code in order to check where the code stops running?
  8. Try to add echoes in several part of the code. Different echoes. After that, run the module and check when echoes stopped showing. That is the best I can suggest in order to troubleshoot the reason why it is not running correctly. Does your website generally sends emails without issues?
  9. This is a commit I have made into phpVMS 5.5 on github. The issue happens when only one pilot is flying. Can you check and perform the changes stated here in your system?
  10. @vbegin7 just a small note. Not only bootstrap based themes are responsive. I agree with vbegin7 to the rest. The template that you are currently using is not responsive and that's why it is not shown correctly in smaller or even larger devices.
  11. I have made a few changes: core/modules/RouteSubmit/RouteSubmit.php: First of all, the "RouteSubmit.php" file should be placed in a folder titled "RouteSubmit" under the modules section. Replaces its contents with the following: <?php class RouteSubmit extends CodonModule { public $title = "RouteSubmit Request"; public function index() { if (!Auth::LoggedIn()) { $this->set('error', 'You are not logged in.'); $this->show('core_error'); } else { $this->set('allairlines', OperationsData::GetAllAirlines()); $this->set('allaircraft', OperationsData::GetAllAircraft()); $this->set('allairports', OperationsData::GetAllAirports()); //$this->set('airport_json_list', OperationsData::getAllAirportsJSON()); $this->set('flighttypes', Config::Get('FLIGHT_TYPES')); $this->render('routesubmit/routesubmit_index'); } } public function submit() { if ($this->post->arr == '') { $this->set('error', 'You haven\'t specified a reason for your leaeve of absence.'); $this->render('routesubmit/routesubmit_error'); $this->render('routesubmit/routesubmit_index'); } else { $this->sendmail($data); } } protected function sendmail($data) { // Form arrays $name = $this->post->name; $from = $this->post->email; $depp = $this->post->depp; $arr = $this->post->arr; $route = $this->post->route; $aircraft = $this->post->Aircraft; $fl = $this->post->fl; $dtime = $this->post->dtime; $atime = $this->post->atime; $ftime = $this->post->ftime; // Send email to admin $subject_admin = SITE_NAME.' A pilot has submitted a Route Request'; $email_admin = 'your_email_or_ADMIN_EMAIL'; $message = "From: $name | $from \n Departure: $depp \n Arrival: $arr \n Route: $route \n Aircraft: $aircraft \n Flight level: $fl \n Departure time: $dtime \n Arrival time: $atime \n Flight time: $ftime \n Essa mensagem automatica, por favor não responder"; if ($_POST['submit']) { Util::SendEmail($email_admin, $subject_admin, $message); // Show the template $this->render('routesubmit/routesubmit_submitted'); } } } Also, put the template files within a "routesubmit" folder too within the core/templates folder. Also, update the routesubmit_index.php file with this: <?php if(!defined('IN_PHPVMS') && IN_PHPVMS !== true) { die(); } ?> <body class="hold-transition login-page" style="background-color: #222222;"> <form action="<?php echo url('/routesubmit/submit');?>" method="post"> <div class="login-box"> <div class="login-logo"> <a href="" style="color: white;">Route<b>Submit</b></a> </div> <!-- /.login-logo --> <div class="login-box-body"> <p class="login-box-msg" style="font-size: 13px;">Please complete this form to send your route.</p> <form method="post" action="<?php echo url('/routesubmit/submit');?>"> <div class="form-group" align="center"> <tr> <td><strong>Name:</strong></td> <td> <?php if(Auth::LoggedIn()) { echo Auth::$userinfo->firstname .' '.Auth::$userinfo->lastname; echo '<input type="hidden" name="name" value="'.Auth::$userinfo->firstname .' '.Auth::$userinfo->lastname.'" />'; } else { ?> <input type="text" name="name" value="" /> <?php } ?> </td> </tr> </div> <div class="form-group" align="center"> <tr> <td width="1%" nowrap><strong>Endereço de E-mail:</strong></td> <td> <?php if(Auth::LoggedIn()) { echo Auth::$userinfo->email; echo '<input type="hidden" name="name" value="'.Auth::$userinfo->email.'" />'; } else { ?> <input type="text" name="email" value="" /> <?php } ?> </td> </tr> </div> <div class="form-group"> <input type="text" name="depp" class="form-control" value="<?php echo Vars::POST('lastname');?>" placeholder="Departure ICAO"> <?php if($departure_error == true) echo '<p class="error">Please enter your departure ICAO</p>'; ?> </div> <div class="form-group"> <input type="text" name="arr" class="form-control" placeholder="Arrival ICAO"> <?php if($arrival_error == true) echo '<p class="error">Please enter your arrival ICAO</p>'; ?> </div> <div class="form-group"> <input type="text" name="route" class="form-control" placeholder="Route"> <?php if($route_error == true) echo '<p class="error">Please enter your route</p>'; ?> </div> <div class="form-group"> <select name="Aircraft" class="form-control"> <option value=" ">Select your aircraft</option> <option value="2">Airbus</option> <option>Airbus A318-111</option> <option>Airbus A319-111</option> <option>Airbus A320-211</option> <option>Airbus A321-211</option> <option value="2">Boeing</option> <option>Boeing 737-800/W</option> <option>Boeing 737-900/W</option> <option>Boeing 747-400</option> <option>Boeing 747-400F</option> <option>Boeing 747-800I</option> <option>Boeing 757-200</option> <option>Boeing 767-300</option> <option>Boeing 777-200LR</option> <option>Boeing 777-300ER</option> <option>Boeing 777-200F</option> <option value="3">De Havilland</option> <option>DHC-8-400</option> <option value="4">McDonnell Douglas</option> <option>MD-11</option> <option>MD-11F</option> </select> <?php if($aircraft_error == true) echo '<p class="error">Please enter your aircraft</p>'; ?> </div> <div class="form-group"> <input type="text" name="fl" class="form-control" placeholder="Flight level"> <?php if($flightlevel_error == true) echo '<p class="error">Please enter your flight level</p>'; ?> </div> <div class="form-group"> <input type="text" name="dtime" class="form-control" placeholder="Departure Time"> <?php if($departuretime_error == true) echo '<p class="error">Please enter your departure time</p>'; ?> </div> <div class="form-group"> <input type="text" name="atime" class="form-control" placeholder="Arrival Time"> <?php if($arrivaltime_error == true) echo '<p class="error">Please enter your arrival time</p>'; ?> </div> <div class="form-group"> <input type="text" name="ftime" class="form-control" placeholder="Flight Time"> <?php if($flighttime_error == true) echo '<p class="error">Please enter your flight time</p>'; ?> </div> <input type="hidden" name="loggedin" value="<?php echo (Auth::LoggedIn())?'true':'false'?>" /> <input id="submit" type="submit" class="btn btn-success" class="btn btn-primary btn-block btn-flat" name="submit" value='Submit Route'> </td> <!-- /.col --> </tr> </form> </div> <!-- /.login-box-body --> </div> <!-- /.login-box --> Copyright &copy <?php echo date(Y); ?> CCBS Virtual Airlines - All Rights Reserved <!-- iCheck --> <script src="<?php echo SITE_URL?>/lib/skins/crewcenter/plugins/iCheck/icheck.min.js"></script> <script> $(function () { $('input').iCheck({ checkboxClass: 'icheckbox_square-blue', radioClass: 'iradio_square-blue', increaseArea: '20%' // optional }); }); </script> It worked in my localhost server (do not comment the values ): Let us know in case you have any issues.
  12. Have you modified the default schedules module? If not, can you try reuploading it? It is the core/modules/Schedules/Schedules.php file.
  13. There is not any modules that shows the pilot's awards and ranks in your phpVMS system. You can either create it on your own or use a free module. Maybe you can check the Pilot Career module I have developed which includes the pilot ranks and awards lists in one page.
  14. First of all, there is no need to check your system's database. phpVMS automatically calculates the ranklevel of each rank. The minrank value is the id of the rank you have selected. The ranklevel value is the row of the rank. The initial pilot rank is 1, then goes to 2 and so one. Of course this cannot be the same with the rank id. You may add ranks in a different row in your system for any reason. Did you check the default phpVMS schedules page? Which phpVMS version are you using?
  15. Could you please explain to us what would you like to display in your frontpage? Based on the template you are trying to display, it seems that you are trying to show all of the top pilot details. What is on your mind?
  16. Try this as a good start: https://github.com/carlosmfreitas2409/RouteSubmit/compare/master...phpmods:patch-1
  17. PHP 5 will stop being supported in the next few months. You can of course keep using the older phpVMS version although I believe that some developers will update their modules accordingly. I personally plan to rewrite most of my modules as soon as the new version is ready for release. Also, it will be easier to develop addons considering that laravel is a framework that a lot know.
  18. The above code should be placed in any of your template files. In your system, there are template files in your core/templates or lib/skins/your_skin_name folders.
  19. Before: $all_hours = TopPilotData::top_pilot_hours($today[mon], $today[year], 5); add this: $today = getdate(); As @mischka stated, $today variable is not populated correctly.
  20. $email is the pilot's email. The pilot who is sending the route request. $email_to is where the route request is sent to. I do not believe that this is an issue. First of all, instead of using this: $_POST['email'] you will have to use this: $this->post->email You will have to do so with all the variables in the SendEmail and index function. Also, your form should include a captcha but I can see that there is not any captcha validation in the SendEmail function. I would suggest removing it from your form or validating in on the form submit. Personally, I would suggest you to add several random echo's in your code. As soon as you run your code, you will be able to understand (based on the echo's) which part of the code run and which part of the code did not run.
  21. I had the same problem with one of the servers I administrate. Check this for more information: https://stackoverflow.com/questions/15438840/mysql-error-1364-field-doesnt-have-a-default-values Alternatively, you can get into your database via phpmyadmin and set a default value into the route_details field of the phpvms_acarsdata database table.
  22. Each pilot can be part of multiple groups, do you want to show all the groups the pilot is assigned to?
  23. It returns an Internal Server Error to me.
×
×
  • Create New...