- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 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');