- 1
 - 2
 - 3
 - 4
 - 5
 
$deleteBasketElId = URLParser::GetParser()->getArgumentSecure('deleteelid');
if ($deleteBasketElId){
    $html = 'бугога';
    print $html;
}
                                    Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+157
$deleteBasketElId = URLParser::GetParser()->getArgumentSecure('deleteelid');
if ($deleteBasketElId){
    $html = 'бугога';
    print $html;
}
                                    Откопано в старом проекте, который писали студийные недопрограммеры.
+157
$blocks = $this->dsp->db->select_array("select distinct B.*, BS.ALIGN_, BS.ORDER_, BS.PARAM_, BS.HTML_CLASS as HTML_CLASS, BS.HTML_TYPE as HTML_TYPE, SC.SYS_CLASS_FILE, SC.SYS_CLASS_VARNAME, SC.SYS_CLASS_CLASSNAME,BS.EXCLUSION, BS.ID
                   from BLOCKS_SECTION BS
                   inner join BLOCKS B on (BS.BLOCKS_ID=B.BLOCKS_ID and B.STATUS=1)
                   left join SYS_CLASS SC ON SC.SYS_CLASS_ID=B.SYS_CLASS_ID
                   where $add and SITE_ID=? and B.BLOCKS_ID=? order by BS.EXCLUSION desc, BS.ORDER_",$site_id,$call_id);
       $arr_block_id = array();             
       while (!empty($blocks)) {
               foreach ($blocks as $idx => $block) {
                       if($block['EXCLUSION']){
                                       if(!in_array($block['BLOCKS_ID'],$arr_block_id)) array_push($arr_block_id,$block['BLOCKS_ID']);
                       }else{
                                       if(!in_array($block['BLOCKS_ID'],$arr_block_id) or $block['ID'])
                                               $ret .= $this->CallPrepareBlock($VARS,$VARS_init,$block);
                       }
                       unset($blocks[$idx]);
                    } // foreach
          } // while
                                    Функция, кстати называется GetOneBlock )))
+157
$cd = strtotime($givendate);
$newdate = date('Y-m-d H:i:s', mktime(date('H',$cd),
                   date('i',$cd), date('s',$cd), date('m',$cd)+$mth,
                   date('d',$cd)+$day, date('Y',$cd)+$yr));
                                    
+157
if ( '' !== $qv['second'] ) {
          $this->is_time = true;
          $this->is_date = true;
  }
if ( '' !== $qv['minute'] ) {
        $this->is_time = true;
        $this->is_date = true;
}
if ( '' !== $qv['hour'] ) {
        $this->is_time = true;
        $this->is_date = true;
}
if ( $qv['day'] ) {
        if ( ! $this->is_date ) {
                $this->is_day = true;
                $this->is_date = true;
        }
}
if ( $qv['monthnum'] ) {
        if ( ! $this->is_date ) {
                $this->is_month = true;
                $this->is_date = true;
        }
}
if ( $qv['year'] ) {
        if ( ! $this->is_date ) {
                $this->is_year = true;
                $this->is_date = true;
        }
}
if ( $qv['m'] ) {
        $this->is_date = true;
        if ( strlen($qv['m']) > 9 ) {
                $this->is_time = true;
        } else if ( strlen($qv['m']) > 7 ) {
                $this->is_day = true;
        } else if ( strlen($qv['m']) > 5 ) {
                $this->is_month = true;
        } else {
                $this->is_year = true;
        }
}
                                    ВротПресс
+157
//header("Location:fbattle.php");
die("<script>location.href='fbattle.php';</script>");
                                    header для лохов.
+157
$day = date('w');
if($day == 0 || $day == 3 || $day == 4)
{
	$me->handsDown();
	$words = $music = $strength = false;
	$me->separateWith($you);
	$me->askForHelp($words);
}
try{
	$key = md5(rand(0, 100));
	$me->closeHouse($key);
	unset($key);
}
catch(e){
	while($light && $candle->getLight())
		$me->believe($_GLOBALS);
}
doSilence();
try{
	$me->sing();
}
catch(e){
	$me->spreadShoulders($_GLOBALS['song']);
	$difficulty = $me->silent(); //often big (bug?)
}
$days_rest = $time_end - time(); //often small (bug!)
/*
you may uncomment - that doesn't matter
$snow(); //true
$warm_blood(); //false
*/
while($light && $candle->getLight())
	for($i = 0; $i < 100; ++$i)
		$me->beginFrom(BEGINNING);
                                    
            Если есть желание, попробуйте угадать песню. ;)
Все остальные могут минусовать.
        
+157
$content=file_get_contents("http://7ion.ru");//берем страницу
$LinksArray=NULL;//тут будут ссылки
preg_match_all("/<a[[:print:]]href=["|'](.*?)["|'].*?>(.*?)<.{0,1}a.{0,1}>/i",$content,$LinksArray,PREG_PATTERN_ORDER);//применяем регулярку
var_dump($LinksArray);//выводим ссылки
                                    
            Один товарищ с таким же ником, как у меня долго и упорно пытался доказать, что кодит лучше меня.
Когда я взломал его мегосекурную кмс (надо было пароль на мыле сменить все же, эх, добрая я душа), он меня материл и говорил, что написал код в 12 лет а щас он ниибаца мастер в свои 18.
Не став возражать, что в 12 лет в похапе еще половины функциона им используемого не было, просто посмотрили кто первым напишет кмс.
Я вообще ничего не стал писать, лол, а он что-то накалял и стал вести блог. Вот вся предыстория.
Решил я его вдруг почитать.
http://7ion.ru/index.php?q=news&a=17 - Парсинг страницы на PHP
Выдача - четвертая ссылка в первой десятке гугла.
Потом, спрашивается, откуда говнокодеры берутся.
        
+157
$('fb').innerHTML =  '<iframe src="http://www.facebook.com/plugins/like.php?href=' +
		href +
		'&layout=button_count&show_faces=false&action=like&font=arial' +
		'&colorscheme=light&height=21&ref=under_buy_button&utm_source=facebook-likebutton" scrolling="no" frameborder="0" ' + 'style="border:none;width:160px;overflow:hidden;height:21px" allowTransparency="true"></iframe>';
                                    http://rozetka.com.ua/ - самый продвинутый интернет-магазин Украины.
+157
// ...
ReplaceHtmlEntities( std::string(abstract), true );
// ...
                                    
            В одном из проектов было найдено (очередная операция подергивания):
void ReplaceHtmlEntities(std::string &, bool /* = true */);
abstract - const char *
        
+157
{{sectionelse}}
                    <script language="javascript">
                      window.location = '/megasection/megapage.html?step='+{{if $step eq '2'}}'3'{{else}}'1'{{/if}};
                    </script>
{{/section}}
                                    PHP, Smarty, редиректы уже не в моде