- 1
$r3['price'] = $r3['price']*1;
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+153
$r3['price'] = $r3['price']*1;
вывод цены
+62.8
$date = '';
$date .= date('d');
$date .= '-'
$date .= date('m');
$date .= '-';
$date .= date('Y');
з.ы.
чтот у вас в FF форма для кода криво отображается...
+151
<?php
$data = file_get_contents('./testt.php');
$repl = array();
//<a href=""><img src="" ></a>
preg_match_all('/[^(?:\<\?.*)]*?[^(?:\<a.*href=.*\>)](?:\<img\s.*)(?:\>)[^(?:\<\/a\>)]*?[^(?:\?\>)]/Umi', $data, $repl);
echo '<pre>';
var_dump($repl);
echo '</pre>';
?>
<html>
<head>
</head>
<body>
<a href="asd">12313</a>
<img src="sadasdasd" alt="dasddasd" /><a href="asd"><img src="sadasdasd" alt="dasddasd" /></a><img src="sadasdasd" alt="dasddasd" /><img src="sadasdasd" alt="dasddasd" />
<img src="sadasdasd" alt="dasddasd" /> <img src="sadasdasd" alt="dasddasd"><br />
<img src="sadasdasd" alt="dasddasd" ><br>
<a href="asd"><img src="sadasdasd" alt="dasddasd"></a><a href="asd"><img src="sadasdasd" alt="dasddasd" ></a><a href="asd">12313</a>
<a href="asd">12313</a>
</body>
</html>
+60.3
function fromunicode($string,$lang){
if ($lang=="fr"):
return utf8_decode($string);
elseif($lang=="rus"):
$tempchar1=chr(208);
$string=ereg_replace( "Рђ" , "А" , $string);
$tempchar2=chr(145);
$tempchar=$tempchar1.$tempchar2;
$string=ereg_replace( $tempchar , "Б" , $string);
$tempchar2=chr( 146);
$tempchar=$tempchar1.$tempchar2;
$string=ereg_replace( $tempchar, "В" , $string);
$tempchar2=chr( 147);
$tempchar=$tempchar1.$tempchar2;
$string=ereg_replace( $tempchar ,"Г" , $string);
$tempchar2=chr( 148);
$tempchar=$tempchar1.$tempchar2;
$string=ereg_replace( $tempchar, "Д" , $string);
$string=ereg_replace( "Р•" , "Е" , $string);
$string=ereg_replace( "РЃ" ,"Ё" , $string);
$string=ereg_replace( "Р–" , "Ж" , $string);
$string=ereg_replace( "Р—" , "З" , $string);
$string=ereg_replace( "Р?" , "И" , $string);
$string=ereg_replace( "Р™" , "Й" , $string);
$string=ereg_replace( "Рљ" , "К" , $string);
$string=ereg_replace( "Р›" , "Л" , $string);
$string=ereg_replace( "Рњ" , "М" , $string);
$string=ereg_replace( "Рќ" , "Н" , $string);
$string=ereg_replace( "Рћ" , "О" , $string);
$string=ereg_replace( "Рџ" , "П" , $string);
//$string=ereg_replace( "Р" , "Р " , $string);
//$string=ereg_replace( "С" , "РЎ" , $string);
$string=ereg_replace( "Рў" , "Т" , $string);
$string=ereg_replace( "РЈ" , "У" , $string);
$string=ereg_replace( "Р¤" , "Ф" , $string);
$string=ereg_replace("РҐ" , "Х" , $string);
$string=ereg_replace( "Р¦" , "Ц" , $string);
$string=ereg_replace( "Р§" , "Ч" , $string);
$string=ereg_replace( "РЁ" , "Ш" , $string);
$string=ereg_replace( "Р©" , "Щ" , $string);
$string=ereg_replace( "Р¬" , "Ь" , $string);
$tempchar2=chr( 170);
$tempchar=$tempchar1.$tempchar2;
$string=ereg_replace( $tempchar,"Ъ" , $string);
//echo "tempmygk=$tempchar";
$tempchar2=chr( 171);
$tempchar=$tempchar1.$tempchar2;
// $string=ereg_replace( $tempchar3,$tempchar, $string);
$string=ereg_replace( $tempchar,"Ы" , $string);
//echo "tempy=$tempchar";
$string=ereg_replace("Р" , "Э" , $string);
$string=ereg_replace( "Р®" , "Ю" , $string);
$string=ereg_replace( "РЇ" , "Я" , $string);
// small
$string=ereg_replace( "Р°" ,"а" , $string);
$string=ereg_replace( "Р±" ,"б" , $string);
$string=ereg_replace( "РІ" ,"в" , $string);
$string=ereg_replace( "Рі" ,"г" , $string);
$string=ereg_replace( "Рґ" , "д" , $string);
$string=ereg_replace( "Рµ" ,"е" , $string);
$string=ereg_replace( "Рµ" ,"ё" , $string);
// $string=ereg_replace( "С'" , "ё" , $string);
$string=ereg_replace( "Р¶" , "ж" , $string);
$string=ereg_replace( "Р·" , "з" , $string);
$string=ereg_replace( "Рё" ,"и" , $string);
$string=ereg_replace( "Р№" ,"й" , $string);
$string=ereg_replace("Рє" , "к" , $string);
$string=ereg_replace( "Р»" , "л" , $string);
$string=ereg_replace( "Рј" , "м" , $string);
$string=ereg_replace( "РЅ" , "н" , $string);
$string=ereg_replace( "Рѕ" , "о" , $string);
$string=ereg_replace("Рї" , "п" , $string);
$string=ereg_replace("СЂ" , "р" , $string);
$string=ereg_replace("СЃ" , "с" , $string);
$string=ereg_replace( "С‚" , "т" , $string);
$string=ereg_replace( "Сѓ" , "у" , $string);
$string=ereg_replace( "С„" , "ф" , $string);
$string=ereg_replace( "С…" , "х" , $string);
$string=ereg_replace( "С†" , "ц" , $string);
$string=ereg_replace( "С‡" , "ч" , $string);
$string=ereg_replace( "С?" , "ш" , $string);
$string=ereg_replace( "С‰" , "щ" , $string);
$string=ereg_replace( "СЊ" ,"ь" , $string);
$string=ereg_replace( "С‹" , "ы" , $string);
$string=ereg_replace( "СЉ" , "ъ" , $string);
$string=ereg_replace( "СЌ" , "э" , $string);
$string=ereg_replace( "СЋ" , "ю" , $string);
$string=ereg_replace("СЏ" , "я" , $string);
$string=ereg_replace("Р " , "Р" , $string);
+69.6
$s = mysql_query('SELECT * FROM `nazva_stolbca` where `nazva_stolbca` = `$_GET['name']`');
if ($s == '' ) { echo 'такого значения нет'};
Я боюсь :(
+54
$k = "\$user->".$rowField->name;
eval("\$k = \"$k\";");
if ( !$k && $k !== '0' ) {
...
}
ребята не в курсе)
+152
if ($view == 0) {
render_blocks($side, $blockfile, $title, $content, $bid, $bposition);
} elseif ($view == 1 && $CURUSER) {
render_blocks($side, $blockfile, $title, $content, $bid, $bposition);
} elseif ($view == 2 && (get_user_class() >= UC_MODERATOR)) {
render_blocks($side, $blockfile, $title, $content, $bid, $bposition);
} elseif ($view == 3 && (!$CURUSER || get_user_class() >= UC_MODERATOR)) {
render_blocks($side, $blockfile, $title, $content, $bid, $bposition);
}
Закодированный кусок с трекера TBDev Yuna Edition.(include/blocks.php)
+142.1
if ($ret == '')
{
$ret = "array('$day', '$date_num', '$date_month', '$image', '$temperatura_high', '$temperatura_low', '$osadky')";
}
else
{
$ret .= ", array('$day', '$date_num', '$date_month', '$image', '$temperatura_high', '$temperatura_low', '$osadky')";
}
$i++;
}
$ret = '$array = array('.$ret.');';
eval($ret);
Нашел случайно. А ведь работает то :)
+153
<?
if ($arResult["MANAGE_PANEL"]["MESSAGES"] == "Y"):
endif;
?>
Ну вы поняли, какая CMS
/bitrix/modules/forum/install/components/bitrix/forum/templates/.default/bitrix/forum.menu/.default/template.php
Семёрка, 426 строка
+150
private function _registerTag($id, $tag) {
$res = $this->_query("DELETE FROM TAG WHERE name='$tag' AND id='$id'");
$res = $this->_query("INSERT INTO tag (name, id) VALUES ('$tag', '$id')");
if (!$res) {
$this->_log("Zend_Cache_Backend_Sqlite::_registerTag() : impossible to register tag=$tag on id=$id");
return false;
}
return true;
}
(с) zend framework @ Zend_Cache_Backend_Sqlite