1. Список говнокодов пользователя proglammer

    Всего: 1

  2. PHP / Говнокод #7669

    +167

    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
    $resultat = mysql_query("SELECT * FROM tovar WHERE t_akcia='1' ");
    $myrowat = mysql_fetch_array($resultat);
    if (isset($myrowat[t_name])){$rstt=$myrowat[t_name]; if ($rstt==''){unset($rstt);}}
    if (isset($rstt)){
    $ft=0;
    do 
    {
    $t_namet=$myrowat[t_name];
    if ($t_namet==''){unset($t_namet);} 
    if (isset($t_namet)){ $ft=$ft+1; } 
    }
    while ($myrowat = mysql_fetch_array($resultat));
    $vidt=rand(1,$ft);
    $vidst=$vidt-1;
    $resultact = mysql_query("SELECT * FROM tovar WHERE t_akcia='1' LIMIT $vidst,1 ");
    $myrowact = mysql_fetch_array($resultact);
    print<<<HERE
    <div style="margin-top:11px;">
    <table width="182" border="0" cellspacing="0" cellpadding="0">
    <tr><td height="29" align="center" valign="middle" bgcolor="#fe0000"><div class="tit_block"><a class="tit_block" href="akcia.php">ÀÊÖÈÈ</a></div></td></tr>
    <tr><td>
    <div style="margin-top:11px; margin-bottom:11px;">
      <table width="182" border="0" cellspacing="0" cellpadding="0" style="background-image:url(../img/block_center.jpg); background-position:center; background-repeat:repeat-y;">
       <tr>
       <td>
       <img src="../img/block_top.jpg" align="top" border='0' />
    <div style="margin-top:11px; margin-bottom:11px;">   
    HERE;
    if (isset($myrowact[t_name]))
    {
    $t_namet=$myrowact[t_name];
    $t_fotot=$myrowact[t_foto];
    $t_pricet=$myrowact[t_price];
    $t_old_rpicet=$myrowact[t_old_rpice];
    $t_idt=$myrowact[t_id];
    $t_valutt=$myrowact[t_valut];
    if (isset($t_valutt)){
    $resultvt = mysql_query("SELECT * FROM valut WHERE v_id='$t_valutt' ");
    $myrowvt = mysql_fetch_array($resultvt);
    $valutt=$myrowvt[v_name];
    $kurst=$myrowvt[v_kurs];
    $v_znakt=$myrowvt[v_znak];
    $t_pricet=ceil($t_pricet*$kurst);
    $t_old_rpicet=ceil($t_old_rpicet*$kurst); 
    }
    if ($t_namet==''){unset($t_namet);}
    if (isset($t_namet))
    {
    $size_imgt=imagecreatefromjpeg("img_tovar/$t_fotot");
    $w_srct = imagesx($size_imgt);
    $h_srct = imagesy($size_imgt);
    if ($w_srct > $h_srct){$widtht=120; $heightt='';}else{$widtht=''; $heightt=120;} 
    print<<<HERE
    <table width='182' border='0' cellspacing='0' cellpadding='0'>
    <tr><td><div class='block_left' style='margin-left:2px; margin-right:2px;'>
    <a class='text' style='text-decoration:none;' href='tovar.php?t_id=$t_idt'>
    HERE;
    if ($heightt > $widtht){echo"<img src='img_tovar/$t_fotot' height='$heightt' hspace='5' vspace='5' align='middle' border='0' />";}
    if ($widtht > $heightt){echo"<img src='img_tovar/$t_fotot' width='$widtht' hspace='5' vspace='5' align='middle' border='0' />";}
    print<<<HERE
    <br><br><strong>$t_namet</strong><br><br>
    <div style='text-align:center' class='price' style='margin-top:15px; margin-bottom:15px;'><span class='old_price'>$t_old_rpicet</span>$t_pricet<span class='valut'>ãðí</span></div></a><br>
    <a href='buy.php?t_id=$t_idt' title='$t_namet'><img src='../img/kypit.jpg' alt='$t_titlet' border='0' /></a><br>
    <div>
    </td></tr>
    </table>
    HERE;
    }
    }
    print<<<HERE
    </div>   
       <img src="../img/block_down.jpg" align="bottom" border='0' />
       </td>
       </tr>
    </table>
    </div>
    </td>
    </tr>
    </table>
    </div>
    HERE;
    }

    Хотел накласть только кусочек, но оно всё такое вкусное :)
    Показывает 1 рандомный товар

    proglammer, 27 Августа 2011

    Комментарии (14)