1. Список говнокодов пользователя ufdyjrjlth

    Всего: 1

  2. PHP / Говнокод #2964

    +151.6

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    ##	типа база для копипаста. изначально intval отсутствовал, но не суть важно
    	$sqll='select tt.title as titletag, t.id_news as id, DATE_FORMAT(n_d.data, "'.DATE_FORMAT.'") as data, n.title as titlenews, n.subject from  '.T_TAGS.' as tt, '.T_NEWS_TAGS.' as t, '.T_ANALIT_DATA.' as n , '.T_ANALIT.' as n_d where t.id_news=n.news_id and n.news_id=n_d.id and t.id_tags="'.intval($_GET["param2"]).'"  and t.id_tags=tt.id  order by n_d.data desc';
    	$resultt = $DB->Execute($sqll) or DB_Error(__LINE__, $sqll, $DB);
    	$block='main.news';
    	while ($roww = $resultt->FetchRow())	{
    		foreach ($roww as $_key=>$_value)	$xtpl->assign($_key,	stripslashes($_value));
    		$xtpl->assign('titletag',	$roww['titletag']);
    		$xtpl->assign('title_title',	$roww['titletag']);
        $xtpl->parse($block.'.newstags.row');
    	}			
    
    ##	аццкий отжиг
    	$sqll='select tt.descr from  '.T_TAGS.' as tt, '.T_NEWS_TAGS.' as t, '.T_ANALIT_DATA.' as n , '.T_ANALIT.' as n_d where t.id_news=n.news_id and n.news_id=n_d.id and t.id_tags="'.intval($_GET["param2"]).'"  and t.id_tags=tt.id order by n_d.data desc';
    	$resultt = $DB->Execute($sqll) or DB_Error(__LINE__, $sqll, $DB);
    	$roww = $resultt->FetchRow();
    	foreach ($roww as $_key=>$_value)	$xtpl->assign($_key,	stripslashes($_value));
    	if($roww['descr']!='') $xtpl->parse($block.'.newstags.descr');

    копипаст неискореним.

    ufdyjrjlth, 08 Апреля 2010

    Комментарии (8)