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

    +156

    1. 1
    $("#maintabs").tabs({disabled: [4<?php if (mb_strpos($kagData['CITY_UR'], 'Мухосранск') === false) echo ', 2'; ?>], heightStyle: "auto"});

    No comments.

    bormand, 09 Апреля 2014

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

    +154

    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
    <?php
    include("blocks/bd.php");
    if (!isset($_SERVER['PHP_AUTH_USER']))
    
    {
            Header ("WWW-Authenticate: Basic realm=\"Admin Page\"");
            Header ("HTTP/1.0 401 Unauthorized");
            exit();
    }
    
    else {
            if (!get_magic_quotes_gpc()) {
                    $_SERVER['PHP_AUTH_USER'] = mysql_escape_string($_SERVER['PHP_AUTH_USER']);
                    $_SERVER['PHP_AUTH_PW'] = mysql_escape_string($_SERVER['PHP_AUTH_PW']);
            }
    
            $query = "SELECT pass FROM userlist WHERE user='".$_SERVER['PHP_AUTH_USER']."'";
            $lst = @mysql_query($query);
    
            if (!$lst)
            {
                Header ("WWW-Authenticate: Basic realm=\"Admin Page\"");
            Header ("HTTP/1.0 401 Unauthorized");
            exit();
            }
    
            if (mysql_num_rows($lst) == 0)
            {
               Header ("WWW-Authenticate: Basic realm=\"Admin Page\"");
               Header ("HTTP/1.0 401 Unauthorized");
               exit();
            }
    
            $pass =  @mysql_fetch_array($lst);
            if ($_SERVER['PHP_AUTH_PW']!= $pass['pass'])
            {
                Header ("WWW-Authenticate: Basic realm=\"Admin Page\"");
               Header ("HTTP/1.0 401 Unauthorized");
               exit();
            }
    
    
    }
    
    
    
    
    ?>

    smith, 08 Апреля 2014

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

    +155

    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
    //выведет таблицу для отладки
    function ExecSQL_SelectTable($sql)
    {
    	if($data = ExecSQL_Select($sql)->fetchAll(PDO::FETCH_ASSOC)){
    		print '<table border=2>';
    		print '<tr>';
    		foreach(array_keys($data[0]) AS $v) print '<td>'.$v.'</td>';
    		print '</tr>';
    		foreach($data AS $row){
    			print '<tr>';
    			foreach($row AS $v) print '<td>'.$v.'</td>';
    			print '</tr>';
    		}
    		print '</table>';
    	}
    	die;
    }

    Что только люди не предумают чтобы не юзать нормальный debug и не отлаживать код нормально.

    smpl, 08 Апреля 2014

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

    +158

    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
    <?php
    	$month = date("m", strtotime($model->order->created));
    	
    	if($month==01){
    		$month = "января";
    	}elseif($month==02){
    		$month = "февраля";
    	}elseif($month==03){
    		$month = "марта";
    	}elseif($month==04){
    		$month = "апреля";
    	}elseif($month==05){
    		$month = "мая";
    	}elseif($month==06){
    		$month = "июня";
    	}elseif($month==07){
    		$month = "июля";
    	}elseif($month==08){
    		$month = "августа";
    	}elseif($month==09){
    		$month = "сентября";
    	}elseif($month==10){
    		$month = "октября";
    	}elseif($month==11){
    		$month = "ноября";
    	}elseif($month==12){
    		$month = "декабря";
    	}
    ?>

    Это facepalm!

    jonasas, 08 Апреля 2014

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

    +31

    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
    if(!$_SESSION["subscribe_user"]){
    
    		   $arr_subscribes = unserialize('a:94:{i:212;s:3:"212";i:228;s:3:"228";i:302;s:3:"302";i:304;s:3:"304";i:322;s:3:"322";i:354;s:3:"354";i:366;s:3:"366";i:382;s:3:"382";i:402;s:3:"402";i:406;s:3:"406";i:458;s:3:"458";i:484;s:3:"484";i:492;s:3:"492";i:548;s:3:"548";i:564;s:3:"564";i:572;s:3:"572";i:622;s:3:"622";i:646;s:3:"646";i:700;s:3:"700";i:706;s:3:"706";i:714;s:3:"714";i:716;s:3:"716";i:718;s:3:"718";i:730;s:3:"730";i:740;s:3:"740";i:746;s:3:"746";i:766;s:3:"766";i:770;s:3:"770";i:816;s:3:"816";i:826;s:3:"826";i:832;s:3:"832";i:834;s:3:"834";i:852;s:3:"852";i:884;s:3:"884";i:894;s:3:"894";i:914;s:3:"914";i:920;s:3:"920";i:982;s:3:"982";i:988;s:3:"988";i:1010;s:4:"1010";i:1194;s:4:"1194";i:1456;s:4:"1456";i:1528;s:4:"1528";i:1598;s:4:"1598";i:1644;s:4:"1644";i:1828;s:4:"1828";i:1938;s:4:"1938";i:1942;s:4:"1942";i:1990;s:4:"1990";i:2130;s:4:"2130";i:2154;s:4:"2154";i:2250;s:4:"2250";i:2272;s:4:"2272";i:2338;s:4:"2338";i:2714;s:4:"2714";i:2798;s:4:"2798";i:2892;s:4:"2892";i:3018;s:4:"3018";i:3178;s:4:"3178";i:3181;s:4:"3181";i:3182;s:4:"3182";i:43;s:2:"43";i:23;s:2:"23";i:25;s:2:"25";i:26;s:2:"26";i:27;s:2:"27";i:28;s:2:"28";i:2;s:1:"2";i:67;s:2:"67";i:74;s:2:"74";i:70;s:2:"70";i:72;s:2:"72";i:13;s:2:"13";i:14;s:2:"14";i:15;s:2:"15";i:16;s:2:"16";i:17;s:2:"17";i:18;s:2:"18";i:19;s:2:"19";i:20;s:2:"20";i:21;s:2:"21";i:22;s:2:"22";i:52;s:2:"52";i:66;s:2:"66";i:68;s:2:"68";i:36;s:2:"36";i:37;s:2:"37";i:38;s:2:"38";i:39;s:2:"39";i:40;s:2:"40";i:41;s:2:"41";i:42;s:2:"42";i:76;s:2:"76";i:78;s:2:"78";}');
    
    			$subscr=new subscribe_new();
    			$subscr->GetUserSubscr();
    
    			if(!count($subscr->user_subscribes)){
    				$subscr->user2subscr_table = 'utos';
    				$sql="select subscribe.* from subscribe LEFT JOIN enterprises ON enterprises.id=subscribe.enterprise where subscribe.visible='Y' AND (subscribe.enterprise = 0 OR enterprises.visible = 'Y') order by priority desc, week_day,id";
    				$res=@mysql_db_query($DB,$sql);
    				$all_subscribe=array();
    				while ($row=@mysql_fetch_assoc($res)):
    					$subscr->all_subscribes[$row["id"]]=$row;
    
    				endwhile;
    				
    				$q = $subscr->UpdateSubscr($arr_subscribes);
    				#print_r($arr_subscribes);
    				
    				#exit;
    			}
    
    	   }

    ну хрясь чтоле

    brainstorm, 07 Апреля 2014

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

    +155

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    $title = str_replace("1", "", $title);
    	$title = str_replace("2", "", $title);
    	$title = str_replace("3", "", $title);
    	$title = str_replace("4", "", $title);
    	$title = str_replace("5", "", $title);
    	$title = str_replace("6", "", $title);
    	$title = str_replace("7", "", $title);
    	$title = str_replace("8", "", $title);
    	$title = str_replace("9", "", $title);
    	$title = str_replace("0", "", $title);
    	echo $title;

    Убираем цифры из строки!

    mrmany, 06 Апреля 2014

    Комментарии (139)
  7. PHP / Говнокод #15686

    +143

    1. 1
    2. 2
    3. 3
    О... О... О, нет... О... Я чувствую, как "blandermein" жарко облизывает мои потные яйца своим шаловливым язычком... О, да...
    О... А потом он захватывает своим жадно зовущим ротиком мой раскалённый пенис, и начинает телебонить его головку,
    забирая по самые гланды... О... Да, давай ещё... О... Ах...

    Konardillo, 06 Апреля 2014

    Комментарии (0)
  8. PHP / Говнокод #15684

    +142

    1. 1
    ХУЙ!

    Konardillo, 06 Апреля 2014

    Комментарии (6)
  9. PHP / Говнокод #15680

    +140

    1. 1
    Лошади снова здесь.

    Konardillo, 06 Апреля 2014

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

    +141

    1. 1
    "xavij", на хуй несёшься, голубизна.

    Konardillo, 06 Апреля 2014

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