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

    Всего: 4

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

    0

    1. 001
    2. 002
    3. 003
    4. 004
    5. 005
    6. 006
    7. 007
    8. 008
    9. 009
    10. 010
    11. 011
    12. 012
    13. 013
    14. 014
    15. 015
    16. 016
    17. 017
    18. 018
    19. 019
    20. 020
    21. 021
    22. 022
    23. 023
    24. 024
    25. 025
    26. 026
    27. 027
    28. 028
    29. 029
    30. 030
    31. 031
    32. 032
    33. 033
    34. 034
    35. 035
    36. 036
    37. 037
    38. 038
    39. 039
    40. 040
    41. 041
    42. 042
    43. 043
    44. 044
    45. 045
    46. 046
    47. 047
    48. 048
    49. 049
    50. 050
    51. 051
    52. 052
    53. 053
    54. 054
    55. 055
    56. 056
    57. 057
    58. 058
    59. 059
    60. 060
    61. 061
    62. 062
    63. 063
    64. 064
    65. 065
    66. 066
    67. 067
    68. 068
    69. 069
    70. 070
    71. 071
    72. 072
    73. 073
    74. 074
    75. 075
    76. 076
    77. 077
    78. 078
    79. 079
    80. 080
    81. 081
    82. 082
    83. 083
    84. 084
    85. 085
    86. 086
    87. 087
    88. 088
    89. 089
    90. 090
    91. 091
    92. 092
    93. 093
    94. 094
    95. 095
    96. 096
    97. 097
    98. 098
    99. 099
    100. 100
    function check_cur_zak(id_zak, obj)
    {
    	obj.getElementsByTagName('img')[0].style.display='none';
    	obj.getElementsByTagName('img')[1].style.display='block';
    	var ch_ids_tree_dse = arr2_ids_dse[id_zak].split('|');
    	var ch_names_tree_dse = arr2_names_dse[id_zak].split('|');
    	var ch_obozs_tree_dse = arr2_obozs_dse[id_zak].split('|');
    	var ch_child_tree_dse = arr2_child_dse[id_zak].split('|');
    	var cur_tree_dse = '';
    
    	if(document.getElementById('nav_tekysh_3').name>0)
    	{
    		console.log(arr_oprs_c_r_2)
    		var spl_op_res = arr_oprs_c_r_2[document.getElementById('nav_tekysh_3').name].split('|');
    		var spl_op_res_arr = [];
    
    		for (var spl_f_ar=0; spl_f_ar<spl_op_res.length; spl_f_ar++)
    			spl_op_res_arr[spl_op_res[spl_f_ar]] = spl_op_res[spl_f_ar];
    	}
    
    	for (var ch_t_f_d=0; ch_t_f_d < (ch_ids_tree_dse.length-1); ch_t_f_d++)
    	{
    		var cur_tree_oper_cur_dse = '';
    		var jv3_arr_full_tbl_1_spl = jv2_arr_full_tbl_1_spl[ch_ids_tree_dse[ch_t_f_d]].split('|');
    		var jv3_arr_full_tbl_2_spl = jv2_arr_full_tbl_2_spl[ch_ids_tree_dse[ch_t_f_d]].split('|');
    		var jv3_arr_full_tbl_3_spl = jv2_arr_full_tbl_3_spl[ch_ids_tree_dse[ch_t_f_d]].split('|');
    		var jv3_arr_full_tbl_4_spl = jv2_arr_full_tbl_4_spl[ch_ids_tree_dse[ch_t_f_d]].split('|');
    		var jv3_arr_full_tbl_5_spl = jv2_arr_full_tbl_5_spl[ch_ids_tree_dse[ch_t_f_d]].split('|');
    		var jv3_arr_full_tbl_5_1_spl = jv2_arr_full_tbl_5_1_spl[ch_ids_tree_dse[ch_t_f_d]].split('|');
    		var jv3_arr_full_tbl_6_spl = jv2_arr_full_tbl_6_spl[ch_ids_tree_dse[ch_t_f_d]].split('|');
    		var jv3_arr_full_tbl_7_spl = jv2_arr_full_tbl_7_spl[ch_ids_tree_dse[ch_t_f_d]].split('|');
    		var jv3_arr_full_tbl_8_spl = jv2_arr_full_tbl_8_spl[ch_ids_tree_dse[ch_t_f_d]].split('|');
    		var jv3_arr_full_tbl_9_spl = jv2_arr_full_tbl_9_spl[ch_ids_tree_dse[ch_t_f_d]].split('|');
    		var jv3_arr_full_tbl_10_spl = jv2_arr_full_tbl_10_spl[ch_ids_tree_dse[ch_t_f_d]].split('|');
    		var jv3_arr_full_tbl_11_spl = jv2_arr_full_tbl_11_spl[ch_ids_tree_dse[ch_t_f_d]].split('|');
    		var jv3_arr_full_tbl_12_spl = jv2_arr_full_tbl_12_spl[ch_ids_tree_dse[ch_t_f_d]].split('|');
    		var jv3_arr_full_tbl_14_spl = jv2_arr_full_tbl_14_spl[ch_ids_tree_dse[ch_t_f_d]].split('|');
    		var jv3_arr_full_tbl_15_spl = jv2_arr_full_tbl_15_spl[ch_ids_tree_dse[ch_t_f_d]].split('|');
    		var jv3_arr_full_tbl_16_spl = jv2_arr_full_tbl_16_spl[ch_ids_tree_dse[ch_t_f_d]].split('|');
    
    		jv3_arr_full_tbl_17_spl = jv2_arr_full_tbl_17_spl[ch_ids_tree_dse[ch_t_f_d]].split('|');
    		jv3_arr_full_tbl_18_spl = jv2_arr_full_tbl_18_spl[ch_ids_tree_dse[ch_t_f_d]].split('|');
    		jv3_arr_full_tbl_19_spl = jv2_arr_full_tbl_19_spl[ch_ids_tree_dse[ch_t_f_d]].split('|');
    
    		var cur_dse_op_dse = '';
    		var cur_id_op_dse = '';
    		var cur_vp_op_dse = '';
    		
    		for (var ch_t_f_o=0; ch_t_f_o < (jv3_arr_full_tbl_1_spl.length-1); ch_t_f_o++)
    		{
    			var clas_tr_col = 'fff';
    			var clas_tr_br = 'fff';
    			var clas_tr_pr = 'fff';
    			var clas_tr_park = 'fff';
    			var zadel_op = 0;
    			var stl_b_tr_pr = '';
    			var js_vp_op = '0<br>0.00';
    			var js_ksz_op = '0<br>0.00';
    			// if (jv3_arr_full_tbl_14_spl[ch_t_f_o]>0)
    			// 	{
    			// 			clas_tr_col='ddffdd';
    			// 			clas_tr_br='ddffdd';
    			// 			clas_tr_pr='ddffdd';
    			// 			clas_tr_park='ddffdd';
    			// 	}
    
    			if(document.getElementById('nav_tekysh_3').name>0)
    			{
    				if (spl_op_res_arr[jv3_arr_full_tbl_16_spl[ch_t_f_o]])
    					{
    						clas_tr_pr='99ff99';
    						stl_b_tr_pr = 'font-size:150%; color:#13BD13;padding-left:5px';
    					}
    			var parks_for_cur_res = document.getElementById('park_sel_cur_res').options.length;
    				for (var p_f_c_r=0; p_f_c_r<parks_for_cur_res; p_f_c_r++)
    				{
    					if ((document.getElementById('park_sel_cur_res').options[p_f_c_r].value !== '0')&&(document.getElementById('park_sel_cur_res').options[p_f_c_r].value !== ''))
    					{
    						if (jv3_arr_full_tbl_5_1_spl[ch_t_f_o]==document.getElementById('park_sel_cur_res').options[p_f_c_r].value)
    									clas_tr_park='99ddff';
    					}
    				}
    			}
    
    			if (jv3_arr_full_tbl_12_spl[ch_t_f_o]==1)
    					clas_tr_br='ff9999';
    
    			if (jv3_arr_full_tbl_15_spl[ch_t_f_o]==0)
    			{
    
    				if(jv3_arr_full_tbl_3_spl[ch_t_f_o]=='')
    					jv3_arr_full_tbl_3_spl[ch_t_f_o]='0';
    
    				if(jv3_arr_full_tbl_6_spl[ch_t_f_o]=='')
    					jv3_arr_full_tbl_6_spl[ch_t_f_o]='0.00';
    
    				if(jv3_arr_full_tbl_7_spl[ch_t_f_o]=='')
    					jv3_arr_full_tbl_7_spl[ch_t_f_o]='0';
    
    				if(jv3_arr_full_tbl_8_spl[ch_t_f_o]=='')

    kib0rg, 18 Февраля 2021

    Комментарии (11)
  3. PHP / Говнокод #27235

    +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
    $txtdd = $DI_Date;
    $DI_Date = explode(".",$DI_Date);
    
    $DI_YY = $DI_Date[2];
    $DI_LYY = $DI_YY;
    $DI_NYY = $DI_YY;
    $MY = $DI_Date[1].".".$DI_Date[2];
    
    $DI_MM = $DI_Date[1]-1;
    $DI_LMM = $DI_MM-1;
    if ($DI_LMM<0) $DI_LMM = 11;
    $DI_NMM = $DI_MM+1;
    if ($DI_NMM>11) $DI_NMM = 0;
    
    if ($DI_MM==0) $DI_LYY = $DI_YY-1;
    if ($DI_MM==11) $DI_NYY = $DI_YY+1;
    
    $DI_DD = 1;
    
    $lastM = $DI_MM;
    $yy = $DI_YY;
    if ($lastM<1) {
    	$lastM = 12+$lastM;
    	$yy = $yy - 1;
    }
    $lastM = $DI_DD.".".$lastM.".".$yy;
    
    $nextM = $DI_MM+2;
    $yy = $DI_YY;
    if ($nextM>12) {
    	$nextM = $nextM-12;
    	$yy = $yy + 1;
    }
    $nextM = $DI_DD.".".$nextM.".".$yy;
    
    $lastY = $DI_DD.".".($DI_MM+1).".".($DI_YY-1);
    $nextY = $DI_DD.".".($DI_MM+1).".".($DI_YY+1);

    kib0rg, 05 Февраля 2021

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

    +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
    $DI_WName = Array('ѕн','¬т','—р','„т','ѕт','—б','¬с');
    	$DI_MName = Array('январь','‘евраль','ћарт','јпрель','ћай','»юнь','»юль','јвгуст','—ент¤брь','ќкт¤брь','Ќо¤брь','ƒекабрь');
    
    	$today = TodayDate();
    	$today = explode(".",$today);
    	$today = $today[2]*10000+$today[1]*100+$today[0];
    
    	$DI_Date = TodayDate();
    	if (isset($_GET["p0"])) $DI_Date = $_GET["p0"];
    	$DI_Date = explode(".",$DI_Date);
    
    	$DI_YY = $DI_Date[2];
    	$DI_LYY = $DI_YY;
    	$DI_NYY = $DI_YY;
    
    	$DI_MM = $DI_Date[1]-1;
    	$DI_LMM = $DI_MM-1;
    	if ($DI_LMM<0) $DI_LMM = 11;
    	$DI_NMM = $DI_MM+1;
    	if ($DI_NMM>11) $DI_NMM = 0;
    
    	if ($DI_MM==0) $DI_LYY = $DI_YY-1;
    	if ($DI_MM==11) $DI_NYY = $DI_YY+1;
    
    	$DI_DD = $DI_Date[0];
    
    	$lastM = $DI_MM-2;
    	$yy = $DI_YY;
    	if ($lastM<1) {
    		$lastM = 12+$lastM;
    		$yy = $yy - 1;
    	}
    	$lastM = $DI_DD.".".$lastM.".".$yy;
    
    	$nextM = $DI_MM+4;
    	$yy = $DI_YY;
    	if ($nextM>12) {
    		$nextM = $nextM-12;
    		$yy = $yy + 1;
    	}
    	$nextM = $DI_DD.".".$nextM.".".$yy;
    
    	$lastY = $DI_DD.".".($DI_MM+1).".".($DI_YY-1);
    	$nextY = $DI_DD.".".($DI_MM+1).".".($DI_YY+1);

    kib0rg, 08 Сентября 2020

    Комментарии (3)
  5. PHP / Говнокод #26930

    +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
    function DI_MNum($Mon, $Year) {
    		$nn = Array(31,28,31,30,31,30,31,31,30,31,30,31);
    		$x = 28;
    		$y = (Round($Year/4))*4;
    		if ($y==$Year) $x = 29;
    		$ret = $nn[$Mon];
    		if ($Mon==1) $ret = $x;
    		return $ret;
    	}
    
    	function DI_FirstDay($Mon,$Year) {
    		$x0 = 365;
    		$Y = $Year-1;
    		$days = $Y*$x0+floor($Y/4)+6;
    		for ($j=0; $j<$Mon; $j=$j+1) {
    			$days = $days+DI_MNum($j,$Year);
    		}
    		$week = $days-(7*Round(($days/7)-0.5));
    		return $week;
    	}
    
    	function even_week($Day,$Mon,$Year) {
    		$x0 = 365;
    		$Y = $Year-1;
    		$days = $Y*$x0+floor($Y/4)+6;
    		for ($j=0; $j<$Mon; $j=$j+1) {
    			$days = $days+DI_MNum($j,$Year);
    		}
    		$days = $days + $Day;
    		$weeks = ceil($days/7);
    
    		$res = false;
    		if (2*ceil($weeks/2) == $weeks) $res = true;
    		return $res;
    	}

    kib0rg, 08 Сентября 2020

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