コード例 #1
0
ファイル: akun_kas.php プロジェクト: rifkyzulfikarf/en-sgj
             $arr['status'] = TRUE;
             $arr['msg'] = "Data tersimpan..";
         } else {
             $arr['status'] = FALSE;
             $arr['msg'] = "Gagal menyimpan..";
         }
     } else {
         $arr['status'] = FALSE;
         $arr['msg'] = "Harap isi data dengan lengkap..";
     }
     echo json_encode($arr);
     break;
 case "ubah-akun":
     $arr = array();
     if (isset($_POST['txt-nama']) && $_POST['txt-nama'] != "" && isset($_POST['txt-id']) && $_POST['txt-id'] != "") {
         if ($result = $akun->ubah_data($_POST['txt-id'], $_POST['txt-nama'])) {
             $arr['status'] = TRUE;
             $arr['msg'] = "Data tersimpan..";
         } else {
             $arr['status'] = FALSE;
             $arr['msg'] = "Gagal menyimpan..";
         }
     } else {
         $arr['status'] = FALSE;
         $arr['msg'] = "Harap isi data dengan lengkap..";
     }
     echo json_encode($arr);
     break;
 case "hapus-akun":
     $arr = array();
     if (isset($_POST['id']) && $_POST['id'] != "") {