Jump to content

Parkho

Moderators
  • Posts

    1375
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by Parkho

  1. Okay! I created a new module and used your codes in the .tpl and changed some parts to work. First off! the folder name of the module is case sensitive with the .php file inside meaning if the folder name is "Name" the .php file has to be the same as "Name.php" Secondly, In your codes I saw you were trying to connect to DB, I got rid of that part and created a data class for you so you don't need to connect to DB any more. Thirdly, I have attached the module with the tpl file and it's ready to be used. Proof: NewPage_V1.0.zip
  2. That's impossible. I think you're missing a part or something.
  3. This is wrong: $query = "SELECT SUM(load) AS totalpax FROM phpvms_pireps WHERE pilotid = '".$pilotid."'"; Try this: $query = "SELECT SUM(load) AS totalpax FROM phpvms_pireps WHERE pilotid = '$pilotid'";
  4. That's not a good idea. Imagine in the middle of the night you go to your website to just check on something and every body's sleeping. By the time you try to turn the loud music off, people are already awakened at you household.
  5. If it's working on the version you're currently having then I think you should have the missing function.
  6. . Okay create a folder and name it "name". Inside the folder create a file using notepad and name it "name.php". And now create a file and copy the entire page codes in it and name it "name.tpl". At last, write the following codes inside "name.php": class Name extends CodonModule //Name can be any names. { public function index() { $this->show('name.tpl'); } } Upload folder "name" into your core/modules folder and "name.tpl" into your lib/skins/skinfolder. Access the page by "http://www.yoursite.com/index.php/name" and you're done.
  7. That's why It's not showing since it's not linked or connected to "Maincontroller()" function. I suggest you create a module inside the system and copy your entire codes from .php to a .tpl. Then show the .tpl as a page.
  8. What page is this? I mean is this a page that belongs to phpvms like frontpage_main.tpl?
  9. I don't think you need to "Include" any files. Just the following code should give you what you're looking for: <?php MainController::Run('Pilots', 'RecentFrontPage', 5); ?>
  10. Yeah! I just found out that it works in older version of phpvms . there is a missing function in new release. TAV maybe you can provide that function.
  11. I was just looking at the code in admin ops_airlineform.tpl and noticed that the <a> tag has an id as "dialog" and a class as "JqModal"
  12. There are 2 possibilities on this issue. 1. The function that inserts the data from submitted PIREPS into PIREPS table. 2. the ACARS client that gets the data from the schedules. Now since you say the schedules are all set up I suggest you start looking into ACARS client data and make sure you have type data correctly and then check the function in PirepData.class.php. I'm pretty sure it's the ACARS since that's the first place the data will be stored before submission.
  13. try this: <a class="a.ajax" href="<?php echo url('/schedules/details/'.$route->id);?>"><?php echo $route->code . $route->flightnum?> <?php echo '('.$route->depicao.' - '.$route->arricao.')'?> </a>
  14. Hi, try this direct link :http://parkho.ir/phpvms
  15. I can offer you to use a hidden table row and then on click the table row opens showing the details in the same table. You can see it on my website. Go to www.parkho.ir -> Login using the provided username and password -> click on "try out center-pilot" -> click on "FlightBookingSystem_V1.0" then click on search and the schedules page opens up then if you click on detail image you'll see what I mean. I assure you it's working and yet it has very simple coding.
  16. Are you getting any errors? Cause it's working just fine on my side.
  17. Follow these steps: 1. Open "profile_edit.tpl" and add the following code at the end: <dt>Hub:</dt> <dd> <select name="hub"> <?php $allhubs = OperationsData::GetAllHubs(); foreach($allhubs as $hub) { if($pilotinfo->hub == $hub->icao) $sel = ' selected'; else $sel = ''; echo '<option value="'.$hub->icao.'" '.$sel.'>'.$hub->icao.' - ' . $hub->name .'</option>'; } ?> </select> </dd> 2. Open "profile.php" in core/modules/profile and change the following: protected function save_profile_post() { if(!Auth::LoggedIn()) { $this->set('message', 'You must be logged in to access this feature!'); $this->render('core_error.tpl'); return; } $pilot = Auth::$pilot; //TODO: check email validity if($this->post->email == '') { return; } $params = array( 'code' => $pilot->code, 'email' => $this->post->email, 'location' => $this->post->location, 'hub' => $pilot->hub, 'bgimage' => $this->post->bgimage, 'retired' => false ); PilotData::updateProfile($pilot->pilotid, $params); PilotData::SaveFields($pilot->pilotid, $_POST); # Generate a fresh signature PilotData::GenerateSignature($pilot->pilotid); PilotData::SaveAvatar($pilot->code, $pilot->pilotid, $_FILES); $this->set('message', 'Profile saved!'); $this->render('core_success.tpl'); } To this: protected function save_profile_post() { if(!Auth::LoggedIn()) { $this->set('message', 'You must be logged in to access this feature!'); $this->render('core_error.tpl'); return; } $pilot = Auth::$pilot; //TODO: check email validity if($this->post->email == '') { return; } $params = array( 'code' => $pilot->code, 'email' => $this->post->email, 'location' => $this->post->location, 'hub' => $this->post->hub, 'bgimage' => $this->post->bgimage, 'retired' => false ); PilotData::updateProfile($pilot->pilotid, $params); PilotData::SaveFields($pilot->pilotid, $_POST); # Generate a fresh signature PilotData::GenerateSignature($pilot->pilotid); PilotData::SaveAvatar($pilot->code, $pilot->pilotid, $_FILES); $this->set('message', 'Profile saved!'); $this->render('core_success.tpl'); } 3. Done!
  18. Is this the default table or you're using a custom one?
  19. You're missing the function in core/common. I would do it like this: In core/common/OperationsData.class.php write the following before the last bracket closes: public function GetSchedulesWithCode($code) { $sql = "SELECT * FROM phpvms_schedules WHERE code='$code'"; return DB::get_results($sql); }
  20. I just noticed in the picture, this is not an economy or comfort ticket, so I think this section should be different for pilots than regular passengers.
  21. What version do you have installed? If you have v1, that's a bit different with V2. V2 as mentioned in the topic has some issues and is no longer supported. It's gonna be V3 that I'm working on and will be available once done. About adding the pilot name, I don't know what you try to do. If you can explain more would be great.
×
×
  • Create New...