Jump to content
MakeWebGames

Dayo

Administrators
  • Posts

    2,491
  • Joined

  • Last visited

  • Days Won

    196

Everything posted by Dayo

  1. looking good, i was just about to post my version of this up, but looks like you beat me to it.
  2. two edits in my post (not sure how many in your register page)
  3. Just recently i was asked, `how would i go about changing my existing DB password field from md5 to sha1` at first i thought it would involve loads of work but i came up with this work around ... Here is how i would do it ... please note you will have to edit the values in the sql to match your DB Right first of all were going to need another password field in our DB [mysql]ALTER TABLE `usertable` ADD `oldpass` VARCHAR( 255 ) NOT NULL[/mysql] now we have that we will need to transfer all the passwords from the old PW field to the `oldpass` feild [mysql]UPDATE `usertable` SET `oldpass`=`userpassfield`[/mysql] Then run this SQL to remove them from the old field (the soon to be sha1) [mysql]UPDATE `usertable` SET `userpassfield`=''[/mysql] Now thats all the sql sorted out! Now open your register then find the query that inserts the password to the DB and edit teh md5 to sha1 You will not have to open your login handler then find the query that selects the password from the DB then make edit it to something like this mysql_query("SELECT * FROM `usertable` WHERE `usernamefield`='".mysql_real_escape_string($_POST['username'])."' AND (`userpassfield`='".sha1($_POST['password'])."' OR `oldpass`='".md5($_POST['password'])."')"); What this will do is look for the username and the users password weather it is from the OLD md5 or the new sha1 Now we need to make a new file called `newpass.php` <?php include 'your_connect_file.php'; // Add your header here // We have to check if the user is still using there old MD5 Password (Please edit $user[''] to what ever varable you use) if (!empty($user['oldpass'])) { // We check if the form is submited if (!empty($_POST['submit'])) { // Now we check if all the values are entered if (empty($_POST['old']) || empty($_POST['new']) || empty($_POST['cnew']) || $_POST['cnew']!=$_POST['new']) { echo 'You need to add all values ot the passwords didnt match! [url="'.basename($_SERVER['SCRIPT_FILENAME']).'"]Back.[/url]'; } else { // If they are we have to check the old md5 password against what they inputed (Again please edit $user if need be) if ($user['oldpass']!=md5($_POST['old'])) { echo 'The submited password was incorect! [url="'.basename($_SERVER['SCRIPT_FILENAME']).'"]Back.[/url]'; } else { // Now lets update the users details (again please edit SQL to match your DB aswell as the $user varable) echo 'Thank you your password is now updated!'; mysql_query("UPDATE `usertable` SET `userpassfield`=".sha1($_POST['cnew']).", `oldpass`='' WHERE `usersid`=".$user['usersid']); } } } else { // If the form isnt submited show it! echo ' We are incresing security on this website, to do this we need you to create a new password please enter it in below! <form id="form1" name="form1" method="post" action="#"> <label> Old Password: <input name="old" type="password" id="old" /> </label> <label> New Password: <input name="new" type="password" id="new" /> </label> <label> Confirm Password: <input name="cnew" type="password" id="cnew" /> </label> <label> <input type="submit" name="Submit" value="Submit" /> </label> </form> '; } } // Add your footer here ?> then in a global file (file shown on all logedin pages) add this (above any html code) if (!empty($user['oldpass'])) {header("Location:newpass.php");} then you are done! :thumbsup: NOTE: This is a far from working script you have to alter it to fit your DB/Site :thumbup:
  4. looks good!
  5. If you buy from george i will code the template for $25 (HTML) $50 (McCodes)
  6. can you not add some thing like /////////// UNTESTED \\\\\\\\\\\\\\ $mail=mysql_query("SELECT `cm_id` FROM `comments` ORDER BY `cm_time` ASC)"); if (mysql_num_rows($mail)>30) { $m=mysql_fetch_array(mysql_query("SELECT `cm_id` FROM `comments` ORDER BY `cm_time` ASC LIMIT 0, 1")); mysql_query("DELETE FROM `comments` WHERE `cm_id` =".$m['cm_id']); } btw zeds will delete all posts were the comment is to any one with a higher id then 30 (by the looms of it)
  7. Tbh you don't need to code to convert from v1 to v2 all you need to do is read then copy and paste
  8. agreed, very basic, i may make it a bit more advance when i get time, along wit all my other donator mods
  9. i have planed ahead my friend, when implemented a user will be able to open a support ticket for the mod once open any user can see and reply to help them out and the user who made the ticket can chose the best awnser and save it (kina like yahoo awnsers) The support tickets will be shown globaly like below New Support Tickets: 8 This will make it much easier/faster to support rather then a forum as you can see the problem direct (not trolling throgh posts years old or posts of people flaming) feedback?
  10. Don't worry crim we want atleast a little bit of quality I compar your capabilty to that of a 3 ye old ... Lol jks :P I may add an option to put all the mods in 1 archive but that may take some time before I implment it
  11. Thank you I'll add them when u get time tonight
  12. realy, how many people per day say, 'can come one make me a mod' @dangerboy all mods added so far were made by myself od sniko so should all be good
  13. here is a beta version of the archive http://archive.cgwebstudios.com here you can see how your mods will be displayed, please remeber this is in BETA so any errors/suggestions please PM me or email me ([email protected])
  14. plus if i hacked would just re resister then set my money to 2699999999 ... bank it then do it again plus some games rely on large ammounts of money using bigint but your way would help stop script kiddies, maby IP banning them would stop the re resestering or setting a session then checking for the session registration
  15. im not to big on hacking but any unsecure user input can be hacked to do this (all/most user input for mccodes) you will have to go throgh ALL your scripts and secure them
  16. he had already found out how, just needed a little fixing, reading helps ;)
  17. what danny was ment to say was use <span style="color:#0033FF"></span> rather then the <font color=blue></font> as it will be deprecated in future versions of HTML
  18. That is what i thought, but i would rather be safe then sorry ;) if people can send the mods to [email protected] along with a descriptiion and any origin details you would like added i will add them and once i have a few i will make the archive public
  19. Dayo

    If you have 1 wish

    wtf? why was mine deleted ... i made a wish plus gave reasons why i wished it .... any way i wish i can get my nuke on MW2 ... severasl times i have had the 25kd but no nuke and when i have it i get 23/24 :cursing:
  20. try $db->escape() mor mysql_real_escape_string() (not sure if $db->escape ir right ot not tho i dont realy use the $db class)
  21. i think this was a paid mod, may be wrong :S
  22. it wasent the quality, i brought this template when i first announced the project (way before me and george joined up) now can we stay on topic please ;)
  23. yea a link back will be added to all mods, if you could zip them then add any info you want added in a text file within the zip then i will add that info for you
  24. ice is common in space but there is evidance there was liquid water on mars(very very rear) but lost it due to a week atmosphere
  25. hiya every one, just to clarify the template is a small stepping stone, something that im using untill the main relese ... its just a little bit of eye candy to lure people in (the images are far to big to be used in mainstream as the loading time would be ages) plus its not the graphics that will blow your minds ... i will tel you that for sure! p.s. it is only the template that is a paid design from GST the rest of the GFX has been hand made!
×
×
  • Create New...