Jump to content

Aaron

Members
  • Posts

    184
  • Joined

  • Last visited

Everything posted by Aaron

  1. I constantly have the problem of pilots not knowing their pilot ID when they sign in the first time. What variable do I use to put the pilot id in the accepted email? I've tried a bunch but I can't figure it out.
  2. ah, I think I found it, I used to have another field called vatsim along with the vatsimid one, but I got rid of it and now it's trying to insert a value into a column that doesn't exist. I think it will work, thanks for the help.
  3. Well it is edited, and the edits work but there is a small error somewhere. And there is a purpose for the edit, there is some javascript involved in the way I did it.
  4. Everytime you try to register on my site, it gives me this error: Unknown column 'vatsim' in 'field list'. I've looked everywhere and can't find what's happening. I have a field I added (not a custom field) called vatsimid and ivaoid in the phpvms_pilots table, and there used to be one called vatsim and another called ivao, idk if that helps at all. Thanks
  5. http://www.canforce.org Willing to pay to have the website fixed by a pro. There's allot to be done, email me at aaron.schptizer@canforce.org
  6. Hello, Canforce is a military VA based out of Canada. We are looking to fix some website problems and are looking for a team of webmasters to help get this done. Canforce will recruit 5 or more webmasters of any skill level, even if you have no experience, as long as you are motivated we will put you on the team. The reason for the large number is so we have a wide variety of skill levels and so the work can be divided up. We are also recruiting a panel to basically make decisions for the airline, again we are hoping for at least 5 people. IF INTERESTED EMAIL: aaron.schpitzer@canforce.org
  7. Any ideas how to set the value in javascript? I want the current value of the vatsimid to show up there by default. Here's what I've tried: function VATSIMID(){ if(document.getElementById('VY').checked) { VATSIMfield.innerHTML="<input type='text' name='vatsimid' value='<?php echo $vatsimid ?>' maxlength='7' onKeyPress='return numbersonly(this, event)'/>" }else if(document.getElementById('VN').checked) { VATSIMfield.innerHTML="<input type='text' name='vatsimid' value='' disabled='disabled' style='background-color: #E6E6E6;'/>" } }
  8. holly crap it works thank you so much
  9. Catchable fatal error: Object of class stdClass could not be converted to string in /home2/canforce.....
  10. I can't use the getFieldValue() function because it isn't a custom field. I added a whole new column for it. This is what I did so far, but if I echo $vatsimid right before the ?> it gives me an error  Profile.php -> editprofile() $this->set('vatsimid', PilotData::GetVatsimId(Auth::$pilotid)); $this->set('ivaoid', PilotData::GetIvaoId(Auth::$pilotid)); PilotData public function GetVatsimId($pilotid) { $query = "SELECT vatsimid FROM phpvms_pilots WHERE pilotid='$pilotid'"; return DB::get_row($query); echo DB::$error; } public function GetIvaoId($pilotid) { $query = "SELECT ivaoid FROM phpvms_pilots WHERE pilotid='$pilotid'"; return DB::get_row($query); echo DB::$error; } profile_edit.tpl <?php if ($vatsimid==0) { $vnchecked = "checked"; $vychecked = ""; } else { $vychecked = "checked"; $vnchecked = ""; } echo $vatsimid; ?> <tr><td>Are you a VATSIM Member: *</td><td><input type="radio" name="vatsim" id="VY" value="Y" onclick="VATSIMID()" <?php echo $vychecked ?>>Yes <input type="radio" name="vatsim" id="VN" value="N" onclick="VATSIMID()" <?php echo $vnchecked ?>>No</td></tr> <tr><td>VATSIM ID:</td> <td><div id="VATSIMfield"><script type="text/javascript"> VATSIMID(); </script> </div>
  11. If you can still get to the mySql, you can try changing the password to a new password that you want and leaving the salt field blank. Not 100% sure it works but it`s worth a try
  12. I added a new field (not custom, added in table) that has VATSIM ID. I got it working so it gets put in the table upon registration, but I need to fix it so it can be eddited in the edit profile page. The problem is if I echo $vatsimid it prints "Array". Help is appreciated. This is what I have so far: Profile.php public function editprofile() { if(!Auth::LoggedIn()) { $this->set('message', 'You must be logged in to access this feature!'); $this->render('core_error.tpl'); return; } $pilotid = Auth::$userinfo->pilotid; $this->set('userinfo', Auth::$userinfo); $this->set('customfields', PilotData::GetFieldData(Auth::$pilotid, true)); $this->set('vatsimid', PilotData::GetVatsimId($pilotid)); $this->set('ivaoid', PilotData::GetIvaoId(Auth::$pilotid)); $this->set('bgimages', PilotData::GetBackgroundImages()); $this->set('countries', Countries::getAllCountries()); $this->set('pilotcode', PilotData::GetPilotCode(Auth::$userinfo->code, Auth::$userinfo->pilotid)); $this->render('profile_edit.tpl'); } PilotData public function GetVatsimId($pilotid) { $vatsimid = "SELECT vatsimid FROM phpvms_pilots WHERE pilotid='$pilotid'"; return DB::get_results($vatsimid); } public function GetIvaoId($pilotid) { $ivaoid = "SELECT ivaoid FROM phpvms_pilots WHERE pilotid='$pilotid'"; return DB::get_results($ivaoid); echo DB::$error; } profile_edit.tpl (so far) <?php if ($vatsimid==0) { $vnchecked="checked"; $vychecked=""; } else { $vychecked="checked"; $vnchecked=""; } echo $vatsimid; ?> <tr><td>Are you a VATSIM Member: *</td> <td><input type="radio" name="vatsim" id="VY" value="Y" onclick="VATSIMID()" <?php echo $vychecked ?>>Yes <input type="radio" name="vatsim" id="VN" value="N" onclick="VATSIMID()" <?php echo $vnchecked ?>>No</td> </tr>
  13. I did some screwing around and got something I'm happy with. If the radio button is set to no, then it disables and grays out the test field. registration_javascript.tpl ... function VATSIMID(){ if(document.getElementById('VY').checked) { VATSIMfield.innerHTML="<input type='text' name='vatsimid' value='' maxlength='7' onKeyPress='return numbersonly(this, event)'/>" }else if(document.getElementById('VN').checked) { VATSIMfield.innerHTML="<input type='text' name='vatsimid' value='' disabled='disabled' style='background-color: #E6E6E6;'/>" } } function IVAOID(){ if(document.getElementById('IY').checked) { IVAOfield.innerHTML="<input type='text' name='ivaoid' value='' maxlength='6' onKeyPress='return numbersonly(this, event)'/>" }else if(document.getElementById('IN').checked) { IVAOfield.innerHTML="<input type='text' name='ivaoid' value='' disabled='disabled' style='background-color: #E6E6E6;'/>" } } function numbersonly(myfield, e, dec) { var key; var keychar; if (window.event) key = window.event.keyCode; else if (e) key = e.which; else return true; keychar = String.fromCharCode(key); // control keys if ((key==null) || (key==0) || (key==8) || (key==9) || (key==13) || (key==27) ) return true; // numbers else if ((("0123456789").indexOf(keychar) > -1)) return true; // decimal point jump else if (dec && (keychar == ".")) { myfield.form.elements[dec].focus(); return false; } else return false; } </script> registration_main.tpl <tr><td>Are you a VATSIM Member: *</td> <td><input type="radio" name="vatsim" id="VY" value="Y" onclick="VATSIMID()"/>Yes <input type="radio" name="vatsim" id="VN" value="N" onclick="VATSIMID()" checked>No</td> </tr> <tr><td>VATSIM ID:</td> <td><div id="VATSIMfield"><input type='text' name='vatsimid' value='' disabled='disabled' style='background-color: #E6E6E6;'/></div> </td></tr> <tr><td>Are you an IVAO Member: *</td> <td><input type="radio" name="ivao" id="IY" value="Y" onclick="IVAOID()"/>Yes <input type="radio" name="ivao" id="IN" value="N" onclick="IVAOID()" checked>No</td> </tr> <tr><td>IVAO ID:</td> <td><div id="IVAOfield"><input type='text' name='ivaoid' value='' disabled='disabled' style='background-color: #E6E6E6;'/></div> </td></tr>
  14. I can't just use additional fields because pilots that don't have VATSIM ID or IVAO normally put something fake in there, so if it's blank I'm gonna make it not show up on their profile.
  15. Here is something else I tried <td>Are you a VATSIM Member: *</td> <td><input type="radio" name="vatsim" value="Y" onclick="<?php $vatsim="Y" ?>"/>Yes <input type="radio" name="vatsim" value="N" onclick="<?php $vatsim="N" ?>" checked>No</td> </tr> <?php if($vatsim=="Y") { ?> <tr><td>VATSIM ID: *</td> <td><input type="text" name="vatsimid" value=""> <?php if($vatsimid_error == true) echo '<p class="error">Please enter your VATSIM ID</p>'; ?> </td></tr> <?php } ?>
  16. This is what I came up with so far, only it doesn't work still: <td>Are you a VATSIM Member: *</td> <td><input type="radio" name="vatsim" value="Y"/>Yes <input type="radio" name="vatsim" value="N" checked>No</td> </tr> <script type="text/javascript"> if(document.getElementById('vatsim').value=="Y") { document.write(" <tr><td>VATSIM ID: *</td> <td><input type="text" name="vatsimid" value="" /> <?php if($vatsimid_error == true) echo '<p class="error">Please enter your VATSIM ID</p>'; ?> </td></tr>"); } </script>
  17. I made some new fields in the _pilots table that have VATSIM ID and IVAO ID. In the registration form I have a radial button that has yes/no if the user is a member of VATSIM and/or IVAO. I need to make an if statement that if the button is equal to yes, then display the id text field. Here is what I tryed, I'm hoping to do it without javascript but not sure if possible. Any ideas? <td>Are you a VATSIM Member: *</td> <td><input type="radio" name="vatsim" value="Y" />Yes <input type="radio" name="vatsim" value="N" />No</td> </tr> <?php if(vatsim=="Y") { ?> <td>VATSIM ID: *</td> <td><input type="text" name="vatsimid" value="" /> <?php if($email_error == true) echo '<p class="error">Please enter your email address</p>'; ?> </td></tr> <?php } ?>
  18. Currently the aircraft are determined by their reg. when PIREPs are submitted. I want to completely get rid of regs. This is how I think it works so far: $pirepdata['aircraft'] = registration# then it calls function-> Get Aircraft by Reg I'm assuming that $pirepdata['aircraft'] is = to registration, never checked, how do I change it so it equals the aircraft name? Then I could make it call a separate function "get aricraft by name".
  19. I fly with XAcars and that version is weird, I haven't seen it before and I switched to xplane 2 years ago, although the fields are similar, it is a 100% different look than the one I have.
  20. I have a custom field for VATSIM ID, and I want to display the Pilot and ATC ratings of the pilots. Is there a way to get this info from VATSIM instead of making another custom field. I have some pilots who keep putting in fake ratings.
  21. Aaron

    Users Online

    It give me an error, this is where I put it: else foreach($usersonline as $pilot) { if(in_array($pilot->pilotid, $shown)){ continue; } ?> <tr And for each user it puts one of these above them: Warning: in_array() expects parameter 2 to be array, null given in /home2/canforce/public_html/lib/skins/canforce_1204/layout.tpl on line 192
  22. Aaron

    Users Online

    Users Online Scott Clifford Aaron Schpitzer Scott Clifford Scott Clifford 0 guest(s) online
  23. Is there a way to make the Users Online tab on my sidebar so that it only shows users once. If someone is logged in maybe in two browsers or maybe it would do that for another reason, idk. Is there a way to show them only once?
  24. Aaron

    footer

    the clear:both worked thanks
  25. Aaron

    footer

    I want a strip of blue in my footer, but the strip always goes under my banner. Here's the code: CSS: #footerbar { height:10px; width: 760px; background-color: #4A6C90; } #footer { position: bottom; float: bottom; width: 760px;} TPL: ?> </div> <div id="footer"> <div id="footerbar"> </div> <br /> <br /> copyright © 2007 - <?php echo date('Y') ?> - <?php echo SITE_NAME; ?><br /> <!-- Please retain this!! It's part of the phpVMS license. You must display a "powered by phpVMS" somewhere on your page. Thanks! --> <a href="http://www.phpvms.net" target="_blank">powered by phpVMS</a></p> </div> </div> <br clear="all" /> </div> </body> </html>
×
×
  • Create New...