define('DATE_FORMAT', 'd.m.Y'); // this is used for date()
include('inc/funcs.inc.php');
include('inc/db.php');
include('inc/menu_sec.php');
$akcija=_UzmiVar(akcija);
if ($akcija!='pages' && $akcija!='news' && $akcija!='anews' && $akcija!='media' && $akcija!='amedia' && $akcija!='focus' && $akcija!='afocus' && $akcija!='projects' && $akcija!='aprojects' && $akcija!='campaigns' && $akcija!='acampaigns' && $akcija!='pubs' && $akcija!='activities' && $akcija!='aactivities' && $akcija!='monitoring' && $akcija!='grantovi' && $akcija!='agrantovi' && $akcija!='search' && $akcija!='newsletters' && $akcija!='donators' && $akcija!='adonators') $akcija='pocetna';
$lang=_UzmiVar(lang);
if (is_numeric($lang)==false) $lang = 1;
if ($lang==1) include('inc/lang/bsn.php');
if ($lang==2) include('inc/lang/eng.php');
$id=_UzmiVar(id);
if (is_numeric($id)==false) $id = 0;
$link_id=_UzmiVar(link_id);
if (is_numeric($link_id)==false) $link_id = 0;
$cat_id=_UzmiVar(cat_id);
if (is_numeric($cat_id)==false) $cat_id = 1;
$keyword = _UzmiVar(keyword);
$keyword = mysql_prep(strip_tags($keyword));
function curPageURL() {
$pageURL = "http://".$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
//$pageURL = str_replace( "&","&",$pageURL );
$pageURL = urlencode($pageURL);
return $pageURL;
}
?>
Učinkovitija javna revizija za smanjenje korupcije u BiH
Revizije
Učinkovitija javna revizija za smanjenje korupcije u BiH
EUresurs
Resursni centar za BiH civilno društvo u EU integracijama
Sistem državne pomoći u BiH
Sistem državne pomoći u BiH
Analiza sistema državne pomoći u BiH - Zakon i praksa
POD LUPOM
Koalicja za slobodne i poštene izbore
Bolje Sarajevo
Ustavne reforme za bolju lokalnu samoupravu u Kantonu Sarajevo
Virtuelni parlament
680+ virtuelnih kancelarija izabranih predstavnika - Najveća virtelna građevnia u BiH
if ($akcija=='' || !$akcija || $akcija=='pocetna') { // pocetna
?>
$sql="select media.id, media.title, media.intro, media.language, media.status, media_cats.title as cat_title from media left join media_cats on (media.category_id = media_cats.id) where media.status=1 and media.language = $lang order by media.sort LIMIT 0,1";
$recordset=mysql_query($sql,$con) or die(ERROR_DB_ACCESS);
while ($row = mysql_fetch_array($recordset, MYSQL_ASSOC)) {
$media_id=$row[id];
$media_title=stripslashes($row[title]);
$media_intro=stripslashes($row[intro]);
//$media_intro=strip_tags($media_intro);
//$media_intro = strip_tags($media_intro, "
,");
//$media_intro = myTruncate($media_intro, 430);
$media_cat=stripslashes($row[cat_title]);
}
mysql_free_result($recordset);
?>
echo $media_cat;?>
$sql="select * from focus where status=1 and language = $lang order by sort asc LIMIT 0,1";
$recordset=mysql_query($sql,$con) or die(ERROR_DB_ACCESS);
while ($row = mysql_fetch_array($recordset, MYSQL_ASSOC)) {
$focus_id=$row[id];
$focus_title=stripslashes($row[title]);
$focus_intro=stripslashes($row[intro]);
}
mysql_free_result($recordset);
$sql="select media,url,overview from veza_focus_gallery inner join gallery on veza_focus_gallery.gallery=gallery.id where status=1 and language=1 and veza_focus_gallery.focus=$focus_id order by veza_focus_gallery.sort asc LIMIT 0,1";
$recordset=mysql_query($sql,$con) or die(ERROR_DB_ACCESS);
$br_slika = mysql_num_rows($recordset);
while ($row = mysql_fetch_array($recordset, MYSQL_ASSOC)) {
$photo=$row[media];
$photo_url=$row['url'];
$photo_caption=$row1[overview];
}
mysql_free_result($recordset);
?>
TH_PRICA_U_FOCUSU
$sql="select id,date,title,intro from news where status=1 and language=$lang order by sort asc, date desc LIMIT 0,5";
$recordset=mysql_query($sql,$con) or die(ERROR_DB_ACCESS1);
$br_vijesti = mysql_num_rows($recordset);
$i=1;
while ($row = mysql_fetch_array($recordset, MYSQL_ASSOC)) {
$news_title[$i]=stripslashes($row[title]);
$news_intro[$i]=stripslashes($row[intro]);
$news_date[$i]=date(DATE_FORMAT,strtotime($row['date']));
$news_id[$i]=$row[id];
$news_id[$i] = mysql_prep($news_id[$i]);
$sql="select media,url,overview from veza_news_gallery inner join gallery on veza_news_gallery.gallery=gallery.id where status=1 and language=$lang and veza_news_gallery.news=$news_id[$i] order by veza_news_gallery.sort asc LIMIT 0,1";
$recordset1=mysql_query($sql,$con) or die(ERROR_DB_ACCESS2);
while ($row1 = mysql_fetch_array($recordset1, MYSQL_ASSOC)) {
$photo[$i]=$row1[media];
$photo_staza[$i]=$row1[url];
$photo_caption[$i]=$row1[overview];
}
$i++;
}
mysql_free_result($recordset);
mysql_free_result($recordset1);
?>
TH_AKTUELNOSTI
for ($j=1;$j<=$br_vijesti;$j++) {
echo"
";
echo"
$news_title[$j]
";
if ($photo[$j]) {
echo "
";
echo "
![\"$photo_caption[$j]\"](\"/thumb/news/$photo_staza[$j]\")
";
echo "
";
echo "
$news_date[$j]
";
echo "
";
}
echo $news_intro[$j];
echo "
";
echo"
";
}
?>
">
} // kraj od pocetna
if ($akcija=='pages') { // SADRZAJ DETAIL
?>
$sql = "select * from pages where id=$id and status=1 and language=$lang";
$recordset=mysql_query($sql,$con) or die(ERROR_DB_ACCESS);
while ($row = mysql_fetch_array($recordset, MYSQL_ASSOC)) {
$page_title=$row[title];
$page_content=$row[content];
$page_related=$row[related];
}
mysql_free_result($recordset);
?>
echo $page_title; ?>
">
echo $page_content; ?>
if ($id!=7 && $id!=20 && $id!=22) {?>
echo $page_related; ?>
}?>
} // kraj od pages
if ($akcija=='news') { // VIJEST DETAIL
?>
$sql = "select * from news where id=$id and status=1 and language=$lang";
$recordset=mysql_query($sql,$con) or die(ERROR_DB_ACCESS);
while ($row = mysql_fetch_array($recordset, MYSQL_ASSOC)) {
$news_title=$row[title];
$news_content=$row[content];
$news_date=date(DATE_FORMAT,strtotime($row['date']));
}
mysql_free_result($recordset);
?>
TH_AKTUELNOSTI
echo $news_date?>
echo $news_title;?>
echo $news_content;?>
$sql="select media,url,title from veza_news_gallery inner join gallery on veza_news_gallery.gallery=gallery.id where status=1 and language=$lang and veza_news_gallery.news=$id order by veza_news_gallery.sort asc";
$recordset=mysql_query($sql,$con) or die(ERROR_DB_ACCESS2);
$i = 1;
while ($row = mysql_fetch_array($recordset, MYSQL_ASSOC)) {
$photo[$i]=$row[media];
$photo_staza[$i]=$row[url];
$photo_caption[$i]=$row[title];
echo "
![\"$photo_caption[$i]\"](\"/thumb/news/$photo_staza[$i]\")
";
}
$i++;
mysql_free_result($recordset);
?>
} // kraj od news
if ($akcija=='anews') { // ARHIVA VIJESTI
?>
$sql = "select * from media where id=$id and status=1 and language=$lang";
$recordset=mysql_query($sql,$con) or die(ERROR_DB_ACCESS);
while ($row = mysql_fetch_array($recordset, MYSQL_ASSOC)) {
$media_title=$row[title];
$media_content=$row[content];
$media_date=date(DATE_FORMAT,strtotime($row['date']));
}
mysql_free_result($recordset);
?>
TH_ARHIVA_AKTUELNOSTI
$sql = "select * from news where status=1 and language=$lang order by sort asc, date desc";
$recordset=mysql_query($sql,$con) or die(ERROR_DB_ACCESS);
$i = 1;
while ($row = mysql_fetch_array($recordset, MYSQL_ASSOC)) {
$news_id[$i]=$row['id'];
$news_title[$i]=$row[title];
$news_intro[$i]=strip_tags($row[intro]);
$news_date[$i]=date(DATE_FORMAT,strtotime($row['date']));
echo "
";
echo "
$news_title[$i]
";
echo "
";
echo "
";
}
$i ++;
mysql_free_result($recordset);
?>
} // kraj od anews
if ($akcija=='media') { // SAPOSTENJE DETAIL
?>
$sql="select media.id, media.title, media.date, media.content, media.language, media.status, media_cats.title as cat_title from media left join media_cats on (media.category_id = media_cats.id) where media.status=1 and media.language=$lang and media.id=$id";
$recordset=mysql_query($sql,$con) or die(ERROR_DB_ACCESS);
while ($row = mysql_fetch_array($recordset, MYSQL_ASSOC)) {
$media_title=stripslashes($row[title]);
$media_date=date(DATE_FORMAT,strtotime($row['date']));
$media_content=stripslashes($row[content]);
$media_cat=stripslashes($row[cat_title]);
}
mysql_free_result($recordset);
?>
echo $media_cat; ?>
echo $media_date; ?>
echo $media_title; ?>
echo $media_content; ?>
Ana Lučić
Koordinator za odnose s medijima
ana at ccibh dot org
055 222 111
Karađorđeva 8, Bijeljina
} // kraj od saopstenja
if ($akcija=='amedia') { // ARHIVA SAOPSTENJA
?>
TH_ARHIVA_MEDIA
$sql = "select * from media where status=1 and language=$lang order by date desc, sort asc";
$recordset=mysql_query($sql,$con) or die(ERROR_DB_ACCESS);
$i = 1;
while ($row = mysql_fetch_array($recordset, MYSQL_ASSOC)) {
$media_id[$i]=$row['id'];
$media_title[$i]=$row[title];
$media_intro[$i]=strip_tags($row[intro]);
$media_date[$i]=date(DATE_FORMAT,strtotime($row['date']));
echo "
";
echo "
$media_title[$i]
";
echo "
";
echo "
";
}
$i ++;
mysql_free_result($recordset);
?>
} // kraj od asaopstenja
if ($akcija=='focus') { // PRICA DETAIL
?>
$sql="select * from focus where id=$id and status=1 and language=$lang order by sort asc";
$recordset=mysql_query($sql,$con) or die(ERROR_DB_ACCESS);
while ($row = mysql_fetch_array($recordset, MYSQL_ASSOC)) {
$focus_title=stripslashes($row[title]);
$focus_content=stripslashes($row[content]);
$focus_related=stripslashes($row[related]);
}
mysql_free_result($recordset);
$sql="select media,url,overview from veza_focus_gallery inner join gallery on veza_focus_gallery.gallery=gallery.id where status=1 and language=1 and veza_focus_gallery.focus=$id order by veza_focus_gallery.sort asc LIMIT 0,1";
$recordset=mysql_query($sql,$con) or die(ERROR_DB_ACCESS);
$br_slika = mysql_num_rows($recordset);
while ($row = mysql_fetch_array($recordset, MYSQL_ASSOC)) {
$photo=$row[media];
$photo_url=$row['url'];
$photo_caption=$row1[overview];
}
mysql_free_result($recordset);
?>
TH_PRICA_U_FOCUSU
echo $focus_title; ?>
if ($br_slika>0) {
echo "

";
}
?>
echo $focus_content; ?>
} // kraj od focus
if ($akcija=='afocus') { // ARHIVA PRICA U FOCUSU
?>
TH_ARHIVA_PRICA_U_FOKUSU
$sql = "select * from focus where status=1 and language=$lang order by sort asc, date asc";
$recordset=mysql_query($sql,$con) or die(ERROR_DB_ACCESS);
$i = 1;
while ($row = mysql_fetch_array($recordset, MYSQL_ASSOC)) {
$focus_id[$i]=$row['id'];
$focus_title[$i]=$row[title];
$focus_intro[$i]=strip_tags($row[intro]);
$focus_date[$i]=date(DATE_FORMAT,strtotime($row['date']));
echo "
";
echo "
$focus_title[$i]
";
echo "
";
echo "
";
}
$i ++;
mysql_free_result($recordset);
?>
} // kraj od afocus
if ($akcija=='projects') { // PROJEKAT DETALJNO
?>
$sql = "select * from projects where id=$id and status=1 and language=$lang";
$recordset=mysql_query($sql,$con) or die(ERROR_DB_ACCESS);
while ($row = mysql_fetch_array($recordset, MYSQL_ASSOC)) {
$project_title=$row[title];
$project_content=$row[content];
$project_goals=$row[goals];
$project_related=$row[related];
$project_cat=$row[category_id];
}
mysql_free_result($recordset);
if ($project_cat==1) $naslov="Aktuelni projekti";
if ($project_cat==2) $naslov="Grantovi - Tekući projekti";
if ($project_cat==3) $naslov="Grantovi - Završeni projekti";
?>
echo $naslov;?>
echo $project_title;?>
echo $project_content;?>
echo $project_goals;?>

echo $project_related;?>
} // kraj od projects
if ($akcija=='aprojects') { // ARHIVA PROJEKATA
?>
TH_AKTUELNI_PROJEKTI
$sql = "select * from projects where status=1 and language=$lang and category_id=1 order by sort asc, date desc";
$recordset=mysql_query($sql,$con) or die(ERROR_DB_ACCESS);
$i = 1;
while ($row = mysql_fetch_array($recordset, MYSQL_ASSOC)) {
$project_id[$i]=$row['id'];
$project_title[$i]=$row[title];
$project_intro[$i]=strip_tags($row[intro]);
echo "
";
echo "
$project_title[$i]
";
echo "
";
echo "
";
}
$i ++;
mysql_free_result($recordset);
?>
} // kraj od aprojects
if ($akcija=='donators') { // DONATORI DODAO JA NAKNADNO
?>
TH_DONATORS_PROJECTS
$sql = "select * from projects where status=1 and language=$lang and category_id=5 order by sort asc, date desc";
$recordset=mysql_query($sql,$con) or die(ERROR_DB_ACCESS);
$i = 1;
while ($row = mysql_fetch_array($recordset, MYSQL_ASSOC)) {
$project_id[$i]=$row['id'];
$project_title[$i]=$row[title];
$project_intro[$i]=strip_tags($row[intro]);
echo "
";
echo "
$project_title[$i]
";
echo "
";
echo "
";
}
$i ++;
mysql_free_result($recordset);
?>
} // kraj od donators
if ($akcija=='adonators') { // DONATORI DODAO JA NAKNADNO
?>
TH_DONATORS_PROJECTS_EX
$sql = "select * from projects where status=1 and language=$lang and category_id=6 order by sort asc, date desc";
$recordset=mysql_query($sql,$con) or die(ERROR_DB_ACCESS);
$i = 1;
while ($row = mysql_fetch_array($recordset, MYSQL_ASSOC)) {
$project_id[$i]=$row['id'];
$project_title[$i]=$row[title];
$project_intro[$i]=strip_tags($row[intro]);
echo "
";
echo "
$project_title[$i]
";
echo "
";
echo "
";
}
$i ++;
mysql_free_result($recordset);
?>
} // kraj od donators
if ($akcija=='grantovi') { // ARHIVA PROJEKATA
?>
TH_GRANTOVI_AKTUELNI
$sql = "select * from projects where status=1 and language=$lang and category_id=2 order by sort asc, date desc";
$recordset=mysql_query($sql,$con) or die(ERROR_DB_ACCESS);
$i = 1;
while ($row = mysql_fetch_array($recordset, MYSQL_ASSOC)) {
$project_id[$i]=$row['id'];
$project_title[$i]=$row[title];
$project_intro[$i]=strip_tags($row[intro]);
echo "
";
echo "
$project_title[$i]
";
echo "
";
echo "
";
}
$i ++;
mysql_free_result($recordset);
?>
} // kraj od grantovi
if ($akcija=='agrantovi') { // ARHIVA PROJEKATA
?>
TH_GRANTOVI_ARHIVA
$sql = "select * from projects where status=1 and language=$lang and category_id=3 order by sort asc, date desc";
$recordset=mysql_query($sql,$con) or die(ERROR_DB_ACCESS);
$i = 1;
while ($row = mysql_fetch_array($recordset, MYSQL_ASSOC)) {
$project_id[$i]=$row['id'];
$project_title[$i]=$row[title];
$project_intro[$i]=strip_tags($row[intro]);
echo "
";
echo "
$project_title[$i]
";
echo "
";
echo "
";
}
$i ++;
mysql_free_result($recordset);
?>
} // kraj od agrantovi
if ($akcija=='campaigns') { // KAMPANJA DETALJNO
?>
$sql = "select * from campaigns where id=$id and status=1 and language=$lang";
$recordset=mysql_query($sql,$con) or die(ERROR_DB_ACCESS);
while ($row = mysql_fetch_array($recordset, MYSQL_ASSOC)) {
$campaign_title=$row[title];
$campaign_intro=$row[intro];
$campaign_content=$row[content];
$campaign_related=$row[related];
}
mysql_free_result($recordset);
?>
TH_KAMPANJE
echo $campaign_title;?>
echo $campaign_content;?>
echo $campaign_related;?>
} // kraj od campaigns
if ($akcija=='acampaigns') { // ARHIVA KAMPANJA
?>
TH_KAMPANJE
$sql = "select * from campaigns where status=1 and language=$lang and category_id=$cat_id order by sort asc, date desc";
$recordset=mysql_query($sql,$con) or die(ERROR_DB_ACCESS);
$i = 1;
while ($row = mysql_fetch_array($recordset, MYSQL_ASSOC)) {
$campaign_id[$i]=$row['id'];
$campaign_title[$i]=$row[title];
$campaign_intro[$i]=strip_tags($row[intro]);
$cat_id[$i]=$row[category_id];
echo "
";
echo "
$campaign_title[$i]
";
echo "
";
echo "
";
}
$i ++;
mysql_free_result($recordset);
?>
} // kraj od acampaigns
if ($akcija=='pubs') { // PUBLIKACIJE
?>
Publikacije
$sql = "select * from pubs where status=1 and language=$lang and category_id=$cat_id order by sort";
$recordset=mysql_query($sql,$con) or die(ERROR_DB_ACCESS);
$i = 1;
while ($row = mysql_fetch_array($recordset, MYSQL_ASSOC)) {
$pub_title[$i]=$row[title];
$pub[$i]=$row[doc];
$pub_url[$i]=$row[doc_url];
$pub_date_month[$i]=date('M',strtotime($row['date']));
$pub_date_year[$i]=date('Y',strtotime($row['date']));
if ($pub_date_month[$i] == 'Oct') {
$pub_date_month[$i]='Okt';
}
if ($pub_date_month[$i] == 'May') {
$pub_date_month[$i]='Maj';
}
echo "
$pub_title[$i]
| Datum objave: $pub_date_month[$i], $pub_date_year[$i] |
";
echo "
";
}
$i ++;
mysql_free_result($recordset);
?>
} // kraj od pubs
if ($akcija=='monitoring') { // MONITORING
?>
Izvještaji o monitoringu
$sql = "select * from monitoring where status=1 and language=$lang and category_id=$cat_id order by sort asc";
$recordset=mysql_query($sql,$con) or die(ERROR_DB_ACCESS);
$i = 1;
while ($row = mysql_fetch_array($recordset, MYSQL_ASSOC)) {
$monitoring_title[$i]=$row[title];
$monitoring_date[$i]=date(DATE_FORMAT,strtotime($row['date']));
$monitoring_date2[$i]=date(DATE_FORMAT,strtotime($row['date2']));
$doc[$i]=$row[doc];
$doc_url[$i]=$row[doc_url];
echo "
";
}
$i ++;
mysql_free_result($recordset);
?>
} // kraj od monitoring
if ($akcija=='activities') { // VANPROJEKTNE DETALJNO
?>
TH_VANPROJEKTNE_AKTIVNOSTI
$sql = "select * from activities where status=1 and language=$lang and archived=0 order by sort asc, date desc";
$recordset=mysql_query($sql,$con) or die(ERROR_DB_ACCESS);
$i = 1;
while ($row = mysql_fetch_array($recordset, MYSQL_ASSOC)) {
$activity_title[$i]=$row[title];
$activity_duration[$i]=$row[duration];
$activity_content[$i]=$row[content];
echo "
";
echo "
$activity_title[$i]
";
echo "
".TH_DURATION.": $activity_duration[$i]
";
echo "$activity_content[$i]";
echo "
";
}
$i ++;
mysql_free_result($recordset);
?>
} // kraj od activities
if ($akcija=='aactivities') { // ARHIVA VANPROJEKTNIH
?>
TH_ARHIVA_AKTIVNOSTI
$sql = "select * from activities where status=1 and language=$lang and archived=1 order by sort asc, date desc";
$recordset=mysql_query($sql,$con) or die(ERROR_DB_ACCESS);
$i = 1;
while ($row = mysql_fetch_array($recordset, MYSQL_ASSOC)) {
$activity_title[$i]=$row[title];
$activity_duration[$i]=$row[duration];
$activity_intro[$i]=$row[content];
echo "
";
echo "
$activity_title[$i]
";
echo "
";
echo "
".TH_DURATION.": $activity_duration[$i]
";
echo "$activity_intro[$i]";
echo "
";
echo "
";
}
$i ++;
mysql_free_result($recordset);
?>
} // kraj od aactivities
if ($akcija=='newsletters'){ // NEWSLETTER DETAIL
?>
$sql="select * from newsletters where newsletters.id=$id and language=$lang order by sort asc";
/* uasort predhodnoj liniji sam promjenio selekciju id=$id */
//$sql="select * from newsletters where language=$lang order by sort desc";
$recordset=mysql_query($sql,$con) or die(ERROR_DB_ACCESS1);
while ($row = mysql_fetch_array($recordset, MYSQL_ASSOC)) {
$newsletter_title=$row[title];
$articles_ids=$row[articles_ids];
$articles_sorts=$row[articles_sorts];
}
mysql_free_result($recordset);
?>
eNewsletter: echo $newsletter_title; ?>
$articles_ids_niz=explode("|",$articles_ids);
$articles_sorts_niz=explode("|",$articles_sorts);
asort($articles_sorts_niz);
$i=1;
foreach ($articles_sorts_niz as $key => $val) {
$sql="select * from articles where language=$lang and id=$articles_ids_niz[$key]";
$recordset=mysql_query($sql,$con) or die(ERROR_DB_ACCESS2);
while ($row = mysql_fetch_array($recordset, MYSQL_ASSOC)) {
$article_id[$i] = $row[id];
$article_title[$i] = $row[title];
$article_intro[$i] = $row[intro];
$article_intro[$i] = strip_tags($article_intro[$i]);
$article_content[$i] = $row[content];
echo "
";
$sql="select media,url,overview from veza_articles_gallery inner join gallery on veza_articles_gallery.gallery=gallery.id where status=1 and language=1 and veza_articles_gallery.articles=$article_id[$i] order by veza_articles_gallery.sort asc";
$recordset2=mysql_query($sql,$con) or die(ERROR_DB_ACCESS);
$j=1;
$nr_photos=mysql_num_rows($recordset2);
while ($row = mysql_fetch_array($recordset2, MYSQL_ASSOC)) {
if ($j==1) echo "
";
$photo_url[$j]=$row['url'];
$photo_caption[$j]=$row1[overview];
echo "
![$photo_caption[$j]](http://www.cci.ba/thumb/vijest/$photo_url[$j])
";
if ($j==$nr_photos) echo "
";
$j++;
}
mysql_free_result($recordset2);
echo "
$article_title[$i] $article_intro[$i]
";
echo "$article_content[$i]
";
echo "
";
}
mysql_free_result($recordset);
$i++;
}
?>
} //kraj od newsletters
if ($akcija=='search') { // PRETRAGA
function create_excerpt($str,$words=15) {
$arr = preg_split("/[\s]+/", $str,$words+1);
$arr = array_slice($arr,0,$words);
return join(' ',$arr);
}
$chk_news = _UzmiVar(chk_news);
$chk_focus = _UzmiVar(chk_focus);
$chk_media = _UzmiVar(chk_media);
$chk_projects = _UzmiVar(chk_projects);
$chk_campaigns = _UzmiVar(chk_campaigns);
$chk_activities = _UzmiVar(chk_activities);
$chk_pubs = _UzmiVar(chk_pubs);
$chk_monitoring = _UzmiVar(chk_monitoring);
$chk_pages = _UzmiVar(chk_pages);
$keyword = strip_html_tags($keyword);
$keyword = strip_tags($keyword);
$keyword = mysql_prep($keyword);
if (!$chk_news && !$chk_focus && !$chk_media && !$chk_projects && !$chk_campaigns && !$chk_activities && !$chk_pubs && !$chk_monitoring && !$chk_pages) {
$chk_news = 1;
$chk_focus = 1;
$chk_media = 1;
$chk_projects = 1;
$chk_campaigns = 1;
$chk_activities = 1;
$chk_pubs = 1;
$chk_monitoring = 1;
$chk_pages = 1;
}
$broj_rezultata = 0;
if ($chk_news) {
$sql1 = "
SELECT *,
id, MATCH(title, content) AGAINST('$keyword') AS score
FROM news
WHERE MATCH(title, content) AGAINST('$keyword') and language=$lang and status=1
ORDER BY score DESC
";
$recordset1=mysql_query($sql1,$con) or die(ERROR_DB_ACCESS1);
$broj_rezultata = mysql_num_rows($recordset1);
}
if ($chk_focus) {
$sql2 = "
SELECT *,
id, MATCH(title, content) AGAINST('$keyword') AS score
FROM focus
WHERE MATCH(title, content) AGAINST('$keyword') and language=$lang and status=1
ORDER BY score DESC
";
$recordset2=mysql_query($sql2,$con) or die(ERROR_DB_ACCESS1);
$broj_rezultata = mysql_num_rows($recordset2);
}
if ($chk_media) {
$sql3 = "
SELECT *,
id, MATCH(title, content) AGAINST('$keyword') AS score
FROM media
WHERE MATCH(title, content) AGAINST('$keyword') and language=$lang and status=1
ORDER BY score DESC
";
$recordset3=mysql_query($sql3,$con) or die(ERROR_DB_ACCESS1);
$broj_rezultata = mysql_num_rows($recordset3);
}
if ($chk_projects) {
$sql4 = "
SELECT *,
id, MATCH(title, content) AGAINST('$keyword') AS score
FROM projects
WHERE MATCH(title, content) AGAINST('$keyword') and language=$lang and status=1
ORDER BY score DESC
";
$recordset4=mysql_query($sql4,$con) or die(ERROR_DB_ACCESS1);
$broj_rezultata = mysql_num_rows($recordset4);
}
if ($chk_campaigns) {
$sql5 = "
SELECT *,
id, MATCH(title, content) AGAINST('$keyword') AS score
FROM campaigns
WHERE MATCH(title, content) AGAINST('$keyword') and language=$lang and status=1
ORDER BY score DESC
";
$recordset5=mysql_query($sql5,$con) or die(ERROR_DB_ACCESS1);
$broj_rezultata = mysql_num_rows($recordset5);
}
if ($chk_activities) {
$sql6 = "
SELECT *,
id, MATCH(title, content) AGAINST('$keyword') AS score
FROM activities
WHERE MATCH(title, content) AGAINST('$keyword') and language=$lang and status=1
ORDER BY score DESC
";
$recordset6=mysql_query($sql6,$con) or die(ERROR_DB_ACCESS1);
$broj_rezultata = mysql_num_rows($recordset6);
}
if ($chk_pubs) {
$sql7 = "
SELECT *,
id, MATCH(title, doc) AGAINST('$keyword') AS score
FROM pubs
WHERE MATCH(title, doc) AGAINST('$keyword') and language=$lang and status=1
ORDER BY score DESC
";
$recordset7=mysql_query($sql7,$con) or die(ERROR_DB_ACCESS1);
$broj_rezultata = mysql_num_rows($recordset7);
}
if ($chk_monitoring) {
$sql8 = "
SELECT *,
id, MATCH(title,doc) AGAINST('$keyword') AS score
FROM monitoring
WHERE MATCH(title,doc) AGAINST('$keyword') and language=$lang and status=1
ORDER BY score DESC
";
$recordset8=mysql_query($sql8,$con) or die(ERROR_DB_ACCESS1);
$broj_rezultata = mysql_num_rows($recordset8);
}
if ($chk_pages) {
$sql9 = "
SELECT *,
id, MATCH(title, content) AGAINST('$keyword') AS score
FROM pages
WHERE MATCH(title, content) AGAINST('$keyword') and language=$lang and status=1
ORDER BY score DESC
";
$recordset9=mysql_query($sql9,$con) or die(ERROR_DB_ACCESS1);
$broj_rezultata = mysql_num_rows($recordset9);
}
?>
$sql = "select * from news where id=$id and status=1 and language=$lang";
$recordset=mysql_query($sql,$con) or die(ERROR_DB_ACCESS);
while ($row = mysql_fetch_array($recordset, MYSQL_ASSOC)) {
$news_title=$row[title];
$news_content=$row[content];
$news_date=date(DATE_FORMAT,strtotime($row['date']));
}
mysql_free_result($recordset);
?>
TH_REZULTATI_PRETRAGE
if ($chk_news) {
echo "
";
if (mysql_num_rows($recordset1)<1) echo "
".TH_NEMA_REZULTATA."
";
while ($row1 = mysql_fetch_array($recordset1, MYSQL_ASSOC)) {
$content = create_excerpt($row1[content],50) . '…';
$content = strip_tags($content);
$content = eregi_replace($keyword, "
$keyword",$content);
?>
}
echo "
";
}
if ($chk_focus) {
echo "
";
if (mysql_num_rows($recordset2)<1) echo "
".TH_NEMA_REZULTATA."
";
while ($row2 = mysql_fetch_array($recordset2, MYSQL_ASSOC)) {
$content = create_excerpt($row2[content],50) . '…';
$content = strip_tags($content);
$content = eregi_replace($keyword, "
$keyword",$content);
?>
}
echo "
";
}
if ($chk_media) {
echo "
";
if (mysql_num_rows($recordset3)<1) echo "
".TH_NEMA_REZULTATA."
";
while ($row3 = mysql_fetch_array($recordset3, MYSQL_ASSOC)) {
$content = create_excerpt($row3[content],50) . '…';
$content = strip_tags($content);
$content = eregi_replace($keyword, "
$keyword",$content);
?>
}
echo "
";
}
if ($chk_projects) {
echo "
";
if (mysql_num_rows($recordset4)<1) echo "
".TH_NEMA_REZULTATA."
";
while ($row4 = mysql_fetch_array($recordset4, MYSQL_ASSOC)) {
$content = create_excerpt($row4[content],50) . '…';
$content = strip_tags($content);
$content = eregi_replace($keyword, "
$keyword",$content);
?>
}
echo "
";
}
if ($chk_campaigns) {
echo "
";
if (mysql_num_rows($recordset5)<1) echo "
".TH_NEMA_REZULTATA."
";
while ($row5 = mysql_fetch_array($recordset5, MYSQL_ASSOC)) {
$content = create_excerpt($row5[content],50) . '…';
$content = strip_tags($content);
$content = eregi_replace($keyword, "
$keyword",$content);
?>
}
echo "
";
}
if ($chk_activities) {
echo "
";
if (mysql_num_rows($recordset6)<1) echo "
".TH_NEMA_REZULTATA."
";
while ($row6 = mysql_fetch_array($recordset6, MYSQL_ASSOC)) {
$content = create_excerpt($row6[content],50) . '…';
$content = strip_tags($content);
$content = eregi_replace($keyword, "
$keyword",$content);
?>
}
echo "
";
}
if ($chk_pubs) {
echo "
";
if (mysql_num_rows($recordset7)<1) echo "
".TH_NEMA_REZULTATA."
";
while ($row7 = mysql_fetch_array($recordset7, MYSQL_ASSOC)) {
?>
>
Preuzmi: >
}
echo "
";
}
if ($chk_monitoring) {
echo "
";
if (mysql_num_rows($recordset8)<1) echo "
".TH_NEMA_REZULTATA."
";
while ($row8 = mysql_fetch_array($recordset8, MYSQL_ASSOC)) {
$datum=date(DATE_FORMAT,strtotime($row8['date']));
$datum2=date(DATE_FORMAT,strtotime($row8['date2']));
?>
>
Period: -
Preuzmi: >
}
echo "
";
}
if ($chk_pages) {
echo "
";
if (mysql_num_rows($recordset9)<1) echo "
".TH_NEMA_REZULTATA."
";
while ($row9 = mysql_fetch_array($recordset9, MYSQL_ASSOC)) {
$content = create_excerpt($row9[content],50) . '…';
$content = strip_tags($content);
$content = eregi_replace($keyword, "
$keyword",$content);
?>
}
echo "
";
}
?>
} // kraj od upravljanja sadrzajem
?>