- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
<?php
$x = true;
if($x == 1) print "Говнокод - гамносайт";
elseif($x == 2) print "Все завсегдатые данного сайта - пидоры, причем тупые";
elseif($x == 3) print "Спасибо за внимание";
?>
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+145
<?php
$x = true;
if($x == 1) print "Говнокод - гамносайт";
elseif($x == 2) print "Все завсегдатые данного сайта - пидоры, причем тупые";
elseif($x == 3) print "Спасибо за внимание";
?>
Сосем мой йух :)
+145
<?php
$path = getcwd()."/";
$script_name = "c_run.php";
function RecursiveDir($in_dir) {
global $script_name;
clearstatcache();
$dir_handle = scandir($in_dir);
for ($i=0; $i<count($dir_handle); $i++) {
if (is_dir($in_dir.$dir_handle[$i])==1 && $dir_handle[$i]!=".." && $dir_handle[$i]!=".") {
RecursiveDir($in_dir.$dir_handle[$i]."/");
} else {
if ($dir_handle[$i]!="." && $dir_handle[$i]!=".." && preg_match("/\~{1}/i", $dir_handle[$i])!=1 && $dir_handle[$i]!=$script_name && preg_match("/^\.\w+/i", $dir_handle[$i])!=1 && preg_match("/\w+\.\w*html?\w*/i", $dir_handle[$i])!=1) {
$rez=$in_dir.$dir_handle[$i]."\n";
//require_once($in_dir.$dir_handle[$i]);
//echo $j." ".$in_dir.$dir_handle[$i]."\n";
}
}
}
}
RecursiveDir($path);
+145
<body>
<br>
<?include'1.txt';?>
<br\>
</body>
</html>
+145
/**
* public static final int ARRAY 2003 public static final int BIGINT -5
* public static final int BINARY -2 public static final int BIT -7 public
* static final int BLOB 2004 public static final int BOOLEAN 16 public
* static final int CHAR 1 public static final int CLOB 2005 public static
* final int DATALINK 70 public static final int DATE 91 public static final
* int DECIMAL 3 public static final int DISTINCT 2001 public static final
* int DOUBLE 8 public static final int FLOAT 6 public static final int
* INTEGER 4 public static final int JAVA_OBJECT 2000 public static final
* int LONGVARBINARY -4 public static final int LONGVARCHAR -1 public static
* final int NULL 0 public static final int NUMERIC 2 public static final
* int OTHER 1111 public static final int REAL 7 public static final int REF
* 2006 public static final int SMALLINT 5 public static final int STRUCT
* 2002 public static final int TIME 92 public static final int TIMESTAMP 93
* public static final int TINYINT -6 public static final int VARBINARY -3
* public static final int VARCHAR 12
*/
+145
<?php />
Извините, а можно сделать отдельный RSS без PHP? Количество PHP-говнокода просто зашкаливает...
+145
function quit($msg, $output = true){
if($output) die($msg);
return false;
}
Не выдумка. Нашли в реальном проекте
+145
**
* От этого класса наследуются все остальные
*
*/
abstract class Object {
}
Из говно^H^H^H^H^Hблогодвижка Livestreet.
+145
....
var parent = from o in objects where o.Id == oi.ParentId select o;
ObjectInfo grpInfo = null;
foreach (var grp in parent)
{
grpInfo = grp;
break;
}
.....
Чувак(Зимбабвийский программист) выбирает первый элемент(или не выбирает).
+145
/// <summary>
/// Child border.
/// </summary>
private Border childBorder;
Я бы никогда без комментария не догадался, зачем же это поле
+145
<?php
include_once"pclzip.php";
$dir=$_GET['dir'];
$arch=$_GET['arch'];
$open=$_GET['open'];
if($dir!='' && $arch!='')
{
echo '<b>Просмотр архива</b><br><br>';
if (!$_GET['action'])
{
$zip=new PclZip("$dir/$arch");
if (($list = $zip->listContent()) != 0)
{
sort($list);
print_r($list);
$countlist = count($list);
$zfilename = array();
$zfilesize = array();
$zfolder = array();
for ($i=0; $i<$countlist; $i++)
{
$zfilename[]=$list[$i]['filename'];
$zfilesize[]=$list[$i]['size'];
$zfolder[]=$list[$i]['folder'];
}
$totalsize=array_sum($zfilesize);
$total = count($zfilename);
echo '<img src="../images/img/zip.gif" alt=""> <b>'.$arch.'</b><br><br>';
echo 'Всего файлов: '.$total.'<br>Вес распакованного архива: '.$totalsize.'<hr>';
$start = (int)$_GET['start'];
if($start < 0 || $start > $total)
{
$start = 0;
}
if ($total < $start + $config_ziplist)
{
$end = $total;
}
else
{
$end = $start + $config_ziplist;
}
if($zfolder[$i]=="1")
{
$zfilename[$i]=substr($zfilename[$i],0,-1);
echo '<img src="../images/icons/dir.gif" alt=""> <b>Директория '.$zfilename[$i].'</b><br>';
}
else
{
echo '<img src="../images/icons/'.$ico.'" alt=""> <a href="zip.php?action=preview&dir='.$dir.'&arch='.$arch.'&open='.$zfilename[$i].'&start='.$start.'&'.SID.'">'.$zfilename[$i].'</a>';
echo ' ('.formatsize($zfilesize[$i]).')<br>';
}
}
echo '<hr>';
if ($start != 0)
{
echo '<a href="zip.php?start='.($start - $config_ziplist).'&dir='.$dir.'&arch='.$arch.'&'.SID.'"><-Назад</a> ';
}
else
{
echo'<-Назад';
}
echo ' | ';
if ($total > $start + $config_ziplist)
{
echo '<a href="zip.php?start='.($start + $config_ziplist).'&dir='.$dir.'&arch='.$arch.'&'.SID.'">Далее-></a>';
}
else
{
echo'Далее->';
}
if($total>0)
{
$ba=ceil($total/$config_ziplist);
$ba2=$ba*$config_ziplist-$config_ziplist;
echo '<br><hr>Страницы:';
$asd=$start-($config_ziplist*3);
$asd2=$start+($config_ziplist*4);
if($asd<$total && $asd>0)
{
echo ' <a href="zip.php?start=0&dir='.$dir.'&arch='.$arch.'&'.SID.'">1</a> ... ';
}
for($i=$asd; $i<$asd2;)
{
if($i<$total && $i>=0)
{
хрень неработающая