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

    Всего: 3

  2. JavaScript / Говнокод #20395

    −44

    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
    calculation = () ->
    	term = parseInt $("#input-term").attr("value")
    	cost = parseInt $("#input-cost-auto").attr("value")
    	value = cost
    	console.log cost, term
    	if value == 1
    		count = 50000
    		final_sum = 42500			
    	if value == 2
    		count = 100000
    		final_sum = 85000
    	if value == 3
    		count = 150000
    		final_sum = 127500
    	if value == 4
    		count = 200000
    		final_sum = 170000
    	if value == 5
    		count = 250000
    		final_sum = 212500
    	if value == 6
    		count = 300000
    		final_sum = 255000
    	if value == 7
    		count = 350000
    		final_sum = 297500
    	if value == 8
    		count = 400000
    		final_sum = 340000
    	if value == 9
    		count = 450000
    		final_sum = 382500
    	if value == 10
    		count = 500000
    		final_sum = 425000
    	if value == 11
    		count = 600000
    		final_sum = 510000
    	if value == 12
    		count = 700000
    		final_sum = 595000
    	if value == 13
    		count = 800000
    		final_sum = 680000
    	if value == 14
    		count = 900000
    		final_sum = 765000
    	if value == 15
    		count = 1000000
    		final_sum = 850000
    	if value == 16
    		count = 1100000	
    		final_sum = 935000
    	if value == 17
    		count = 1200000	
    		final_sum = 1020000
    	if value == 18
    		count = 1300000	
    		final_sum = 1105000
    	if value == 19
    		count = 1500000	
    		final_sum = 1275000
    	if value == 20

    Калькулятор. Весь не влез

    IKARUS, 19 Июля 2016

    Комментарии (19)
  3. JavaScript / Говнокод #19778

    +4

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    $(document).ready(function() {
    		setInterval(form_check, 10);
    
    		function form_check() {
    			if ($("#main-order-form input[name='car-name']").attr("value") == "") {
    				$("#main-order-form button").attr('disabled', 'disabled');
    			} else {
    				$("#main-order-form button").removeAttr('disabled');
    			}						
    		}
    	});

    Валидация формы)))

    IKARUS, 08 Апреля 2016

    Комментарии (2)
  4. PHP / Говнокод #19777

    +1

    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
    <?php if($this->config->get('UniversumControl_status') == '1'){ ?>
    <style type="text/css">
    body {
    <?php if(( $this->config->get('UniversumControl_body_bg_pattern') != null) && ($this->config->get('UniversumControl_body_bg_pattern') != 'pattern0.png')){ ?>
     background:url("catalog/view/theme/<?php echo $this->config->get('config_template'); ?>/image/backgrounds/<?php echo  $this->config->get('UniversumControl_body_bg_pattern');?>") top center repeat;
     <?php } ?>
     background-color:#<?php echo $this->config->get('UniversumControl_body_bg_color') ?>;
     font-family:<?php echo $this->config->get('UniversumControl_body_font') ?>;
     color:#<?php echo $this->config->get('UniversumControl_text_color') ?>;
    }
    h1,h2,h3,h4,h5,h6, #menu ul li a, #column-left .box .box-heading, #column-right .box .box-heading, .htabs a, .product-info .price-old, .product-info .price-new, .product-info .cart .button, .offer_title, div.prod_hold .prod-info-fly .name a, .accordeonHolder .name a, .prod_hold .name a, #content .boxPlain .box-heading { 
    <?php if(($this->config->get('UniversumControl_status') == '1') && ( $this->config->get('UniversumControl_custom_font') != null)){	?>
    font-family: '<?php echo  $this->config->get('UniversumControl_custom_font_family');?>';
    <?php } elseif (($this->config->get('UniversumControl_status') == '1') && ( $this->config->get('UniversumControl_custom_font') == null) && ( $this->config->get('UniversumControl_header_font') != 'Arial')){ ?>
    <?php $headerFont = $this->config->get('UniversumControl_headings_font');
    $font = str_replace("+", " ", $headerFont);
    ?> font-family: '<?php echo $font; ?>';
    <?php } else { ?>
    font-family: 'Ubuntu Condensed';
    <?php } ?>
    }
    <?php if(($this->config->get('UniversumControl_status') == '1') && ( $this->config->get('UniversumControl_headings_color') != null)){	?>
    h1, h2, h2.heading_title, h3, h4, h5, h6, #column-left .box .box-heading, #column-right .box .box-heading {
    color:#<?php echo $this->config->get('UniversumControl_headings_color') ?>;
    }
    <?php } ?>
    <?php if(($this->config->get('UniversumControl_status') == '1') && ( $this->config->get('UniversumControl_headings1_size') != null)){	?>
    h1 {
    font-size:<?php echo $this->config->get('UniversumControl_headings1_size') ?>px;
    }
    <?php } ?>
    <?php if(($this->config->get('UniversumControl_status') == '1') && ( $this->config->get('UniversumControl_headings2_size') != null)){	?>
    h2, #content .boxPlain .box-heading {
    font-size:<?php echo $this->config->get('UniversumControl_headings2_size') ?>px;
    }
    <?php } ?>
    <?php if(($this->config->get('UniversumControl_status') == '1') && ( $this->config->get('UniversumControl_headings3_size') != null)){	?>
    h3 {
    font-size:<?php echo $this->config->get('UniversumControl_headings3_size') ?>px;
    }
    <?php } ?>
    <?php if(($this->config->get('UniversumControl_status') == '1') && ( $this->config->get('UniversumControl_headings4_size') != null)){	?>
    h4 {
    font-size:<?php echo $this->config->get('UniversumControl_headings4_size') ?>px;
    }
    <?php } ?>
    <?php if(($this->config->get('UniversumControl_status') == '1') && ( $this->config->get('UniversumControl_price_size') != null)){	?>
    .product-info .price {
    font-size:<?php echo $this->config->get('UniversumControl_price_size') ?>px;
    }
    <?php } ?>
    <?php if(($this->config->get('UniversumControl_status') == '1') && ( $this->config->get('UniversumControl_module_title_size') != null)){	?>
    #content h2.heading_title span {
    font-size:<?php echo $this->config->get('UniversumControl_module_title_size') ?>px;
    }
    <?php } ?>
    <?php if(($this->config->get('UniversumControl_status') == '1') && ( $this->config->get('UniversumControl_column_title_size') != null)){	?>
    #column-left .box .box-heading, #column-right .box .box-heading {
    font-size:<?php echo $this->config->get('UniversumControl_column_title_size') ?>px;
    }

    И такого кода там еще на 1000 строк.

    Интернет-магазин на опенкарте. Видимо кто то сделал систему настраивания css через админку))

    IKARUS, 08 Апреля 2016

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