Exemplo n.º 1
0
<?php

include_once 'include/hg_config.php';
include_once 'include/mysql_function.php';
//MEMBER===========================================================================================================
//Buat Member
if (requestData('pg') == 'buatmember') {
    include_once DOCUMENT_PATH . PATHTEM . 'member/input_member.php';
    if (requestData('submit')) {
        $data = array('nm_lengkap' => requestData('nm_lengkap'), 'nm_server' => requestData('nm_server'), 'ym1' => requestData('ym1'), 'ym2' => requestData('ym2'), 'ym3' => requestData('ym3'), 'username' => requestData('username'), 'password' => requestData('password'), 'email' => requestData('email'), 'nope' => requestData('nope'));
        hg_insert('t_member', $data);
    }
}
if (requestData('pg') == 'tampilproduk') {
    $data = hg_SelectMysql('t_produk');
    $cat = hg_SelectMysql('t_kategori');
    include_once 'template/tampil_produk.php';
}
function tampil_produk()
{
    $data = hg_SelectMysql('t_kategori, t_produk', '', 'where t_produk.id_kategori=t_kategori.id_kategori', '3');
    include_once DOCUMENT_PATH . PATHTEM . 'admin/tampil_produk_index.php';
}
Exemplo n.º 2
0
 if (requestData('pg') == 'buatproduk') {
     if (requestData('submit')) {
         if (requestData('st') == '') {
             $st = 1;
             //$st='Ada';
         } else {
             $st = 0;
             //$st='Tidak Ada';
         }
         $data = array('id_kategori' => requestData('id_kategori'), 'kode' => requestData('kode'), 'harga' => requestData('harga'), 'waktu' => $date, 'status' => $st);
         if ($data) {
             echo "<script>alert('Data Berhasil Disimpan'); window.location = 'a_home.php?pg=tampilproduk';</script>";
         } else {
             echo "<script>alert('Gagal Disimpan'); window.location = 'a_home.php?pg=tampilproduk';</script>";
         }
         hg_insert('t_produk', $data);
     }
     $cat = hg_SelectMysql('t_kategori');
     include_once DOCUMENT_PATH . PATHTEM . 'admin/input_produk.php';
 }
 if (requestData('pg') == 'hapusproduk') {
     $data = hg_Delete('t_produk', 'id_produk =' . requestData('id_produk'));
     if ($data) {
         echo "<script>alert('Data Berhasil di Hapus'); window.location = 'a_home.php?pg=tampilproduk';</script>";
     } else {
         echo "<script>alert('Gagal di Hapus'); window.location = 'a_home.php?pg=tampilproduk';</script>";
     }
 }
 if (requestData('pg') == 'updateproduk') {
     if (requestData('submit')) {
         $data = array('id_kategori' => requestData('id_kategori'), 'kode' => requestData('kode'), 'harga' => requestData('harga'), 'waktu' => $date);