define("_FILE_","tools/"); require_once (_FILE_.'connect.php'); require_once (_FILE_.'crypton.php'); require_once (_FILE_.'database.php'); $db = new db; $beritacat = $_GET[IDCatTitle]; $beritaid = $_GET[ID]; $beritaTitleid = $_GET[IDTitle]; if ($beritacat) { $catmod = $_GET[IDCatTitle]; if ($catmod=="") { $catmod = "Pprofil"; } else { $catmod = $beritacat; } $resultMenu=$db->query("select * from menu_page where menucategories='Profil' AND menupublished=1 AND menumod='$catmod' ORDER BY menupriory ASC"); $dataMenu=$db->fetch_array($resultMenu); $menuID = "$dataMenu[menuID]"; $textcatID = "$dataMenu[textcatID]"; $newscat = "AND textcatID=$textcatID AND textsubcatID=$menuID"; $textid = $_GET[textid]; $sql_berita=$db->query("SELECT textcode,textID,texttitle,textsubtitle,textfirstpar,textcontent,textfrontimgurl FROM textcontents WHERE textdropped=0 AND textpublished=1 $newscat ORDER BY textdatepublished ASC"); $rs_berita=$db->fetch_array($sql_berita); $beritaID = $rs_berita[textID]; $title = $rs_berita[texttitle]; $IDBerita = "textberitacat"; } else if ($beritaid) { $sql_berita=$db->query("SELECT beritacode,beritaID,beritatitle,beritasubtitle FROM beritacontents WHERE beritapublished=1 AND beritaID='$beritaid'"); $rs_berita=$db->fetch_array($sql_berita); $beritaID = $rs_berita[beritaID]; $title = $rs_berita[beritatitle]; $IDBerita = "berita"; } else { $sql_berita=$db->query("SELECT textcode,textID,texttitle,textsubtitle FROM textcontents WHERE textpublished=1 AND textID='$beritaTitleid'"); $rs_berita=$db->fetch_array($sql_berita); $beritaID = $rs_berita[textID]; $title = $rs_berita[texttitle]; $IDBerita = "textberita"; } ?>