コード例 #1
0
<?php

include '../../fungsi/fungsi_thumb.php';
include '../../fungsi/library.php';
require_once '../../config/dbWeb.php';
$con = new dbWeb();
$ACTION = $_POST['action'];
switch ($ACTION) {
    case "select":
        $idWhere = array('row_status' => 1);
        $dataBalik = $con->selectFrom('m_gallery', '*', $idWhere);
        echo json_encode($dataBalik);
        break;
    case "selectKatGallery":
        $idWhere = array('row_status' => 1);
        $dataBalik = $con->selectFrom('m_kat_gallery', '*', $idWhere);
        echo json_encode($dataBalik);
        break;
    case "selectEdit":
        $id_gallery = $_POST['id'];
        $idWhere = array('id_gallery' => $id_gallery);
        $dataBalik = $con->selectFrom('m_gallery', '*', $idWhere);
        echo json_encode($dataBalik);
        break;
    case "hapus":
        $id_gallery = $_POST['id'];
        $idWhere = array('id_gallery' => $id_gallery);
        $query = "select * from m_gallery where id_gallery = '{$id_gallery}'";
        $data = $con->execQuery($query);
        $gambar = $data[0]['gambar'];
        unlink("../../../uploads/fotoGallery/{$gambar}");
コード例 #2
0
<?php

include '../../fungsi/fungsi_thumb.php';
require_once '../../config/dbWeb.php';
$con = new dbWeb();
$ACTION = $_POST['action'];
switch ($ACTION) {
    case "selectSlide":
        $idWhere = array('row_status' => 1);
        $dataBalik = $con->selectFrom('m_slide', '*', $idWhere);
        echo json_encode($dataBalik);
        break;
    case "selectEdit":
        $idSlide = $_POST['id'];
        $idWhere = array('id_slide' => $idSlide);
        $dataBalik = $con->selectFrom('m_slide', '*', $idWhere);
        echo json_encode($dataBalik);
        break;
    case "hapusSlide":
        $idSlide = $_POST['id'];
        $query = "select * from m_slide where id_slide = '{$idSlide}'";
        $data = $con->execQuery($query);
        $gambar = $data[0]['gambar'];
        unlink("../../../uploads/fotoSlide/{$gambar}");
        unlink("../../../uploads/fotoSlide/kecil_{$gambar}");
        /*$fieldValue = array(
        			'row_status'	=>	'0',
        		);*/
        $idWhere = array('id_slide' => $idSlide);
        //$con->update('m_slide',$fieldValue,$idWhere);
        $con->delete('m_slide', $idWhere);
コード例 #3
0
<?php

include '../../fungsi/library.php';
require_once '../../config/dbWeb.php';
$con = new dbWeb();
$ACTION = $_POST['action'];
switch ($ACTION) {
    case "selectPengumuman":
        $idWhere = array('row_status' => 1);
        $dataBalik = $con->selectFrom('m_pengumuman', '*', $idWhere);
        echo json_encode($dataBalik);
        break;
    case "selectEdit":
        $idPeng = $_POST['id'];
        $idWhere = array('id_pengumuman' => $idPeng);
        $dataBalik = $con->selectFrom('m_pengumuman', '*', $idWhere);
        echo json_encode($dataBalik);
        break;
    case "hapusPengumuman":
        $idPeng = $_POST['id'];
        /*$fieldValue = array(
        			'row_status'	=>	'0',
        		);*/
        $idWhere = array('id_pengumuman' => $idPeng);
        //$con->update('m_pengumuman',$fieldValue,$idWhere);
        $con->delete('m_pengumuman', $idWhere);
        if ($con->commitQuery()) {
            $pesan = "Query Berhasil";
        } else {
            $pesan = "Query Gagal";
        }
コード例 #4
0
<?php

include '../../fungsi/fungsi_thumb.php';
include '../../fungsi/library.php';
require_once '../../config/dbWeb.php';
$con = new dbWeb();
$ACTION = $_POST['action'];
switch ($ACTION) {
    case "select":
        $idWhere = array('row_status' => 1);
        $dataBalik = $con->selectFrom('m_kat_product', '*', $idWhere);
        echo json_encode($dataBalik);
        break;
    case "selectEdit":
        $id = $_POST['id'];
        $idWhere = array('id_kat_product' => $id);
        $dataBalik = $con->selectFrom('m_kat_product', '*', $idWhere);
        echo json_encode($dataBalik);
        break;
    case "hapus":
        $id = $_POST['id'];
        $idWhere = array('id_kat_product' => $id);
        $con->delete('m_kat_product', $idWhere);
        if ($con->commitQuery()) {
            $pesan = "Query Berhasil";
        } else {
            $pesan = "Query Gagal";
        }
        echo json_encode($pesan);
        break;
    case "commit":
コード例 #5
0
 public function setMenuKanan()
 {
     $whereValue = array('letak_menu' => 'kanan');
     $arrMenuKanan = parent::selectFrom('w_menu', 'ALL', $whereValue);
     $objMenuKanan = $this->arrayToObject($arrMenuKanan);
     $data = array();
     foreach ($objMenuKanan as $menuKanan) {
         $data[$menuKanan->id_parent][] = $menuKanan;
     }
     $htmlMenuKanan = $this->orderMenuKanan($data);
     return $htmlMenuKanan;
 }
コード例 #6
0
<?php

include '../../fungsi/library.php';
include '../../fungsi/fungsi_thumb.php';
require_once '../../config/dbWeb.php';
$con = new dbWeb();
$ACTION = $_POST['action'];
switch ($ACTION) {
    case "selectVideo":
        $idWhere = array('row_status' => 1);
        $dataBalik = $con->selectFrom('m_video', '*', $idWhere);
        echo json_encode($dataBalik);
        break;
    case "selectEdit":
        $idVD = $_POST['id'];
        $idWhere = array('id_video' => $idVD);
        $dataBalik = $con->selectFrom('m_video', '*', $idWhere);
        echo json_encode($dataBalik);
        break;
    case "hapusVideo":
        $idVD = $_POST['id'];
        /*$fieldValue = array(
        			'row_status'	=>	'0',
        		);*/
        $idWhere = array('id_video' => $idVD);
        $query = "select * from m_video where id_video = '{$idVD}'";
        $data = $con->execQuery($query);
        $file = $data[0]['file'];
        unlink("../../../uploads/fileVideo/{$file}");
        unlink("../../../uploads/fileVideo/kecil_{$file}");
        //$con->update('m_video',$fieldValue,$idWhere);
コード例 #7
0
<?php

//include '../../fungsi/fungsi_thumb.php';
require_once '../../config/dbWeb.php';
$con = new dbWeb();
$ACTION = $_POST['action'];
switch ($ACTION) {
    case "view":
        $id = $_POST['id'];
        $idWhere = array('id_informasi' => $id);
        $dataBalik = $con->selectFrom('m_informasi', '*', $idWhere);
        echo json_encode($dataBalik);
        break;
    default:
        break;
}
コード例 #8
0
<?php

require_once '../../config/dbWeb.php';
$con = new dbWeb();
$ACTION = $_POST['action'];
switch ($ACTION) {
    case "selectBerita":
        $idWhere = array('row_status' => 1);
        $dataBalik = $con->selectFrom('m_berita', '*', $idWhere);
        echo json_encode($dataBalik);
        break;
    case "selectEdit":
        $idberita = $_POST['id'];
        $idWhere = array('id_berita' => $idberita);
        $dataBalik = $con->selectFrom('m_berita', '*', $idWhere);
        echo json_encode($dataBalik);
        break;
    case "hapusFak":
        $idFak = $_POST['id'];
        $fieldValue = array('row_status' => '0');
        $idWhere = array('id_fakultas' => $idFak);
        $con->update('m_fakultas', $fieldValue, $idWhere);
        if ($con->commitQuery()) {
            $pesan = "Query Berhasil";
        } else {
            $pesan = "Query Gagal";
        }
        echo json_encode($pesan);
        break;
    case "commit":
        $idBerita = $_POST['idBerita'];
コード例 #9
0
<?php

//include '../../fungsi/fungsi_thumb.php';
require_once '../../../config/dbWeb.php';
$con = new dbWeb();
$ACTION = $_POST['action'];
switch ($ACTION) {
    case "view":
        $idWhere = array('row_status' => 1);
        $orderby = array('id_berita desc limit 3');
        $dataBalik = $con->selectFrom('m_berita', '*', $idWhere, $orderby);
        echo json_encode($dataBalik);
        break;
    case "view_promosi":
        $idWhere = array('row_status' => 1);
        $orderby = array('id_pengumuman desc limit 3');
        $dataBalik = $con->selectFrom('m_pengumuman', '*', $idWhere, $orderby);
        echo json_encode($dataBalik);
        break;
    default:
        break;
}