</body></html>'; echo $HTMLOUT; echo $HTMLOUT; exit; } $ovfid = isset($_GET["forid"]) ? (int) $_GET["forid"] : 0; if (!is_valid_id($ovfid)) { stderr('Error', 'Invalid ID!'); } $res = sql_query("SELECT name FROM over_forums WHERE id=" . sqlesc($ovfid)) or sqlerr(__FILE__, __LINE__); $arr = mysqli_fetch_assoc($res) or stderr('Sorry', 'No forums with that ID!'); sql_query("UPDATE users SET forum_access = " . TIME_NOW . " WHERE id=" . sqlesc($CURUSER['id'])) or sqlerr(__FILE__, __LINE__); if ($INSTALLER09['forums_online'] == 0) { $HTMLOUT .= stdmsg('Warning', 'Forums are currently in maintainance mode'); } // $HTMLOUT .= begin_main_frame(); $HTMLOUT .= "<div class='navigation'>\n\t\t\t\t<a href='index.php'>" . $INSTALLER09["site_name"] . "</a> \n\t\t\t\t>\n\t\t\t\t<a href='forums.php'>Forums</a>\n\t\t\t\t<br><img src='templates/1/pic/carbon/nav_bit.png' alt=''>\n\t\t\t\t<span class='active'>" . htmlsafechars($arr["name"]) . "</span>\n\t\t\t\t</div> <br />"; $HTMLOUT .= begin_main_div(); $HTMLOUT .= begin_head_div(); $HTMLOUT .= begin_head_label("collapse" . $ovfid . ""); $HTMLOUT .= "<img src='templates/1/pic/carbon/collapse.png' alt='[+/-]' title='[+/-]' />"; $HTMLOUT .= " <strong>" . htmlsafechars($arr["name"]) . "</strong><span class='desc'></span>"; $HTMLOUT .= end_head_label(); $HTMLOUT .= end_div(); $HTMLOUT .= begin_body_div("collapse" . $ovfid . ""); $HTMLOUT .= "\n\t<table border='0' cellspacing='0' cellpadding='5' class='tborder clear'>\n"; $HTMLOUT .= show_forums($ovfid); $HTMLOUT .= end_table(); // $HTMLOUT .= end_main_frame(); echo stdhead("Forums", true, $stdhead) . $HTMLOUT . stdfoot($stdfoot); exit;
end_div(); } else { //-------------------------------DISPLAY----------------------------------------- submit_button('AddNew', '<i class="fa fa-plus"></i> Add New', "class='btn btn-primary'"); br(); start_table(" class='table table-bordered table-striped table-hover' "); $head = array('Id Category', 'Category Name', 'Description', 'Action'); head_table($head); //display dengan fungsi rekursif display_categories(0, ''); end_table(); } end_form(); br(); //end div kotak end_div(); //------------------------------------------------------------------------------ //FUNGSI KHUSUS /** * fungsi display category khusus menggunakan rekursif * @param type $parent * @param type $titik_titik */ function display_categories($parent = 0, $titik_titik = '') { $sql = sql_display_table_master_categories_by_parent_category($parent); $query = db_query($sql); while ($row = db_fetch($query)) { start_row("class='odd gradeX'"); text_cell($row['id'], "align='center'"); text_cell($titik_titik . $row['category_name'], "align='left'");