Jump to content

Kieran

Members
  • Posts

    176
  • Joined

  • Last visited

Everything posted by Kieran

  1. Say If I wanted to add a field to each flight saying whether the flight was regional or not, how would I go about it? How would I access the data from the new field in the For() loop? Also, where can I change the default fuel price? Thanl you very much! Kieran
  2. Thanks, I worked it out... I was having a look at the 'only show routes that match the users last pirep position'... Uncommented the code, but it still seems to display all of the routes?
  3. Hello, My website has three airlines integrated into it... KLM, Ryanair and EasyJet. I'm a member of the 'KLM' airline, but I can bid on routes from the other two airlines! They show on the available routes section. How would I stop this? Thanks... Kieran. PS. I can add this as a bug in the tracker if you like!
  4. Kieran

    Passwords

    Thanks a lot, just what I needed! Also, what's the name of the function that email's people?
  5. Kieran

    Passwords

    So if, for example, I had a freshly-inputted password stored in $password, I could, -Get the Salt from the database -MD5 the inputted password -Add $password and $salt together (in that order?) -MD5 that and store it in $encpw -The value in the 'password' field of the database would equal $encpw Am I guessing correctly here? Thanks! Ps. Well done on the new forums I love them
  6. Kieran

    Passwords

    Hello all, Although I'm a fluent php/mysql/css coder, I'm ashamed to say that I don't know the first thing about MD5 and general encryption. I'm a little confused as to how this works... When I generate an MD5 hash using PHP, the generated hash is different to that stored in the database? Why is this? Also, if anybody has time, could they please explain what a 'salt' is... Thanks, Kieran
  7. Doesn't seem to be inserting anything either :s
  8. CSS is a way of defining website styles in one place - so for example, if you wanted to change your header style (<h1>) just edit the CSS for it and it would apply to all your headers - no need to edit one by one.
  9. Kieran

    Enquiries

    Have done, but that post is doormant
  10. <?php class ForumRegister extends CodonModule { public function __construct() { CodonEvent::addListener('ForumRegister'); } public function EventListener($eventinfo) { if($eventinfo[0] == 'registration_complete') { echo 'Receiving You!'; $userinfo = $eventinfo[2]; $fname = $userinfo['firstname']; $lname = $userinfo['lastname']; $pass = $userinfo['password1']; $email = $userinfo['email']; $code = $userinfo['code']; $uinfo = PilotData::GetPilotByEmail($userinfo['email']); $code = PilotData::GetPilotCode($uinfo->code, $uinfo->pilotid); $pilot_id = $fname. '' .$lname. '' .$code.$pilot_id; $pilot_id_klein = strtolower($pilot_id); $passMD5 = md5($pass); $tm = time(); DB::Query("INSERT INTO phpbb_users (username, username_clean, user_password, user_email, group_id, user_timezone, user_dst, user_rank, user_lang, user_colour, user_type, user_dateformat, user_style, user_regdate) VALUES ('".$pilot_id."', '".$pilot_id_klein."', '".$passMD5."', '".$email."', '2','0.0', '0', '2','en_us','0099FF','1','1', jS F Y g:i:s A', '1', '".$tm."')"); } } } ?> Is My script. It Displays 'Receivng You' but doesn't put anything into the Database? My phpbb_users is in the same directory as my phpVMS database :S
  11. I would be prepared too offer you any help you need whilist making your skin. You can check out my skin (so far, at least) as www.liverpoolvirtual.info. (Please don't register the script is messed up). PM me if you have any questions regarding HTML/PHP/CSS. Sorry but I cannot make your whole website for you as I'm up until 3am trying to sculpt my phpVMS
  12. I stumbled accross this automatic backup script for cPanel users who have access to Cron Jobs. I use it to back up my phpVMS site. Hope somebody finds it useful! Add the file 'fullbackup.php' in your home directory (/home/(username)/). Configure your cPanel login and theme details, and then your ftp details and email notification details (it can be a remote ftp server!): <?php // PHP script to allow periodic cPanel backups automatically, optionally to a remote FTP server. // This script contains passwords. KEEP ACCESS TO THIS FILE SECURE! (place it in your home dir, not /www/) // ********* THE FOLLOWING ITEMS NEED TO BE CONFIGURED ********* // Info required for cPanel access $cpuser = ""; // Username used to login to CPanel $cppass = ""; // Password used to login to CPanel $domain = ""; // Domain name where CPanel is run $skin = ""; // Set to cPanel skin you use (script won't work if it doesn't match). Most people run the default x theme // Info required for FTP host $ftpuser = ""; // Username for FTP account $ftppass = ""; // Password for FTP account $ftphost = "l"; // Full hostname or IP address for FTP host $ftpmode = "ftp"; // FTP mode ("ftp" for active, "passiveftp" for passive) // Notification information $notifyemail = ""; // Email address to send results // Secure or non-secure mode $secure = 0; // Set to 1 for SSL (requires SSL support), otherwise will use standard HTTP // Set to 1 to have web page result appear in your cron log $debug = 0; // *********** NO CONFIGURATION ITEMS BELOW THIS LINE ********* if ($secure) { $url = "ssl://".$domain; $port = 2083; } else { $url = $domain; $port = 2082; } $socket = fsockopen($url,$port); if (!$socket) { echo "Failed to open socket connection... Bailing out!n"; exit; } // Encode authentication string $authstr = $cpuser.":".$cppass; $pass = base64_encode($authstr); $params = "dest=$ftpmode&email=$notifyemail&server=$ftphost&user=$ftpuser&pass=$ftppass&submit=Generate Backup"; // Make POST to cPanel fputs($socket,"POST /frontend/".$skin."/backup/dofullbackup.html?".$params." HTTP/1.0rn"); fputs($socket,"Host: $domainrn"); fputs($socket,"Authorization: Basic $passrn"); fputs($socket,"Connection: Closern"); fputs($socket,"rn"); // Grab response even if we don't do anything with it. while (!feof($socket)) { $response = fgets($socket,4096); if ($debug) echo $response; } fclose($socket); ?> To find your skin, it will be in the URL like this: http://www.mysite.com:2082/frontend/x3/index.html It's usually X but it could be something else. Secondly, this is the cron job command. Customise it to run at any time you wish: /usr/local/bin/php /home/<YOUR USERNAME>/fullbackup.php Of course, replace <YOUR USERNAME> with your cPanel Username. Any problems and I'll help you out.
  13. Kieran

    Enquiries

    Has anybody got this working?
  14. Well it should just require an if statement: if ( users rank >= required rank ) { show the bid link } Or if you wanted to do it by distance: if (distance > 500 && users rank > 2 ) {show the link} else {show an error } I will code if for you shortly, flying a transatlantic flight at the moment
  15. Yeah, XACARS supports XPlane. phpVMS is a web framework - other than with the logging software, it doesn't really integrate into any particular simulator client.
  16. No problem, Coming right up.
  17. Hey, If you would like an awards table if your site, use this code. The table is totally plain, but fully customisable using your standard table css/html. profile_mail.tpl <p> <strong>My Awards</strong><br /> <?php if(!$allawards) { echo 'No awards yet'; } else { /* To show the image: <img src="<?php echo $award->image?>" alt="<?php echo $award->descrip?>" /> */ ?> <ul> <table width="790" border="0" cellspacing="5" cellpadding="5"> <?php foreach($allawards as $award){ ?> <tr> <td width="25%"><center><img src="<?php echo $award->image?>" alt="<?php echo $award->descrip?>" /></center></td> <td width="25%"><center><?php echo $award->name ?></center></td> <td width="50%"><center><?php echo $award->descrip ?></center></td> </tr> <?php } ?> </table> </ul> <?php } ?> </p> pilots_public_profile.tpl <p> <strong><?php echo $userinfo->firstname; ?>'s Awards</strong><br /> <?php if(!$allawards) { echo $userinfo->firstname . 'has no awards yet.'; } else { /* To show the image: <img src="<?php echo $award->image?>" alt="<?php echo $award->descrip?>" /> */ ?> <ul> <table width="790" border="0" cellspacing="5" cellpadding="5"> <?php foreach($allawards as $award){ ?> <tr> <td width="25%"><center><img src="<?php echo $award->image?>" alt="<?php echo $award->descrip?>" /></center></td> <td width="25%"><center><?php echo $award->name ?></center></td> <td width="50%"><center><?php echo $award->descrip ?></center></td> </tr> <?php } ?> </table> </ul> <?php } ?> </p>
  18. You've got to edit it direct in core/templates.
  19. Kieran

    Enquiries

    I've currently got this script on the go: This script shows 'Receiving You', but does not insert anything into the database
  20. Kieran

    Enquiries

    phpBB
  21. Kieran

    Enquiries

    Im having a little trouble integrating the auto forum register script. I've made the module ForumRegistration... but what is it you have to do next?
  22. Theoretically, it should be quite simple. I will look into it for you.
  23. Ive tried it using Google Mail and SSL on my own server. I get: The following From address failed: no-reply@liverpoolvirtual.info The following From address failed: no-reply@liverpoolvirtual.info. The config file is filled out correctly.
  24. Kieran

    Enquiries

    Spoke a little too soon - seems to be working now
×
×
  • Create New...