function main_page_content() { echo '<div id="main_content">'; $lbl = array(); $cnt = array(); /* ambil isi .main tiap modul */ $csql = "select cpath from " . PREFIX . "moduls"; $nresult = gcms_query($csql); while ($opath = gcms_fetch_object($nresult)) { $mainfile = translate_modul_path(str_replace(".php", ".main.php", strtolower($opath->cpath))); if (file_exists($mainfile)) { $ainfo = b_readinit(translate_modul_path(str_replace(".php", ".init.php", strtolower($opath->cpath)))); $lbl[] = $ainfo['name']; $cnt[] = $mainfile; } } $sel = false; if (count($lbl) > 0) { echo '<div id="gcms_main_tab" class="yui-navset"> ' . "\n" . ' <ul class="yui-nav"> ' . "\n"; if ($_REQUEST['page'] || $_REQUEST['mod']) { $sel = true; echo ' <li class="selected"><a href="#gcms_main_tab_menu"><em>' . ($_REQUEST['page'] ? menu_get_title($_REQUEST['page']) : 'Utama') . '</em></a></li> ' . "\n"; } foreach ($lbl as $k => $v) { echo ' <li'; if (!$sel) { $sel = true; echo ' class="selected"'; } echo '><a href="#gcms_main_tab' . $k . '" ><em>' . $v . '</em></a></li> ' . "\n"; } echo ' </ul> ' . "\n" . ' <div class="yui-content"> ' . "\n"; foreach ($cnt as $k => $v) { echo ' <div id="gcms_main_tab' . $k . '">'; include $v; echo '</div> ' . "\n"; } if ($_REQUEST['page'] || $_REQUEST['mod']) { echo ' <div id="gcms_main_tab_menu"><p>'; } } /* masukkan isi halaman sesuai menu disini */ if ($_REQUEST['page']) { menu_get_content($_REQUEST['page']); } else { if ($_REQUEST['mod']) { menu_get_content_by_mod($_REQUEST['mod'], $_REQUEST['func']); } } if (count($lbl) > 0) { if ($_REQUEST['page'] || $_REQUEST['mod']) { echo '</p></div> ' . "\n"; } echo ' </div> ' . "\n" . '</div> ' . "\n"; } echo '</div> <!-- main content -->'; }
function form_page_content() { echo '<div id="content"> ' . "\n"; /* masukkan isi halaman disini */ if ($_REQUEST['page']) { menu_get_content($_REQUEST['page']); } else { if ($_REQUEST['mod']) { menu_get_content_by_mod($_REQUEST['mod'], $_REQUEST['func']); } } echo '</div> <!-- content --> ' . "\n"; }