- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
function Fields_Change()
{
if (username.value == "")
{
username.value = lbUserName.innerHTML;
}
if (username.value == lbUserName.innerHTML)
{
username.value = "";
}
}
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+176.5
function Fields_Change()
{
if (username.value == "")
{
username.value = lbUserName.innerHTML;
}
if (username.value == lbUserName.innerHTML)
{
username.value = "";
}
}
+176.4
if($n==1 or $n==3 or $n==3 or $n==4 or $n==5) {
if($n ==1 ) {$result = mysql_query("SELECT * FROM spec WHERE id_fac='$id_fac' and 1c='1' and id_sett='1'");}
if($n ==2 ) {$result = mysql_query("SELECT * FROM spec WHERE id_fac='$id_fac' and 2c='1' and id_sett='1'");}
if($n ==3 ) {$result = mysql_query("SELECT * FROM spec WHERE id_fac='$id_fac' and 3c='1' and id_sett='1'");}
if($n ==4 ) {$result = mysql_query("SELECT * FROM spec WHERE id_fac='$id_fac' and 4c='1' and id_sett='1'");}
if($n ==5 ) {$result = mysql_query("SELECT * FROM spec WHERE id_fac='$id_fac' and 5c='1' and id_sett='1'");}}
кусок из примера кода, который чувак прислал к нам в контору вместе с резюме
+176.4
if ('yes'!= 'yes') {
checkCaptcha();
return true;
}
в кодах блог движка нашел подобное..
+176.1
$little=array('а','б','в','г','д','е','ё','ж','з','и','й','к','л','м','н','о','п','р','с','т','у','ф','х','ц','ч','ш','щ','ъ','ы','ь','э','ю','я','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z');
$big= array('А','Б','В','Г','Д','Е','Ё','Ж','З','И','Й','К','Л','М','Н','О','П','Р','С','Т','У','Ф','Х','Ц','Ч','Ш','Щ','Ъ','Ы','Ь','Э','Ю','Я','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z');
while($d1 = mysql_fetch_array($d)){
$name2 = str_replace($little, $big, $d1["name"]);
}
вместо ф-ции strtoupper()
+176
function convert_date($date) {
$part_date = explode(" ", $date);
$part_day = explode("-", $part_date[0]);
$year = $part_day[0];
$month = $part_day[1];
$day = $part_day[2];
$part_time = explode(":", $part_date[1]);
$hour = $part_time[0];
$min = $part_time[1];
$result = $day . "." . $month . "." . $year;
return $result;
}
Трудное решение легких проблем
+176
function getAnchor(link){
var url=( (!link) ? window.location : link).toString();
var idx = url.indexOf("#");
return (idx != -1 ? url.substring(idx+1) : '');
}
function setAnchor(anchor){
var url=(window.location).toString();
var idx = url.indexOf("#");
return ( window.location=
(idx != -1 ? url.substring(0,idx+1) : url+'#')+anchor
);
}
+176
public function setPIDorSEORedirect($id, $disableVarName = '') {
........
}
отличное название метода)))
+176
$query = "
SELECT `ord`.*,`cus`.`existing_phone_number`,`cus`.`nova_jednotka`,
`cus`.`order_phone`,`cus`.`custom_delivery_date`, `cus`.`delivery_address`,
`cus`.`invoice_address`, `cus`.`invoice_street`, `cus`.`invoice_street_number`,
`cus`.`invoice_city`, `cus`.`invoice_zip`
FROM ".(!empty($_GET["copy_view"]) && $_GET["copy_view"] == 1 ? "`orders`" : "`".$this->table."`")." AS `ord`,
`products`, `navigace`, `customers` AS `cus`
WHERE `ord`.`order_id` = ".$order_id."
AND `ord`.`id_produktu_db` = `products`.`id`
AND `products`.`navigace_polozka_id` = `navigace`.`id`
AND `cus`.`id` = `ord`.`customers_id`
union all
select
null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null,
'', tp.description, tp.product_id, tp.activation_price, tp.activation_price_EUR,
0, tor.pocet_kusu, tp.name, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null
from tarifs_prop tp
inner join tarifs_orders tor on tp.id = tor.tarif_prop_id
where tor.order_id = ".$order_id."
union all
select
null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, '', b.description, b.product_id, b.activation_price, b.activation_price_EUR,
0, tor.pocet_kusu, b.name, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null,
null, null, null, null, null, null
from balicky b
inner join tarifs_orders tor on b.id = tor.tarif_balicek_id
where tor.order_id = ".$order_id."
ORDER BY `user_id` desc";
а филе нам кабанам, надо продукты из разных таблиц объединить в одну, ну и фто што таблицы разного размера. Зато когда добавляешь новый столбец в таблицу, нужно вручную считать сколько раз нужно добавить null :D
+176
if (strpos($_SERVER[HTTP_REFERER], "chocobo.us")) {
echo("Go away kids.");
exit;
}
if (strpos($_SERVER[REMOTE_HOST], "midmich.net")) { echo("Dry your eyes son, not everyone can be funny."); }
if (strpos($_SERVER[REMOTE_HOST], "rima-tde.net")) { echo("spam == permban"); }
#if ($REMOTE_ADDR == "12.227.136.202") {echo("Cheap sluts need not apply.");exit;}
if ($REMOTE_ADDR == "129.252.177.248") {die(0);}
if ($REMOTE_ADDR == "80.190.209.170") {die(0); }
if ($REMOTE_ADDR == "62.163.74.167") {die(0);}
if ($REMOTE_ADDR == "69.10.120.117") {echo("bye bye");exit;}
if ($REMOTE_ADDR == "24.10.146.28") {echo("flooding the queue with nonsense == ban");exit;}
if ($REMOTE_ADDR == "80.202.184.96") {echo("there is but one qdb. ripoff artists need not apply.");exit;}
if ($REMOTE_ADDR == "216.24.104.36") {echo("Blaxthos: yeah so, however many quotes us bash mods reject is how many cocks we suck -- take it easy");exit;}
if ($REMOTE_ADDR == "217.230.240.250") die("No.");
if ($REMOTE_ADDR == "134.102.2.100") {exit;}
if ($REMOTE_ADDR == "217.64.202.205") {echo("you == idiot");exit;}
if ($REMOTE_ADDR == "64.237.52.210") {exit;}
if ($REMOTE_ADDR == "155.143.208.237") {exit;}
if ($REMOTE_ADDR == "82.165.144.86") {exit;}
if ($REMOTE_ADDR == "141.157.35.222") {echo("Go away.");exit;}
if ($REMOTE_ADDR == "80.198.19.122") {echo("Fuck off.");exit;}
if ($REMOTE_ADDR == "192.93.2.12") {echo("Fuck off.");exit;}
if ($REMOTE_ADDR == "24.235.181.61") {echo("*fuckx* bash.org is for niggers.");exit;}
if ($REMOTE_ADDR == "213.202.130.44") {echo("Fuck off.");exit;}
if ($REMOTE_ADDR == "130.194.13.106") {echo("Fuck off.");exit;}
if ($REMOTE_ADDR == "144.132.68.119") {echo("Fuck off.");exit;}
if ($REMOTE_ADDR == "81.1.73.247") {echo("your access has been revoked");exit;}
if ($REMOTE_ADDR == "68.13.143.147") {exit;}
if ($REMOTE_ADDR == "217.8.141.230") {exit;}
if ($REMOTE_ADDR == "62.101.198.25") {exit;}
if ($REMOTE_ADDR == "80.96.109.170") {exit;}
if ($REMOTE_ADDR == "80.60.182.139") {exit;}
if ($REMOTE_ADDR == "4.21.108.175") {echo("Flooding the submission queue. (Banned)");exit;}
if ($REMOTE_ADDR == "151.188.16.17") {echo("Thanks for your letter. --Blaxthos (you can all thank Lunch Box Prime (some fuckchop on AIM)");exit;}
if ($REMOTE_ADDR == "203.217.65.231") {echo("No more.");exit;}
if ($REMOTE_ADDR == "68.111.156.240") {echo("No more.");exit;}
if ($REMOTE_ADDR == "82.149.227.249") {echo("No more.");exit;}
http://webcache.googleusercontent.com/search?q=cache%3Abash.org%2Findex.bak
+176
<?php
$login = 'XXXXX';
$pass = 'XXXXXXXX';
if (@$_COOKIE['login'] != $login) {
setcookie('login',$login,time()+60*60*24,'/');
}
if (@$_COOKIE['password'] != $pass) {
setcookie('password',$pass,time()+60*60*24,'/');
}
Вот такая интересная проверка на авторизацию.