- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
case "delete":
$id=$_GET['id'];
if(!isset($id)){
// no id? GTFO
header('Location: index.php?go=manage_costumes&act=view');
exit();
}else{
// id exists
...
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+156
case "delete":
$id=$_GET['id'];
if(!isset($id)){
// no id? GTFO
header('Location: index.php?go=manage_costumes&act=view');
exit();
}else{
// id exists
...
)))
+159
private function isBonusAddOK($code,$ffStr)
{
switch($code)
{
case 1:if(
($this->isBFFOK($ffStr,40) || $this->isBFFOK($ffStr,38) || $this->isBFFOK($ffStr,37)) &&
$this->isBFFOK($ffStr,24) && $this->isBFFOK($ffStr,19) &&
($this->isBFFOK($ffStr,42) || $this->isBFFOK($ffStr,43) || $this->isBFFOK($ffStr,44))
)return true;return false;
case 6:if(
($this->isBFFOK($ffStr,40) || $this->isBFFOK($ffStr,38) || $this->isBFFOK($ffStr,37)) &&
$this->isBFFOK($ffStr,24) && $this->isBFFOK($ffStr,20) &&
($this->isBFFOK($ffStr,42) || $this->isBFFOK($ffStr,43) || $this->isBFFOK($ffStr,44))
)return true;return false;
case 11:if(
$this->isBFFOK($ffStr,24) &&
($this->isBFFOK($ffStr,16) || $this->isBFFOK($ffStr,358) || $this->isBFFOK($ffStr,360) || $this->isBFFOK($ffStr,361)) &&
$this->isBFFOK($ffStr,62) &&
($this->isBFFOK($ffStr,64) || $this->isBFFOK($ffStr,352) || $this->isBFFOK($ffStr,356) || $this->isBFFOK($ffStr,363)) &&
($this->isBFFOK($ffStr,3) || $this->isBFFOK($ffStr,4) || $this->isBFFOK($ffStr,5))
)return true;return false;
case 14:if(
$this->isBFFOK($ffStr,24) &&
($this->isBFFOK($ffStr,16) || $this->isBFFOK($ffStr,358) || $this->isBFFOK($ffStr,360) || $this->isBFFOK($ffStr,361)) &&
$this->isBFFOK($ffStr,61) &&
($this->isBFFOK($ffStr,64) || $this->isBFFOK($ffStr,352) || $this->isBFFOK($ffStr,356) || $this->isBFFOK($ffStr,363)) &&
($this->isBFFOK($ffStr,3) || $this->isBFFOK($ffStr,4) || $this->isBFFOK($ffStr,5))
)return true;return false;
case 17:if(
($this->isBFFOK($ffStr,16) || $this->isBFFOK($ffStr,358) || $this->isBFFOK($ffStr,360) || $this->isBFFOK($ffStr,361)) &&
($this->isBFFOK($ffStr,64) || $this->isBFFOK($ffStr,352) || $this->isBFFOK($ffStr,356) || $this->isBFFOK($ffStr,363)) &&
($this->isBFFOK($ffStr,3) || $this->isBFFOK($ffStr,4) || $this->isBFFOK($ffStr,5)) &&
$this->isBFFOK($ffStr,17)
)return true;return false;
case 20:if(
($this->isBFFOK($ffStr,16) || $this->isBFFOK($ffStr,358) || $this->isBFFOK($ffStr,360) || $this->isBFFOK($ffStr,361)) &&
($this->isBFFOK($ffStr,64) || $this->isBFFOK($ffStr,352) || $this->isBFFOK($ffStr,356) || $this->isBFFOK($ffStr,363)) &&
($this->isBFFOK($ffStr,3) || $this->isBFFOK($ffStr,4) || $this->isBFFOK($ffStr,5)) &&
$this->isBFFOK($ffStr,25) && $this->isBFFOK($ffStr,21)
)return true;return false;
case 23:if(
($this->isBFFOK($ffStr,16) || $this->isBFFOK($ffStr,358) || $this->isBFFOK($ffStr,360) || $this->isBFFOK($ffStr,361)) &&
($this->isBFFOK($ffStr,64) || $this->isBFFOK($ffStr,352) || $this->isBFFOK($ffStr,356) || $this->isBFFOK($ffStr,363)) &&
($this->isBFFOK($ffStr,3) || $this->isBFFOK($ffStr,4) || $this->isBFFOK($ffStr,5)) &&
$this->isBFFOK($ffStr,21)
)return true;return false;
.... еще куча строк до значения 88
default: return true;
}
}
private function isBFFOK($ffStr,$pos)
{
$val = substr($ffStr,$pos,1);//echo $pos.':'.$val;var_dump(($val != '0'));echo ' ';
return ($val != '0');
/*if($val == 0)return false;
ИфЗебок
−127
Папка, создаваемая USB Disk Antivirus в корне всех дисков предотвращает заражение компьютера через Autorun. Пожалуйста не изменяйте и не удаляйте ее.
Напомнило кое-что.
−122
var mapDress:BitmapData = MathUtils.getTransformationMapTShort(bottomMovie.width, bottomMovie.height, pointFilterTopLeft, pointFilterBezierLeft, point1, pointFilterLimitLeft, pointFilterTopRight, pointFilterBezierRight, point2, pointFilterLimitRight, this.clothes[bottomIndex.layer][bottomIndex.child].colored_set[this.clothes[bottomIndex.layer][bottomIndex.child].currentColorVariant].variants[this.clothes[bottomIndex.layer][bottomIndex.child].currentWearVariant][this.currentView].arm_points_right, this.clothes[bottomIndex.layer][bottomIndex.child].colored_set[this.clothes[bottomIndex.layer][bottomIndex.child].currentColorVariant].variants[this.clothes[bottomIndex.layer][bottomIndex.child].currentWearVariant][this.currentView].arm_points_left);
"752 см позитива!"
+161
AnsiString DateArray = "";
int DaysBetween = 0;
DaysBetween = DateTimePicker2->Date - DateTimePicker1->Date;
for (int i = 0; i <= DaysBetween; i++ )
{
if (i != 0)
DateArray = DateArray + " OR ";
DateArray = DateArray + " date_made = '"+DateToStr(DateTimePicker1->Date + i)+"'";
}
Очевидно, подготавливаем запрос для отбора по диапазону дат :)
+154
// сохраняем лог
$log = fopen($logfile,'w'); // открыли файл, стерев его
foreach($temp as $tmp) {fwrite($log,trim($tmp)."n");} // каждый элемент массива записали в строку
fclose($log); // закрыли лог
?>
Зачем мне implode и file_put_contents?
У меня нет времени, чтобы ебаться с ними! Лучше я создам цикл.
http://forum.htmlbook.ru/index.php?showtopic=7169
На это ссылка в топ-теме причем.
+127
<p>
Журкабаев
<span> </span>
<span>- заместитель акима города Костаная,</span>
</p>
<p>
Марат Кенжебекович
<span> председатель комиссии</span>
</p>
http://kostanay-city.kz/index.php?mod=page&obj=2701 таблица в центре страницы, кода много, поэтому приведу часть... Мне жаль того кто её делал, но еще больше жаль знакомого которому пришлось переносить это чудо на новый сайт... CTRL + U, не поможет посмотреть всю картину, т.к. данные подгружаются, но firebug приятно радует)
+158
foreach ($aa as $key => $value) {
$aa[$key][2] = str_replace(',', '.', $aa[$key][2]);
$aa[$key][3] = str_replace(',', '.', $aa[$key][3]);
$aa[$key][4] = str_replace(',', '.', $aa[$key][4]);
}
+140
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>По колено в коде — Говнокод.ру</title>
<meta name="keywords" content="говнокод, смешной код, быдлокод, быдлокодеры, индусы, для программистов, про программистов, индусский код, записки программиста, говно, говнокод на php, mysql, perl" />
<meta name="description" content="Сборник говнокода на различных языках программирования" />
<meta property="og:image" content="http://govnokod.ru/images/brand.gif" />
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
<link rel="icon" href="/animated_favicon.gif" type="image/gif" />
<link rel="stylesheet" href="/css/style.css?v=4" media="all" type="text/css" />
<!--[if lte IE 7]><link href="/css/ie.css" rel="stylesheet" type="text/css"><![endif]-->
<link title="rss govnokod.ru" type="application/rss+xml" rel="alternate" href="http://govnokod.ru/rss"/>
<link rel="stylesheet" type="text/css" href="/media/b5aabef57bd7c3fa62379caa0e483deb.css?files=jshighlight/govnokod.css" />
<script type="text/javascript">
//<!--
var SITE_PATH = ''; var SITE_LANG = '';
//-->
</script>
<script type="text/javascript" src="/media/ddd20ce56acf1d9ebadd126322495087.js?files=jquery.js,jquery.scrollTo.js,govnokod.js,jshighlight/highlight.pack.js&v=4"></script>
</head>
Привлекает внимание поисковиков(04).
+80
public static java.util.Date getPreviousMonth () throws ParseException {
Date currentDate = new Date(System.currentTimeMillis());
Calendar currentCalendar = Calendar.getInstance();
currentCalendar.setTimeInMillis(currentDate.getTime());
SimpleDateFormat format = new SimpleDateFormat("dd.MM.yyyy");
//currentCalendar.set(Calendar.MONTH, currentCalendar.get(Calendar.MONTH) - 1);
currentCalendar.set(Calendar.DAY_OF_MONTH, currentCalendar.get(Calendar.DAY_OF_MONTH) - 30);
//currentCalendar.set(Calendar.DATE, currentCalendar.getActualMinimum(Calendar.DAY_OF_MONTH));
format.format(currentCalendar.getTime());
java.util.Date resultDate = null;
resultDate = format.parse(format.format(currentCalendar.getTime()));
return resultDate;
}
Занимаюсь рефакторингом. Особо радует предпоследняя строчка.