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

    Всего: 4

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

    +156

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    function hideRequestBySelector(selector, str) {
        var num = $('td:nth-child(2)', selector).text();
        var cur = $('.requests .main-tr-more.' + num);
        var requestSent = $('.requests .send-notice.' + num);
        $(selector).css('background','#ccc');
        $('td:nth-child(1)', selector).html('<img src="/static/v12/img/tr-ok.png" alt="">');
        $(".main-request-action."+ num +" .answers-number.magenta").show();
        var code = "cur." + str + ";requestSent." + str + ";";
        eval(code);                                                                         
    }

    Черномагическое применение jquery-метода к обьекту по селектору

    blessed, 25 Декабря 2013

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

    +67

    1. 1
    $msg = (($this->data[0] == '1' || $this->auth->demo == 1) ? "orderCheck" : "orderInsert")." ".(($this->data[4] == '1') ? "1" : "0")."*|*".$a[$ww][$objs[0][0]][0]['o']."%|%".$a[$ww][$objs[0][0]][0]['h']."%|%%|%".$a[$ww][$objs[0][0]][0]['e']."%|%".$this->data[9].$hord."*|*".$this->regiond['phone_code'].(($this->auth->demo==1) ? $this->regiond['demo_phone'] : $this->auth->phone)."*|*".$nord."*|*".$this->data[7]."*|*".$this->regiond['phone_code'].(($this->auth->demo==1) ? $this->regiond['demo_phone'] : $this->data[6])."*|*".$this->data[5]/*(($this->data[5] == '2' && $this->regiond['lux'] == '1') ? "deluxe" : "")*/."*|*".$this->java."*|*".$this->data[13];

    Картина Репина. PHP притворяется регэкспом.

    blessed, 23 Августа 2012

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

    +56

    1. 1
    2. 2
    3. 3
    4. 4
    $data = $this->db->qp($q=(($type == 1 && $this->auth->demo == 0) ? '(SELECT Favorite_Name as s, CONCAT(oname,\'|\',House,\'|\',Enter) as s2, Id as id, \'1\' as t, null as m, IF(LEFT(LOWER(TRIM(Favorite_Name)), '.$c.')=\''.$sword.'\', 0, IF(LEFT(LOWER(TRIM(oname)), '.$c.')=\''.$sword.'\', 1, 2)) as od, \'1\' as t2 FROM :Cabinet_Favorite_Objects: WHERE Client_Phone=\'7'.$this->auth->phone.'\' && (lower(Favorite_Name) LIKE \'%'.$sword.'%\' || lower(oname) LIKE \'%'.$sword.'%\') ORDER BY od ASC, Favorite_Name'.$lim.')
    		UNION ALL
    		(SELECT addr as s, \'1\' as s2, id as id, \'2\' as t, null as m, IF(LEFT(LOWER(TRIM(addr)), '.$c.')=\''.$sword.'\', 0, 1) as od, \'2\' as t2 FROM :cabinet_history_objects: WHERE cid=\''.$this->auth->adata['IDClient'].'\' && lower(addr) LIKE \'%'.$sword.'%\' ORDER BY od ASC, num, addr DESC'.$lim.')
    		' : '').(($type == 1 && $this->auth->demo == 0 && $c > 0) ? ' UNION ALL ' : '').(($c > 0) ? '(SELECT objectName as s, objectMetaType as s2, objectID as id, \'3\' as t, objectAddress as m, IF(LEFT(LOWER(TRIM(SearchField)), '.$c.')=\''.$sword.'\', 0, 1) as od, IF(objectMetaType=\'0\', 3, IF(objectMetaType=\'100\', 4, 5)) as t2 FROM :Cabinet_Objects: WHERE lower(SearchField) LIKE \'%'.$sword.'%\' ORDER BY od ASC, objectMetaType ASC, s ASC'.$lim.')' : ''), '', 'select');

    Получение списка доступных адресов для заказа такси.

    blessed, 21 Августа 2012

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

    +61

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    if (empty($columns)) {
    	$columns = 'eleven';
    } else {
    	// Check the function for a returned variable
            // (от автора) КОГО КОГО МЫ ТАМ ЧЕКАЕМ??
    	$columns = $columns;
    }

    Найдено в достойном шаблоне Skeleton для WordPress
    /(. . )

    blessed, 13 Июня 2012

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