-
Posts
2284 -
Joined
-
Last visited
-
Days Won
2
Content Type
Profiles
Forums
phpVMS Resources
Downloads
Everything posted by mark1million
-
Is there a hook when a pilot is accepted in to the system, what triggers the sending of the email once they are accepted, could i tap in to that?
-
Not surprised Jeff that file is massive if i remember right
-
It works ok it was me not doing something right Just one more thing i need conformation with, when a pilot registers all the data is put in to the database using the function forum_register($eventinfo), now i need to update a row when a pilot is approved, in the PilotData.class.php line 448 can i add my custom $sql query in to that loop? /** * Accept the pilot (allow them into the system) */ public static function AcceptPilot($pilotid) { return self::updateProfile($pilotid, array('confirmed'=>PILOT_ACCEPTED, 'retired'=>'0')); //My custom sql update HERE } As i understand there is no hook for when a pilot is accepted just when he/she registers? Just got to finish this off and its all complete.
-
Yep, thats what i use now to insert the data in to the db. my head is starting to hurt now lol. OK so this is where i am at now. In the pilot profile main i have added a button that needs to update a record in my database when pushed by the pilot, so here is the code im using, <form action="../../insert.php" method="post"> <input name="pilotid" type="hidden" value="<?php echo $pilotcode; ?>" /> <input name="Username" type="hidden" value="<?php echo $userinfo->firstname . ' ' . $userinfo->lastname; ?> <?php echo $pilotcode; ?>" /> <input type="submit" value="Create Forum Account" /> </form> Insert works fine but i want it to update a record where the pilot id is the pilots id. When i hit the button i get "Error: Query was empty" here is also my insert.php cpde, <code> <?php $con = mysql_connect("localhost","removed","removed"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("mydatabase", $con); mysql_query("UPDATE mydatabase SET fullid_name = '$_POST[username]' WHERE s_client_name = '$_POST[pilotid]'"); if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } echo "1 record added"; mysql_close($con) ?> </code> Any help would be appreciated to fix this sucker as all i seem to do now is go round in circles and start to confuse myself even more Thanks in advance.
-
And the function put contents is your files setting the cache needs to be 777 or like Tav said your out of space. If your passwords have been compromised then you need to also identify what else has been created and cleanse it. Change cpanel passwords, take all your sites off-line, change ALL your mysql db passwords update the local.config.php, make sure you recognise ALL files on your host. Easiest way is to delete them all if you are unable to do that, firstly making a backup and moving to your pc. Reinstall phpVMS in to new databases and database names, check that no one has updated their own permissions to admin or you will be in the same boat again with regards to access.
-
My advise, start off simple and take your time to learn, Dave, the profile you are viewing is a master of phpVMS as you will see when browsing these forums.
- 1 reply
-
- 1
-
Ok so i have had another idea, instead of modding all the files i shouldn't be maybe i should go about it a bit more simpler, would i be able to add a button to the pilots profile titled "Activate Forum Account" and have the button update the field in the db? Could i also put that in to an if else statement so it will disappear once pressed or change to activated, all this thinking is hurting my little brain :lol Im no expert but i have come a long way with php and mysql since phpVMS, All help greatly appreciated though
-
Thanks for that Dave, Just one more query if i may, when a pilot registers they are set as retired =1 in the pilots database, when they are accepted by admin that table is updated with the following code, /** * Accept the pilot (allow them into the system) */ public static function AcceptPilot($pilotid) { return self::updateProfile($pilotid, array('confirmed'=>PILOT_ACCEPTED, 'retired'=>'0')); } I have a separate table in the same db that has a flag when pilots register set to 1, what i need to do is update that to 0 when they are accepted, can i just add the query below that line? example, /** * Accept the pilot (allow them into the system) */ public static function AcceptPilot($pilotid) { return self::updateProfile($pilotid, array('confirmed'=>PILOT_ACCEPTED, 'retired'=>'0')); $sql = "UPDATE `mydb`.`mytable` SET `retired` = \'0\' WHERE `mytable`.`myrow` = \'$pilotid\';"; } Or is it a bit more complex than that?, I know you shouldn't mess with the code as it can get messy on a update.
-
Thanks Dave, I will start tinkering with that lot later. For example then, if i was to just add a line to the PilotData.Class.php that should update the table as its in the same database. $sql[] = 'DELETE FROM '.TABLE_PREFIX.'mytable WHERE pilotid='.$pilotid;
-
No its fine, as long as you use the admin function within phpvms, its the last tab on the pilot admin. What i do is pilots who have not flown for 6 months get deleted, if they want to join again then that's fine they get issued another number.
-
HI guys, When you delete a pilot from the admin I want to be able to edit that code to also update another field in my database, basically what i have is external authentication switched on for IPB, I have pilot id and the password and the account creation for the fourm, i also have a further check retired=0 so when i delete a pilot that has never flown i also want to update that field to retired preventing forum access. So to finally get to the point where does that code live and can i just reference it to the pilot id and update the retired column? Thanks.
-
Hi Jon, Yes just call the mysql connection before the script, mysql_connect("localhost", "db_username", "db_pw") or die(mysql_error()); mysql_select_db("Your_database") or die(mysql_error()); Your code mysql_close(); Or to be more secure you could use a require, ie create a file, forum_config.php or anything you like and add it in to the page, <?php require("forum_config.php"); ?>
-
Hi guys i have just converted from phpbb3 to IBP and was wondering if anyone would know how to display latest forum posts on the main index page of phpvms. I have this displayed OK using phpbb3 but i cant seem to find the code anywhere for IBP. Any help would be appreciated, Thanks.
-
OK so to get help, What is your url? Are you using free or paid version? When did it last work? What have you been doing to your files, editing uploading etc?
-
HI Calum, sorry i don't have the original files i downloaded. All the files i have are heavily modified, i will try to have a look and find something you can use.
-
I don't know too much about IVAO sorry.
-
OK check your ObsessBlue folder for your header.tpl and footer.tpl files
-
Check the references to your header and footer files as they are not there
-
You could try to make a vatsim indicator and call that image code as your dynamic image
-
Nice one, ill uncomment out the xml code now then
-
Then when you click on Bid on flight this is not going to your profile. What is your site and what skin are you using? Also try using the search on here as there are plenty of threads.
-
Yes i used one for another website i had, but i cant remember what it was called now
-
HI Joeri, If you send a email to Michal Rok he will set vroute to look for a text file with all your vatsim id's in and new ones will automatically be added to your community overnight. This is the code i use to pull the vatsim id's from the database. <?php error_reporting(E_ALL); ini_set('display_errors', 'on'); include 'Your site path//core/codon.config.php'; $allpilots = PilotData::getAllPilots(); foreach($allpilots as $pilot) { echo PilotData::GetFieldValue($pilot->pilotid, 'VATSIM ID'); echo '<br />'; } ?> All you need to change is the include to your location and it does need the two // for some reason Just put that in a file and give the url to Michal.
-
If you have a look in the crystal skin its in there the format you want. http://www.flywise.co.uk/fsuk/ Have a look on their page on the right