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

    +165

    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
    for($i=0; $i < $fldCount; $i++) {
          if($fldType[$i]==8) {
            eval("\$f_".$fld[$i]."_year = substr(\$f_".$fld[$i].", 0, 4);");
            eval("\$f_".$fld[$i]."_month = substr(\$f_".$fld[$i].", 5, 2);");
            eval("\$f_".$fld[$i]."_day = substr(\$f_".$fld[$i].", 8, 2);");
            eval("\$f_".$fld[$i]."_hours = substr(\$f_".$fld[$i].", 11, 2);");
            eval("\$f_".$fld[$i]."_minutes = substr(\$f_".$fld[$i].", 14, 2);");
            eval("\$f_".$fld[$i]."_seconds = substr(\$f_".$fld[$i].", 17, 2);");
          }
          else if ($fldType[$i]==6 && $fldValue[$i]) {
            ${"f_".$fld[$i]."_old"} = $fldValue[$i];
    
            $fileinfo = $db->get_row("SELECT * FROM `Filetable`
              WHERE `Field_ID` = ".$fldID[$i]." AND `Message_ID` = ".$message, ARRAY_A);
        
            if ($fileinfo) {
              ${"f_".$fld[$i]} = $SUB_FOLDER . rtrim($HTTP_FILES_PATH, "/") . $fileinfo["File_Path"] . "h_" . $fileinfo["Virt_Name"];
              ${"f_".$fld[$i]."_url"} = $SUB_FOLDER . rtrim($HTTP_FILES_PATH, "/") . $fileinfo["File_Path"] .        $fileinfo["Virt_Name"];
              ${"f_".$fld[$i]."_name"} = $fileinfo["Real_Name"];
              ${"f_".$fld[$i]."_size"} = $fileinfo["File_Size"];
              ${"f_".$fld[$i]."_type"} = $fileinfo["File_Type"];
            }
            else {
              preg_match("/^(.+?(\.[^.]+)?):(.+):(.+)$/", $fldValue[$i], $regs);
              ${"f_".$fld[$i]} = $SUB_FOLDER.$HTTP_FILES_PATH.$fldID[$i]."_".$message.$regs[2];
              ${"f_".$fld[$i]."_url"} = $SUB_FOLDER.$HTTP_FILES_PATH.$fldID[$i]."_".$message.$regs[2];
              ${"f_".$fld[$i]."_name"} = $regs[1];
              ${"f_".$fld[$i]."_size"} = $regs[4];
              ${"f_".$fld[$i]."_type"} = $regs[3];
            }
          }
        }

    И ещё один кусочек из того же файла (/netcat/message.php).

    Запостил: telnet, 18 Мая 2010

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

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