@@ -1,7 +1,7 @@ discard block |
||
| 1 | 1 | <? |
| 2 | 2 | session_start(); |
| 3 | 3 | if (empty($_SESSION['username']) AND empty($_SESSION['password'])){
|
| 4 | - echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
|
|
| 4 | + echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
|
|
| 5 | 5 | } else{
|
| 6 | 6 | include "./../../config/koneksi.php"; |
| 7 | 7 | ?> |
@@ -41,27 +41,27 @@ discard block |
||
| 41 | 41 | |
| 42 | 42 | $id_module = $_GET['id_module']; |
| 43 | 43 | |
| 44 | - $id = isset($_GET['id_rujukan']) ? intval($_GET['id_rujukan']) : false; |
|
| 44 | + $id = isset($_GET['id_rujukan']) ? intval($_GET['id_rujukan']) : false; |
|
| 45 | 45 | |
| 46 | - if($id){
|
|
| 47 | - $query = mysql_query('SELECT * FROM rujukan WHERE id_rujukan = "'.$id.'"');
|
|
| 48 | - if($query && mysql_num_rows($query) == 1){
|
|
| 46 | + if($id){
|
|
| 47 | + $query = mysql_query('SELECT * FROM rujukan WHERE id_rujukan = "'.$id.'"');
|
|
| 48 | + if($query && mysql_num_rows($query) == 1){
|
|
| 49 | 49 | $data = mysql_fetch_object($query); |
| 50 | - }else |
|
| 50 | + }else |
|
| 51 | 51 | die('Data modul tidak ditemukan');
|
| 52 | - } |
|
| 52 | + } |
|
| 53 | 53 | |
| 54 | 54 | if ($_GET['igroup']) {
|
| 55 | - $group = $_GET['igroup']; |
|
| 55 | + $group = $_GET['igroup']; |
|
| 56 | 56 | } else {
|
| 57 | - $group = $data->id_rujukan; |
|
| 57 | + $group = $data->id_rujukan; |
|
| 58 | 58 | |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | if ($_GET['imenu']) {
|
| 62 | - $imenu = $_GET['imenu']; |
|
| 62 | + $imenu = $_GET['imenu']; |
|
| 63 | 63 | } else {
|
| 64 | - $imenu = $data->id_modul; |
|
| 64 | + $imenu = $data->id_modul; |
|
| 65 | 65 | |
| 66 | 66 | } |
| 67 | 67 | |
@@ -1,8 +1,8 @@ discard block |
||
| 1 | 1 | <? |
| 2 | 2 | session_start(); |
| 3 | -if (empty($_SESSION['username']) AND empty($_SESSION['password'])){
|
|
| 3 | +if (empty($_SESSION['username']) AND empty($_SESSION['password'])) {
|
|
| 4 | 4 | echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
|
| 5 | -} else{
|
|
| 5 | +} else {
|
|
| 6 | 6 | include "./../../config/koneksi.php"; |
| 7 | 7 | ?> |
| 8 | 8 | <!doctype html> |
@@ -37,17 +37,17 @@ discard block |
||
| 37 | 37 | $modul = $_GET['module']; |
| 38 | 38 | $title = $_GET['title']; |
| 39 | 39 | |
| 40 | -$role = $_SESSION['role']; |
|
| 40 | +$role = $_SESSION['role']; |
|
| 41 | 41 | |
| 42 | 42 | $id_module = $_GET['id_module']; |
| 43 | 43 | |
| 44 | 44 | $id = isset($_GET['id_rujukan']) ? intval($_GET['id_rujukan']) : false; |
| 45 | 45 | |
| 46 | - if($id){
|
|
| 46 | + if ($id) {
|
|
| 47 | 47 | $query = mysql_query('SELECT * FROM rujukan WHERE id_rujukan = "'.$id.'"');
|
| 48 | - if($query && mysql_num_rows($query) == 1){
|
|
| 48 | + if ($query && mysql_num_rows($query)==1) {
|
|
| 49 | 49 | $data = mysql_fetch_object($query); |
| 50 | - }else |
|
| 50 | + } else |
|
| 51 | 51 | die('Data modul tidak ditemukan');
|
| 52 | 52 | } |
| 53 | 53 | |
@@ -75,9 +75,9 @@ discard block |
||
| 75 | 75 | <form action="<?php echo"../../modul/mod_$modul/aksi_$modul.php?module=$modul&act=input"; ?>" method="post" name="formData" enctype="multipart/form-data" > |
| 76 | 76 | |
| 77 | 77 | |
| 78 | - <?php if ($id){ ?>
|
|
| 78 | + <?php if ($id) { ?>
|
|
| 79 | 79 | |
| 80 | - <?php if (@$data->tipe=='R'){ ?>
|
|
| 80 | + <?php if (@$data->tipe=='R') { ?>
|
|
| 81 | 81 | |
| 82 | 82 | <div class="form-group"> |
| 83 | 83 | <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Tipe :</label> |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | <input type=radio name='tipe' value='L' class="flat"> Lab |
| 87 | 87 | </div> |
| 88 | 88 | </div> |
| 89 | - <?php }else{ ?>
|
|
| 89 | + <?php } else { ?>
|
|
| 90 | 90 | |
| 91 | 91 | <div class="form-group"> |
| 92 | 92 | <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Tipe :</label> |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | </div> |
| 98 | 98 | <?php } ?> |
| 99 | 99 | |
| 100 | - <?php }else{ ?>
|
|
| 100 | + <?php } else { ?>
|
|
| 101 | 101 | |
| 102 | 102 | |
| 103 | 103 | <div class="form-group"> |
@@ -119,9 +119,9 @@ discard block |
||
| 119 | 119 | </div> |
| 120 | 120 | |
| 121 | 121 | |
| 122 | - <?php if ($id){ ?>
|
|
| 122 | + <?php if ($id) { ?>
|
|
| 123 | 123 | |
| 124 | - <?php if (@$data->aktif=='Y'){ ?>
|
|
| 124 | + <?php if (@$data->aktif=='Y') { ?>
|
|
| 125 | 125 | |
| 126 | 126 | <div class="form-group"> |
| 127 | 127 | <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Aktif :</label> |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | <input type=radio name='aktif' value='N' class="flat"> T |
| 131 | 131 | </div> |
| 132 | 132 | </div> |
| 133 | - <?php }else{ ?>
|
|
| 133 | + <?php } else { ?>
|
|
| 134 | 134 | |
| 135 | 135 | <div class="form-group"> |
| 136 | 136 | <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Aktif :</label> |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | </div> |
| 142 | 142 | <?php } ?> |
| 143 | 143 | |
| 144 | - <?php }else{ ?>
|
|
| 144 | + <?php } else { ?>
|
|
| 145 | 145 | |
| 146 | 146 | |
| 147 | 147 | <div class="form-group"> |
@@ -47,8 +47,9 @@ discard block |
||
| 47 | 47 | $query = mysql_query('SELECT * FROM rujukan WHERE id_rujukan = "'.$id.'"');
|
| 48 | 48 | if($query && mysql_num_rows($query) == 1){
|
| 49 | 49 | $data = mysql_fetch_object($query); |
| 50 | - }else |
|
| 51 | - die('Data modul tidak ditemukan');
|
|
| 50 | + } else {
|
|
| 51 | + die('Data modul tidak ditemukan');
|
|
| 52 | + } |
|
| 52 | 53 | } |
| 53 | 54 | |
| 54 | 55 | if ($_GET['igroup']) {
|
@@ -86,7 +87,7 @@ discard block |
||
| 86 | 87 | <input type=radio name='tipe' value='L' class="flat"> Lab |
| 87 | 88 | </div> |
| 88 | 89 | </div> |
| 89 | - <?php }else{ ?>
|
|
| 90 | + <?php } else{ ?>
|
|
| 90 | 91 | |
| 91 | 92 | <div class="form-group"> |
| 92 | 93 | <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Tipe :</label> |
@@ -97,7 +98,7 @@ discard block |
||
| 97 | 98 | </div> |
| 98 | 99 | <?php } ?> |
| 99 | 100 | |
| 100 | - <?php }else{ ?>
|
|
| 101 | + <?php } else{ ?>
|
|
| 101 | 102 | |
| 102 | 103 | |
| 103 | 104 | <div class="form-group"> |
@@ -130,7 +131,7 @@ discard block |
||
| 130 | 131 | <input type=radio name='aktif' value='N' class="flat"> T |
| 131 | 132 | </div> |
| 132 | 133 | </div> |
| 133 | - <?php }else{ ?>
|
|
| 134 | + <?php } else{ ?>
|
|
| 134 | 135 | |
| 135 | 136 | <div class="form-group"> |
| 136 | 137 | <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Aktif :</label> |
@@ -141,7 +142,7 @@ discard block |
||
| 141 | 142 | </div> |
| 142 | 143 | <?php } ?> |
| 143 | 144 | |
| 144 | - <?php }else{ ?>
|
|
| 145 | + <?php } else{ ?>
|
|
| 145 | 146 | |
| 146 | 147 | |
| 147 | 148 | <div class="form-group"> |
@@ -1,7 +1,7 @@ discard block |
||
| 1 | 1 | <? |
| 2 | 2 | session_start(); |
| 3 | 3 | if (empty($_SESSION['username']) AND empty($_SESSION['password'])){
|
| 4 | - echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
|
|
| 4 | + echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
|
|
| 5 | 5 | } else{
|
| 6 | 6 | include "./../../config/koneksi.php"; |
| 7 | 7 | ?> |
@@ -41,27 +41,27 @@ discard block |
||
| 41 | 41 | |
| 42 | 42 | $id_module = $_GET['id_module']; |
| 43 | 43 | |
| 44 | - $id = isset($_GET['id_satuan']) ? intval($_GET['id_satuan']) : false; |
|
| 44 | + $id = isset($_GET['id_satuan']) ? intval($_GET['id_satuan']) : false; |
|
| 45 | 45 | |
| 46 | - if($id){
|
|
| 47 | - $query = mysql_query('SELECT * FROM satuan WHERE id_satuan = "'.$id.'"');
|
|
| 48 | - if($query && mysql_num_rows($query) == 1){
|
|
| 46 | + if($id){
|
|
| 47 | + $query = mysql_query('SELECT * FROM satuan WHERE id_satuan = "'.$id.'"');
|
|
| 48 | + if($query && mysql_num_rows($query) == 1){
|
|
| 49 | 49 | $data = mysql_fetch_object($query); |
| 50 | - }else |
|
| 50 | + }else |
|
| 51 | 51 | die('Data modul tidak ditemukan');
|
| 52 | - } |
|
| 52 | + } |
|
| 53 | 53 | |
| 54 | 54 | if ($_GET['igroup']) {
|
| 55 | - $group = $_GET['igroup']; |
|
| 55 | + $group = $_GET['igroup']; |
|
| 56 | 56 | } else {
|
| 57 | - $group = $data->id_satuan; |
|
| 57 | + $group = $data->id_satuan; |
|
| 58 | 58 | |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | if ($_GET['imenu']) {
|
| 62 | - $imenu = $_GET['imenu']; |
|
| 62 | + $imenu = $_GET['imenu']; |
|
| 63 | 63 | } else {
|
| 64 | - $imenu = $data->id_modul; |
|
| 64 | + $imenu = $data->id_modul; |
|
| 65 | 65 | |
| 66 | 66 | } |
| 67 | 67 | |
@@ -1,8 +1,8 @@ discard block |
||
| 1 | 1 | <? |
| 2 | 2 | session_start(); |
| 3 | -if (empty($_SESSION['username']) AND empty($_SESSION['password'])){
|
|
| 3 | +if (empty($_SESSION['username']) AND empty($_SESSION['password'])) {
|
|
| 4 | 4 | echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
|
| 5 | -} else{
|
|
| 5 | +} else {
|
|
| 6 | 6 | include "./../../config/koneksi.php"; |
| 7 | 7 | ?> |
| 8 | 8 | <!doctype html> |
@@ -37,17 +37,17 @@ discard block |
||
| 37 | 37 | $modul = $_GET['module']; |
| 38 | 38 | $title = $_GET['title']; |
| 39 | 39 | |
| 40 | -$role = $_SESSION['role']; |
|
| 40 | +$role = $_SESSION['role']; |
|
| 41 | 41 | |
| 42 | 42 | $id_module = $_GET['id_module']; |
| 43 | 43 | |
| 44 | 44 | $id = isset($_GET['id_satuan']) ? intval($_GET['id_satuan']) : false; |
| 45 | 45 | |
| 46 | - if($id){
|
|
| 46 | + if ($id) {
|
|
| 47 | 47 | $query = mysql_query('SELECT * FROM satuan WHERE id_satuan = "'.$id.'"');
|
| 48 | - if($query && mysql_num_rows($query) == 1){
|
|
| 48 | + if ($query && mysql_num_rows($query)==1) {
|
|
| 49 | 49 | $data = mysql_fetch_object($query); |
| 50 | - }else |
|
| 50 | + } else |
|
| 51 | 51 | die('Data modul tidak ditemukan');
|
| 52 | 52 | } |
| 53 | 53 | |
@@ -83,9 +83,9 @@ discard block |
||
| 83 | 83 | </div> |
| 84 | 84 | |
| 85 | 85 | |
| 86 | - <?php if ($id){ ?>
|
|
| 86 | + <?php if ($id) { ?>
|
|
| 87 | 87 | |
| 88 | - <?php if (@$data->aktif=='Y'){ ?>
|
|
| 88 | + <?php if (@$data->aktif=='Y') { ?>
|
|
| 89 | 89 | |
| 90 | 90 | <div class="form-group"> |
| 91 | 91 | <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Aktif :</label> |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | <input type=radio name='aktif' value='N' class="flat"> T |
| 95 | 95 | </div> |
| 96 | 96 | </div> |
| 97 | - <?php }else{ ?>
|
|
| 97 | + <?php } else { ?>
|
|
| 98 | 98 | |
| 99 | 99 | <div class="form-group"> |
| 100 | 100 | <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Aktif :</label> |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | </div> |
| 106 | 106 | <?php } ?> |
| 107 | 107 | |
| 108 | - <?php }else{ ?>
|
|
| 108 | + <?php } else { ?>
|
|
| 109 | 109 | |
| 110 | 110 | |
| 111 | 111 | <div class="form-group"> |
@@ -47,8 +47,9 @@ discard block |
||
| 47 | 47 | $query = mysql_query('SELECT * FROM satuan WHERE id_satuan = "'.$id.'"');
|
| 48 | 48 | if($query && mysql_num_rows($query) == 1){
|
| 49 | 49 | $data = mysql_fetch_object($query); |
| 50 | - }else |
|
| 51 | - die('Data modul tidak ditemukan');
|
|
| 50 | + } else {
|
|
| 51 | + die('Data modul tidak ditemukan');
|
|
| 52 | + } |
|
| 52 | 53 | } |
| 53 | 54 | |
| 54 | 55 | if ($_GET['igroup']) {
|
@@ -94,7 +95,7 @@ discard block |
||
| 94 | 95 | <input type=radio name='aktif' value='N' class="flat"> T |
| 95 | 96 | </div> |
| 96 | 97 | </div> |
| 97 | - <?php }else{ ?>
|
|
| 98 | + <?php } else{ ?>
|
|
| 98 | 99 | |
| 99 | 100 | <div class="form-group"> |
| 100 | 101 | <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Aktif :</label> |
@@ -105,7 +106,7 @@ discard block |
||
| 105 | 106 | </div> |
| 106 | 107 | <?php } ?> |
| 107 | 108 | |
| 108 | - <?php }else{ ?>
|
|
| 109 | + <?php } else{ ?>
|
|
| 109 | 110 | |
| 110 | 111 | |
| 111 | 112 | <div class="form-group"> |
@@ -1,7 +1,7 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | session_start(); |
| 3 | 3 | if (empty($_SESSION['username']) AND empty($_SESSION['password'])){
|
| 4 | - echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
|
|
| 4 | + echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
|
|
| 5 | 5 | } else{
|
| 6 | 6 | include "./../../config/koneksi.php"; |
| 7 | 7 | include "./../../config/fungsi_thumb.php"; |
@@ -18,14 +18,14 @@ discard block |
||
| 18 | 18 | |
| 19 | 19 | // Hapus modul |
| 20 | 20 | if ($module=='satuan' AND $act=='hapus'){
|
| 21 | - $id = $_GET['id']; |
|
| 22 | - $id_module = $_GET['id_module']; |
|
| 21 | + $id = $_GET['id']; |
|
| 22 | + $id_module = $_GET['id_module']; |
|
| 23 | 23 | |
| 24 | - mysql_query("DELETE FROM ".$module." WHERE id_".$module." = $id");
|
|
| 24 | + mysql_query("DELETE FROM ".$module." WHERE id_".$module." = $id");
|
|
| 25 | 25 | |
| 26 | - //header('location:../../main.php?module='.$module.'&id_module='.$id_module);
|
|
| 26 | + //header('location:../../main.php?module='.$module.'&id_module='.$id_module);
|
|
| 27 | 27 | |
| 28 | - ?> |
|
| 28 | + ?> |
|
| 29 | 29 | |
| 30 | 30 | <script language="javascript"> |
| 31 | 31 | window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module";?>"; |
@@ -34,16 +34,16 @@ discard block |
||
| 34 | 34 | |
| 35 | 35 | <?php |
| 36 | 36 | |
| 37 | - } |
|
| 37 | + } |
|
| 38 | 38 | |
| 39 | - // Input group |
|
| 39 | + // Input group |
|
| 40 | 40 | elseif ($module=='satuan' AND $act=='input'){
|
| 41 | 41 | |
| 42 | - $id_module = $_POST['id_module']; |
|
| 42 | + $id_module = $_POST['id_module']; |
|
| 43 | 43 | |
| 44 | 44 | |
| 45 | - if($_POST['ID']){
|
|
| 46 | - mysql_query("UPDATE satuan SET satuan = '$_POST[satuan]'
|
|
| 45 | + if($_POST['ID']){
|
|
| 46 | + mysql_query("UPDATE satuan SET satuan = '$_POST[satuan]'
|
|
| 47 | 47 | ,upddt = '$datetime' |
| 48 | 48 | ,updby = '$userid' |
| 49 | 49 | ,aktif = '$_POST[aktif]' |
@@ -52,8 +52,8 @@ discard block |
||
| 52 | 52 | |
| 53 | 53 | |
| 54 | 54 | |
| 55 | - } else {
|
|
| 56 | - mysql_query("INSERT INTO satuan(satuan
|
|
| 55 | + } else {
|
|
| 56 | + mysql_query("INSERT INTO satuan(satuan
|
|
| 57 | 57 | ,crtdt |
| 58 | 58 | ,crtby |
| 59 | 59 | ,upddt |
@@ -67,12 +67,12 @@ discard block |
||
| 67 | 67 | ,'$_POST[aktif]')"); |
| 68 | 68 | |
| 69 | 69 | |
| 70 | - } |
|
| 70 | + } |
|
| 71 | 71 | |
| 72 | 72 | |
| 73 | - //header('location:../../main.php?module='.$module.'&id_module='.$id_module);
|
|
| 73 | + //header('location:../../main.php?module='.$module.'&id_module='.$id_module);
|
|
| 74 | 74 | |
| 75 | - ?> |
|
| 75 | + ?> |
|
| 76 | 76 | |
| 77 | 77 | <script language="javascript"> |
| 78 | 78 | window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module";?>"; |
@@ -1,23 +1,23 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | session_start(); |
| 3 | -if (empty($_SESSION['username']) AND empty($_SESSION['password'])){
|
|
| 3 | +if (empty($_SESSION['username']) AND empty($_SESSION['password'])) {
|
|
| 4 | 4 | echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
|
| 5 | -} else{
|
|
| 5 | +} else {
|
|
| 6 | 6 | include "./../../config/koneksi.php"; |
| 7 | 7 | include "./../../config/fungsi_thumb.php"; |
| 8 | 8 | |
| 9 | -$module=$_GET[module]; |
|
| 10 | -$act=$_GET[act]; |
|
| 9 | +$module = $_GET[module]; |
|
| 10 | +$act = $_GET[act]; |
|
| 11 | 11 | |
| 12 | 12 | $date = date("d/m/Y");
|
| 13 | 13 | $idate = date("Y-m-d");
|
| 14 | 14 | $hour = time() - (1 * 1 * 60 * 60); |
| 15 | -$datetime = date("Y-m-d G:i:s", $hour);
|
|
| 15 | +$datetime = date("Y-m-d G:i:s", $hour);
|
|
| 16 | 16 | $userid = $_SESSION['userid']; |
| 17 | 17 | |
| 18 | 18 | |
| 19 | 19 | // Hapus modul |
| 20 | -if ($module=='satuan' AND $act=='hapus'){
|
|
| 20 | +if ($module=='satuan' AND $act=='hapus') {
|
|
| 21 | 21 | $id = $_GET['id']; |
| 22 | 22 | $id_module = $_GET['id_module']; |
| 23 | 23 | |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | ?> |
| 29 | 29 | |
| 30 | 30 | <script language="javascript"> |
| 31 | - window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module";?>"; |
|
| 31 | + window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module"; ?>"; |
|
| 32 | 32 | window.parent.tb_remove(); |
| 33 | 33 | </script> |
| 34 | 34 | |
@@ -37,12 +37,12 @@ discard block |
||
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | // Input group |
| 40 | -elseif ($module=='satuan' AND $act=='input'){
|
|
| 40 | +elseif ($module=='satuan' AND $act=='input') {
|
|
| 41 | 41 | |
| 42 | 42 | $id_module = $_POST['id_module']; |
| 43 | 43 | |
| 44 | 44 | |
| 45 | - if($_POST['ID']){
|
|
| 45 | + if ($_POST['ID']) {
|
|
| 46 | 46 | mysql_query("UPDATE satuan SET satuan = '$_POST[satuan]'
|
| 47 | 47 | ,upddt = '$datetime' |
| 48 | 48 | ,updby = '$userid' |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | ?> |
| 76 | 76 | |
| 77 | 77 | <script language="javascript"> |
| 78 | - window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module";?>"; |
|
| 78 | + window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module"; ?>"; |
|
| 79 | 79 | window.parent.tb_remove(); |
| 80 | 80 | </script> |
| 81 | 81 | |
@@ -55,13 +55,13 @@ |
||
| 55 | 55 | echo" <td style='text-align:center;'>"; |
| 56 | 56 | |
| 57 | 57 | if($r_edit == 'Y') {
|
| 58 | - echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_satuan=$r[id_satuan]&id_module=$id&width=720&height=560&module=$module&TB_iframe=true' title='Update $nmmodule'><span class='icon'><i class='fa fa-pencil'></i></span></a>"; |
|
| 59 | - } |
|
| 58 | + echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_satuan=$r[id_satuan]&id_module=$id&width=720&height=560&module=$module&TB_iframe=true' title='Update $nmmodule'><span class='icon'><i class='fa fa-pencil'></i></span></a>"; |
|
| 59 | + } |
|
| 60 | 60 | |
| 61 | 61 | |
| 62 | - // if($r_delete == 'Y') {
|
|
| 63 | - // echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$r[id_satuan]&id_module=$id' onClick=\"return confirm('Hapus data ?')\" title='Delete $nmmodule'><span class='icon'><i class='fa fa-trash'></i></span></a>";
|
|
| 64 | - // } |
|
| 62 | + // if($r_delete == 'Y') {
|
|
| 63 | + // echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$r[id_satuan]&id_module=$id' onClick=\"return confirm('Hapus data ?')\" title='Delete $nmmodule'><span class='icon'><i class='fa fa-trash'></i></span></a>";
|
|
| 64 | + // } |
|
| 65 | 65 | echo"</td>"; |
| 66 | 66 | echo"</tr>"; |
| 67 | 67 | $no++; |
@@ -2,8 +2,8 @@ discard block |
||
| 2 | 2 | <?php |
| 3 | 3 | switch($_GET[act]){
|
| 4 | 4 | |
| 5 | -default: |
|
| 6 | - ?> |
|
| 5 | + default: |
|
| 6 | + ?> |
|
| 7 | 7 | |
| 8 | 8 | <div class=""> |
| 9 | 9 | |
@@ -43,31 +43,31 @@ discard block |
||
| 43 | 43 | |
| 44 | 44 | <? |
| 45 | 45 | |
| 46 | - $tampil=mysql_query("SELECT * FROM satuan ORDER BY id_satuan");
|
|
| 46 | + $tampil=mysql_query("SELECT * FROM satuan ORDER BY id_satuan");
|
|
| 47 | 47 | |
| 48 | - $no = 1; |
|
| 48 | + $no = 1; |
|
| 49 | 49 | |
| 50 | - while ($r=mysql_fetch_array($tampil)){
|
|
| 50 | + while ($r=mysql_fetch_array($tampil)){
|
|
| 51 | 51 | |
| 52 | - echo"<tr>"; |
|
| 53 | - echo"<td>$r[satuan]</td>"; |
|
| 54 | - echo"<td style='text-align:center;'>$r[aktif]</td>"; |
|
| 55 | - echo" <td style='text-align:center;'>"; |
|
| 52 | + echo"<tr>"; |
|
| 53 | + echo"<td>$r[satuan]</td>"; |
|
| 54 | + echo"<td style='text-align:center;'>$r[aktif]</td>"; |
|
| 55 | + echo" <td style='text-align:center;'>"; |
|
| 56 | 56 | |
| 57 | - if($r_edit == 'Y') {
|
|
| 58 | - echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_satuan=$r[id_satuan]&id_module=$id&width=720&height=560&module=$module&TB_iframe=true' title='Update $nmmodule'><span class='icon'><i class='fa fa-pencil'></i></span></a>"; |
|
| 59 | - } |
|
| 57 | + if($r_edit == 'Y') {
|
|
| 58 | + echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_satuan=$r[id_satuan]&id_module=$id&width=720&height=560&module=$module&TB_iframe=true' title='Update $nmmodule'><span class='icon'><i class='fa fa-pencil'></i></span></a>"; |
|
| 59 | + } |
|
| 60 | 60 | |
| 61 | 61 | |
| 62 | - // if($r_delete == 'Y') {
|
|
| 63 | - // echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$r[id_satuan]&id_module=$id' onClick=\"return confirm('Hapus data ?')\" title='Delete $nmmodule'><span class='icon'><i class='fa fa-trash'></i></span></a>";
|
|
| 64 | - // } |
|
| 65 | - echo"</td>"; |
|
| 66 | - echo"</tr>"; |
|
| 67 | - $no++; |
|
| 62 | + // if($r_delete == 'Y') {
|
|
| 63 | + // echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$r[id_satuan]&id_module=$id' onClick=\"return confirm('Hapus data ?')\" title='Delete $nmmodule'><span class='icon'><i class='fa fa-trash'></i></span></a>";
|
|
| 64 | + // } |
|
| 65 | + echo"</td>"; |
|
| 66 | + echo"</tr>"; |
|
| 67 | + $no++; |
|
| 68 | 68 | |
| 69 | - } |
|
| 70 | - ?> |
|
| 69 | + } |
|
| 70 | + ?> |
|
| 71 | 71 | </tbody> |
| 72 | 72 | </table> |
| 73 | 73 | </div> |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | |
| 2 | 2 | <?php |
| 3 | -switch($_GET[act]){
|
|
| 3 | +switch ($_GET[act]) {
|
|
| 4 | 4 | |
| 5 | 5 | default: |
| 6 | 6 | ?> |
@@ -12,8 +12,8 @@ discard block |
||
| 12 | 12 | <div class="col-md-12 col-sm-12 col-xs-12"> |
| 13 | 13 | <div class="x_panel"> |
| 14 | 14 | <div class="x_title"> |
| 15 | - <h2><?php echo $nmmodule;?></h2> |
|
| 16 | - <p class="pull-right"><a href='<?php echo"modul/mod_$module/form_$module.php?width=720&height=560&module=$module&id_module=$id_module&TB_iframe=true";?>' title='<?php echo $nmmodule;?> Baru' class='thickbox btn btn-sm btn-success'><i class="fa fa-plus"></i> Baru</a></p> |
|
| 15 | + <h2><?php echo $nmmodule; ?></h2> |
|
| 16 | + <p class="pull-right"><a href='<?php echo"modul/mod_$module/form_$module.php?width=720&height=560&module=$module&id_module=$id_module&TB_iframe=true"; ?>' title='<?php echo $nmmodule; ?> Baru' class='thickbox btn btn-sm btn-success'><i class="fa fa-plus"></i> Baru</a></p> |
|
| 17 | 17 | <div class="clearfix"></div> |
| 18 | 18 | </div> |
| 19 | 19 | <div class="x_content"> |
@@ -43,18 +43,18 @@ discard block |
||
| 43 | 43 | |
| 44 | 44 | <? |
| 45 | 45 | |
| 46 | - $tampil=mysql_query("SELECT * FROM satuan ORDER BY id_satuan");
|
|
| 46 | + $tampil = mysql_query("SELECT * FROM satuan ORDER BY id_satuan");
|
|
| 47 | 47 | |
| 48 | 48 | $no = 1; |
| 49 | 49 | |
| 50 | - while ($r=mysql_fetch_array($tampil)){
|
|
| 50 | + while ($r = mysql_fetch_array($tampil)) {
|
|
| 51 | 51 | |
| 52 | 52 | echo"<tr>"; |
| 53 | 53 | echo"<td>$r[satuan]</td>"; |
| 54 | 54 | echo"<td style='text-align:center;'>$r[aktif]</td>"; |
| 55 | 55 | echo" <td style='text-align:center;'>"; |
| 56 | 56 | |
| 57 | - if($r_edit == 'Y') {
|
|
| 57 | + if ($r_edit=='Y') {
|
|
| 58 | 58 | echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_satuan=$r[id_satuan]&id_module=$id&width=720&height=560&module=$module&TB_iframe=true' title='Update $nmmodule'><span class='icon'><i class='fa fa-pencil'></i></span></a>"; |
| 59 | 59 | } |
| 60 | 60 | |
@@ -1,7 +1,7 @@ discard block |
||
| 1 | 1 | <? |
| 2 | 2 | session_start(); |
| 3 | 3 | if (empty($_SESSION['username']) AND empty($_SESSION['password'])){
|
| 4 | - echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
|
|
| 4 | + echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
|
|
| 5 | 5 | } else{
|
| 6 | 6 | include "./../../config/koneksi.php"; |
| 7 | 7 | ?> |
@@ -41,27 +41,27 @@ discard block |
||
| 41 | 41 | |
| 42 | 42 | $id_module = $_GET['id_module']; |
| 43 | 43 | |
| 44 | - $id = isset($_GET['id_obat']) ? intval($_GET['id_obat']) : false; |
|
| 44 | + $id = isset($_GET['id_obat']) ? intval($_GET['id_obat']) : false; |
|
| 45 | 45 | |
| 46 | - if($id){
|
|
| 47 | - $query = mysql_query('SELECT * FROM obat WHERE id_obat = "'.$id.'"');
|
|
| 48 | - if($query && mysql_num_rows($query) == 1){
|
|
| 46 | + if($id){
|
|
| 47 | + $query = mysql_query('SELECT * FROM obat WHERE id_obat = "'.$id.'"');
|
|
| 48 | + if($query && mysql_num_rows($query) == 1){
|
|
| 49 | 49 | $data = mysql_fetch_object($query); |
| 50 | - }else |
|
| 50 | + }else |
|
| 51 | 51 | die('Data modul tidak ditemukan');
|
| 52 | - } |
|
| 52 | + } |
|
| 53 | 53 | |
| 54 | 54 | if ($_GET['igroup']) {
|
| 55 | - $group = $_GET['igroup']; |
|
| 55 | + $group = $_GET['igroup']; |
|
| 56 | 56 | } else {
|
| 57 | - $group = $data->id_obat; |
|
| 57 | + $group = $data->id_obat; |
|
| 58 | 58 | |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | if ($_GET['imenu']) {
|
| 62 | - $imenu = $_GET['imenu']; |
|
| 62 | + $imenu = $_GET['imenu']; |
|
| 63 | 63 | } else {
|
| 64 | - $imenu = $data->id_modul; |
|
| 64 | + $imenu = $data->id_modul; |
|
| 65 | 65 | |
| 66 | 66 | } |
| 67 | 67 | |
@@ -89,14 +89,14 @@ discard block |
||
| 89 | 89 | <div class="col-md-6 col-sm-6 col-xs-12" > |
| 90 | 90 | <select name="satuan" class="form-control"> |
| 91 | 91 | <? |
| 92 | - $query = mysql_query('SELECT * FROM satuan ORDER BY satuan');
|
|
| 93 | - if($query && mysql_num_rows($query) > 0){
|
|
| 94 | - while($row = mysql_fetch_object($query)){
|
|
| 95 | - echo '<option value="'.$row->id_satuan.'"'; |
|
| 96 | - if($row->id_satuan == @$data->id_satuan) echo ' selected'; |
|
| 97 | - echo '>'.$row->satuan.'</option>'; |
|
| 98 | - } |
|
| 99 | - } |
|
| 92 | + $query = mysql_query('SELECT * FROM satuan ORDER BY satuan');
|
|
| 93 | + if($query && mysql_num_rows($query) > 0){
|
|
| 94 | + while($row = mysql_fetch_object($query)){
|
|
| 95 | + echo '<option value="'.$row->id_satuan.'"'; |
|
| 96 | + if($row->id_satuan == @$data->id_satuan) echo ' selected'; |
|
| 97 | + echo '>'.$row->satuan.'</option>'; |
|
| 98 | + } |
|
| 99 | + } |
|
| 100 | 100 | ?> |
| 101 | 101 | </select> |
| 102 | 102 | </div> |
@@ -1,8 +1,8 @@ discard block |
||
| 1 | 1 | <? |
| 2 | 2 | session_start(); |
| 3 | -if (empty($_SESSION['username']) AND empty($_SESSION['password'])){
|
|
| 3 | +if (empty($_SESSION['username']) AND empty($_SESSION['password'])) {
|
|
| 4 | 4 | echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
|
| 5 | -} else{
|
|
| 5 | +} else {
|
|
| 6 | 6 | include "./../../config/koneksi.php"; |
| 7 | 7 | ?> |
| 8 | 8 | <!doctype html> |
@@ -37,17 +37,17 @@ discard block |
||
| 37 | 37 | $modul = $_GET['module']; |
| 38 | 38 | $title = $_GET['title']; |
| 39 | 39 | $business_type = $_SESSION['business_type']; |
| 40 | -$role = $_SESSION['role']; |
|
| 40 | +$role = $_SESSION['role']; |
|
| 41 | 41 | |
| 42 | 42 | $id_module = $_GET['id_module']; |
| 43 | 43 | |
| 44 | 44 | $id = isset($_GET['id_obat']) ? intval($_GET['id_obat']) : false; |
| 45 | 45 | |
| 46 | - if($id){
|
|
| 46 | + if ($id) {
|
|
| 47 | 47 | $query = mysql_query('SELECT * FROM obat WHERE id_obat = "'.$id.'"');
|
| 48 | - if($query && mysql_num_rows($query) == 1){
|
|
| 48 | + if ($query && mysql_num_rows($query)==1) {
|
|
| 49 | 49 | $data = mysql_fetch_object($query); |
| 50 | - }else |
|
| 50 | + } else |
|
| 51 | 51 | die('Data modul tidak ditemukan');
|
| 52 | 52 | } |
| 53 | 53 | |
@@ -90,10 +90,10 @@ discard block |
||
| 90 | 90 | <select name="satuan" class="form-control"> |
| 91 | 91 | <? |
| 92 | 92 | $query = mysql_query('SELECT * FROM satuan ORDER BY satuan');
|
| 93 | - if($query && mysql_num_rows($query) > 0){
|
|
| 94 | - while($row = mysql_fetch_object($query)){
|
|
| 93 | + if ($query && mysql_num_rows($query)>0) {
|
|
| 94 | + while ($row = mysql_fetch_object($query)) {
|
|
| 95 | 95 | echo '<option value="'.$row->id_satuan.'"'; |
| 96 | - if($row->id_satuan == @$data->id_satuan) echo ' selected'; |
|
| 96 | + if ($row->id_satuan==@$data->id_satuan) echo ' selected'; |
|
| 97 | 97 | echo '>'.$row->satuan.'</option>'; |
| 98 | 98 | } |
| 99 | 99 | } |
@@ -109,9 +109,9 @@ discard block |
||
| 109 | 109 | </div> |
| 110 | 110 | |
| 111 | 111 | |
| 112 | - <?php if ($id){ ?>
|
|
| 112 | + <?php if ($id) { ?>
|
|
| 113 | 113 | |
| 114 | - <?php if (@$data->aktif=='Y'){ ?>
|
|
| 114 | + <?php if (@$data->aktif=='Y') { ?>
|
|
| 115 | 115 | |
| 116 | 116 | <div class="form-group"> |
| 117 | 117 | <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Aktif:</label> |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | <input type=radio name='aktif' value='N' class="flat"> T |
| 121 | 121 | </div> |
| 122 | 122 | </div> |
| 123 | - <?php }else{ ?>
|
|
| 123 | + <?php } else { ?>
|
|
| 124 | 124 | |
| 125 | 125 | <div class="form-group"> |
| 126 | 126 | <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Aktif:</label> |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | </div> |
| 132 | 132 | <?php } ?> |
| 133 | 133 | |
| 134 | - <?php }else{ ?>
|
|
| 134 | + <?php } else { ?>
|
|
| 135 | 135 | |
| 136 | 136 | |
| 137 | 137 | <div class="form-group"> |
@@ -47,8 +47,9 @@ discard block |
||
| 47 | 47 | $query = mysql_query('SELECT * FROM obat WHERE id_obat = "'.$id.'"');
|
| 48 | 48 | if($query && mysql_num_rows($query) == 1){
|
| 49 | 49 | $data = mysql_fetch_object($query); |
| 50 | - }else |
|
| 51 | - die('Data modul tidak ditemukan');
|
|
| 50 | + } else {
|
|
| 51 | + die('Data modul tidak ditemukan');
|
|
| 52 | + } |
|
| 52 | 53 | } |
| 53 | 54 | |
| 54 | 55 | if ($_GET['igroup']) {
|
@@ -93,7 +94,9 @@ discard block |
||
| 93 | 94 | if($query && mysql_num_rows($query) > 0){
|
| 94 | 95 | while($row = mysql_fetch_object($query)){
|
| 95 | 96 | echo '<option value="'.$row->id_satuan.'"'; |
| 96 | - if($row->id_satuan == @$data->id_satuan) echo ' selected'; |
|
| 97 | + if($row->id_satuan == @$data->id_satuan) {
|
|
| 98 | + echo ' selected'; |
|
| 99 | + } |
|
| 97 | 100 | echo '>'.$row->satuan.'</option>'; |
| 98 | 101 | } |
| 99 | 102 | } |
@@ -120,7 +123,7 @@ discard block |
||
| 120 | 123 | <input type=radio name='aktif' value='N' class="flat"> T |
| 121 | 124 | </div> |
| 122 | 125 | </div> |
| 123 | - <?php }else{ ?>
|
|
| 126 | + <?php } else{ ?>
|
|
| 124 | 127 | |
| 125 | 128 | <div class="form-group"> |
| 126 | 129 | <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Aktif:</label> |
@@ -131,7 +134,7 @@ discard block |
||
| 131 | 134 | </div> |
| 132 | 135 | <?php } ?> |
| 133 | 136 | |
| 134 | - <?php }else{ ?>
|
|
| 137 | + <?php } else{ ?>
|
|
| 135 | 138 | |
| 136 | 139 | |
| 137 | 140 | <div class="form-group"> |
@@ -64,13 +64,13 @@ |
||
| 64 | 64 | echo" <td style='text-align:center;'>"; |
| 65 | 65 | |
| 66 | 66 | if($r_edit == 'Y') {
|
| 67 | - echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_obat=$r[id_obat]&id_module=$id&width=720&height=560&module=$module&TB_iframe=true' title='Update $nmmodule'><span class='icon'><i class='fa fa-pencil'></i></span></a>"; |
|
| 68 | - } |
|
| 67 | + echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_obat=$r[id_obat]&id_module=$id&width=720&height=560&module=$module&TB_iframe=true' title='Update $nmmodule'><span class='icon'><i class='fa fa-pencil'></i></span></a>"; |
|
| 68 | + } |
|
| 69 | 69 | |
| 70 | 70 | |
| 71 | - // if($r_delete == 'Y') {
|
|
| 72 | - // echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$r[id_obat]&id_module=$id' onClick=\"return confirm('Delete this record ?')\" title='Delete $nmmodule'><span class='icon'><i class='fa fa-trash'></i></span></a>";
|
|
| 73 | - // } |
|
| 71 | + // if($r_delete == 'Y') {
|
|
| 72 | + // echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$r[id_obat]&id_module=$id' onClick=\"return confirm('Delete this record ?')\" title='Delete $nmmodule'><span class='icon'><i class='fa fa-trash'></i></span></a>";
|
|
| 73 | + // } |
|
| 74 | 74 | echo"</td>"; |
| 75 | 75 | echo"</tr>"; |
| 76 | 76 | $no++; |
@@ -2,8 +2,8 @@ discard block |
||
| 2 | 2 | <?php |
| 3 | 3 | switch($_GET[act]){
|
| 4 | 4 | |
| 5 | -default: |
|
| 6 | - ?> |
|
| 5 | + default: |
|
| 6 | + ?> |
|
| 7 | 7 | |
| 8 | 8 | <div class=""> |
| 9 | 9 | |
@@ -45,38 +45,38 @@ discard block |
||
| 45 | 45 | |
| 46 | 46 | <? |
| 47 | 47 | |
| 48 | - $tampil=mysql_query("SELECT a.*,b.satuan
|
|
| 48 | + $tampil=mysql_query("SELECT a.*,b.satuan
|
|
| 49 | 49 | FROM obat a left join satuan b |
| 50 | 50 | ON a.id_satuan = b.id_satuan |
| 51 | 51 | ORDER BY a.obat "); |
| 52 | 52 | |
| 53 | - $no = 1; |
|
| 53 | + $no = 1; |
|
| 54 | 54 | |
| 55 | - while ($r=mysql_fetch_array($tampil)){
|
|
| 55 | + while ($r=mysql_fetch_array($tampil)){
|
|
| 56 | 56 | |
| 57 | - $jumlah = number_format($r[jumlah],0,'','.'); |
|
| 57 | + $jumlah = number_format($r[jumlah],0,'','.'); |
|
| 58 | 58 | |
| 59 | - echo"<tr>"; |
|
| 60 | - echo"<td>$r[obat]</td>"; |
|
| 61 | - echo"<td>$r[satuan]</td>"; |
|
| 62 | - echo"<td style='text-align:right;'>$jumlah</td>"; |
|
| 63 | - echo"<td style='text-align:center;'>$r[aktif]</td>"; |
|
| 64 | - echo" <td style='text-align:center;'>"; |
|
| 59 | + echo"<tr>"; |
|
| 60 | + echo"<td>$r[obat]</td>"; |
|
| 61 | + echo"<td>$r[satuan]</td>"; |
|
| 62 | + echo"<td style='text-align:right;'>$jumlah</td>"; |
|
| 63 | + echo"<td style='text-align:center;'>$r[aktif]</td>"; |
|
| 64 | + echo" <td style='text-align:center;'>"; |
|
| 65 | 65 | |
| 66 | - if($r_edit == 'Y') {
|
|
| 67 | - echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_obat=$r[id_obat]&id_module=$id&width=720&height=560&module=$module&TB_iframe=true' title='Update $nmmodule'><span class='icon'><i class='fa fa-pencil'></i></span></a>"; |
|
| 68 | - } |
|
| 66 | + if($r_edit == 'Y') {
|
|
| 67 | + echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_obat=$r[id_obat]&id_module=$id&width=720&height=560&module=$module&TB_iframe=true' title='Update $nmmodule'><span class='icon'><i class='fa fa-pencil'></i></span></a>"; |
|
| 68 | + } |
|
| 69 | 69 | |
| 70 | 70 | |
| 71 | - // if($r_delete == 'Y') {
|
|
| 72 | - // echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$r[id_obat]&id_module=$id' onClick=\"return confirm('Delete this record ?')\" title='Delete $nmmodule'><span class='icon'><i class='fa fa-trash'></i></span></a>";
|
|
| 73 | - // } |
|
| 74 | - echo"</td>"; |
|
| 75 | - echo"</tr>"; |
|
| 76 | - $no++; |
|
| 71 | + // if($r_delete == 'Y') {
|
|
| 72 | + // echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$r[id_obat]&id_module=$id' onClick=\"return confirm('Delete this record ?')\" title='Delete $nmmodule'><span class='icon'><i class='fa fa-trash'></i></span></a>";
|
|
| 73 | + // } |
|
| 74 | + echo"</td>"; |
|
| 75 | + echo"</tr>"; |
|
| 76 | + $no++; |
|
| 77 | 77 | |
| 78 | - } |
|
| 79 | - ?> |
|
| 78 | + } |
|
| 79 | + ?> |
|
| 80 | 80 | </tbody> |
| 81 | 81 | </table> |
| 82 | 82 | </div> |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | |
| 2 | 2 | <?php |
| 3 | -switch($_GET[act]){
|
|
| 3 | +switch ($_GET[act]) {
|
|
| 4 | 4 | |
| 5 | 5 | default: |
| 6 | 6 | ?> |
@@ -12,8 +12,8 @@ discard block |
||
| 12 | 12 | <div class="col-md-12 col-sm-12 col-xs-12"> |
| 13 | 13 | <div class="x_panel"> |
| 14 | 14 | <div class="x_title"> |
| 15 | - <h2><?php echo $nmmodule;?></h2> |
|
| 16 | - <p class="pull-right"><a href='<?php echo"modul/mod_$module/form_$module.php?width=720&height=560&module=$module&id_module=$id_module&TB_iframe=true";?>' title='New <?php echo $nmmodule;?>' class='thickbox btn btn-sm btn-success'><i class="fa fa-plus"></i> New</a></p> |
|
| 15 | + <h2><?php echo $nmmodule; ?></h2> |
|
| 16 | + <p class="pull-right"><a href='<?php echo"modul/mod_$module/form_$module.php?width=720&height=560&module=$module&id_module=$id_module&TB_iframe=true"; ?>' title='New <?php echo $nmmodule; ?>' class='thickbox btn btn-sm btn-success'><i class="fa fa-plus"></i> New</a></p> |
|
| 17 | 17 | <div class="clearfix"></div> |
| 18 | 18 | </div> |
| 19 | 19 | <div class="x_content"> |
@@ -45,16 +45,16 @@ discard block |
||
| 45 | 45 | |
| 46 | 46 | <? |
| 47 | 47 | |
| 48 | - $tampil=mysql_query("SELECT a.*,b.satuan
|
|
| 48 | + $tampil = mysql_query("SELECT a.*,b.satuan
|
|
| 49 | 49 | FROM obat a left join satuan b |
| 50 | 50 | ON a.id_satuan = b.id_satuan |
| 51 | 51 | ORDER BY a.obat "); |
| 52 | 52 | |
| 53 | 53 | $no = 1; |
| 54 | 54 | |
| 55 | - while ($r=mysql_fetch_array($tampil)){
|
|
| 55 | + while ($r = mysql_fetch_array($tampil)) {
|
|
| 56 | 56 | |
| 57 | - $jumlah = number_format($r[jumlah],0,'','.'); |
|
| 57 | + $jumlah = number_format($r[jumlah], 0, '', '.'); |
|
| 58 | 58 | |
| 59 | 59 | echo"<tr>"; |
| 60 | 60 | echo"<td>$r[obat]</td>"; |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | echo"<td style='text-align:center;'>$r[aktif]</td>"; |
| 64 | 64 | echo" <td style='text-align:center;'>"; |
| 65 | 65 | |
| 66 | - if($r_edit == 'Y') {
|
|
| 66 | + if ($r_edit=='Y') {
|
|
| 67 | 67 | echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_obat=$r[id_obat]&id_module=$id&width=720&height=560&module=$module&TB_iframe=true' title='Update $nmmodule'><span class='icon'><i class='fa fa-pencil'></i></span></a>"; |
| 68 | 68 | } |
| 69 | 69 | |
@@ -1,7 +1,7 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | session_start(); |
| 3 | 3 | if (empty($_SESSION['username']) AND empty($_SESSION['password'])){
|
| 4 | - echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
|
|
| 4 | + echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
|
|
| 5 | 5 | } else{
|
| 6 | 6 | include "./../../config/koneksi.php"; |
| 7 | 7 | include "./../../config/fungsi_thumb.php"; |
@@ -18,14 +18,14 @@ discard block |
||
| 18 | 18 | |
| 19 | 19 | // Hapus modul |
| 20 | 20 | if ($module=='obat' AND $act=='hapus'){
|
| 21 | - $id = $_GET['id']; |
|
| 22 | - $id_module = $_GET['id_module']; |
|
| 21 | + $id = $_GET['id']; |
|
| 22 | + $id_module = $_GET['id_module']; |
|
| 23 | 23 | |
| 24 | - mysql_query("DELETE FROM ".$module." WHERE id_".$module." = $id");
|
|
| 24 | + mysql_query("DELETE FROM ".$module." WHERE id_".$module." = $id");
|
|
| 25 | 25 | |
| 26 | - //header('location:../../main.php?module='.$module.'&id_module='.$id_module);
|
|
| 26 | + //header('location:../../main.php?module='.$module.'&id_module='.$id_module);
|
|
| 27 | 27 | |
| 28 | - ?> |
|
| 28 | + ?> |
|
| 29 | 29 | |
| 30 | 30 | <script language="javascript"> |
| 31 | 31 | window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module";?>"; |
@@ -34,16 +34,16 @@ discard block |
||
| 34 | 34 | |
| 35 | 35 | <?php |
| 36 | 36 | |
| 37 | - } |
|
| 37 | + } |
|
| 38 | 38 | |
| 39 | - // Input group |
|
| 39 | + // Input group |
|
| 40 | 40 | elseif ($module=='obat' AND $act=='input'){
|
| 41 | 41 | |
| 42 | - $id_module = $_POST['id_module']; |
|
| 42 | + $id_module = $_POST['id_module']; |
|
| 43 | 43 | |
| 44 | 44 | |
| 45 | - if($_POST['ID']){
|
|
| 46 | - mysql_query("UPDATE obat SET obat = '$_POST[obat]'
|
|
| 45 | + if($_POST['ID']){
|
|
| 46 | + mysql_query("UPDATE obat SET obat = '$_POST[obat]'
|
|
| 47 | 47 | ,id_satuan = '$_POST[satuan]' |
| 48 | 48 | ,jumlah = '$_POST[jumlah]' |
| 49 | 49 | ,upddt = '$datetime' |
@@ -53,8 +53,8 @@ discard block |
||
| 53 | 53 | |
| 54 | 54 | |
| 55 | 55 | |
| 56 | - } else {
|
|
| 57 | - mysql_query("INSERT INTO obat(obat
|
|
| 56 | + } else {
|
|
| 57 | + mysql_query("INSERT INTO obat(obat
|
|
| 58 | 58 | ,id_satuan |
| 59 | 59 | ,jumlah |
| 60 | 60 | ,crtdt |
@@ -72,12 +72,12 @@ discard block |
||
| 72 | 72 | ,'$_POST[aktif]')"); |
| 73 | 73 | |
| 74 | 74 | |
| 75 | - } |
|
| 75 | + } |
|
| 76 | 76 | |
| 77 | 77 | |
| 78 | - //header('location:../../main.php?module='.$module.'&id_module='.$id_module);
|
|
| 78 | + //header('location:../../main.php?module='.$module.'&id_module='.$id_module);
|
|
| 79 | 79 | |
| 80 | - ?> |
|
| 80 | + ?> |
|
| 81 | 81 | |
| 82 | 82 | <script language="javascript"> |
| 83 | 83 | window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module";?>"; |
@@ -1,23 +1,23 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | session_start(); |
| 3 | -if (empty($_SESSION['username']) AND empty($_SESSION['password'])){
|
|
| 3 | +if (empty($_SESSION['username']) AND empty($_SESSION['password'])) {
|
|
| 4 | 4 | echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
|
| 5 | -} else{
|
|
| 5 | +} else {
|
|
| 6 | 6 | include "./../../config/koneksi.php"; |
| 7 | 7 | include "./../../config/fungsi_thumb.php"; |
| 8 | 8 | |
| 9 | -$module=$_GET[module]; |
|
| 10 | -$act=$_GET[act]; |
|
| 9 | +$module = $_GET[module]; |
|
| 10 | +$act = $_GET[act]; |
|
| 11 | 11 | |
| 12 | 12 | $date = date("d/m/Y");
|
| 13 | 13 | $idate = date("Y-m-d");
|
| 14 | 14 | $hour = time() - (1 * 1 * 60 * 60); |
| 15 | -$datetime = date("Y-m-d G:i:s", $hour);
|
|
| 15 | +$datetime = date("Y-m-d G:i:s", $hour);
|
|
| 16 | 16 | $userid = $_SESSION['userid']; |
| 17 | 17 | $business_type = $_SESSION['business_type']; |
| 18 | 18 | |
| 19 | 19 | // Hapus modul |
| 20 | -if ($module=='obat' AND $act=='hapus'){
|
|
| 20 | +if ($module=='obat' AND $act=='hapus') {
|
|
| 21 | 21 | $id = $_GET['id']; |
| 22 | 22 | $id_module = $_GET['id_module']; |
| 23 | 23 | |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | ?> |
| 29 | 29 | |
| 30 | 30 | <script language="javascript"> |
| 31 | - window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module";?>"; |
|
| 31 | + window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module"; ?>"; |
|
| 32 | 32 | window.parent.tb_remove(); |
| 33 | 33 | </script> |
| 34 | 34 | |
@@ -37,12 +37,12 @@ discard block |
||
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | // Input group |
| 40 | -elseif ($module=='obat' AND $act=='input'){
|
|
| 40 | +elseif ($module=='obat' AND $act=='input') {
|
|
| 41 | 41 | |
| 42 | 42 | $id_module = $_POST['id_module']; |
| 43 | 43 | |
| 44 | 44 | |
| 45 | - if($_POST['ID']){
|
|
| 45 | + if ($_POST['ID']) {
|
|
| 46 | 46 | mysql_query("UPDATE obat SET obat = '$_POST[obat]'
|
| 47 | 47 | ,id_satuan = '$_POST[satuan]' |
| 48 | 48 | ,jumlah = '$_POST[jumlah]' |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | ?> |
| 81 | 81 | |
| 82 | 82 | <script language="javascript"> |
| 83 | - window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module";?>"; |
|
| 83 | + window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module"; ?>"; |
|
| 84 | 84 | window.parent.tb_remove(); |
| 85 | 85 | </script> |
| 86 | 86 | |
@@ -54,19 +54,19 @@ |
||
| 54 | 54 | |
| 55 | 55 | echo"<tr>"; |
| 56 | 56 | echo"<td>$r[groups]</td>"; |
| 57 | - // echo"<td>$r[main_page]</td>"; |
|
| 57 | + // echo"<td>$r[main_page]</td>"; |
|
| 58 | 58 | // echo"<td>$r[tipe_sales]</td>"; |
| 59 | 59 | echo"<td style='text-align:center;'>$r[aktif]</td>"; |
| 60 | 60 | echo" <td style='text-align:center;'>"; |
| 61 | 61 | |
| 62 | 62 | if($r_edit == 'Y') {
|
| 63 | - echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_groups=$r[id_groups]&id_module=$id&width=720&height=560&module=$module&TB_iframe=true' title='Update $nmmodule'><span class='icon'><i class='fa fa-pencil'></i></span></a>"; |
|
| 64 | - } |
|
| 63 | + echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_groups=$r[id_groups]&id_module=$id&width=720&height=560&module=$module&TB_iframe=true' title='Update $nmmodule'><span class='icon'><i class='fa fa-pencil'></i></span></a>"; |
|
| 64 | + } |
|
| 65 | 65 | |
| 66 | 66 | |
| 67 | - if($r_delete == 'Y') {
|
|
| 68 | - echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$r[id_groups]&id_module=$id' onClick=\"return confirm('Delete this record ?')\" title='Delete $nmmodule'><span class='icon'><i class='fa fa-trash'></i></span></a>";
|
|
| 69 | - } |
|
| 67 | + if($r_delete == 'Y') {
|
|
| 68 | + echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$r[id_groups]&id_module=$id' onClick=\"return confirm('Delete this record ?')\" title='Delete $nmmodule'><span class='icon'><i class='fa fa-trash'></i></span></a>";
|
|
| 69 | + } |
|
| 70 | 70 | echo"</td>"; |
| 71 | 71 | echo"</tr>"; |
| 72 | 72 | $no++; |
@@ -2,8 +2,8 @@ discard block |
||
| 2 | 2 | <?php |
| 3 | 3 | switch($_GET[act]){
|
| 4 | 4 | |
| 5 | -default: |
|
| 6 | - ?> |
|
| 5 | + default: |
|
| 6 | + ?> |
|
| 7 | 7 | |
| 8 | 8 | <div class=""> |
| 9 | 9 | |
@@ -45,34 +45,34 @@ discard block |
||
| 45 | 45 | |
| 46 | 46 | <? |
| 47 | 47 | |
| 48 | - $tampil=mysql_query("SELECT * FROM groups a
|
|
| 48 | + $tampil=mysql_query("SELECT * FROM groups a
|
|
| 49 | 49 | ORDER BY id_groups"); |
| 50 | 50 | |
| 51 | - $no = 1; |
|
| 51 | + $no = 1; |
|
| 52 | 52 | |
| 53 | - while ($r=mysql_fetch_array($tampil)){
|
|
| 53 | + while ($r=mysql_fetch_array($tampil)){
|
|
| 54 | 54 | |
| 55 | - echo"<tr>"; |
|
| 56 | - echo"<td>$r[groups]</td>"; |
|
| 57 | - // echo"<td>$r[main_page]</td>"; |
|
| 58 | - // echo"<td>$r[tipe_sales]</td>"; |
|
| 59 | - echo"<td style='text-align:center;'>$r[aktif]</td>"; |
|
| 60 | - echo" <td style='text-align:center;'>"; |
|
| 55 | + echo"<tr>"; |
|
| 56 | + echo"<td>$r[groups]</td>"; |
|
| 57 | + // echo"<td>$r[main_page]</td>"; |
|
| 58 | + // echo"<td>$r[tipe_sales]</td>"; |
|
| 59 | + echo"<td style='text-align:center;'>$r[aktif]</td>"; |
|
| 60 | + echo" <td style='text-align:center;'>"; |
|
| 61 | 61 | |
| 62 | - if($r_edit == 'Y') {
|
|
| 63 | - echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_groups=$r[id_groups]&id_module=$id&width=720&height=560&module=$module&TB_iframe=true' title='Update $nmmodule'><span class='icon'><i class='fa fa-pencil'></i></span></a>"; |
|
| 64 | - } |
|
| 62 | + if($r_edit == 'Y') {
|
|
| 63 | + echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_groups=$r[id_groups]&id_module=$id&width=720&height=560&module=$module&TB_iframe=true' title='Update $nmmodule'><span class='icon'><i class='fa fa-pencil'></i></span></a>"; |
|
| 64 | + } |
|
| 65 | 65 | |
| 66 | 66 | |
| 67 | - if($r_delete == 'Y') {
|
|
| 68 | - echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$r[id_groups]&id_module=$id' onClick=\"return confirm('Delete this record ?')\" title='Delete $nmmodule'><span class='icon'><i class='fa fa-trash'></i></span></a>";
|
|
| 69 | - } |
|
| 70 | - echo"</td>"; |
|
| 71 | - echo"</tr>"; |
|
| 72 | - $no++; |
|
| 67 | + if($r_delete == 'Y') {
|
|
| 68 | + echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$r[id_groups]&id_module=$id' onClick=\"return confirm('Delete this record ?')\" title='Delete $nmmodule'><span class='icon'><i class='fa fa-trash'></i></span></a>";
|
|
| 69 | + } |
|
| 70 | + echo"</td>"; |
|
| 71 | + echo"</tr>"; |
|
| 72 | + $no++; |
|
| 73 | 73 | |
| 74 | - } |
|
| 75 | - ?> |
|
| 74 | + } |
|
| 75 | + ?> |
|
| 76 | 76 | </tbody> |
| 77 | 77 | </table> |
| 78 | 78 | </div> |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | |
| 2 | 2 | <?php |
| 3 | -switch($_GET[act]){
|
|
| 3 | +switch ($_GET[act]) {
|
|
| 4 | 4 | |
| 5 | 5 | default: |
| 6 | 6 | ?> |
@@ -12,8 +12,8 @@ discard block |
||
| 12 | 12 | <div class="col-md-12 col-sm-12 col-xs-12"> |
| 13 | 13 | <div class="x_panel"> |
| 14 | 14 | <div class="x_title"> |
| 15 | - <h2><?php echo $nmmodule;?></h2> |
|
| 16 | - <p class="pull-right"><a href='<?php echo"modul/mod_$module/form_$module.php?width=720&height=560&module=$module&id_module=$id_module&TB_iframe=true";?>' title='New <?php echo $nmmodule;?>' class='thickbox btn btn-sm btn-success'><i class="fa fa-plus"></i> New</a></p> |
|
| 15 | + <h2><?php echo $nmmodule; ?></h2> |
|
| 16 | + <p class="pull-right"><a href='<?php echo"modul/mod_$module/form_$module.php?width=720&height=560&module=$module&id_module=$id_module&TB_iframe=true"; ?>' title='New <?php echo $nmmodule; ?>' class='thickbox btn btn-sm btn-success'><i class="fa fa-plus"></i> New</a></p> |
|
| 17 | 17 | <div class="clearfix"></div> |
| 18 | 18 | </div> |
| 19 | 19 | <div class="x_content"> |
@@ -45,12 +45,12 @@ discard block |
||
| 45 | 45 | |
| 46 | 46 | <? |
| 47 | 47 | |
| 48 | - $tampil=mysql_query("SELECT * FROM groups a
|
|
| 48 | + $tampil = mysql_query("SELECT * FROM groups a
|
|
| 49 | 49 | ORDER BY id_groups"); |
| 50 | 50 | |
| 51 | 51 | $no = 1; |
| 52 | 52 | |
| 53 | - while ($r=mysql_fetch_array($tampil)){
|
|
| 53 | + while ($r = mysql_fetch_array($tampil)) {
|
|
| 54 | 54 | |
| 55 | 55 | echo"<tr>"; |
| 56 | 56 | echo"<td>$r[groups]</td>"; |
@@ -59,12 +59,12 @@ discard block |
||
| 59 | 59 | echo"<td style='text-align:center;'>$r[aktif]</td>"; |
| 60 | 60 | echo" <td style='text-align:center;'>"; |
| 61 | 61 | |
| 62 | - if($r_edit == 'Y') {
|
|
| 62 | + if ($r_edit=='Y') {
|
|
| 63 | 63 | echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_groups=$r[id_groups]&id_module=$id&width=720&height=560&module=$module&TB_iframe=true' title='Update $nmmodule'><span class='icon'><i class='fa fa-pencil'></i></span></a>"; |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | |
| 67 | - if($r_delete == 'Y') {
|
|
| 67 | + if ($r_delete=='Y') {
|
|
| 68 | 68 | echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$r[id_groups]&id_module=$id' onClick=\"return confirm('Delete this record ?')\" title='Delete $nmmodule'><span class='icon'><i class='fa fa-trash'></i></span></a>";
|
| 69 | 69 | } |
| 70 | 70 | echo"</td>"; |
@@ -1,7 +1,7 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | session_start(); |
| 3 | 3 | if (empty($_SESSION['username']) AND empty($_SESSION['password'])){
|
| 4 | - echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
|
|
| 4 | + echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
|
|
| 5 | 5 | } else{
|
| 6 | 6 | include "./../../config/koneksi.php"; |
| 7 | 7 | include "./../../config/fungsi_thumb.php"; |
@@ -18,14 +18,14 @@ discard block |
||
| 18 | 18 | |
| 19 | 19 | // Hapus modul |
| 20 | 20 | if ($module=='groups' AND $act=='hapus'){
|
| 21 | - $id = $_GET['id']; |
|
| 22 | - $id_module = $_GET['id_module']; |
|
| 21 | + $id = $_GET['id']; |
|
| 22 | + $id_module = $_GET['id_module']; |
|
| 23 | 23 | |
| 24 | - mysql_query("DELETE FROM ".$module." WHERE id_".$module." = $id");
|
|
| 24 | + mysql_query("DELETE FROM ".$module." WHERE id_".$module." = $id");
|
|
| 25 | 25 | |
| 26 | - //header('location:../../main.php?module='.$module.'&id_module='.$id_module);
|
|
| 26 | + //header('location:../../main.php?module='.$module.'&id_module='.$id_module);
|
|
| 27 | 27 | |
| 28 | - ?> |
|
| 28 | + ?> |
|
| 29 | 29 | |
| 30 | 30 | <script language="javascript"> |
| 31 | 31 | window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module";?>"; |
@@ -34,16 +34,16 @@ discard block |
||
| 34 | 34 | |
| 35 | 35 | <?php |
| 36 | 36 | |
| 37 | - } |
|
| 37 | + } |
|
| 38 | 38 | |
| 39 | - // Input group |
|
| 39 | + // Input group |
|
| 40 | 40 | elseif ($module=='groups' AND $act=='input'){
|
| 41 | 41 | |
| 42 | - $id_module = $_POST['id_module']; |
|
| 42 | + $id_module = $_POST['id_module']; |
|
| 43 | 43 | |
| 44 | 44 | |
| 45 | - if($_POST['ID']){
|
|
| 46 | - mysql_query("UPDATE groups SET groups = '$_POST[groups]'
|
|
| 45 | + if($_POST['ID']){
|
|
| 46 | + mysql_query("UPDATE groups SET groups = '$_POST[groups]'
|
|
| 47 | 47 | ,upddt = '$datetime' |
| 48 | 48 | ,updby = '$userid' |
| 49 | 49 | ,aktif = '$_POST[aktif]' |
@@ -51,8 +51,8 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | |
| 53 | 53 | |
| 54 | - } else {
|
|
| 55 | - mysql_query("INSERT INTO groups(groups
|
|
| 54 | + } else {
|
|
| 55 | + mysql_query("INSERT INTO groups(groups
|
|
| 56 | 56 | ,crtdt |
| 57 | 57 | ,crtby |
| 58 | 58 | ,upddt |
@@ -66,12 +66,12 @@ discard block |
||
| 66 | 66 | ,'$_POST[aktif]')"); |
| 67 | 67 | |
| 68 | 68 | |
| 69 | - } |
|
| 69 | + } |
|
| 70 | 70 | |
| 71 | 71 | |
| 72 | - //header('location:../../main.php?module='.$module.'&id_module='.$id_module);
|
|
| 72 | + //header('location:../../main.php?module='.$module.'&id_module='.$id_module);
|
|
| 73 | 73 | |
| 74 | - ?> |
|
| 74 | + ?> |
|
| 75 | 75 | |
| 76 | 76 | <script language="javascript"> |
| 77 | 77 | window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module";?>"; |
@@ -1,23 +1,23 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | session_start(); |
| 3 | -if (empty($_SESSION['username']) AND empty($_SESSION['password'])){
|
|
| 3 | +if (empty($_SESSION['username']) AND empty($_SESSION['password'])) {
|
|
| 4 | 4 | echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
|
| 5 | -} else{
|
|
| 5 | +} else {
|
|
| 6 | 6 | include "./../../config/koneksi.php"; |
| 7 | 7 | include "./../../config/fungsi_thumb.php"; |
| 8 | 8 | |
| 9 | -$module=$_GET[module]; |
|
| 10 | -$act=$_GET[act]; |
|
| 9 | +$module = $_GET[module]; |
|
| 10 | +$act = $_GET[act]; |
|
| 11 | 11 | |
| 12 | 12 | $date = date("d/m/Y");
|
| 13 | 13 | $idate = date("Y-m-d");
|
| 14 | 14 | $hour = time() - (1 * 1 * 60 * 60); |
| 15 | -$datetime = date("Y-m-d G:i:s", $hour);
|
|
| 15 | +$datetime = date("Y-m-d G:i:s", $hour);
|
|
| 16 | 16 | $userid = $_SESSION['userid']; |
| 17 | 17 | $business_type = $_SESSION['business_type']; |
| 18 | 18 | |
| 19 | 19 | // Hapus modul |
| 20 | -if ($module=='groups' AND $act=='hapus'){
|
|
| 20 | +if ($module=='groups' AND $act=='hapus') {
|
|
| 21 | 21 | $id = $_GET['id']; |
| 22 | 22 | $id_module = $_GET['id_module']; |
| 23 | 23 | |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | ?> |
| 29 | 29 | |
| 30 | 30 | <script language="javascript"> |
| 31 | - window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module";?>"; |
|
| 31 | + window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module"; ?>"; |
|
| 32 | 32 | window.parent.tb_remove(); |
| 33 | 33 | </script> |
| 34 | 34 | |
@@ -37,12 +37,12 @@ discard block |
||
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | // Input group |
| 40 | -elseif ($module=='groups' AND $act=='input'){
|
|
| 40 | +elseif ($module=='groups' AND $act=='input') {
|
|
| 41 | 41 | |
| 42 | 42 | $id_module = $_POST['id_module']; |
| 43 | 43 | |
| 44 | 44 | |
| 45 | - if($_POST['ID']){
|
|
| 45 | + if ($_POST['ID']) {
|
|
| 46 | 46 | mysql_query("UPDATE groups SET groups = '$_POST[groups]'
|
| 47 | 47 | ,upddt = '$datetime' |
| 48 | 48 | ,updby = '$userid' |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | ?> |
| 75 | 75 | |
| 76 | 76 | <script language="javascript"> |
| 77 | - window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module";?>"; |
|
| 77 | + window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module"; ?>"; |
|
| 78 | 78 | window.parent.tb_remove(); |
| 79 | 79 | </script> |
| 80 | 80 | |