-
Posts
1375 -
Joined
-
Last visited
-
Days Won
5
Content Type
Profiles
Forums
phpVMS Resources
Downloads
Everything posted by Parkho
-
Problem integrating airline stats into static website
Parkho replied to ahughes3's topic in Support Forum
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 -
What's the error message?
-
Problem integrating airline stats into static website
Parkho replied to ahughes3's topic in Support Forum
That's impossible. I think you're missing a part or something. -
Get how many passengers a pilot has carried [SOLVED]
Parkho replied to freshJet's topic in Code Snippets
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'"; -
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.
-
If it's working on the version you're currently having then I think you should have the missing function.
-
Problem integrating airline stats into static website
Parkho replied to ahughes3's topic in Support Forum
. 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. -
Problem integrating airline stats into static website
Parkho replied to ahughes3's topic in Support Forum
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. -
Problem integrating airline stats into static website
Parkho replied to ahughes3's topic in Support Forum
What page is this? I mean is this a page that belongs to phpvms like frontpage_main.tpl? -
Problem integrating airline stats into static website
Parkho replied to ahughes3's topic in Support Forum
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); ?> -
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.
-
code for using jquery modal dialog, like in admin module
Parkho replied to mischka's topic in Support Forum
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" -
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.
-
code for using jquery modal dialog, like in admin module
Parkho replied to mischka's topic in Support Forum
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> -
code for using jquery modal dialog, like in admin module
Parkho replied to mischka's topic in Support Forum
Hi, try this direct link :http://parkho.ir/phpvms -
code for using jquery modal dialog, like in admin module
Parkho replied to mischka's topic in Support Forum
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. -
Of course it worked!
-
Are you getting any errors? Cause it's working just fine on my side.
-
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!
-
Is this the default table or you're using a custom one?
-
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); }
-
FlightBookingSystem_V2.0 (Removed from Github due to some issues)
Parkho replied to Parkho's topic in Parkho's Addons
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. -
FlightBookingSystem_V2.0 (Removed from Github due to some issues)
Parkho replied to Parkho's topic in Parkho's Addons
Cool. Let me know if you need help. -
FlightBookingSystem_V2.0 (Removed from Github due to some issues)
Parkho replied to Parkho's topic in Parkho's Addons
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.