start(); if (file_exists("install.php")){ header ("location:install.php"); } define('KLATENWEB-KOMPONEN', true); define('KLATENWEB-KONTEN', true); include "ikutan/config.php"; include "ikutan/mysql.php"; include "ikutan/template.php"; global $judul_situs,$theme; $_GET['aksi'] = !isset($_GET['aksi']) ? null : $_GET['aksi']; $_GET['modul'] = !isset($_GET['modul']) ? null : $_GET['modul']; $_GET['pilih'] = !isset($_GET['pilih']) ? null : $_GET['pilih']; $_GET['act'] = !isset($_GET['act']) ? null : $_GET['act']; if (isset($stats) != 'OK'){ include 'ikutan/statistik.inc.php'; stats(); setcookie('stats', 'OK', time()+ 3600); } $old_modulules = !isset($old_modulules) ? null : $old_modulules; ob_start(); switch($_GET['modul']) { case 'yes': if (file_exists('modul/'.$_GET['pilih'].'/'.$_GET['pilih'].'.php') && !isset($_GET['act']) && !preg_match('/\.\./',$_GET['pilih'])) { include 'modul/'.$_GET['pilih'].'/'.$_GET['pilih'].'.php'; } else if (file_exists('modul/'.$_GET['pilih'].'/act_'.$_GET['act'].'.php') && !preg_match('/\.\./',$_GET['pilih']) && !preg_match('/\.\./',$_GET['act']) ) { include 'modul/'.$_GET['pilih'].'/act_'.$_GET['act'].'.php'; } else { header("location:index.php"); exit; } break; default: if (!isset($_GET['pilih'])) { include 'konten/normal.php'; } else if (file_exists('konten/'.$_GET['pilih'].'.php') && !preg_match("/\.\./",$_GET['pilih'])){ include 'konten/'.$_GET['pilih'].'.php'; } else { header("location:index.php"); exit; } break; } $tengah = ob_get_contents(); ob_end_clean(); ///////////////// HEADER //////////// if (!isset($_GET['pilih'])) { ob_start(); include "plugin/header.php"; $header = ob_get_contents(); ob_end_clean(); } else { ob_start(); $header = ob_get_contents(); ob_end_clean(); } ////////////////////////////////// ///////////////// WIDGET //////////// ob_start(); echo ""; modul(1); echo ""; blok(1); $widget = ob_get_contents(); ob_end_clean(); ////////////////////////////////// ///////////////// LINKLOGIN //////////// ob_start(); include "plugin/linklogin.php"; $linklogin = ob_get_contents(); ob_end_clean(); ////////////////////////////////// ///////////////// BAWAH //////////// if (!isset($_GET['pilih'])) { ob_start(); include "plugin/bawah.php"; $bawah = ob_get_contents(); ob_end_clean(); } else { ob_start(); $bawah = ob_get_contents(); ob_end_clean(); } ////////////////////////////////// if ($_GET['aksi'] == 'logout') { logout (); } $style_include_out = !isset($style_include) ? '' : implode("",$style_include); $script_include_out = !isset($script_include) ? '' : implode("",$script_include); $header = !isset($header) ? '' : $header; $widget = !isset($widget) ? '' : $widget; $linklogin = !isset($linklogin) ? '' : $linklogin; $bawah = !isset($bawah) ? '' : $bawah; $define = array ( 'header' => $header, 'widget' => $widget, 'linklogin' => $linklogin, 'bawah' => $bawah, 'tengah' => $tengah, 'judul_situs' => $judul_situs, 'style_include' => $style_include_out, 'script_include' => $script_include_out, 'meta_description' => $_META['description'], 'meta_keywords' => $_META['keywords'], 'timer' => $timer->stop() ); $tpl = new template ('thema/klatenweb-template.html'); $tpl-> define_tag($define); $tpl-> cetak(); ?>