function printModal() { global $table; $liputan_terbaru = parent::get_db($table); $modal_counter = 0; foreach ($liputan_terbaru as $key => $value) { ?> <div id="<?php echo $table . $modal_counter; $modal_counter++; ?> " class="modal fade" role="dialog"> <div class="modal-dialog"> <!-- Modal content--> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button> <h4 class="modal-title"><?php echo $value['judul_' . $table]; ?> </h4> </div> <div class="modal-body"> <p> <img src="<?php echo "outsource/UserFile/img/" . $value['thumb_' . $table]; ?> " alt="Post Title" style="width: 100%;"> </p> <hr> <p> <?php echo htmlspecialchars_decode($value['content_' . $table]); ?> </p> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> </div> </div> </div> </div> <?php } }
echo $id_sosmed; ?> '> <?php $new_sosmed->text_input('Nama sosmed', 'nama_sosmed'); $new_sosmed->text_input('Link sosmed', 'link_sosmed'); $new_sosmed->thumbnail(); $new_sosmed->form_end(); } else { if ($_GET['act'] == 'edit') { $update_sosmed = new Post('sosmed'); $res_update_sosmed = $update_sosmed->get_db('sosmed', array('id_sosmed' => $_GET['id'])); $update_scent = new Post('mm_sosmed_scent'); $res_update_scent = $update_scent->get_db('mm_sosmed_scent', array('id_sosmed' => $_GET['id'])); $update_category = new Post('mm_sosmed_category'); $res_update_category = $update_category->get_db('mm_sosmed_category', array('id_sosmed' => $_GET['id'])); $update_sosmed->form_start($title = 'EDIT sosmed', $path = 'sosmed', $module = 'sosmed', $table = 'sosmed', $action = 'update', $size = 'width_full'); ?> <input type='hidden' name='id' value='<?php echo $res_update_sosmed[0]['id_sosmed']; ?> '> <?php $update_sosmed->text_input('Nama sosmed', 'nama_sosmed', $res_update_sosmed[0]['nama_sosmed']); $update_sosmed->text_input('Link sosmed', 'link_sosmed', $res_update_sosmed[0]['link_sosmed']); $update_sosmed->thumbnail(); $update_sosmed->form_end(); } else { $view_sosmed = new Post('sosmed'); $header = array('id_sosmed' => 'No', 'nama_sosmed' => 'Nama', 'link_sosmed' => 'link', 'thumb_sosmed' => 'Gambar'); $view_sosmed->view_datatable($header, 'sosmed', '95%', 'yes');
<?php $update_users = new Post('users'); $users_value = $update_users->get_db(); $update_users->form_start('Ganti Password', 'users', 'users', 'users', 'update', 'width_full'); if (!empty($_GET['salah'])) { ?> <p align="center">Password Lama Salah</p> <?php } ?> <input type='hidden' name='condition' value='<?php echo $users_value[0]['username']; ?> '> <?php $update_users->text_input('pwd Lama', 'password_users_lama', "", $type = 'password'); $update_users->text_input('pwd Baru', 'password_users_baru', "", $type = 'password'); $update_users->form_end();
<link href="outsource/simplyscroll/style.css" rel="stylesheet"> <ul id="scroller"> <?php $slideshow = new Post('slideshow'); $slideshow_icon = $slideshow->get_db(); foreach ($slideshow_icon as $key => $value) { ?> <li><img src="outsource/UserFile/img/<?php echo $value['thumb_slideshow']; ?> " style="height: 100%; "></li> <?php } ?> </ul> </script> <script type="text/javascript" src="http://logicbox.net/jquery/simplyscroll/jquery.simplyscroll.js"></script> <link rel="stylesheet" href="http://logicbox.net/jquery/simplyscroll/jquery.simplyscroll.min.js" media="all" type="text/css"> <script type="text/javascript"> (function($) { $(function() { //on DOM ready $("#scroller").simplyScroll(); }); })(jQuery); </script>
<h3> Tentang Kami </h3> <hr> <?php $contact = new Post('modul_child'); $contact_teks = $contact->get_db('modul_child', $condition = array('id_modul' => 1)); echo htmlspecialchars_decode($contact_teks[0]['static_content']);
</th> <th> Jumlah pesanan </th> <th> Aksi </th> </tr> </thead> <tbody> <?php $counter = 1; foreach ($pemesananArray as $key => $value) { $universal_class = new Post('pesanan'); $product = $universal_class->get_db('product', $condition = array('id_product' => $value['id_product'])); $scent = $universal_class->get_db('scent', $condition = array('id_scent' => $value['id_scent'])); $jumlah_pesanan = $value['jumlah_pemesanan']; echo "<tr>"; echo "<td>"; echo $counter; echo "</td>"; echo "<td>"; echo $product[0]['judul_product']; echo "</td>"; echo "<td>"; echo $scent[0]['judul_scent']; echo "</td>"; echo "<td>"; echo $jumlah_pesanan; echo "</td>";
$res_update_universal = $update_universal->get_db('modul_child', $update_condition); ?> <input type='hidden' name='id' value='<?php echo $prepose_result[0]['id_modul']; ?> '> <?php $update_universal->text_area('modul_child', 'edit', $update_condition, 'static_content'); $update_universal->form_end(); } $prepose = new Post('modul_child'); $prepose_condition = array('id_tipe' => 3, 'link' => "?module=" . $_GET['module']); $prepose_result = $prepose->get_db('modul_child', $prepose_condition); if (!empty($prepose_result)) { $update_universal = new Post('modul_child'); $update_universal->form_start('EDIT ' . $_GET['module'], 'universal_mono_editor', $_GET['module'], 'modul_child', 'update'); $update_condition = array('id_modul' => $prepose_result[0]['id_modul']); $res_update_universal = $update_universal->get_db('modul_child', $update_condition); ?> <input type='hidden' name='id' value='<?php echo $prepose_result[0]['id_modul']; ?> '> <?php $update_universal->text_input('Title', 'static_content', $prepose_result[0]['static_content']); $update_universal->form_end(); }
<h3> Testimoni </h3> <hr> <?php $testimoni = new Post('testimoni'); $res_testimoni = $testimoni->get_db(); foreach ($res_testimoni as $key => $value) { ?> <div class="row" style="margin-left: 10%; margin-right: 10%; margin-top: 2%; margin-bottom: 2%; border: solid 1px #9D824E"> <div class="col-sm-4" style=""> <center> <img src="outsource/UserFile/img/<?php echo $value['thumb_testimoni']; ?> " style="max-width: 100px; overflow: hidden; margin-top: 10px; margin-bottom: 10px" alt="image not found"> </center> </div> <div class="col-lg-8"> <div class="row"> <p><b><?php echo $value['nama_testimoni']; ?> </b></p> </div> <div class="row"> <blockquote> <i>"<?php echo $value['isi_testimoni']; ?>
$new_productcategory->form_start($title = 'TAMBAH KATEGORI', $path = 'productcategory', $module = 'productcategory', $table = 'productcategory', $action = 'insertdb', $size = 'width_full'); //$new_productcategory->text_input('Judul Informasi', 'judul_productcategory'); $id_productcategory = $new_productcategory->get_ID('productcategory'); ?> <input type='hidden' name='id' value='<?php echo $id_productcategory; ?> '> <?php $new_productcategory->text_input('Nama Kategori', 'judul_productcategory'); $new_productcategory->text_area('productcategory', 'new'); $new_productcategory->form_end(); } else { if ($_GET['act'] == 'edit') { $update_productcategory = new Post('productcategory'); $res_update_productcategory = $update_productcategory->get_db('productcategory', array('id_productcategory' => $_GET['id'])); $update_productcategory->form_start($title = 'EDIT KATEGORI', $path = 'productcategory', $module = 'productcategory', $table = 'productcategory', $action = 'update', $size = 'width_full'); ?> <input type='hidden' name='id' value='<?php echo $res_update_productcategory[0]['id_productcategory']; ?> '> <?php $update_productcategory->text_input('Nama Kategori', 'judul_productcategory', $res_update_productcategory[0]['judul_productcategory']); $update_productcategory->text_area('productcategory', 'edit', $res_update_productcategory[0], 'description_productcategory'); $update_productcategory->form_end(); } else { $view_productcategory = new Post('productcategory'); $header = array('id_productcategory' => 'No', 'judul_productcategory' => 'Nama', 'description_productcategory' => 'Deskripsi'); $view_productcategory->view_datatable($header, 'productcategory', '90%', 'yes'); }
?> </div> <div class="col-md-6" style="padding-left: 5%; padding-right: 5%"> <?php $sambutan = new Post('modul_child'); $sambutan_teks = $sambutan->get_db('modul_child', $condition = array('id_modul' => 5)); echo htmlspecialchars_decode($sambutan_teks[0]['static_content']); ?> </div> <div class="col-md-3" style="padding-left: 5%; padding-right: 5%"> <center><b>Sosial Media</b></center> <br> <div class="row"> <?php $sosmed = new Post('sosmed'); $res_sosmed = $sosmed->get_db(); foreach ($res_sosmed as $key => $value) { ?> <div style="float: left; margin-right: 10px; width: 40px;"> <a href="http://<?php echo $value['link_sosmed']; ?> " target="blank"> <img src="outsource/UserFile/img/<?php echo $value['thumb_sosmed']; ?> " style="width: 100%"> </a> </div> <?php }
echo $id_testimoni; ?> '> <?php $new_testimoni->text_input('Nama Testimoni', 'nama_testimoni'); $new_testimoni->text_input('Isi testimoni', 'isi_testimoni'); $new_testimoni->thumbnail(); $new_testimoni->form_end(); } else { if ($_GET['act'] == 'edit') { $update_testimoni = new Post('testimoni'); $res_update_testimoni = $update_testimoni->get_db('testimoni', array('id_testimoni' => $_GET['id'])); $update_scent = new Post('mm_testimoni_scent'); $res_update_scent = $update_scent->get_db('mm_testimoni_scent', array('id_testimoni' => $_GET['id'])); $update_category = new Post('mm_testimoni_category'); $res_update_category = $update_category->get_db('mm_testimoni_category', array('id_testimoni' => $_GET['id'])); $update_testimoni->form_start($title = 'EDIT TESTIMONI', $path = 'testimoni', $module = 'testimoni', $table = 'testimoni', $action = 'update', $size = 'width_full'); ?> <input type='hidden' name='id' value='<?php echo $res_update_testimoni[0]['id_testimoni']; ?> '> <?php $update_testimoni->text_input('Nama testimoni', 'nama_testimoni', $res_update_testimoni[0]['nama_testimoni']); $update_testimoni->text_input('Isi testimoni', 'isi_testimoni', $res_update_testimoni[0]['isi_testimoni']); $update_testimoni->thumbnail(); $update_testimoni->form_end(); } else { $view_testimoni = new Post('testimoni'); $header = array('id_testimoni' => 'No', 'nama_testimoni' => 'Nama', 'isi_testimoni' => 'Isi', 'thumb_testimoni' => 'Gambar'); $view_testimoni->view_datatable($header, 'testimoni', '95%', 'yes');
<?php include '../../../josys/koneksi.php'; include '../../c_post.php'; include '../../c_login.php'; $module = $_GET['module']; $act = $_GET['act']; $users = new Post('users'); if ($module == 'users') { // UPDATE DATA if ($act == 'update') { $condition = array('username' => $_POST['condition']); $check_password = new Login(); $check_exist = new Post('users'); $isExist = array('username' => $_POST['condition'], 'password' => md5($_POST['password_users_lama'])); $hasil_check_exist = $check_exist->get_db('users', $isExist); if (!empty($hasil_check_exist) and !empty($_POST['password_users_baru'])) { $password_baru = ''; if ($check_password->check($_POST['condition'], $_POST['password_users_baru'])) { $password_baru = md5($_POST['password_users_baru']); } $p_record = array('password' => $password_baru); $users->update_db('users', $condition, 'username', $p_record); } else { header('location:../../media.php?module=' . $module . "&salah=yes"); exit; } } } header('location:../../media.php?module=' . $module);
</div> </div> <?php } if ($_GET['module'] != "hubungikami") { ?> <h2> Hubungi Kami </h2> <?php $hubungi_kami = new Post('hubungi_kami'); $ret_hubungi_kami = $hubungi_kami->get_db(); echo htmlspecialchars_decode($ret_hubungi_kami[0]['content_hubungi_kami']); } $modul = new Post('modul'); $res_modul = $modul->get_db(); foreach ($res_modul as $key => $value) { if ($value['type_modul'] == 'maps') { ?> <hr> <h2> <?php echo $value['type_modul']; ?> </h2> <?php echo $value['content_modul']; } } ?> </div>
<div style="margin: 10%; margin-top: 0; background-image: url(http://www.alpha-dream.com/images/common/marbleBG.jpg); background-repeat: repeat"> <div class="col-lg-12" style="background-color: black;"> <?php if (!empty($_SESSION['cart_list'])) { ?> <h3> Daftar Pesanan </h3> <hr> <div class="well"> <form action="media.php?module=aksi_cart&act=bayar" method="POST"> <?php $total = 0; foreach ($_SESSION['cart_list'] as $key_cart => $value_cart) { $cart = new Post('cart'); $product = $cart->get_db('product', $condition = array('id_product' => $value_cart['id_product'])); $scent = $cart->get_db('scent', $condition = array('id_scent' => $value_cart['id_scent'])); $total += $product[0]['price_product'] * $value_cart['jumlah_pesanan']; ?> <div class="row"> <center> <div class="col-md-2 well"> <img src="outsource/UserFile/img/<?php echo $product[0]['thumb_product']; ?> " style="max-width: 100%"> </div> <div class="col-md-3"> <?php echo $product[0]['judul_product'];
<?php $web = new Post("modul_child"); $condition = array('nama_modul' => "deskripsi website"); $res_web = $web->get_db('modul_child', $condition); echo $res_web[0]['static_content'];
<?php include '../../../josys/koneksi.php'; include '../../c_post.php'; $act = $_GET['act']; $prepose = new Post('modul_child'); $prepose_condition = array('id_tipe' => 2, 'link' => "?module=" . $_GET['module']); $prepose_result = $prepose->get_db('modul_child', $prepose_condition); if (!empty($prepose_result)) { if ($act == 'update') { $condition = array('id_modul' => $_POST['id']); $p_record = array('id_modul' => $_POST['id'], 'static_content' => $_POST['isi']); $update_database = new Post('modul_child'); $update_database->update_db('modul_child', $condition, 'id_modul', $p_record); } } $prepose = new Post('modul_child'); $prepose_condition = array('id_tipe' => 3, 'link' => "?module=" . $_GET['module']); $prepose_result = $prepose->get_db('modul_child', $prepose_condition); if (!empty($prepose_result)) { if ($act == 'update') { $condition = array('id_modul' => $_POST['id']); $p_record = array('id_modul' => $_POST['id'], 'static_content' => $_POST['static_content']); $update_database = new Post('modul_child'); $update_database->update_db('modul_child', $condition, 'id_modul', $p_record); } } header('location:../../media.php?module=halamanadmin');
$new_scent->form_start($title = 'TAMBAH scent', $path = 'scent', $module = 'scent', $table = 'scent', $action = 'insertdb', $size = 'width_full'); //$new_scent->text_input('Judul Informasi', 'judul_scent'); $id_scent = $new_scent->get_ID('scent'); ?> <input type='hidden' name='id' value='<?php echo $id_scent; ?> '> <?php $new_scent->text_input('Nama Scent', 'judul_scent'); $new_scent->text_area('scent', 'new'); $new_scent->form_end(); } else { if ($_GET['act'] == 'edit') { $update_scent = new Post('scent'); $res_update_scent = $update_scent->get_db('scent', array('id_scent' => $_GET['id'])); $update_scent->form_start($title = 'EDIT scent', $path = 'scent', $module = 'scent', $table = 'scent', $action = 'update', $size = 'width_full'); ?> <input type='hidden' name='id' value='<?php echo $res_update_scent[0]['id_scent']; ?> '> <?php $update_scent->text_input('Nama scent', 'judul_scent', $res_update_scent[0]['judul_scent']); $update_scent->text_area('scent', 'edit', $res_update_scent[0], 'description_scent'); $update_scent->form_end(); } else { $view_scent = new Post('scent'); $header = array('id_scent' => 'No', 'judul_scent' => 'Nama', 'description_scent' => 'Deskripsi'); $view_scent->view_datatable($header, 'scent', '90%', 'yes'); }
if ($new_product->view_Checkbox('scent', array('1' => '1'), 'mm_product_scent', $condition = array('id_product' => $id_product))) { } else { echo "No Scent Added"; } ?> </div> <?php $new_product->form_end(); } else { if ($_GET['act'] == 'edit') { $update_product = new Post('product'); $res_update_product = $update_product->get_db('product', array('id_product' => $_GET['id'])); $update_scent = new Post('mm_product_scent'); $res_update_scent = $update_scent->get_db('mm_product_scent', array('id_product' => $_GET['id'])); $update_category = new Post('mm_product_category'); $res_update_category = $update_category->get_db('mm_product_category', array('id_product' => $_GET['id'])); $update_product->form_start($title = 'EDIT PRODUCT', $path = 'product', $module = 'product', $table = 'product', $action = 'update', $size = 'width_full'); ?> <input type='hidden' name='id' value='<?php echo $res_update_product[0]['id_product']; ?> '> <?php $update_product->text_input('Nama Product', 'judul_product', $res_update_product[0]['judul_product']); $update_product->text_input('Harga Product', 'price_product', $res_update_product[0]['price_product']); ?> <div style="padding:20px; width: 25%; background-color: #F8F8F8; border: solid 1px #DDD; border-radius: 5px"> <div style=""> <h3>Select Category</h3> </div>
} elseif ($_GET[module] == 'ym') { ?> Edit Sosial Media <?php } else { echo ucwords($_GET[module]); } ?> </a></article> </div> </section><!-- end of secondary bar --> <aside id="sidebar" class="column"> <?php $modul_parent = $modul->get_db('modul_parent'); foreach ($modul_parent as $key_parent => $value_parent) { echo "<h3>{$value_parent['nama_parent']}</h3>"; $child_condition = array('id_parent' => $value_parent['id_parent']); $modul_child = $modul->get_db('modul_child', $child_condition); foreach ($modul_child as $key_child => $value_child) { echo "\n\t\t\t\t\t<li class='icn_photo'><a href='{$value_child['link']}'>{$value_child['nama_modul']}</a></li>\n\t\t\t\t"; } } ?> <footer> <hr /> <p style="margin-bottom:10px;">Copyright © 2015 King Pheromone<br>Developed By <a href="http://jogjasite.com" target="_blank">Jogjasite.com</a></p> </footer> </aside><!-- end of sidebar -->
<div class="col-md-12"> aroma : <?php $mm_product_scent = new Post('mm_product_scent'); $res_mm_product_scent = $mm_product_scent->get_db('mm_product_scent', $condition = array('id_product' => $value_product['id_product'])); ?> <input type="hidden" name="id_product" value="<?php echo $value_product['id_product']; ?> "> <select name="id_scent" class="form-control"> <?php foreach ($res_mm_product_scent as $key_mm_scent => $value_mm_scent) { $hasil_dropdown = new Post('scent'); $res_hasil_dropdown = $hasil_dropdown->get_db('scent', $condition = array('id_scent' => $value_mm_scent['id_scent'])); ?> <option value='<?php echo $value_mm_scent['id_scent']; ?> '><?php echo $res_hasil_dropdown[0]['judul_scent']; ?> </option> <?php } ?> </select> </div> <div class="col-md-12"> <button type="submit" class="btn btn-default col-md-12">Tambahkan CART</button>