- 1
- 2
- 3
- 4
- 5
- 6
- 7
function showTimeToLive(doTranslation)
{
doTranslation = (doTranslation == undefined) ? true : doTranslation;
....
timer = window.setTimeout (doTranslation ? "turnOff(true)" : "turnOff(false)", secs)
....
}
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+137
function showTimeToLive(doTranslation)
{
doTranslation = (doTranslation == undefined) ? true : doTranslation;
....
timer = window.setTimeout (doTranslation ? "turnOff(true)" : "turnOff(false)", secs)
....
}
+130
i=s.indexOf ("!") ;
Смотрю с утра в код, а там жопа.
+119
private static ControlledBlock uncontrolledBlock;
Взаимоисключающие параграфы...
+134
list($long_startIp, $long_endIp) = ip_range($value);
$strange = long2ip($long_startIp);
$endrange = long2ip($long_endIp);
$addit[] = ('a.dst_ip BETWEEN ' . ip2long($strange) . ' AND ' . ip2long($endrange));
Студенты нынче совсем тупые пошли.
+135
....
elseif(!strcasecmp(substr($value['type'],-4),'form'))
{
$class=$value['type']==='form' ? get_class($this->_form) : Yii::import($value['type']);
$element=new $class($value,null,$this->_form);
}
......
В недрах Yii.
Условие довольно странное ,этож надо было до этого додуматься
+138
<?php
header("Content-Type: text/javascript;charset=utf-8");
$html='';
#$fp = fopen('counter.txt', 'w+');
if (isset($_GET)) {
$type=$_REQUEST['type'];
if (isset ($_REQUEST['callback'])){
$html.=$_REQUEST['callback']."(";
}
$fils=array('ukqs','uk','regions', 'org', 'citiesarhobl', 'cities', 'omsu', 'iogv','fund_uk','standart');
if (isset($_GET['cfund_uk'])) {
$fund_file='jbase/cities_'.$_GET['cfund_uk'].'.js';
if (file_exists($fund_file))
$html.=file_get_contents($fund_file);
else
$html.='error:'.$fund_file;
}
else
if (isset($_GET['rfund_uk'])) {
$fund_file='jbase/'.$_GET['rfund_uk'].'_regions.js';
if (file_exists($fund_file))
$html.=file_get_contents($fund_file);
else
$html.='error';
}
if (isset($_REQUEST['uks'])&&($type=='cities')) {
$fund_file='jbase2/'.$_GET['uks'].'_cities.js';
if (file_exists($fund_file))
$html.=file_get_contents($fund_file);
else
$html.='error:'.$fund_file;
}
else
if (isset($_REQUEST['uks'])&&($type=='regions')) {
$fund_file='jbase2/'.$_GET['uks'].'_regions.js';
if (file_exists($fund_file))
$html.=file_get_contents($fund_file);
else
$html.='error';
}
else
if ($type=='standart') {
$fund_file='standart.js';
if (file_exists($fund_file))
$html.=file_get_contents($fund_file);
else
$html.='error';
}
else
foreach ($fils as $ty)
if ($ty==$type)
$html.=file_get_contents($type.".js");
if (isset ($_REQUEST['callback']))
{
$html.=")";
}
#$date=date("F j, Y, g:i a");
#$test = fwrite($fp, $date."#####\n\r ".$html);
print $html;
#fclose($fp);
}
?>
этот файл отдаёт json ajax ответ, подгружая его из *.js файла
+162
if (!isset($_SESSION['user']))
{
$_SESSION['user'] = "guest";
$_SESSION['user_id'] = mt_rand(1000000, 99999999);
}
Так и представляю двух очень везучих юзеров, у которых в корзине сами собой будут появляться товары.
−139
>> # HTML/4.01 says that line breaks are represented as "CR LF" pairs (i.e., `%0D%0A')
>> $content =~ s/(?<!%0D)%0A/%0D%0A/g if defined($content);
HTTP::Request::Common 6.04, строка 86
http://cpansearch.perl.org/src/GAAS/HTTP-Message-6.04/lib/HTTP/Request/Common.pm
Оно просто берёт и изменяет передаваемый контент. Любой. В том числе просто бинарные данные.
+151
$idmenu = intval(strip_tags(trim($_REQUEST[idmenu])));
+116
/**
* just to see logs...
* @param context
*/
public void drawPalletes(PYGraphics context){
//log.info(elevatorSimelement.getName()+" -draw Palettes, palettes number is: "+elevatorSimelement.getPalletes().size());
super.drawPalletes(context);
}