-
Posts
217 -
Joined
-
Last visited
Content Type
Profiles
Forums
phpVMS Resources
Downloads
Everything posted by HighFlyerPL185
-
I'm doing something else outside phpVMS, but I believe a cookie might solve my issue. A subdomain basically does not carry over the session from phpVMS. You login on the subdomain, it logs you in phpVMS, but it does not work on the subdomain. Works if you type in the direct link though :S
-
Which ACARS are you using? Try clearing your sessions table in the database.
-
Is there any chance you could expand on this please? I've ran into a brick wall, I'm trying to develop something outside of phpVMS, and the session is not being carried over. <?php include_once'/home/srv/public_html/core/codon.config.php'; session_set_cookie_params(0, '/', '.site_url.com'); session_start(); if(Auth::LoggedIn()) { header("Location: crew_center.php"); } else { header("Location: login.php"); } ?> When the user is logged in, it should show him crew_center.php page, but instead it is showing the login page. It works however when you enter the direct folder path in the browser. How and where would I use the $_COOKIE['VMSAUTH'] ?
-
Any ideas why Auth::LoggedIn doesn't work in mine? Basically, when logged in, the site still opens and shows the !Auth::LoggedIn state (a login form). <?php include_once'/home/flyeurov/public_html/core/codon.config.php';?> <html> <head> ... </head> </html> <body> <?php if(!Auth::LoggedIn()) { // Show these if they haven't logged in yet ?> <p>Login form etc</p> <?php } else { ?> <p>You have been logged in!</p> <?php } ?> </body> </html>
-
I'd like to place an image above the data in the ACARS bubble, however I'd like it to detect and choose an image for the airline the flight is operated for. However, I'd only like to keep one airline in the system. I imagined it like, if the flight number is FE3XXX, the ACARS bubble would display one image, but if it's any other, for e.g. FEXXXX, it would display image of another airline.
-
Va stealing other peoples images
HighFlyerPL185 replied to Strider's topic in Virtual Airlines Discussion
Lemon Party. Sorry, couldn't resist -
Sky High Design | Web Design & Fleet Repaints
HighFlyerPL185 replied to HighFlyerPL185's topic in Paid Services
I'll get back to you on PM, so we can discuss further details -
Sky High Design | Web Design & Fleet Repaints
HighFlyerPL185 replied to HighFlyerPL185's topic in Paid Services
Finished a fleet package exclusive for inSpirit Airlines, added the pictures to the first post. More pictures can be found here: https://plus.google....=CJKFqvizkIj6PA I am currently on holiday and I am not busy with any orders, so if you have any offers for me, please do not hesitate to get in touch. -
I'm having this exact issue, did anyone find a fix for this?
-
Thanks Simpilot
-
I'd like to add new flight types, and I'm wondering how can I do this? For example L would stand for low-cost. I could then display 'Low Cost' in the search results or in Flight Briefing, instead of the letter.
-
That could be useful. Can you remember the topic title or anything so I could find it quicker?
-
The issue has now passed as described above, to the record not saving. I've been fiddling with it all morning but it refuses to work, and I feel it might be just a little stupid mistake or a typo. Anyhow, take a look: schedule_results.tpl sends the variables foreach($allroutes as $route) { ... Table etc. here <form action="<?php echo url('/Booking') ;?>" method="post"> <input type="hidden" name="id" value="<?php echo $route->id; ?>"> <input type="hidden" name="code" value="<?php echo $route->code; ?>"> ... Other inputs </form> } $_REQUEST picks them up on the /Booking page. So I have this code to submit the form, the usual code from phpVMS. Using the code above, to add $network from the form into the database, the record does not get saved: <?php # Don't allow overlapping bids and a bid exists if(Config::Get('DISABLE_SCHED_ON_BID') == true && $route->bidid != 0) { ?> <a id="<?php echo $id; ?>" class="addbid btn" href="<?php echo actionurl('/schedules/addbid');?>">Book</a> <?php } else { if(Auth::LoggedIn()) { ?> <a id="<?php echo $id; ?>" class="addbid btn" href="<?php echo url('/schedules/addbid');?>">Book</a> <?php } } ?> I did some variable dumping, and they're present, hence I'm clueless where I've gone wrong. Schedules.php public function addbid() { if(!Auth::LoggedIn()) return; $routeid = $this->get->id; $network = 'VATSIM'; if($routeid == '') { echo 'No route passed'; echo var_dump($routeid); echo var_dump($network); return; } // See if this is a valid route $route = SchedulesData::findSchedules(array('s.id' => $routeid)); if(!is_array($route) && !isset($route[0])) { echo 'Invalid Route'; return; } CodonEvent::Dispatch('bid_preadd', 'Schedules', $routeid); /* Block any other bids if they've already made a bid */ if(Config::Get('DISABLE_BIDS_ON_BID') == true) { $bids = SchedulesData::getBids(Auth::$userinfo->pilotid); # They've got somethin goin on if(count($bids) > 0) { echo 'Bid exists!'; return; } } $ret = SchedulesData::AddBid(Auth::$userinfo->pilotid, $routeid, $network); CodonEvent::Dispatch('bid_added', 'Schedules', $routeid); if($ret == true) { /*echo 'Booked';*/ echo var_dump($routeid); echo var_dump($network); } else { echo 'Already booked'; } } This returns string(3) "441" string(6) "VATSIM", and the record is not added to the phpvms_bids table. The reason I have added "VATSIM" as a string was to see where the issue is. The normal event would be taking the network variable from the form like this: $routeid = $this->get->id; When I attempt to make the link as a submit button, like this: <form action="<?php echo url('/schedules/addbid');?>" id="bookform" method="post" > .. Actual form went here, and the fields e.g. <td> <input type="radio" name="network" value="Offline"/>Offline<br/> <input type="radio" name="network" value="VATSIM"/>VATSIM<br/> <input type="radio" name="network" value="IVAO"/>IVAO<br/><br/> </td> <a id="<?php echo $id; ?>" onclick="document.getElementById('bookform').submit();" class="addbid btn" href="<?php echo actionurl('/schedules/addbid');?>">Book</a> </form> It will always give me 'No Route Passed' and the id variable will be lost along the way, for some reason (prints out NULL on the next page with var_dump). And the result is the same, if I return back to original files and remove network from the system, it will still do this. But obviously, the form fields need to be somehow submitted.
-
I have now tried adding the form results into new columns of the database. For the time being, I only made one column called "network" in a varchar(25) format. <td> <input type="radio" name="network" value="Offline">Offline<br/> <input type="radio" name="network" value="VATSIM">VATSIM<br/> <input type="radio" name="network" value="IVAO">IVAO<br/><br/> </td> Schedules.php public function addbid() { if(!Auth::LoggedIn()) return; $routeid = $this->get->id; $network = $this->get->network; Further down Schedules.php $ret = SchedulesData::AddBid(Auth::$userinfo->pilotid, $routeid, $network); And finally, inside SchedulesData.class.php public static function addBid($pilotid, $routeid, $network) { $pilotid = DB::escape($pilotid); $routeid = DB::escape($routeid); if(DB::get_row('SELECT bidid FROM '.TABLE_PREFIX.'bids WHERE pilotid='.$pilotid.' AND routeid='.$routeid)) { return false; } $pilotid = DB::escape($pilotid); $routeid = DB::escape($routeid); $network = DB::escape($network); $sql = 'INSERT INTO '.TABLE_PREFIX.'bids (pilotid, routeid, dateadded, network) VALUES ('.$pilotid.', '.$routeid.', NOW(), '.$network.')'; DB::query($sql); self::setBidOnSchedule($routeid, DB::$insert_id); if(DB::errno() != 0) return false; return true; } However, the record isn't saved at all, and I can't understand why. Could it be, because the columns are empty? When I do var_dump($network), it states NULL. It's probably down to the form again, because there is no submit on the link to pass $network through, but I have no idea how to make the link below a type=submit, so it submits the form + $id. <a id="<?php echo $id; ?>" class="addbid btn" href="<?php echo url('/schedules/addbid');?>">Book</a>
-
Bare with me, I'm bad at explaining things :L It will always pass on the same $route->id, regardless of which result you click "Book" on. I was contemplating whether I placed the submit button and the inputs outside the foreach, but this isn't the case. If I click "Book" on Flight Number FE9885, it will pass 234 to the next page as $route->id. Equally, it will pass on the same Flight Number, ID and data for other flights, for example if I click "Book" next to FE6000, it will still pass FE9885 and 234 through to the next page. Hope I made more sense now. Edit:// I fixed it by fiddling with the <form> tags order, it didn't like the <form> tags outside of the table column. It's passing it now on fine
-
The flight number is generated correctly. However, like I said, it always passes on the same schedule ID for some odd reason, and does not alter it correctly to the results So, when you click the redirect "Book" link which takes you to the form, It always passes ID 234 to that form. I know this because $flightnum always displays as FE9885. Looking at the database: 234 FE 9885 EGAE EGGP
-
I'm trying to understand it atm, but I believe, and of course correct me if I'm wrong, the 'bidid' is generated past the booking? I was looking at the Javascript which triggers the addition of a bid to the system: <a id="<?php echo $route->id; ?>" class="addbid" href="<?php echo url('/schedules/addbid');?>">Book</a> It seems that it adds $route->id, so I guess it would need to be passed onto the form, the remaining details I'd require the user to fill, would be completed in the form, and the data all together would be submitted using the above code, but modified so it's $id instead now. It's merely an extension to the bidding process. I just tried $route->bidid now, and it passes always the first record's ID, regardless of which one I choose to book. I'm beginning to contemplate whether it is down to tablesorter Javascript. Edit: Just got rid of the tablesorter and it did not fix the issue.
-
Thanks for your reply, Parkho. I've followed these steps, and tried to echo the flight number on the next page, however the flight number is always the same, suggesting that it chooses always the same flight, regardless of whichever I click on. For instance, it's always the first one in the results, in this instance FE9885. <form action="<?php echo url('/Booking') ;?>" method="post"> /* Results Table */ <input type="hidden" name="id" value="<?php echo $route->id; ?>"> <input type="hidden" name="code" value="<?php echo $route->code; ?>"> <input type="hidden" name="flightnum" value="<?php echo $route->flightnum; ?>"> <input type="submit" value="Book"> </form> In the form, I have the following code: <?php $id = $_REQUEST['id']; $code = $_REQUEST['code']; $flightnum = $_REQUEST['flightnum']; ?> <form action="<?php echo url('/schedules/addbid');?>" method="post" > <div class="extended_header"></div> <div class="extended_content"> <table width="100%"> <tr> <td width="25%">Flight Number:</td> <td width="75%"><?php echo $code . $flightnum?></td> </tr> </table> </div> </form> Edit: Just echoed the $id, and it's always 234. Hmm.
-
Hi, I am attempting to pass data in perhaps some kind of a variable to another page where I can actually submit a bid, however I've never extended any modules, and I was wondering if perhaps someone could point me in the right direction, and perhaps explain how passing variables and/or generating templates work? Basically, what I'm setting out to do, is for pilots to complete a form, after they've pressed "Book" in search results. Instead, the current Javascript which adds the bid to the user's record would be moved onto the form. The form would submit information into new columns of phpvms_bids table, once the actual "Book" in the form is pressed. Edit: I had a look at it, so how could I pass $route->id onto another template? (the form)
-
Hi, I was wondering what are the current capabilities for phpVMS to generate schedule flight plans and download them for instance for FSX default, PMDG, FSInn etc?
-
Sky High Design | Web Design & Fleet Repaints
HighFlyerPL185 replied to HighFlyerPL185's topic in Paid Services
I have recently finished two new websites and a fleet order for Ohio Express. If you'd like to see how I've done, simply click on the links in the first post. -
SilverJet VA - silverjet-virtual.co.uk
HighFlyerPL185 replied to ltslack's topic in Virtual Airlines Discussion
Good luck, as said above, the airline looks promising! -
Maybe a possibility of creating redirecting links? A feature similar is available in SMF, where you create a board with a redirect link.
-
phpVMS Development Services (Modules, Skins and more!)
HighFlyerPL185 replied to Sava's topic in Paid Services
Wow, that's an incredible skin Sava! Each one gets better and better...