- 1
- 2
- 3
- 4
- 5
- 6
- 7
...
</table>
<table style="height: 5px; width: 150px;"><tr><td></td></tr></table>
<table style="width: 99%;">
..
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+144
...
</table>
<table style="height: 5px; width: 150px;"><tr><td></td></tr></table>
<table style="width: 99%;">
..
+148.1
$a = 2; $b = 3;
$a ^= $b ^= $a ^= $b;
echo "a = $a, b = $b"; // a = 3, b = 2
Меням $а на $б без третьей переменной
+138
for(;;)
{
echo 'хуй остановишь!';
}
+147.5
echo '<script>';
echo "function filtover(element) { element.style.color='red'; }";
echo "function filtout(element) { element.style.color='black'; }";
echo "function filtOpt()";
echo "{";
for($i = 1; $i <= $amGroups; $i++)
{
echo "if(!filtOpt.option" . $i . ") filtOpt.option" . $i . " = '" . $params[$i - 1][0] . "=" . $_SESSION[$params[$i - 1][0]] . "';";
}
echo "switch(opt)";
echo "{";
for($i = 1; $i <= $amGroups; $i++)
{
for($j = 1; $j <= $amElements[$i - 1]; $j++)
{
echo "case '" . $i . "_" . $j . "': ";
for($m = 1; $m <= $amElements[$i - 1]; $m++)
{
if($m == $j) echo "document.getElementById('opt" . $i . "_" . $m . "').className = 'checkruby-on';";
else echo "document.getElementById('opt" . $i . "_" . $m . "').className = 'checkruby';";
}
echo "break;";
}
}
echo "case 'iWantToSee': ajaxRequest(";
for($i = 1; $i <= $amGroups; $i++)
{
echo "filtOpt.option" . $i;
if($i != $amGroups) echo " + '&' + ";
}
echo ");"; // цифры - это размеры ajax-блока, появляющегося при отсутствии результатов работы фильтра
echo "}";
echo "}";
echo '</script>';
Фрагмент кода с одного сайта. Вся это ебатория автоматически генерит шаблонные чек-боксы с подключенным к нему javascript.
+146
<?php
// Функция рассылки писем
// .........
if ($row['site_id'] == 0 and array_search($template, $not_readnotify) === false)
{
$to = $row['email'].'.readnotify.com';
}
else{
$to = $row['email'];
}
$to = $row['email'];
// ..........
?>
Я видел всякие чудеса на свете. Но мне после отработки скрипта один раз пришло письмо от [email protected]
o_O
(c) n3m0
−100
...
@font-face
{
src: url("/components/TimeNewRoman.swf");
fontFamily: "Times New Roman";
}
...
TextArea {
backgroundAlpha: 0.07;
backgroundColor: #ffffff;
borderColor: #99ff00;
color: #99ff66;
font-family: "Times New Roman";
}
...
обнаружил в css своего РАБОЧЕГО проекта... не, спать все-таки надо временами)
−30.1
select t1.PosTag, t1.KlTOt, t1.NameKipID, t1.TypMarkaName, t1.Lim, t1.EdIzm,
t1.OD_NUMMNF, t1.PeriodP, t1.PeriodK,
D3, D5,
case
--поверка
when Convert(varchar,t1.ArealP) = '1' and Convert(varchar,MONTH(t1.DataOchP)) =1 then 'Пм'
when Convert(varchar,t1.ArealP) = '1' and Convert(varchar,MONTH(t1.dd3_1p)) =1 then 'Пм'
when Convert(varchar,t1.ArealP) = '1' and Convert(varchar,MONTH(t1.dd3_2p)) =1 then 'Пм'
when Convert(varchar,t1.ArealP) = '1' and Convert(varchar,MONTH(t1.dd3_3p)) =1 then 'Пм'
when Convert(varchar,t1.ArealP) = '1' and Convert(varchar,MONTH(t1.dd3_4p)) =1 then 'Пм'
when Convert(varchar,t1.ArealP) = '1' and Convert(varchar,MONTH(t1.dd3_5p)) =1 then 'Пм'
when Convert(varchar,t1.ArealP) = '1' and Convert(varchar,MONTH(t1.dd6_1p)) =1 then 'Пм'
when Convert(varchar,t1.ArealP) = '1' and Convert(varchar,MONTH(t1.dd6_2p)) =1 then 'Пм'
when Convert(varchar,t1.ArealP) = '1' and Convert(varchar,MONTH(t1.ddp)) =1 then 'Пм'
when Convert(varchar,t1.ArealP) <> '1' and Convert(varchar,MONTH(t1.DataOchP)) =1 then 'П'
when Convert(varchar,t1.ArealP) <> '1' and Convert(varchar,MONTH(t1.dd3_1p)) =1 then 'П'
when Convert(varchar,t1.ArealP) <> '1' and Convert(varchar,MONTH(t1.dd3_2p)) =1 then 'П'
when Convert(varchar,t1.ArealP) <> '1' and Convert(varchar,MONTH(t1.dd3_3p)) =1 then 'П'
when Convert(varchar,t1.ArealP) <> '1' and Convert(varchar,MONTH(t1.dd3_4p)) =1 then 'П'
when Convert(varchar,t1.ArealP) <> '1' and Convert(varchar,MONTH(t1.dd3_5p)) =1 then 'П'
when Convert(varchar,t1.ArealP) <> '1' and Convert(varchar,MONTH(t1.dd6_1p)) =1 then 'П'
when Convert(varchar,t1.ArealP) <> '1' and Convert(varchar,MONTH(t1.dd6_2p)) =1 then 'П'
when Convert(varchar,t1.ArealP) <> '1' and Convert(varchar,MONTH(t1.ddp)) =1 then 'П'
--калибровка
when Convert(varchar,t1.ArealK) = '1' and Convert(varchar,MONTH(t1.DataOchK)) =1 then 'Км'
when Convert(varchar,t1.ArealK) = '1' and Convert(varchar,MONTH(t1.dd3_1k)) =1 then 'Км'
when Convert(varchar,t1.ArealK) = '1' and Convert(varchar,MONTH(t1.dd3_2k)) =1 then 'Км'
when Convert(varchar,t1.ArealK) = '1' and Convert(varchar,MONTH(t1.dd3_3k)) =1 then 'Км'
when Convert(varchar,t1.ArealK) = '1' and Convert(varchar,MONTH(t1.dd3_4k)) =1 then 'Км'
when Convert(varchar,t1.ArealK) = '1' and Convert(varchar,MONTH(t1.dd3_5k)) =1 then 'Км'
when Convert(varchar,t1.ArealK) = '1' and Convert(varchar,MONTH(t1.dd6_1k)) =1 then 'Км'
when Convert(varchar,t1.ArealK) = '1' and Convert(varchar,MONTH(t1.dd6_2k)) =1 then 'Км'
when Convert(varchar,t1.ArealK) = '1' and Convert(varchar,MONTH(t1.ddk)) =1 then 'Км'
when Convert(varchar,t1.ArealK) <> '1' and Convert(varchar,MONTH(t1.DataOchK)) =1 then 'К'
when Convert(varchar,t1.ArealK) <> '1' and Convert(varchar,MONTH(t1.dd3_1k)) =1 then 'К'
when Convert(varchar,t1.ArealK) <> '1' and Convert(varchar,MONTH(t1.dd3_2k)) =1 then 'К'
when Convert(varchar,t1.ArealK) <> '1' and Convert(varchar,MONTH(t1.dd3_3k)) =1 then 'К'
when Convert(varchar,t1.ArealK) <> '1' and Convert(varchar,MONTH(t1.dd3_4k)) =1 then 'К'
when Convert(varchar,t1.ArealK) <> '1' and Convert(varchar,MONTH(t1.dd3_5k)) =1 then 'К'
when Convert(varchar,t1.ArealK) <> '1' and Convert(varchar,MONTH(t1.dd6_1k)) =1 then 'К'
when Convert(varchar,t1.ArealK) <> '1' and Convert(varchar,MONTH(t1.dd6_2k)) =1 then 'К'
when Convert(varchar,t1.ArealK) <> '1' and Convert(varchar,MONTH(t1.ddk)) =1 then 'К' end a1,
case
--поверка
when Convert(varchar,t1.ArealP) = '1' and Convert(varchar,MONTH(t1.DataOchP)) =2 then 'Пм'
when Convert(varchar,t1.ArealP) = '1' and Convert(varchar,MONTH(t1.dd3_1p)) =2 then 'Пм'
when Convert(varchar,t1.ArealP) = '1' and Convert(varchar,MONTH(t1.dd3_2p)) =2 then 'Пм'
when Convert(varchar,t1.ArealP) = '1' and Convert(varchar,MONTH(t1.dd3_3p)) =2 then 'Пм'
when Convert(varchar,t1.ArealP) = '1' and Convert(varchar,MONTH(t1.dd3_4p)) =2 then 'Пм'
when Convert(varchar,t1.ArealP) = '1' and Convert(varchar,MONTH(t1.dd3_5p)) =2 then 'Пм'
when Convert(varchar,t1.ArealP) = '1' and Convert(varchar,MONTH(t1.dd6_1p)) =2 then 'Пм'
when Convert(varchar,t1.ArealP) = '1' and Convert(varchar,MONTH(t1.dd6_2p)) =2 then 'Пм'
when Convert(varchar,t1.ArealP) = '1' and Convert(varchar,MONTH(t1.ddp)) =2 then 'Пм'
when Convert(varchar,t1.ArealP) <> '1' and Convert(varchar,MONTH(t1.DataOchP)) =2 then 'П'
when Convert(varchar,t1.ArealP) <> '1' and Convert(varchar,MONTH(t1.dd3_1p)) =2 then 'П'
when Convert(varchar,t1.ArealP) <> '1' and Convert(varchar,MONTH(t1.dd3_2p)) =2 then 'П'
when Convert(varchar,t1.ArealP) <> '1' and Convert(varchar,MONTH(t1.dd3_3p)) =2 then 'П'
when Convert(varchar,t1.ArealP) <> '1' and Convert(varchar,MONTH(t1.dd3_4p)) =2 then 'П'
when Convert(varchar,t1.ArealP) <> '1' and Convert(varchar,MONTH(t1.dd3_5p)) =2 then 'П'
when Convert(varchar,t1.ArealP) <> '1' and Convert(varchar,MONTH(t1.dd6_1p)) =2 then 'П'
when Convert(varchar,t1.ArealP) <> '1' and Convert(varchar,MONTH(t1.dd6_2p)) =2 then 'П'
when Convert(varchar,t1.ArealP) <> '1' and Convert(varchar,MONTH(t1.ddp)) =2 then 'П'
--калибровка
when Convert(varchar,t1.ArealK) = '1' and Convert(varchar,MONTH(t1.DataOchK)) =2 then 'Км'
when Convert(varchar,t1.ArealK) = '1' and Convert(varchar,MONTH(t1.dd3_1k)) =2 then 'Км'
when Convert(varchar,t1.ArealK) = '1' and Convert(varchar,MONTH(t1.dd3_2k)) =2 then 'Км'
when Convert(varchar,t1.ArealK) = '1' and Convert(varchar,MONTH(t1.dd3_3k)) =2 then 'Км'
when Convert(varchar,t1.ArealK) = '1' and Convert(varchar,MONTH(t1.dd3_4k)) =2 then 'Км'
when Convert(varchar,t1.ArealK) = '1' and Convert(varchar,MONTH(t1.dd3_5k)) =2 then 'Км'
when Convert(varchar,t1.ArealK) = '1' and Convert(varchar,MONTH(t1.dd6_1k)) =2 then 'Км'
when Convert(varchar,t1.ArealK) = '1' and Convert(varchar,MONTH(t1.dd6_2k)) =2 then 'Км'
when Convert(varchar,t1.ArealK) = '1' and Convert(varchar,MONTH(t1.ddk)) =2 then 'Км'
when Convert(varchar,t1.ArealK) <> '1' and Convert(varchar,MONTH(t1.DataOchK)) =2 then 'К'
when Convert(varchar,t1.ArealK) <> '1' and Convert(varchar,MONTH(t1.dd3_1k)) =2 then 'К'
when Convert(varchar,t1.ArealK) <> '1' and Convert(varchar,MONTH(t1.dd3_2k)) =2 then 'К'
when Convert(varchar,t1.ArealK) <> '1' and Convert(varchar,MONTH(t1.dd3_3k)) =2 then 'К'
when Convert(varchar,t1.ArealK) <> '1' and Convert(varchar,MONTH(t1.dd3_4k)) =2 then 'К'
when Convert(varchar,t1.ArealK) <> '1' and Convert(varchar,MONTH(t1.dd3_5k)) =2 then 'К'
when Convert(varchar,t1.ArealK) <> '1' and Convert(varchar,MONTH(t1.dd6_1k)) =2 then 'К'
when Convert(varchar,t1.ArealK) <> '1' and Convert(varchar,MONTH(t1.dd6_2k)) =2 then 'К'
when Convert(varchar,t1.ArealK) <> '1' and Convert(varchar,MONTH(t1.ddk)) =2 then 'К' end a2,
case
--поверка
when Convert(varchar,t1.ArealP) = '1' and Convert(varchar,MONTH(t1.DataOchP)) =3 then 'Пм'
when Convert(varchar,t1.ArealP) = '1' and Convert(varchar,MONTH(t1.dd3_1p)) =3 then 'Пм'
when Convert(varchar,t1.ArealP) = '1' and Convert(varchar,MONTH(t1.dd3_2p)) =3 then 'Пм'
when Convert(varchar,t1.ArealP) = '1' and Convert(varchar,MONTH(t1.dd3_3p)) =3 then 'Пм'
when Convert(varchar,t1.ArealP) = '1' and Convert(varchar,MONTH(t1.dd3_4p)) =3 then 'Пм'
when Convert(varchar,t1.ArealP) = '1' and Convert(varchar,MONTH(t1.dd3_5p)) =3 then 'Пм'
when Convert(varchar,t1.ArealP) = '1' and Convert(varchar,MONTH(t1.dd6_1p)) =3 then 'Пм'
when Convert(varchar,t1.ArealP) = '1' and Convert(varchar,MONTH(t1.dd6_2p)) =3 then 'Пм'
when Convert(varchar,t1.ArealP) = '1' and Convert(varchar,MONTH(t1.ddp)) =3 then 'Пм'
when Convert(varchar,t1.ArealP) <> '1' and Convert(varchar,MONTH(t1.DataOchP)) =3 then 'П'
when Convert(varchar,t1.ArealP) <> '1' and Convert(varchar,MONTH(t1.dd3_1p)) =3 then 'П'
when Convert(varchar,t1.ArealP) <> '1' and Convert(varchar,MONTH(t1.dd3_2p)) =3 then 'П'
when Convert(varchar,t1.ArealP) <> '1' and Convert(varchar,MONTH(t1.dd3_3p)) =3 then 'П'
when Convert(varchar,t1.ArealP) <> '1' and Convert(varchar,MONTH(t1.dd3_4p)) =3 then 'П'
when Convert(varchar,t1.ArealP) <> '1' and Convert(varchar,MONTH(t1.dd3_5p)) =3 then 'П'
when Convert(varchar,t1.ArealP) <> '1' and Convert(varchar,MONTH(t1.dd6_1p)) =3 then 'П'
when Convert(varchar,t1.ArealP) <> '1' and Convert(varchar,MONTH(t1.dd6_2p)) =3 then 'П'
Взято со знаменитого топика на sql.ru: http://sql.ru/forum/actualthread.aspx?tid=591607
Писано ручками некоего безумца. Тому, кто занял его место впоследствии, было дано задание оптимизировать это под угрозой увольнения.
P.S. Функционал сайта, как выяснилось, не держит больше 100 строк говнокода, поэтому с полным текстом лучше ознакомиться по данной выше ссылке.
+141.4
AnsiString TForm1::GetParam(int flag){
switch (flag){
case 20 :
return Edit20->Text.c_str();
break;
case 21 :
return Edit21->Text.c_str();
break;
case 22 :
return Edit22->Text.c_str();
break;
case 23 :
return Edit23->Text.c_str();
break;
case 24 :
return Edit24->Text.c_str();
break;
case 25 :
return Edit25->Text.c_str();
break;
case 26 :
return Edit26->Text.c_str();
break;
case 27 :
return Edit27->Text.c_str();
break;
case 28 :
return Edit28->Text.c_str();
break;
case 29 :
return Edit29->Text.c_str();
break;
case 30 :
return Edit30->Text.c_str();
break;
case 31 :
return Edit31->Text.c_str();
break;
case 32 :
return Edit32->Text.c_str();
break;
case 33 :
return Edit33->Text.c_str();
break;
case 34 :
return Edit34->Text.c_str();
break;
case 35 :
return Edit35->Text.c_str();
break;
case 36 :
return Edit36->Text.c_str();
break;
case 37 :
return Edit37->Text.c_str();
break;
case 10 :
return Edit10->Text.c_str();
break;
case 11 :
return Edit11->Text.c_str();
break;
case 12 :
return Edit12->Text.c_str();
break;
case 13 :
return Edit13->Text.c_str();
break;
case 14 :
return Edit14->Text.c_str();
break;
case 15 :
return Edit15->Text.c_str();
break;
case 16 :
return Edit16->Text.c_str();
break;
}
}
void * TForm1::SetParam(int flag, char * value){
switch (flag){
case 20 :
Edit20->Text = value;
break;
case 21 :
Edit21->Text = value;
break;
case 22 :
Edit22->Text = value;
break;
case 23 :
Edit23->Text = value;
в билдере массивы контролов реализованны реально через механизм производства говнокода... потому пришлось вот...
ЗЫ Потомки простите
+196.1
$id=mysql_escape_string(htmlspecialchars(trim(intval($_GET['id']))));
Непробиваемая защита гг
+147
private static string ParseDate(DateTime date) {
return date.ToString(Consts.Formatting.SHORT_DATE_WITH_SHORT_YEAR_DATA_FORMAT, CultureInfo.InvariantCulture);
}
неожиданный нейминг naming. после использования - сжечь