- 1
- 2
- 3
- 4
- 5
if ($type['my_event']) {
$select->where('1=1)))');
} else {
$select->where('1=1))');
}
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+79
if ($type['my_event']) {
$select->where('1=1)))');
} else {
$select->where('1=1))');
}
Индусы..
+62
$str = CHEREZ_GOPU_NOCACHE ? false : $mem->get($cachename);
if ($str === false)
{
/*
мно гомно гомно го кода
*/
$mem->set('totalonline', $totalonline, false, MEMCACHE_CACHETIME * 3);
if (!CHEREZ_GOPU_NOCACHE)
$mem->set($cachename, $str, false, MEMCACHE_CACHETIME);
}
и еще 100500 строк в данном файле...
+61
class admin_payment {
// ...
}
$m = 'admin_payment';
$$m = new $m();
$m->get();
отборно.
+72
/* Данные пользователя*/
$fio=$_POST['fio'];
$sex=$_POST['sex'];
$sdate=$_POST['sdate'];
$city=$_POST['city'];
$age=$_POST['age'];
$hage=$_POST['hage'];
$cage=$_POST['cage'];
$page=$_POST['page'];
$stime=$_POST['stime'];
$ip=$_POST['ip'];
/* Вопросы*/
$a1=$_POST['a1'];
$a1b1=$_POST['1a1'];
$a1b2=$_POST['1a2'];
$a1b3=$_POST['1a3'];
$a1b4=$_POST['1a4'];
$com1=$_POST['com1'];
$a2=$_POST['a2'];
$a2b1=$_POST['2a1'];
$a2b2=$_POST['2a2'];
$com2=$_POST['com2'];
$a3=$_POST['a3'];
$b1a1=$_POST['b1a1'];
$b1a2=$_POST['b1a2'];
$b1a3=$_POST['b1a3'];
$a4=$_POST['a4'];
$a3b1=$_POST['3a1'];
$a3b2=$_POST['3a2'];
$a3b3=$_POST['3a3'];
$a3b4=$_POST['3a4'];
$a3b5=$_POST['3a5'];
$a3b6=$_POST['3a6'];
$a3b7=$_POST['3a7'];
$a3b8=$_POST['3a8'];
$a3b9=$_POST['3a9'];
$a3b10=$_POST['3a10'];
$com3=$_POST['com3'];
$a5=$_POST['a5'];
$b2a1=$_POST['b2a1'];
$b2a2=$_POST['b2a2'];
$b2a3=$_POST['b2a3'];
$a6=$_POST['a6'];
$a4b1=$_POST['4a1'];
$a4b2=$_POST['4a2'];
$a4b3=$_POST['4a3'];
$a4b4=$_POST['4a4'];
$a4b5=$_POST['4a5'];
$a4b6=$_POST['4a6'];
$a4b7=$_POST['4a7'];
$com4=$_POST['com4'];
$a7=$_POST['a7'];
$b3a1=$_POST['b3a1'];
$b3a2=$_POST['b3a2'];
$b3a3=$_POST['b3a3'];
$a8=$_POST['a8'];
$a5b1=$_POST['5a1'];
$a5b2=$_POST['5a2'];
$a5b3=$_POST['5a3'];
$a5b4=$_POST['5a4'];
$a5b5=$_POST['5a5'];
$a5b6=$_POST['5a6'];
$a5b7=$_POST['5a7'];
$a5b8=$_POST['5a8'];
$a5b9=$_POST['5a9'];
$a5b10=$_POST['5a10'];
$a5b11=$_POST['5a11'];
$com5=$_POST['com5'];
$a9=$_POST['a9'];
$a6b1=$_POST['6a1'];
$a6b2=$_POST['6a2'];
$a6b3=$_POST['6a3'];
$a6b4=$_POST['6a4'];
$a6b5=$_POST['6a5'];
$a6b6=$_POST['6a6'];
$a6b7=$_POST['6a7'];
$a6b8=$_POST['6a8'];
$com6=$_POST['com6'];
echo "<CENTER>";
echo "Привет, ".$_POST['fio'];
echo "<BR><BR>";
echo "Спасибо за ваш интерес.<BR><BR>";
....
нашли в прокте вот такое извращение :)
+78
private function isRussianCar($car){
# Определялка российских машин.
if ($car['make_id'] == '107') return true;
if ($car['make_id'] == '108') return true;
if ($car['make_id'] == '109') return true;
if ($car['make_id'] == '110') return true;
if ($car['make_id'] == '111') return true;
if ($car['make_id'] == '112') return true;
if ($car['make_id'] == '113') return true;
if ($car['make_id'] == '114') return true;
if ($car['make_id'] == '115') return true;
if ($car['make_id'] == '116') return true;
if ($car['make_id'] == '117') return true;
return false;
}
Нашёл в одном из проектов
+71
$template_archive_footer = stripslashes(get_option('poll_template_pollarchivefooter'));
$template_archive_footer = str_replace("%POLL_START_DATE%", $poll_start_date, $template_archive_footer);
$template_archive_footer = str_replace("%POLL_END_DATE%", $poll_end_date, $template_archive_footer);
$template_archive_footer = str_replace("%POLL_TOTALVOTES%", number_format_i18n($polls_question['totalvotes']), $template_archive_footer);
$template_archive_footer = str_replace("%POLL_TOTALVOTERS%", number_format_i18n($polls_question['totalvoters']), $template_archive_footer);
$template_archive_footer = str_replace("%POLL_MOST_ANSWER%", $poll_most_answer, $template_archive_footer);
$template_archive_footer = str_replace("%POLL_MOST_VOTES%", number_format_i18n($poll_most_votes), $template_archive_footer);
$template_archive_footer = str_replace("%POLL_MOST_PERCENTAGE%", $poll_most_percentage, $template_archive_footer);
$template_archive_footer = str_replace("%POLL_LEAST_ANSWER%", $poll_least_answer, $template_archive_footer);
$template_archive_footer = str_replace("%POLL_LEAST_VOTES%", number_format_i18n($poll_least_votes), $template_archive_footer);
$template_archive_footer = str_replace("%POLL_LEAST_PERCENTAGE%", $poll_least_percentage, $template_archive_footer);
wp-polls. пиздец.
+62
if($col == "#eeeeee"){
$col = "#ffffff";
}else{
$col = "#eeeeee";
}
Нашел на просторах интернета скрипт, а в нем вот это. $col нигде не присваивается.
+58
if ($who == 'student') $answerArray['student_id'] = $this->people->id;
if ($who == 'teacher') $answerArray['teacher_id'] = $this->people->id;
if ($who == 'student') $answerArray['student_text'] = $post_array['message'];
if ($who == 'teacher') $answerArray['teacher_text'] = $post_array['message'];
if ($who == 'student') $answerArray['student_date'] = date('Y-m-d H:i:s');
if ($who == 'teacher') $answerArray['teacher_date'] = date('Y-m-d H:i:s');
if ($who == 'student' && $files) $answerArray['student_file'] = $files[0]['name'];
if ($who == 'teacher' && $files) $answerArray['teacher_file'] = $files[0]['name'];
if ($who == 'student' && $files) $answerArray['student_file_orig_name'] = $files[0]['orig_name'];
if ($who == 'teacher' && $files) $answerArray['teacher_file_orig_name'] = $files[0]['orig_name'];
if ($who == 'student') $answerArray['status'] = 0;
if ($who == 'teacher') $answerArray['status'] = 1;
Обнаружил в корпоративном коде. )
+71
/**
* Get the river's access where clause
*
* @return string
* @since 1.8.0
* @access private
*/
function elgg_river_get_access_sql() {
// rewrite default access where clause to work with river table
return str_replace("and enabled='yes'", '',
str_replace('owner_guid', 'rv.subject_guid',
str_replace('access_id', 'rv.access_id', get_access_sql_suffix())));
}
Кусок из ядра фремворка Elgg, Sql запрос подправляется с помощью str_replace
+71
$res= (isset($r[0]) and count($r[0]) > 0) ? true : false;
return $res;
Классика