Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. can you update the http://www.trixielugosi.com/code/vendors.phps with your latest code please EDIT: you can remove the print_r's
  2. step one: setup a php file with the array for english. include that file and use something like str_replace to replace the text ie "{greeting}" => "Hello" once you have the site working in english you can change the php to connect to a database (if you want)
  3. can you do a print_r($vendors) print_r($vendors); //<--Add echo "<br>New:<br>";//<--Add foreach ($vendors as $K => $V) { if($vendors[$K]["vendLevel"] == "1") $vendor1[] = $vendors[$K]; if($vendors[$K]["vendLevel"] == "2") $vendor2[] = $vendors[$K]; if($vendors[$K]["vendLevel"] == "3") $vendor3[] = $vendors[$K]; if($vendors[$K]["vendLevel"] == "4") $vendor4[] = $vendors[$K]; } unset($vendors); $vendors =array_merge($vendor2, $vendor1, $vendor3, $vendor4); print_r($vendors); //<--Add and post the results also what fetch method are you using ?
  4. have a lang.en.php file for english inside this have an array like above, it better to have the sentances store in each language as any translation software will make mistakes, unless some tell me the different between a money and an ape in french!
  5. foreach ($vendors as $K => $V) { if($vendors[$K]["vendLevel"] == "1") $vendor1[] = $vendors[$K]; if($vendors[$K]["vendLevel"] == "2") $vendor2[] = $vendors[$K]; if($vendors[$K]["vendLevel"] == "3") $vendor3[] = $vendors[$K]; if($vendors[$K]["vendLevel"] == "4") $vendor4[] = $vendors[$K]; }
  6. coolie click solved if all is fine..
  7. So $_FILES is empty.. what about the $_POST? maybe you could use the isempty($_FILES); them upload time out, the file is too large.. just trying to think of some workarounds.. have you got some code i could test to recreate the problem
  8. cheers jitesh, thats no help at all! :-\
  9. oops forgot the key try foreach ($vendors as $K => $V) { if($vendors[$K]["vendLevel"] == "1") $vendor1[] = $K[$V]; if($vendors[$K]["vendLevel"] == "2") $vendor2[] = $K[$V]; if($vendors[$K]["vendLevel"] == "3") $vendor3[] = $K[$V]; if($vendors[$K]["vendLevel"] == "4") $vendor4[] = $K[$V]; }
  10. ok, had to break it up a little <?php $subject = '<form action="new.asp" method="post">'; $Reg1 = '/(??:href\s?=\s?|action\s?=\s?)(?:"|'; $Reg2 = "\\')?)(.*?)"; $Reg3 = '(?:"|'; $Reg4 = "\\'|\s)/si"; preg_match_all($Reg1.$Reg2.$Reg3.$Reg4, $subject, $result, PREG_PATTERN_ORDER); $result = $result[1]; print_r($result); ?>
  11. ok basically you want the display in level order.. so i wrote an untested code to put the array in that order thus it will follow the nature route and be inorder.
  12. lost password emails a reset account password link lost name emails the login name but i'll let you think about them a little bit :-X
  13. preg_match_all('/(??:href\s?=\s?|action\s?=\s?)(?:"|\\')?)(.*?)(?:"|\\'|\s)/si', $subject, $result, PREG_PATTERN_ORDER); $result = $result[0];
  14. what part are you stuck on ? str_replace helps
  15. ahh well spotted change to $b = md5($b);
  16. don't change it unless they change the password then generate a new one.. save some areas of security for the login page, ie detecting someone trying every possible password (aka brute force) thus after 5 attemps the account is surspended for 30 minutes, if the same ip attemps to login more that 10 time (no matter what the account name) that IP is banned for 30 minutes etc theirs some nice ones i use.. get your thinking cap on oh the reason i use 30 minutes is if you done 100days you may get someone could ban all your members.. oh yeah have a display and a login name never show the login name (kinda like a 2nd password), also you need a forgot password, forgot username page
  17. works with all preg_match_all('/(??:href\s?=\s?|action\s?=\s?)(?:"|\\'|))(.*?)(?:"|\\'|\s)/si', $subject, $result, PREG_PATTERN_ORDER); $result = $result[0];
  18. correct quick update comments and where $insert = mysql_query($insertSQL); $uID = mysql_insert_id(); //<--gets the auto increment if(!$insert) die(mysql_error()); $getvalcode = "SELECT mem_validate FROM gs_mem WHERE id = $uID";//Finds the user
  19. and they can't use another browser or computer or run a disk clean up.. may want to rethink that lol why MD5 the Username ? remember MD5 is ONEWAY encryption.. also as a note if the salt it know then someone can write a brute force cracker.. and the login page isn't going to be the problem.. its more common for someone to get a membership then look for holes after the login page.
  20. try a higher amount i can really say.. or a little larger image until it fails.
  21. readup on mysql insert id and see edited post above only real problem had to guess that mem_id is unique
  22. OK MD5 + salt we talked about Use of $a $b $c, will cause you problems later use names like $mName it save scrolling up look for what the $a was set to.. the code itself looks ok maybe a few changes $insertSQL = "INSERT INTO `gs_mem` (mem_name, mem_pass, mem_email, mem_active, mem_validate) VALUES ('".$a."', '".$b."', '".$d."', '0', '".$e."')"; $insert = mysql_query($insertSQL); mysql_query($insertSQL); $uID = mysql_insert_id(); if(!$insert) die(mysql_error()); $getvalcode = "SELECT mem_validate FROM gs_mem WHERE mem_id = $uID";
  23. in code tags
  24. maybe this //Line 80ish //break the array into 4 groups and merge as one (in level order) foreach ($vendors as $K => $V) { if($vendors["vendLevel"] == "1") $vendor1[] = $K[$V]; if($vendors["vendLevel"] == "2") $vendor2[] = $K[$V]; if($vendors["vendLevel"] == "3") $vendor3[] = $K[$V]; if($vendors["vendLevel"] == "4") $vendor4[] = $K[$V]; } unset($vendors); $vendors =array_merge($vendor2, $vendor1, $vendor3, $vendor4); for($i=0;$i<count($vendors);$i++) { $vendId = $vendors[$i]["vendId"]; $vendName = $vendors[$i]["vendName"];
  25. IPB use MD5 with salt.. so do VB (maybe sha1 with salt) SHA1 is securer but MD5 is more of a standard (a little faster as well)
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.