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

    Всего: 3

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

    0

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    $php1 = "<";
    $php2= "?php";
    $php3 = " require_once $";
    $php4 = "_SERVER['DOCUMENT_ROOT'].\"/gen/admin/Debugger.php\"; ?";
    $php5 = "";
    $php6 = ">\r\n";
    $php_debuger = $php1 .$php2 .$php3 .$php4 .$php5 .$php6;

    Даже трудно предположить нахрен так.

    kerberos, 22 Июня 2016

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

    −49

    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
    function load_err_count()
    {
    
    	var theUrl ='http://<?php print $_SERVER['HTTP_HOST'] ?>/gen/err/error_count.php';
    		//alert(theUrl);
    	var xmlHttp = null;
    	xmlHttp = new XMLHttpRequest();
        xmlHttp.open( "GET", theUrl, false );
        xmlHttp.send( null );
        //alert(xmlHttp.responseText);
    	var text = xmlHttp.responseText;
    	try{
    	if(   parseInt(text)>0)
    		document.getElementById('id_err_count').innerHTML  = '<a target=\'_blank\' href=http://<?php print $_SERVER['HTTP_HOST'] ?>/gen/err/error_log.php>'+text+'</a>';
    	else 
    		document.getElementById('id_err_count').innerHTML  = '';
    	}
    	catch (ex){document.getElementById('id_err_count').innerHTML  = '';}
    	
    	
    	var theUrl ='http://<?php print $_SERVER['HTTP_HOST'] ?>/gen/err/util_count.php';
    		//alert(theUrl);
    	var xmlHttp = null;
    	xmlHttp = new XMLHttpRequest();
        xmlHttp.open( "GET", theUrl, false );
        xmlHttp.send( null );
        //alert(xmlHttp.responseText);
    	var text = xmlHttp.responseText;
    	try{
    	if(   parseInt(text)>0)
    		document.getElementById('id_util_count').innerHTML  = '<a target=\'_blank\' href=http://<?php print $_SERVER['HTTP_HOST'] ?>/gen/err/util_log.php>'+text+'</a>';
    	else 
    		document.getElementById('id_util_count').innerHTML  = '';
    	}
    	catch (ex){document.getElementById('id_util_count').innerHTML  = '';}
    
    }

    Внимание на: var theUrl

    kerberos, 16 Июня 2016

    Комментарии (11)
  4. SQL / Говнокод #15698

    −123

    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
    ALTER TRIGGER [dbo].[ObjectTrade]
    ON [dbo].[packets] 
    AFTER INSERT
    AS 
    BEGIN
    SET NOCOUNT ON;
    
    DECLARE
    @id_key int,
    @id_th int,
    @date_end datetime,
    @date_beg datetime
    
    SET @id_key = (SELECT id_key FROM inserted)
    SET @id_th = (SELECT id_th FROM inserted WHERE id_key = @id_key)
    SET @date_end = (SELECT date_end FROM inserted WHERE id_key = @id_key)
    SET @date_beg = (SELECT date_beg FROM inserted WHERE id_key = @id_key)
    
    IF @id_th = 183 
    UPDATE packets 
    SET packets.date_end = CAST('12-05-2014' AS DATE) 
    WHERE id_key =@id_key
    
    IF (CAST(@date_end AS DATE) BETWEEN '08-03-2014' and '10-03-2014') SET @date_end = '07-03-2014'
    IF (CAST(@date_end AS DATE) BETWEEN '01-05-2014' and '04-05-2014') SET @date_end = '30-04-2014'
    IF (CAST(@date_end AS DATE) BETWEEN '09-05-2014' and '11-05-2014') SET @date_end = '08-05-2014'
    IF (CAST(@date_end AS DATE) BETWEEN '12-06-2014' and '15-06-2014') SET @date_end = '11-06-2014'
    IF (CAST(@date_end AS DATE) BETWEEN '02-11-2014' and '04-11-2014') SET @date_end = '01-11-2014'
    IF (CAST(@date_end AS DATE) BETWEEN '01-01-2015' and '08-01-2015') SET @date_end = '31-12-2014'
    IF DATEPART(WEEKDAY, @date_end) = 7 SET @date_end = DATEADD(DAY, -1, @date_end)
    UPDATE packets SET packets.date_end = @date_end WHERE id_key =@id_key
    
    END

    kerberos, 07 Апреля 2014

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