<?php $text_meta_discription = $web_discription; $sql = "SELECT post.judul_" . $bhs_on . " as nama, post.isi_" . $bhs_on . " as diskripsi, post.seo, post.foto FROM post WHERE status='PUBLISH' ORDER BY post.id DESC LIMIT 0, 10"; $array_post_child = RowData($sql, $conn); //profile $sql = "SELECT judul_{$bhs_on} as judul, isi_{$bhs_on} as profile FROM post WHERE seo = 'profile'"; $viewprofile = TampilData($sql, $conn); $text_profile = $viewprofile['judul']; $text_profile_discription = $viewprofile['profile']; //banner $sql = "SELECT * FROM banner_detail WHERE id_banner = '1'"; $homebanner = RowData($sql, $conn); //skill $sql = "SELECT judul_{$bhs_on} as judul, isi_{$bhs_on} as skill FROM post WHERE seo = 'my-skill'"; $viewskill = TampilData($sql, $conn); $text_skill = $viewskill['judul']; $text_skill_isi = $viewskill['skill'];
if (!isset($_SESSION)) { session_start(); } //pemanggil season bahasa if (isset($_GET['bahasa']) && $_GET['bahasa'] != "") { $_SESSION['bhs'] = $_GET['bahasa']; header("Location: " . $_SERVER['HTTP_REFERER']); } //load data dari folder bahsa berdasarkan settingan default if (isset($_SESSION['bhs']) && $_SESSION['bhs'] != "") { $bhs_on = $_SESSION['bhs']; } else { $bhs_on = WEB_SETTING("bahasa", $conn); } $sql = "SELECT * FROM bahasa WHERE kode='{$bhs_on}'"; $set_bhs = TampilData($sql, $conn); //load database //load file bahasa require_once DIR_BAHASA . $set_bhs['namafile']; //load file di folder berdasarkan $route //jika $route terisi dan nilai $route terdapat dalam array controller maka load file dalam controller if (isset($route) && $route != "" && in_array($route . ".php", ArrayDir(DIR_BAHASA . $set_bhs['folder'] . "/"))) { Load(DIR_BAHASA . $set_bhs['folder'] . "/" . $route . ".php"); } else { //jika $route tidak di isi maka yang di load adalah home dan home harus ada di array controller Load(DIR_BAHASA . $set_bhs['folder'] . "/" . "home.php"); } //Bahasa pada header $sql = "SELECT * FROM bahasa WHERE status = '1'"; $array_bahasa = RowData($sql, $conn); $text_bahasa = $set_bhs['nama'];
$link_filter = AutoLink($link_source, $route, $menu, $idpost, $judulpost, $aksi) . $hub; if ($idpost == "" || $idpost == $querystring) { $detailuser = false; $query_pencarian = ""; if (isset($_GET['nama']) && $_GET['nama'] != "") { $query_pencarian = "WHERE nama LIKE '%" . FormSet($_GET['nama']) . "%'"; } if (isset($_GET['filter_bylevel']) && $_GET['filter_bylevel'] != "") { $query_pencarian = "WHERE level ='" . FormSet($_GET['filter_bylevel']) . "'"; } $sql = "SELECT * FROM user {$query_pencarian} ORDER BY nama ASC"; $array_user = RowData($sql, $conn); } else { $detailuser = true; $sql = "SELECT * FROM user WHERE id='{$idpost}'"; $tampiluser = TampilData($sql, $conn); $nama_user = $tampiluser["nama"]; $id_user = $tampiluser["id"]; $email_user = $tampiluser["email"]; $level_user = $tampiluser["level"]; $status_user = $tampiluser["status"]; $foto_user = $tampiluser["foto"]; } if (isset($_POST['add-data'])) { $input_email = FormSet($_POST['email']); $input_nama = FormSet($_POST['nama']); $input_level = FormSet($_POST['level']); $input_status = "AKTIF"; $input_password = FormSet(md5("aritaprima")); $input_confirm = FormSet(md5(acakangkahuruf(6))); $sql = "INSERT INTO user (nama, email, level, password, status ) VALUES ('{$input_nama}','{$input_email}','{$input_level}', '{$input_password}', '{$input_status}')";
<?php // tittle $text_meta_title = "Kontak | " . $text_meta_title; ///keyword tanpa host //image // deskripsi //breadcrumb setting $breadcrumbs[] = array("text" => "Kontak", "href" => AutoLink($link_source, "", "", "", "", "")); $sql = "SELECT * FROM banner_detail WHERE id_banner='5'"; $ads_banner_side = RowData($sql, $conn); $id_menu = 2; $array_contak_info = RowMenu($id_menu, '0', $conn, $bhs_on, $link_source); $sql = "SELECT * FROM main_menu WHERE id='{$id_menu}'"; $arraymenu_kontak = TampilData($sql, $conn); $namamenu_kontak = $arraymenu_kontak['nama']; $acakkode = acakangkahuruf(5); if (isset($_POST['kontak'])) { if (FormSet($_POST['kode']) == FormSet($_POST['kon-kode'])) { $input_nama = FormSet($_POST['nama']); $input_email = FormSet($_POST['email']); $input_subjek = FormSet($_POST['subjek']); $input_pesan = FormSet($_POST['pesan']); $nama_pengguna = $input_nama; $sql = "INSERT INTO kontak (tanggal, nama, email, subjek, pesan) VALUES ('{$tanggal}', '{$input_nama}','{$input_email}','{$input_subjek}', '{$input_pesan}')"; if ($conn->query($sql) === TRUE) { $log_txt = "{$input_nama} mengisi form kontak\n"; LogSys($log_txt, "normal"); $email_to = $web_email; $email_subject = $input_subjek; $email_pesan = $input_pesan;
$_SESSION['id'] = $loginuser['id']; $_SESSION['emailpengguna'] = $inputusername; $_SESSION['levelpengguna'] = $loginStrGroup; $go_to = $webURL; if ($_SESSION['history'] != "") { $go_to = $_SESSION['history']; } header("Location: " . $go_to); } else { $_SESSION['kalimat_status'] = "Password dan Email tidak cocok! "; header("Location: " . LINK_LANJUT . "status=berhasil"); } } if (isset($_SESSION['emailpengguna']) && $_SESSION['emailpengguna'] != "") { $sql = "SELECT * FROM user WHERE email='" . $_SESSION['emailpengguna'] . "'"; $dataUSER = TampilData($sql, $conn); $logged = true; $nama_pengguna = kapital_str($dataUSER['nama']); $id_pengguna = $dataUSER['id']; $email_pengguna = $dataUSER['email']; $level_pengguna = $dataUSER['level']; } $ip_pengguna = $_SERVER['REMOTE_ADDR']; if (isset($_GET['doLogout']) && $_GET['doLogout'] == "true") { //to fully log out a visitor we need to clear the session varialbles $_SESSION['emailpengguna'] = NULL; $_SESSION['id'] = NULL; $_SESSION['levelpengguna'] = NULL; $_SESSION['kalimat_status'] = NULL; $_SESSION['history'] = NULL; $_SESSION['dir_folder'] = NULL;
$sql = "SELECT judul_" . $bhs_on . " as nama, isi_" . $bhs_on . " as diskripsi, seo, foto, tanggal, id FROM post WHERE judul_{$bhs_on} LIKE '%" . FormSet($_GET['keyword']) . "%' AND status='PUBLISH' ORDER BY id DESC"; $menu = "post"; } else { $sql = "SELECT kategori_post.id_post, post.judul_" . $bhs_on . " as nama, post.isi_" . $bhs_on . " as diskripsi, post.seo, post.foto, post.tanggal, post.id FROM kategori_post INNER JOIN post ON kategori_post.id_post=post.id WHERE kategori_post.id_kategori='{$idpostingan}' AND post.status='PUBLISH' ORDER BY post.id DESC"; } $detailposting = false; $array_post = RowData($sql, $conn); } else { $filter_status = ""; if (!$logged) { $filter_status = " AND post.status='PUBLISH'"; } //postingan $detailposting = true; $sql = "SELECT user.nama as owner, user.foto, post.metakeyword, post.metadiskripsi, post.judul_" . $bhs_on . ", post.isi_" . $bhs_on . ", post.seo, post.foto, post.id, post.tanggal FROM user INNER JOIN post ON user.id=post.oleh WHERE post.seo='{$idpost}' {$filter_status}"; $halaman = TampilData($sql, $conn); $text_title = $halaman["judul_{$bhs_on}"]; $text_meta_title = $halaman["judul_{$bhs_on}"] . " | {$web_title}"; $text_heading = $halaman["judul_{$bhs_on}"]; $isi_post = $halaman["isi_{$bhs_on}"]; $idpostingan = $halaman["id"]; if ($halaman["metadiskripsi"]) { $metadiskripsi = $halaman["metadiskripsi"]; } else { $metadiskripsi = $isi_post; } $metakeyword = $halaman["metakeyword"]; $sql = "SELECT kategori_post.id_post, post.judul_" . $bhs_on . " as nama, post.isi_" . $bhs_on . " as diskripsi, post.seo, post.foto, post.tanggal FROM kategori_post INNER JOIN post ON kategori_post.id_post=post.id WHERE kategori_post.id_kategori='{$kategoriakhir}' AND post.id!='{$idpostingan}' AND post.status='PUBLISH' ORDER BY post.id DESC LIMIT 0, 10"; $array_terkait = RowData($sql, $conn); if ($halaman["foto"]) { $text_meta_foto = $halaman["foto"];
function RootKategori($id, $bhs_on, $conn) { $sql = "SELECT kategori_post.id_kategori, kategori.id, kategori.parent, kategori.seo, kategori.nama_{$bhs_on} as nama FROM kategori_post INNER JOIN kategori ON kategori_post.id_kategori = kategori.id WHERE kategori_post.id_post='{$id}'"; $array_kategori = RowData($sql, $conn); if ($array_kategori) { foreach ($array_kategori as $data) { if ($data) { $kat_teratas = ""; if ($data['parent'] > 0) { //array menu kiri $sql = "SELECT * FROM kategori WHERE id='" . $data['parent'] . "'"; $first_child = TampilData($sql, $conn); $kat_teratas = $first_child['seo']; if ($first_child['parent'] > 0) { //array menu kiri $sql = "SELECT * FROM kategori WHERE id='" . $first_child['parent'] . "'"; $second_child = TampilData($sql, $conn); $kat_teratas = $second_child['seo']; if ($second_child['parent'] > 0) { //array menu kiri $sql = "SELECT * FROM kategori WHERE id='" . $second_child['parent'] . "'"; $third_child = TampilData($sql, $conn); $kat_teratas = $third_child['seo']; if ($third_child['parent'] > 0) { //array menu kiri $sql = "SELECT * FROM kategori WHERE id='" . $third_child['parent'] . "'"; $four_child = TampilData($sql, $conn); $kat_teratas = $four_child['seo']; } } } } ///batas pertama $iddata[] = array("id" => $data['id_kategori'], "text" => $data['nama'], "parent" => $data['parent'], "seo" => $data['seo'], "induk" => $kat_teratas); } } } else { $iddata = false; } return $iddata; }
$sql = "SELECT * FROM kategori WHERE seo='{$route}'"; $halaman = TampilData($sql, $conn); $bannerpostingan = $halaman["foto"]; $text_title = $halaman["nama_" . $bhs_on]; $isi_post = $halaman["diskripsi_" . $bhs_on]; $idpostingan = $halaman["id"]; $password_file = ""; $download_permision = 1; $formdownload = false; if ($menu == "" || $menu == $querystring) { header("Location: " . AutoLink($link_source, "category", "download", "", "", "")); } else { //klo menu gak kosong //detail post yang download $sql = "SELECT * FROM filemanager WHERE kode = '{$menu}'"; $data_file = TampilData($sql, $conn); $nama_file = $data_file['nama']; $password_file = $data_file['password']; $diskripsi_file = $data_file['diskripsi']; $ContentType_file = $data_file['ContentType']; $DotType_file = $data_file['DotType']; $tanggal_file = $data_file['tgl_upload']; $diskripsi_file = $data_file['diskripsi']; $own_file = $data_file['own']; $size_file = SizeFile($data_file['size']); $src_file = TanpaHosting($data_file['src']); $detailfile = true; $text_meta_title = $nama_file; $breadcrumbs[] = array("text" => $nama_file, "href" => "#"); if ($password_file == "" || $logged || isset($_SESSION['bolehdownload']) && $_SESSION['bolehdownload'] == $TargetForm && (isset($_GET['download']) && $_GET['download'] == "done")) { if (file_exists($src_file)) {
<?php $detailbanner = true; $sql = "SELECT * FROM banner ORDER BY nama ASC"; $array_banner = RowData($sql, $conn); if ($idpost == "" || $idpost == $querystring) { $detailbanner = false; } else { $sql = "SELECT * FROM banner_detail WHERE id_banner='{$idpost}' ORDER BY urutan ASC"; $listbanner = RowData($sql, $conn); $sql = "SELECT * FROM banner WHERE id='{$idpost}'"; $nama_banner = TampilData($sql, $conn); } if (isset($_POST['add-banner'])) { $namabanner = FormSet($_POST['nama']); $sql = "INSERT INTO banner (nama) VALUES ('{$namabanner}')"; if ($conn->query($sql) === true) { $_SESSION['kalimat_status'] = "Silahkan Masukan Slide Banner Anda"; header("Location: " . LINK_LANJUT . "idpost=" . IdTerakhir($conn) . "&status=berhasil"); } else { $_SESSION['kalimat_status'] = "GAGAL: error tidak diketahui"; header("Location: " . LINK_LANJUT . "status=gagal"); } } if (isset($_POST['add-slide-banner'])) { foreach ($array_bahasa as $data_bhs) { if ($data_bhs) { $colom[] = "caption_" . $data_bhs['kode']; $value[] = "'" . FormSet($_POST['caption_' . $data_bhs['kode']]) . "'"; } }
$Array_Filter[] = " tanggal >= '" . $_GET['mulai'] . "' AND tanggal <= '" . $_GET['hingga'] . "'"; } if (isset($_GET['about']) && $_GET['about'] != "") { $Array_Filter[] = " tentang='" . $_GET['about'] . "'"; } if (isset($Array_Filter)) { $filter_data = "WHERE " . implode(" AND ", $Array_Filter); } } $sql = "SELECT * FROM kontak {$filter_data} ORDER BY id DESC"; $array_report = RowData($sql, $conn); $total_inquery = count($array_report); } else { $detailview = true; $sql = "SELECT * FROM kontak WHERE id='{$idpost}' ORDER BY id DESC"; $detail_report = TampilData($sql, $conn); } if (isset($_POST['delete-data'])) { $sql = "DELETE FROM kontak WHERE id='{$idpost}'"; if ($conn->query($sql) === TRUE) { $_SESSION['kalimat_status'] = "Delete berhasil"; header("Location: " . AutoLink($link_source, $route, $menu, "", "", "") . $hub . "status=berhasil"); } else { $_SESSION['kalimat_status'] = "Delete Gagal"; header("Location: " . AutoLink($link_source, $route, $menu, "", "", "") . $hub . "status=gagal"); } } if (isset($_POST['update-data'])) { $tanggal_inquery = FormSet($_POST['tanggal']); $dari_inquery = FormSet($_POST['dari']); $isi_inquery = FormSet($_POST['isi']);
} else { $datalist = false; $sql = "SELECT * FROM filemanager WHERE id = '{$idpost}'"; $data_file = TampilData($sql, $conn); $id_file = $data_file['id']; $nama_file = $data_file['nama']; $kode_file = $data_file['kode']; $password_file = $data_file['password']; $diskripsi_file = $data_file['diskripsi']; $ContentType_file = $data_file['ContentType']; $DotType_file = $data_file['DotType']; $tanggal_file = $data_file['tgl_upload']; $diskripsi_file = $data_file['diskripsi']; $id_owner = $data_file['own']; $sql = "SELECT * FROM user WHERE id = '{$id_owner}'"; $array_user = TampilData($sql, $conn); $own_file = $array_user['nama']; $size_file = SizeFile($data_file['size']); $src_file = $data_file['src']; $iconfile = '<i class="fa fa-file fa-5x"></i>'; } if (isset($_POST['upload-file'])) { $nama_file = $ContentType_file = $DotType_file = $size_file = $own_file = $diskripsi_file = $src_file = ""; //string seting $nama_file = FormSet($_POST['nama']); if (!isset($_POST['nama'])) { $nama_file = "File Belum Punya Nama"; } $ContentType_file = $_FILES['file']['type']; $DotType_file = strtolower(pathinfo($_FILES['file']['name'], PATHINFO_EXTENSION)); $size_file = $_FILES['file']['size'];
$array_semuamenu_3 = RowData($sql, $conn); if ($array_semuamenu_3) { foreach ($array_semuamenu_3 as $semuamenu_3) { if ($semuamenu_3) { $menuparent[] = array("id" => $semuamenu_3['id'], "text" => TextMenu($semuamenu['route'], $semuamenu['menu'], $semuamenu['idpost'], $conn, $bhs_on) . " > " . TextMenu($semuamenu_2['route'], $semuamenu_2['menu'], $semuamenu_2['idpost'], $conn, $bhs_on) . " > " . TextMenu($semuamenu_3['route'], $semuamenu_3['menu'], $semuamenu_3['idpost'], $conn, $bhs_on)); } } } } } } } } } $sql = "SELECT * FROM main_menu WHERE id='{$idpost}'"; $nama_menu = TampilData($sql, $conn); } if (isset($_POST['add-main-menu'])) { $namamenu = FormSet($_POST['nama']); $sql = "INSERT INTO main_menu (nama) VALUES ('{$namamenu}')"; if ($conn->query($sql) === true) { $log_txt = "{$nama_pengguna} membuat menu <strong>'{$namamenu}'</strong>\n"; LogSys($log_txt, "normal"); $_SESSION['kalimat_status'] = "Silahkan Masukan Menu Anda"; header("Location: " . LINK_LANJUT . "idpost=" . IdTerakhir($conn) . "&status=berhasil"); } else { $_SESSION['kalimat_status'] = "GAGAL: error tidak diketahui"; header("Location: " . LINK_LANJUT . "status=gagal"); } } /////////////
<?php //breadcrumb setting $breadcrumbs[] = array("text" => "Dashboard", "href" => AutoLink($link_source, $route, $menu, "", "", "")); $sql = "SELECT COUNT(id) as jumlah FROM post "; $array_totalposting = TampilData($sql, $conn); $total_posting = $array_totalposting['jumlah']; $sql_publish = $sql . "WHERE status = 'PUBLISH'"; $array_totalposting = TampilData($sql_publish, $conn); $total_posting_publish = $array_totalposting['jumlah']; $sql_draft = $sql . "WHERE status = 'DRAFT'"; $array_totalposting = TampilData($sql_draft, $conn); $total_posting_draft = $array_totalposting['jumlah']; $sql = "SELECT COUNT(id) as jumlah FROM kategori "; $array_totalposting = TampilData($sql, $conn); $total_kategori = $array_totalposting['jumlah']; $sql = "SELECT COUNT(id) as jumlah FROM user "; $array_totalposting = TampilData($sql, $conn); $total_user = $array_totalposting['jumlah']; $sql = "SELECT COUNT(id) as jumlah FROM filemanager "; $array_totalposting = TampilData($sql, $conn); $total_file = $array_totalposting['jumlah'];