1. PHP / Говнокод #19258

    −107

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    45. 45
    46. 46
    47. 47
    48. 48
    49. 49
    50. 50
    51. 51
    52. 52
    53. 53
    54. 54
    55. 55
    56. 56
    57. 57
    58. 58
    59. 59
    60. 60
    61. 61
    62. 62
    63. 63
    64. 64
    65. 65
    66. 66
    67. 67
    68. 68
    69. 69
    70. 70
    71. 71
    72. 72
    73. 73
    74. 74
    75. 75
    76. 76
    77. 77
    78. 78
    79. 79
    80. 80
    81. 81
    82. 82
    83. 83
    84. 84
    85. 85
    86. 86
    87. 87
    if ((!empty($icq))&&(!is_numeric($icq))) printm($w[13],1); 
    if ((!empty($zip))&&(!is_numeric($zip))) printm($w[288],1); 
    if ((!empty($aim))&&((strlen($aim) < 3)||(strlen($aim) > 300))) printm($w[14],1); 
    if ((C_PHONER)&&(empty($phone))) printm($w[15]); 
    if ((C_ZIPR)&&(empty($zip))) printm($w[288]); 
    if ((C_CITYR)&&(empty($city))) printm($w[16]); 
    if ((C_MARSR)&&($marstat == "0")) printm($w[17]); 
    if ((C_CHILDR)&&($child == "0")) printm($w[18]); 
    if ((C_HGHTR)&&($height == "0")) printm($w[19]); 
    if ((C_WGHTR)&&($weight == "0")) printm($w[20]); 
    if ((C_SHGHTR)&&($heightf == "0")) printm($w[21]); 
    if ((C_SHGHTR)&&($heightt == "0")) printm($w[21]); 
    if ((C_SWGHTR)&&($weightf == "0")) printm($w[22]); 
    if ((C_SWGHTR)&&($weightt == "0")) printm($w[22]); 
    if ((C_HAIRR)&&($hcolor == "0")) printm($w[23]); 
    if ((C_EYER)&&($ecolor == "0")) printm($w[24]); 
    if ((C_ETNR)&&($etnicity == "0")) printm($w[25]); 
    if ((C_RELR)&&($religion == "0")) printm($w[26]); 
    if ((C_SETNR)&&($setnicity == "0")) printm($w[27]); 
    if ((C_SRELR)&&($sreligion == "0")) printm($w[28]); 
    if ((C_SMOKER)&&($smoke == "0")) printm($w[29]); 
    if ((C_DRINKR)&&($drink == "0")) printm($w[30]); 
    if ((C_EDUCR)&&($education == "0")) printm($w[31]); 
    if ((C_JOBR)&&(empty($job))) printm($w[32]); 
    if ((C_SAGER)&&((empty($agef)||empty($aget)))) printm($w[33]); 
    if ((C_HDYFUR)&&($hdyfu == "0")) printm($w[34]); 
    if (C_HOBBR) { 
       if (empty($hobby) || trim($hobby) == "") printm($w[35]);  
       if (strlen($hobby) > C_HOBBB) { 
       $tm=array(C_HOBBB); 
       printm(template($w[36],$tm)); 
       } 
       $e = explode(" ",$hobby); 
       for ($a = 0; $a < sizeof($e); $a++){ 
           $o = strlen($e[$a]); 
           if ($o > C_HOBBW) { 
               $tm=array(C_HOBBW); 
               printm(template($w[37],$tm)); 
           } 
       } 
    } 
    if ((C_DESCR)&&($descr) == "0") printm($w[38]); 
    if (strlen($descr) > C_DESCB) { 
        $tm=array(C_DESCB); 
        printm(template($w[39],$tm)); 
        }  
    $e = explode(" ",$descr); 
    for ($a = 0; $a < sizeof($e); $a++){$o = strlen($e[$a]); 
        if ($o > C_DESCW) { 
        $tm=array(C_DESCW); 
        $errors .= $w[7].'<br>'; 
        } 
    } 
    
    if (C_CHECK_REGISTER == '0') $cst = 7; 
    elseif (C_CHECK_REGISTER == '2') $cst = 1; 
    else $cst = 0; 
    $picture=array('','',''); 
    if ((C_PHOTOR)&&((empty($HTTP_POST_FILES['file0']['name']))&&(empty($HTTP_POST_FILES['file1']['name']))&&(empty($HTTP_POST_FILES['file2']['name'])))) printm($w[41],1); 
    ////////////// Include class for file uploading! 
    include_once 'classes/upload.class.php'; 
    ////////////// 
    $time = time(); 
    for($p=0;$p<=2;$p++) { 
    
    $file='file'.$p;$k=$p+1; 
    if(!empty($HTTP_POST_FILES[$file]['name'])) { 
    if(!C_IMG_ERR) { // If Unavailable image upload errors with UIN 
       $dir = date("mY", $time);$slash="/"; 
       if (!is_dir(C_PATH.'/members/uploads/'.$dir)) 
       {umask(0);mkdir (C_PATH."/members/uploads/".$dir, 0777);} 
       } else $dir=$slash=""; 
    $fb=date("dHis",$time);$fe=rand(0,999);$fn =$fb."-".$fe; 
    $intpic = $dir.$slash.$fn.'.'; 
    $u = new Upload($file,C_MAXSZ,C_MAXWD,C_MAXHG,C_PATH.'/members/uploads/'.$intpic); 
    if(!$u->do_upload()) printm($u->getErrors());  
    $picture[$p]=$intpic.$u->getType(); 
    } 
    } 
    $usr = (C_ID) ? '' : "'".$username."',"; 
    mysql_query("INSERT INTO ".C_MYSQL_MEMBERS." VALUES ('', ".$usr." '".$fname."','".$lname."','".$pass."', 
    '".$year."-".$month."-".$day."','".$gender."', 
    '".$purpose."','".$country."','".$email."','".$url."', 
    '".$icq."','".$aim."','".$phone."','".$zip."','".$city."','".$marstat."','".$child."','".$height."','".$weight."','".$hcolor."','".$ecolor."','".$etnicity."','".$religion."','".$smoke."','".$drink."','".$education."','".$job."','".$hobby."','".$descr."','".$sgender."','".$setnicity."','".$sreligion."','".$agef."','".$aget."','".$heightf."','".$heightt."','".$weightf."','".$weightt."','".$hdyfu."','".$picture[0]."','".$picture[1]."','".$picture[2]."','".horo($month,$day)."',NOW(''),NOW(''),INET_ATON('".ip()."'),'".$cst."','0')"); 
    
    $last_id = mysql_fetch_array(mysql_query("SELECT LAST_INSERT_ID() AS last_id")); 
    $last_id = $last_id['last_id'];

    ну и так далее...
    взято отсюда
    http://www.softtime.ru/forum/read.php?id_forum=1&id_theme=67032
    и конечно же у него ошибка

    Запостил: glauberov, 28 Декабря 2015

    Комментарии (5) RSS

    Добавить комментарий