?> '> <?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'); }
//$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'); } }
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> <!-- Optional theme --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css"> <!-- Latest compiled and minified JavaScript --> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <?php if ($_GET['act'] == 'insertnew') { $new_cart = new Post('cart'); $new_cart->form_start($title = 'TAMBAH cart', $path = 'cart', $module = 'cart', $table = 'cart', $action = 'insertdb', $size = 'width_full'); //$new_cart->text_input('Judul Informasi', 'judul_cart'); $id_cart = $new_cart->get_ID('cart'); ?> <input type='hidden' name='id' value='<?php echo $id_cart; ?> '> <?php $new_cart->text_input('Nama cart', 'judul_cart'); $new_cart->text_area('cart', 'new'); $new_cart->form_end(); } else { if ($_GET['act'] == 'edit') { $cartToEdit = new Post('cart'); $cartArray = $cartToEdit->get_db('cart', $condition = array('id_cart' => $_GET['id'])); $pemesananToEdit = new Post('pemesanan'); $pemesananArray = $pemesananToEdit->get_db('pemesanan', $condition = array('id_cart' => $_GET['id'])); ?>
<?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();
} 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> <?php
<?php $view_slider = new Post('slider'); $header = array('id_slider' => 'nomor', 'thumb_slider' => 'Gambar'); $view_slider->view_datatable($header); $insert_slider = new Post('slider'); $insert_slider->form_start('Tambah Slide', 'slider', 'slider', 'slider', 'insertdb', 'width_quarter'); $insert_slider->thumbnail('Gambar', 100); $insert_slider->form_end();
//$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'); } }
?> '> <?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'); }
$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(); }