Passed
Push — master ( d91862...237c42 )
by Saepul
04:48
created
modul/mod_rujukan_pasien/aksi_rujukan_pasien.php 1 patch
Switch Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -1,32 +1,32 @@  discard block
 block discarded – undo
1
-<?php
2
-session_start();
3
-if (empty($_SESSION['username']) and empty($_SESSION['password'])) {
4
-    echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
1
+    <?php
2
+    session_start();
3
+    if (empty($_SESSION['username']) and empty($_SESSION['password'])) {
4
+        echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
5 5
 } else {
6
-    include './../../config/koneksi.php';
7
-    include './../../config/fungsi_thumb.php';
6
+        include './../../config/koneksi.php';
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
-    $date = date('d/m/Y');
13
-    $idate = date('Y-m-d');
14
-    $hour = time() - (1 * 1 * 60 * 60);
15
-    $datetime = date('Y-m-d G:i:s', $hour);
16
-    $userid = $_SESSION['userid'];
17
-    $business_type = $_SESSION['business_type'];
12
+        $date = date('d/m/Y');
13
+        $idate = date('Y-m-d');
14
+        $hour = time() - (1 * 1 * 60 * 60);
15
+        $datetime = date('Y-m-d G:i:s', $hour);
16
+        $userid = $_SESSION['userid'];
17
+        $business_type = $_SESSION['business_type'];
18 18
 
19
-    if ($module == 'rujukan_pasien' and $act == 'update') {
20
-        $id_module = $_POST['id_module'];
19
+        if ($module == 'rujukan_pasien' and $act == 'update') {
20
+            $id_module = $_POST['id_module'];
21 21
 
22
-        mysql_query("UPDATE kunjungan_berobat SET id_rujukan_rs   = '$_POST[rujukan_rs]'
22
+            mysql_query("UPDATE kunjungan_berobat SET id_rujukan_rs   = '$_POST[rujukan_rs]'
23 23
                     ,id_rujukan_lab   = '$_POST[rujukan_lab]'
24 24
                     ,upddt   = '$datetime' 
25 25
                     ,updby   = '$userid' 
26 26
                     ,status     = '1'  
27 27
                  WHERE id_kunjungan_berobat    = '$_POST[ID]'");
28 28
 
29
-        //header('location:../../main.php?module='.$module.'&id_module='.$id_module);?>
29
+            //header('location:../../main.php?module='.$module.'&id_module='.$id_module);?>
30 30
    
31 31
   <script language="javascript">
32 32
      window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module"; ?>";  
@@ -34,6 +34,6 @@  discard block
 block discarded – undo
34 34
    </script>
35 35
   
36 36
   <?php
37
-    }
37
+        }
38 38
 }
39
-?>
39
+    ?>
Please login to merge, or discard this patch.
modul/mod_kunjungan_berobat/kunjungan_berobat.php 1 patch
Switch Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1
-<?php
1
+    <?php
2 2
 switch ($_GET[act]) {
3 3
 
4
-default:
5
-  ?>
4
+        default:
5
+          ?>
6 6
 
7 7
  <div class="">
8 8
                    
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
                             
48 48
                          <?php
49 49
 
50
-            $tampil = mysql_query('SELECT a.*,b.nama,b.tgl_lahir,b.ktp,c.poli,d.kategori 
50
+                    $tampil = mysql_query('SELECT a.*,b.nama,b.tgl_lahir,b.ktp,c.poli,d.kategori 
51 51
                                 FROM kunjungan_berobat a left join pasien b 
52 52
                                  ON a.id_pasien = b.id_pasien
53 53
                                  left join poli c 
@@ -56,45 +56,45 @@  discard block
 block discarded – undo
56 56
                                  ON b.id_kategori = d.id_kategori
57 57
                                  ORDER BY a.tanggal,a.id_poli,a.no_urut ASC');
58 58
 
59
-            $no = 1;
59
+                    $no = 1;
60 60
 
61
-            while ($r = mysql_fetch_array($tampil)) {
62
-                $tgl = date('d/m/Y', strtotime($r[tanggal]));
63
-                $tgl_lahir = date('d/m/Y', strtotime($r[tgl_lahir]));
64
-                $status = $r[status];
61
+                    while ($r = mysql_fetch_array($tampil)) {
62
+                        $tgl = date('d/m/Y', strtotime($r[tanggal]));
63
+                        $tgl_lahir = date('d/m/Y', strtotime($r[tgl_lahir]));
64
+                        $status = $r[status];
65 65
 
66
-                echo'<tr>';
67
-                echo"<td>$tgl</td>";
68
-                echo"<td>$r[poli]</td>";
69
-                echo"<td>$r[no_urut]</td>";
70
-                echo"<td>$r[nama]</td>";
71
-                echo"<td>$r[ktp]</td>";
72
-                echo"<td>$tgl_lahir</td>";
73
-                echo"<td>$r[kategori]</td>";
74
-                echo" <td  style='text-align:center;'>";
66
+                        echo'<tr>';
67
+                        echo"<td>$tgl</td>";
68
+                        echo"<td>$r[poli]</td>";
69
+                        echo"<td>$r[no_urut]</td>";
70
+                        echo"<td>$r[nama]</td>";
71
+                        echo"<td>$r[ktp]</td>";
72
+                        echo"<td>$tgl_lahir</td>";
73
+                        echo"<td>$r[kategori]</td>";
74
+                        echo" <td  style='text-align:center;'>";
75 75
 
76
-                if ($r_edit == 'Y') {
77
-                    //if ($status == '0') {
78
-                    echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_kunjungan_berobat=$r[id_kunjungan_berobat]&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>";
79
-                    // } else {
80
-              //  echo"<span class='icon'><i class='fa fa-pencil'></i></span>";
81
-              // }
82
-                }
76
+                        if ($r_edit == 'Y') {
77
+                            //if ($status == '0') {
78
+                            echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_kunjungan_berobat=$r[id_kunjungan_berobat]&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>";
79
+                            // } else {
80
+                      //  echo"<span class='icon'><i class='fa fa-pencil'></i></span>";
81
+                      // }
82
+                        }
83 83
 
84
-                if ($r_delete == 'Y') {
85
-                    //if ($status == '0') {
86
-                    echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$r[id_kunjungan_berobat]&id_module=$id' onClick=\"return confirm('Delete this record ?')\" title='Delete $nmmodule'><span class='icon'><i class='fa fa-trash'></i></span></a>";
84
+                        if ($r_delete == 'Y') {
85
+                            //if ($status == '0') {
86
+                            echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$r[id_kunjungan_berobat]&id_module=$id' onClick=\"return confirm('Delete this record ?')\" title='Delete $nmmodule'><span class='icon'><i class='fa fa-trash'></i></span></a>";
87 87
 
88
-                    // }else {
89
-                //   echo"<span class='icon'><i class='fa fa-trash'></i></span>";
88
+                            // }else {
89
+                        //   echo"<span class='icon'><i class='fa fa-trash'></i></span>";
90 90
 
91
-                // }
92
-                }
93
-                echo'</td>';
94
-                echo'</tr>';
95
-                $no++;
96
-            }
97
-                                ?>
91
+                        // }
92
+                        }
93
+                        echo'</td>';
94
+                        echo'</tr>';
95
+                        $no++;
96
+                    }
97
+                                        ?>
98 98
                          </tbody>
99 99
                     </table>
100 100
                   </div>
@@ -139,4 +139,4 @@  discard block
 block discarded – undo
139 139
 
140 140
     <?php
141 141
 }
142
-?>
142
+    ?>
Please login to merge, or discard this patch.
modul/mod_kunjungan_berobat/aksi_kunjungan_berobat.php 1 patch
Switch Indentation   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -1,29 +1,29 @@  discard block
 block discarded – undo
1
-<?php
2
-session_start();
3
-if (empty($_SESSION['username']) and empty($_SESSION['password'])) {
4
-    echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
1
+    <?php
2
+    session_start();
3
+    if (empty($_SESSION['username']) and empty($_SESSION['password'])) {
4
+        echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
5 5
 } else {
6
-    include './../../config/koneksi.php';
7
-    include './../../config/fungsi_thumb.php';
6
+        include './../../config/koneksi.php';
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
-    $date = date('d/m/Y');
13
-    $idate = date('Y-m-d');
14
-    $hour = time() - (1 * 1 * 60 * 60);
15
-    $datetime = date('Y-m-d G:i:s', $hour);
16
-    $userid = $_SESSION['userid'];
17
-    $business_type = $_SESSION['business_type'];
12
+        $date = date('d/m/Y');
13
+        $idate = date('Y-m-d');
14
+        $hour = time() - (1 * 1 * 60 * 60);
15
+        $datetime = date('Y-m-d G:i:s', $hour);
16
+        $userid = $_SESSION['userid'];
17
+        $business_type = $_SESSION['business_type'];
18 18
 
19
-    // Hapus modul
20
-    if ($module == 'kunjungan_berobat' and $act == 'hapus') {
21
-        $id = $_GET['id'];
22
-        $id_module = $_GET['id_module'];
19
+        // Hapus modul
20
+        if ($module == 'kunjungan_berobat' and $act == 'hapus') {
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
   <script language="javascript">
29 29
      window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module"; ?>";  
@@ -31,34 +31,34 @@  discard block
 block discarded – undo
31 31
    </script>
32 32
   
33 33
   <?php
34
-    }
34
+        }
35 35
 
36
-    // Input group
37
-    elseif ($module == 'kunjungan_berobat' and $act == 'input') {
38
-        $id_module = $_POST['id_module'];
36
+        // Input group
37
+        elseif ($module == 'kunjungan_berobat' and $act == 'input') {
38
+            $id_module = $_POST['id_module'];
39 39
 
40
-        if ($_POST['ID']) {
41
-            mysql_query("UPDATE kunjungan_berobat SET tanggal   = '$_POST[tanggal]'
40
+            if ($_POST['ID']) {
41
+                mysql_query("UPDATE kunjungan_berobat SET tanggal   = '$_POST[tanggal]'
42 42
                     ,id_pasien   = '$_POST[pasien]'
43 43
                     ,id_poli   = '$_POST[poli]'    
44 44
                     ,upddt   = '$datetime' 
45 45
                     ,updby   = '$userid' 
46 46
                     ,aktif     = '$_POST[aktif]'  
47 47
                  WHERE id_kunjungan_berobat    = '$_POST[ID]'");
48
-        } else {
49
-            $sql = mysql_query("select no_urut from kunjungan_berobat 
48
+            } else {
49
+                $sql = mysql_query("select no_urut from kunjungan_berobat 
50 50
                      where tanggal='$_POST[tanggal]' 
51 51
                      and id_poli   = '$_POST[poli]'   ");
52 52
 
53
-            $r = mysql_fetch_array($sql);
53
+                $r = mysql_fetch_array($sql);
54 54
 
55
-            if ($r['no_urut']) {
56
-                $no_urut = $r['no_urut'] + 1;
57
-            } else {
58
-                $no_urut = 1;
59
-            }
55
+                if ($r['no_urut']) {
56
+                    $no_urut = $r['no_urut'] + 1;
57
+                } else {
58
+                    $no_urut = 1;
59
+                }
60 60
 
61
-            mysql_query("INSERT INTO kunjungan_berobat(tanggal
61
+                mysql_query("INSERT INTO kunjungan_berobat(tanggal
62 62
                     ,no_urut
63 63
                    ,id_pasien
64 64
                    ,id_poli
@@ -74,9 +74,9 @@  discard block
 block discarded – undo
74 74
                   ,'$userid'
75 75
                   ,'$datetime'
76 76
                   ,'$userid')");
77
-        }
77
+            }
78 78
 
79
-        //header('location:../../main.php?module='.$module.'&id_module='.$id_module);?>
79
+            //header('location:../../main.php?module='.$module.'&id_module='.$id_module);?>
80 80
    
81 81
   <script language="javascript">
82 82
      window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module"; ?>";  
@@ -84,6 +84,6 @@  discard block
 block discarded – undo
84 84
    </script>
85 85
   
86 86
   <?php
87
-    }
87
+        }
88 88
 }
89
-?>
89
+    ?>
Please login to merge, or discard this patch.
modul/mod_kasir/ecetak_kasir.php 1 patch
Switch Indentation   +182 added lines, -182 removed lines patch added patch discarded remove patch
@@ -1,38 +1,38 @@  discard block
 block discarded – undo
1
-<?php
1
+    <?php
2 2
 
3
-header('Content-Type: application/octet-stream');
4
-header('Content-Type: application/download');
5
-header('Content-Type: application/vnd.ms-excel');
6
-header('Content-Disposition: attachment;filename=laporan_harian_kasir.xls ');
7
-header('Content-Transfer-Encoding: binary ');
3
+    header('Content-Type: application/octet-stream');
4
+    header('Content-Type: application/download');
5
+    header('Content-Type: application/vnd.ms-excel');
6
+    header('Content-Disposition: attachment;filename=laporan_harian_kasir.xls ');
7
+    header('Content-Transfer-Encoding: binary ');
8 8
 
9
-?>
10
-
11
-<?php
9
+    ?>
10
+    
11
+    <?php
12 12
 
13 13
 
14
-include './../../config/koneksi.php';
14
+    include './../../config/koneksi.php';
15 15
 
16
-$report_id = $_GET[report_id];
17
-$tampil = mysql_query("SELECT * FROM modul WHERE id_modul ='".$report_id."'");
16
+    $report_id = $_GET[report_id];
17
+    $tampil = mysql_query("SELECT * FROM modul WHERE id_modul ='".$report_id."'");
18 18
 
19
-$r = mysql_fetch_array($tampil);
19
+    $r = mysql_fetch_array($tampil);
20 20
 
21
-//module=$module&report_id=$report_id&k_ID=$k_ID
21
+    //module=$module&report_id=$report_id&k_ID=$k_ID
22 22
 
23
-$module = $_GET['module'];
23
+    $module = $_GET['module'];
24 24
 
25
-$imodule = ucwords($r['nama_modul']);
25
+    $imodule = ucwords($r['nama_modul']);
26 26
 
27
-$nmmodule = ucwords($r['nama_modul']);
27
+    $nmmodule = ucwords($r['nama_modul']);
28 28
 
29
-$id = $r['id_modul'];
29
+    $id = $r['id_modul'];
30 30
 
31
-$fa_icon = $r['fa_icon'];
31
+    $fa_icon = $r['fa_icon'];
32 32
 
33
-$k_ID = $_GET['k_ID'];
33
+    $k_ID = $_GET['k_ID'];
34 34
 
35
-?>
35
+    ?>
36 36
 
37 37
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
38 38
 <html xmlns="http://www.w3.org/1999/xhtml"><head>
@@ -49,37 +49,37 @@  discard block
 block discarded – undo
49 49
   
50 50
       <?php
51 51
 
52
-       $gtampil = mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'");
52
+           $gtampil = mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'");
53 53
 
54
-       $g = mysql_fetch_array($gtampil);
54
+           $g = mysql_fetch_array($gtampil);
55 55
 
56
-      if ($g['pict']) {
57
-          $pict = $g['pict'];
58
-      } else {
59
-          $pict = '';
60
-      }
56
+          if ($g['pict']) {
57
+              $pict = $g['pict'];
58
+          } else {
59
+              $pict = '';
60
+          }
61 61
 
62
-      $company = ucwords($g['company']);
62
+          $company = ucwords($g['company']);
63 63
 
64
-      $sql = mysql_query("SELECT a.*,b.shift FROM kasir  a LEFT JOIN shift b 
64
+          $sql = mysql_query("SELECT a.*,b.shift FROM kasir  a LEFT JOIN shift b 
65 65
                             ON a.id_shift = b.id_shift
66 66
                             WHERE a.id_kasir = '$k_ID' 
67 67
 
68 68
                            ");
69 69
 
70
-      $r = mysql_fetch_array($sql);
70
+          $r = mysql_fetch_array($sql);
71 71
 
72
-      $penjualan_barang = $r['id_kasir'];
72
+          $penjualan_barang = $r['id_kasir'];
73 73
 
74
-      $shift = $r['shift'];
74
+          $shift = $r['shift'];
75 75
 
76
-      $petugas = $r['petugas'];
76
+          $petugas = $r['petugas'];
77 77
 
78
-      $status = $r['status'];
78
+          $status = $r['status'];
79 79
 
80
-      $tanggal = date('d/m/Y', strtotime($r['tanggal']));
80
+          $tanggal = date('d/m/Y', strtotime($r['tanggal']));
81 81
 
82
-      ?>
82
+          ?>
83 83
 
84 84
       <table width="100%">
85 85
       <tr>
@@ -111,21 +111,21 @@  discard block
 block discarded – undo
111 111
             <tr>
112 112
                <?php
113 113
 
114
-                $itampil = mysql_query("SELECT * FROM jenis_transaksi where aktif = 'Y' ORDER BY id_jenis_transaksi");
114
+                    $itampil = mysql_query("SELECT * FROM jenis_transaksi where aktif = 'Y' ORDER BY id_jenis_transaksi");
115 115
 
116
-                while ($i = mysql_fetch_array($itampil)) {
117
-                    echo "<th>$i[jenis_transaksi]</th>";
118
-                }
119
-               ?>
120
-
116
+                    while ($i = mysql_fetch_array($itampil)) {
117
+                        echo "<th>$i[jenis_transaksi]</th>";
118
+                    }
119
+                   ?>
120
+    
121 121
                <?php
122 122
 
123
-                $itampil = mysql_query("SELECT * FROM jenis_pembayaran where aktif = 'Y' ORDER BY id_jenis_pembayaran");
123
+                    $itampil = mysql_query("SELECT * FROM jenis_pembayaran where aktif = 'Y' ORDER BY id_jenis_pembayaran");
124 124
 
125
-                while ($i = mysql_fetch_array($itampil)) {
126
-                    echo "<th>$i[jenis_pembayaran]</th>";
127
-                }
128
-               ?>
125
+                    while ($i = mysql_fetch_array($itampil)) {
126
+                        echo "<th>$i[jenis_pembayaran]</th>";
127
+                    }
128
+                   ?>
129 129
 
130 130
 
131 131
             </tr> 
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
           <tbody>
139 139
             <?php
140 140
 
141
-            $dSQL = "SELECT a.notrans, a.pasien , a.id_jenis_pembayaran, c.penjamin,d.jenis_pembayaran , sum(a.jumlah) as jumlah 
141
+                $dSQL = "SELECT a.notrans, a.pasien , a.id_jenis_pembayaran, c.penjamin,d.jenis_pembayaran , sum(a.jumlah) as jumlah 
142 142
 
143 143
                      FROM kasir_detail a LEFT JOIN jenis_transaksi b
144 144
 
@@ -160,45 +160,45 @@  discard block
 block discarded – undo
160 160
 
161 161
                      ";
162 162
 
163
-            $dtampil = mysql_query($dSQL);
163
+                $dtampil = mysql_query($dSQL);
164 164
 
165
-            $no = 1;
165
+                $no = 1;
166 166
 
167
-            while ($d = mysql_fetch_array($dtampil)) {
168
-                $d_id = $d['id_kasir_detail'];
167
+                while ($d = mysql_fetch_array($dtampil)) {
168
+                    $d_id = $d['id_kasir_detail'];
169 169
 
170
-                $ijumlah = number_format($d['jumlah'], 0, '.', ',');
170
+                    $ijumlah = number_format($d['jumlah'], 0, '.', ',');
171 171
 
172
-                $jumlah = number_format($d['jumlah'], 0, '.', ',');
172
+                    $jumlah = number_format($d['jumlah'], 0, '.', ',');
173 173
 
174
-                $total = $total + $d['jumlah'];
174
+                    $total = $total + $d['jumlah'];
175 175
 
176
-                $itotal = number_format($total, 0, '.', ',');
176
+                    $itotal = number_format($total, 0, '.', ',');
177 177
 
178
-                echo'<tr>';
178
+                    echo'<tr>';
179 179
 
180
-                echo' <td>';
180
+                    echo' <td>';
181 181
 
182
-                echo $no;
182
+                    echo $no;
183 183
 
184
-                echo'</td>';
184
+                    echo'</td>';
185 185
 
186
-                echo' <td>';
186
+                    echo' <td>';
187 187
 
188
-                echo $d['notrans'];
188
+                    echo $d['notrans'];
189 189
 
190
-                echo'</td>';
190
+                    echo'</td>';
191 191
 
192
-                echo' <td>';
192
+                    echo' <td>';
193 193
 
194
-                echo $d['pasien'];
194
+                    echo $d['pasien'];
195 195
 
196
-                echo'</td>';
196
+                    echo'</td>';
197 197
 
198
-                $itampil = mysql_query("SELECT * FROM jenis_transaksi where aktif = 'Y' ORDER BY id_jenis_transaksi");
198
+                    $itampil = mysql_query("SELECT * FROM jenis_transaksi where aktif = 'Y' ORDER BY id_jenis_transaksi");
199 199
 
200
-                while ($i = mysql_fetch_array($itampil)) {
201
-                    $jtampil = mysql_query("SELECT b.jumlah FROM kasir a INNER JOIN kasir_detail b 
200
+                    while ($i = mysql_fetch_array($itampil)) {
201
+                        $jtampil = mysql_query("SELECT b.jumlah FROM kasir a INNER JOIN kasir_detail b 
202 202
                                          ON a.id_kasir = b.id_kasir 
203 203
                                          where a.tanggal = '$r[tanggal]'
204 204
                                          AND a.id_shift  = '$r[id_shift]'
@@ -207,21 +207,21 @@  discard block
 block discarded – undo
207 207
                                          AND b.status <> '4'
208 208
                                          ");
209 209
 
210
-                    $j = mysql_fetch_array($jtampil);
210
+                        $j = mysql_fetch_array($jtampil);
211 211
 
212
-                    if ($j[jumlah]) {
213
-                        $jml = number_format($j['jumlah'], 0, '.', ',');
214
-                    } else {
215
-                        $jml = 0;
216
-                    }
212
+                        if ($j[jumlah]) {
213
+                            $jml = number_format($j['jumlah'], 0, '.', ',');
214
+                        } else {
215
+                            $jml = 0;
216
+                        }
217 217
 
218
-                    echo "<td  style='text-align:right;'>$jml</td>";
219
-                }
218
+                        echo "<td  style='text-align:right;'>$jml</td>";
219
+                    }
220 220
 
221
-                $itampil = mysql_query("SELECT * FROM jenis_pembayaran where aktif = 'Y' ORDER BY id_jenis_pembayaran");
221
+                    $itampil = mysql_query("SELECT * FROM jenis_pembayaran where aktif = 'Y' ORDER BY id_jenis_pembayaran");
222 222
 
223
-                while ($i = mysql_fetch_array($itampil)) {
224
-                    $pSQL = "SELECT  sum(a.jumlah) as jumlah 
223
+                    while ($i = mysql_fetch_array($itampil)) {
224
+                        $pSQL = "SELECT  sum(a.jumlah) as jumlah 
225 225
 
226 226
                          FROM kasir_detail a LEFT JOIN jenis_transaksi b
227 227
 
@@ -251,43 +251,43 @@  discard block
 block discarded – undo
251 251
 
252 252
                          ";
253 253
 
254
-                    $ptampil = mysql_query($pSQL);
254
+                        $ptampil = mysql_query($pSQL);
255 255
 
256
-                    $p = mysql_fetch_array($ptampil);
256
+                        $p = mysql_fetch_array($ptampil);
257 257
 
258
-                    if ($p[jumlah]) {
259
-                        $jml = number_format($p['jumlah'], 0, '.', ',');
260
-                    } else {
261
-                        $jml = 0;
262
-                    }
258
+                        if ($p[jumlah]) {
259
+                            $jml = number_format($p['jumlah'], 0, '.', ',');
260
+                        } else {
261
+                            $jml = 0;
262
+                        }
263 263
 
264
-                    echo"<td  style='text-align:right;'>$jml </td>";
265
-                }
264
+                        echo"<td  style='text-align:right;'>$jml </td>";
265
+                    }
266 266
 
267
-                echo' <td>';
267
+                    echo' <td>';
268 268
 
269
-                $jtampil = mysql_query("SELECT b.ket  FROM kasir a INNER JOIN kasir_detail b 
269
+                    $jtampil = mysql_query("SELECT b.ket  FROM kasir a INNER JOIN kasir_detail b 
270 270
                                          ON a.id_kasir = b.id_kasir 
271 271
                                          where a.tanggal = '$r[tanggal]'
272 272
                                          AND a.id_shift  = '$r[id_shift]'
273 273
                                          AND b.notrans  = '$d[notrans]'
274 274
                                          ");
275 275
 
276
-                $j = mysql_fetch_array($jtampil);
276
+                    $j = mysql_fetch_array($jtampil);
277 277
 
278
-                echo $j[ket];
278
+                    echo $j[ket];
279 279
 
280
-                if ($d['penjamin']) {
281
-                    echo'<br>'.'('.$d['penjamin'].')';
282
-                }
280
+                    if ($d['penjamin']) {
281
+                        echo'<br>'.'('.$d['penjamin'].')';
282
+                    }
283 283
 
284
-                echo'</td>';
284
+                    echo'</td>';
285 285
 
286
-                echo '</tr>';
286
+                    echo '</tr>';
287 287
 
288
-                $no++;
289
-            }
290
-             ?>
288
+                    $no++;
289
+                }
290
+                 ?>
291 291
              </tbody> 
292 292
 
293 293
              <tfoot>
@@ -300,10 +300,10 @@  discard block
 block discarded – undo
300 300
 
301 301
                <?php
302 302
 
303
-                          $itampil = mysql_query("SELECT * FROM jenis_transaksi where aktif = 'Y' ORDER BY id_jenis_transaksi");
303
+                              $itampil = mysql_query("SELECT * FROM jenis_transaksi where aktif = 'Y' ORDER BY id_jenis_transaksi");
304 304
 
305
-                            while ($i = mysql_fetch_array($itampil)) {
306
-                                $jtampil = mysql_query("SELECT sum(b.jumlah) as jumlah FROM kasir a INNER JOIN kasir_detail b 
305
+                                while ($i = mysql_fetch_array($itampil)) {
306
+                                    $jtampil = mysql_query("SELECT sum(b.jumlah) as jumlah FROM kasir a INNER JOIN kasir_detail b 
307 307
                                                      ON a.id_kasir = b.id_kasir 
308 308
                                                      where a.tanggal = '$r[tanggal]'
309 309
                                                      AND a.id_shift  = '$r[id_shift]'
@@ -311,24 +311,24 @@  discard block
 block discarded – undo
311 311
                                                      AND b.status <> '4'
312 312
                                                      ");
313 313
 
314
-                                $j = mysql_fetch_array($jtampil);
314
+                                    $j = mysql_fetch_array($jtampil);
315 315
 
316
-                                if ($j[jumlah]) {
317
-                                    $jml = number_format($j['jumlah'], 0, '.', ',');
318
-                                } else {
319
-                                    $jml = 0;
320
-                                }
316
+                                    if ($j[jumlah]) {
317
+                                        $jml = number_format($j['jumlah'], 0, '.', ',');
318
+                                    } else {
319
+                                        $jml = 0;
320
+                                    }
321 321
 
322
-                                echo "<th  style='text-align:right;'>$jml</th>";
323
-                            }
322
+                                    echo "<th  style='text-align:right;'>$jml</th>";
323
+                                }
324 324
 
325
-                ?>        
325
+                    ?>        
326 326
 
327 327
                  <?php
328
-                 $itampil = mysql_query("SELECT * FROM jenis_pembayaran where aktif = 'Y' ORDER BY id_jenis_pembayaran");
328
+                     $itampil = mysql_query("SELECT * FROM jenis_pembayaran where aktif = 'Y' ORDER BY id_jenis_pembayaran");
329 329
 
330
-                  while ($i = mysql_fetch_array($itampil)) {
331
-                      $pSQL = "SELECT  sum(a.jumlah) as jumlah 
330
+                      while ($i = mysql_fetch_array($itampil)) {
331
+                          $pSQL = "SELECT  sum(a.jumlah) as jumlah 
332 332
 
333 333
                            FROM kasir_detail a LEFT JOIN jenis_transaksi b
334 334
 
@@ -356,20 +356,20 @@  discard block
 block discarded – undo
356 356
 
357 357
                            ";
358 358
 
359
-                      $ptampil = mysql_query($pSQL);
359
+                          $ptampil = mysql_query($pSQL);
360 360
 
361
-                      $p = mysql_fetch_array($ptampil);
361
+                          $p = mysql_fetch_array($ptampil);
362 362
 
363
-                      if ($p[jumlah]) {
364
-                          $jml = number_format($p['jumlah'], 0, '.', ',');
365
-                      } else {
366
-                          $jml = 0;
367
-                      }
363
+                          if ($p[jumlah]) {
364
+                              $jml = number_format($p['jumlah'], 0, '.', ',');
365
+                          } else {
366
+                              $jml = 0;
367
+                          }
368 368
 
369
-                      echo"<th  style='text-align:right;'>$jml </th>";
370
-                  }
369
+                          echo"<th  style='text-align:right;'>$jml </th>";
370
+                      }
371 371
 
372
-               ?> 
372
+                   ?> 
373 373
        
374 374
                <th></th> 
375 375
 
@@ -389,16 +389,16 @@  discard block
 block discarded – undo
389 389
 
390 390
             <?php 
391 391
 
392
-                 if ($r[id_shift] == '1') {
393
-                     $id_shift = '1';
394
-                 } else {
395
-                     $id_shift = '%';
396
-                 }
392
+                     if ($r[id_shift] == '1') {
393
+                         $id_shift = '1';
394
+                     } else {
395
+                         $id_shift = '%';
396
+                     }
397 397
 
398
-                 $itampil = mysql_query("SELECT * FROM shift where aktif = 'Y' and id_shift LIKE '$id_shift' ORDER BY id_shift");
398
+                     $itampil = mysql_query("SELECT * FROM shift where aktif = 'Y' and id_shift LIKE '$id_shift' ORDER BY id_shift");
399 399
 
400
-                  while ($i = mysql_fetch_array($itampil)) {
401
-                      $shift = $i['shift']; ?>       
400
+                      while ($i = mysql_fetch_array($itampil)) {
401
+                          $shift = $i['shift']; ?>       
402 402
 
403 403
                     <tr>
404 404
                     <th></th>
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
                     <?php
410 410
 
411 411
 
412
-                    $pSQL = "SELECT  sum(a.jumlah) as jumlah 
412
+                        $pSQL = "SELECT  sum(a.jumlah) as jumlah 
413 413
 
414 414
                            FROM kasir_detail a LEFT JOIN jenis_transaksi b
415 415
 
@@ -437,22 +437,22 @@  discard block
 block discarded – undo
437 437
 
438 438
                            ";
439 439
 
440
-                      $ptampil = mysql_query($pSQL);
440
+                          $ptampil = mysql_query($pSQL);
441 441
 
442
-                      $p = mysql_fetch_array($ptampil);
442
+                          $p = mysql_fetch_array($ptampil);
443 443
 
444
-                      if ($p[jumlah]) {
445
-                          $cash = number_format($p['jumlah'], 0, '.', ',');
446
-                      } else {
447
-                          $cash = 0;
448
-                      } ?>
449
-                    <th style="text-align: right;"><?=$cash; ?></th>
444
+                          if ($p[jumlah]) {
445
+                              $cash = number_format($p['jumlah'], 0, '.', ',');
446
+                          } else {
447
+                              $cash = 0;
448
+                          } ?>
449
+                        <th style="text-align: right;"><?=$cash; ?></th>
450 450
                     <th style="text-align: left;">Credit</th>
451 451
 
452 452
                     <?php
453 453
 
454 454
 
455
-                    $pSQL = "SELECT  sum(a.jumlah) as jumlah 
455
+                        $pSQL = "SELECT  sum(a.jumlah) as jumlah 
456 456
 
457 457
                            FROM kasir_detail a LEFT JOIN jenis_transaksi b
458 458
 
@@ -480,15 +480,15 @@  discard block
 block discarded – undo
480 480
 
481 481
                            ";
482 482
 
483
-                      $ptampil = mysql_query($pSQL);
483
+                          $ptampil = mysql_query($pSQL);
484 484
 
485
-                      $p = mysql_fetch_array($ptampil);
485
+                          $p = mysql_fetch_array($ptampil);
486 486
 
487
-                      if ($p[jumlah]) {
488
-                          $credit = number_format($p['jumlah'], 0, '.', ',');
489
-                      } else {
490
-                          $credit = 0;
491
-                      } ?>
487
+                          if ($p[jumlah]) {
488
+                              $credit = number_format($p['jumlah'], 0, '.', ',');
489
+                          } else {
490
+                              $credit = 0;
491
+                          } ?>
492 492
 
493 493
                     <th style="text-align: right;"><?=$credit; ?></th>
494 494
                     <th colspan="4"></th>
@@ -496,12 +496,12 @@  discard block
 block discarded – undo
496 496
 
497 497
 
498 498
                <?php
499
-                  }
499
+                      }
500 500
 
501
-               ?> 
501
+                   ?> 
502 502
 
503 503
                <?php if ($id_shift == '%') {
504
-                   ?>
504
+                       ?>
505 505
                <tr>
506 506
                     <th></th>
507 507
                     <th></th>
@@ -510,7 +510,7 @@  discard block
 block discarded – undo
510 510
                     <?php
511 511
 
512 512
 
513
-                    $pSQL = "SELECT  sum(a.jumlah) as jumlah 
513
+                        $pSQL = "SELECT  sum(a.jumlah) as jumlah 
514 514
 
515 515
                            FROM kasir_detail a LEFT JOIN jenis_transaksi b
516 516
 
@@ -537,22 +537,22 @@  discard block
 block discarded – undo
537 537
 
538 538
                            ";
539 539
 
540
-                   $ptampil = mysql_query($pSQL);
540
+                       $ptampil = mysql_query($pSQL);
541 541
 
542
-                   $p = mysql_fetch_array($ptampil);
542
+                       $p = mysql_fetch_array($ptampil);
543 543
 
544
-                   if ($p[jumlah]) {
545
-                       $cash = number_format($p['jumlah'], 0, '.', ',');
546
-                   } else {
547
-                       $cash = 0;
548
-                   } ?>
549
-                    <th style="text-align: right;"><?=$cash; ?></th>
544
+                       if ($p[jumlah]) {
545
+                           $cash = number_format($p['jumlah'], 0, '.', ',');
546
+                       } else {
547
+                           $cash = 0;
548
+                       } ?>
549
+                        <th style="text-align: right;"><?=$cash; ?></th>
550 550
                     <th style="text-align: left;">Credit</th>
551 551
 
552 552
                     <?php
553 553
 
554 554
 
555
-                    $pSQL = "SELECT  sum(a.jumlah) as jumlah 
555
+                        $pSQL = "SELECT  sum(a.jumlah) as jumlah 
556 556
 
557 557
                            FROM kasir_detail a LEFT JOIN jenis_transaksi b
558 558
 
@@ -578,22 +578,22 @@  discard block
 block discarded – undo
578 578
 
579 579
                            ";
580 580
 
581
-                   $ptampil = mysql_query($pSQL);
581
+                       $ptampil = mysql_query($pSQL);
582 582
 
583
-                   $p = mysql_fetch_array($ptampil);
583
+                       $p = mysql_fetch_array($ptampil);
584 584
 
585
-                   if ($p[jumlah]) {
586
-                       $credit = number_format($p['jumlah'], 0, '.', ',');
587
-                   } else {
588
-                       $credit = 0;
589
-                   } ?>
585
+                       if ($p[jumlah]) {
586
+                           $credit = number_format($p['jumlah'], 0, '.', ',');
587
+                       } else {
588
+                           $credit = 0;
589
+                       } ?>
590 590
 
591 591
                     <th style="text-align: right;"><?=$credit; ?></th>
592 592
                     <th colspan="4"></th>
593 593
                     </tr> 
594 594
 
595 595
                 <?php
596
-               } ?>
596
+                   } ?>
597 597
 
598 598
                  <tr><td colspan="12">&nbsp</td></tr>  
599 599
 
@@ -614,7 +614,7 @@  discard block
 block discarded – undo
614 614
                 <?php
615 615
 
616 616
 
617
-                    $pSQL = "SELECT  sum(a.jumlah) as jumlah 
617
+                        $pSQL = "SELECT  sum(a.jumlah) as jumlah 
618 618
 
619 619
                            FROM kasir_detail a LEFT JOIN jenis_transaksi b
620 620
 
@@ -640,17 +640,17 @@  discard block
 block discarded – undo
640 640
 
641 641
                            ";
642 642
 
643
-                        $ptampil = mysql_query($pSQL);
643
+                            $ptampil = mysql_query($pSQL);
644 644
 
645
-                        $p = mysql_fetch_array($ptampil);
645
+                            $p = mysql_fetch_array($ptampil);
646 646
 
647
-                             if ($p[jumlah]) {
648
-                                 $total = number_format($p['jumlah'], 0, '.', ',');
649
-                             } else {
650
-                                 $total = 0;
651
-                             }
647
+                                 if ($p[jumlah]) {
648
+                                     $total = number_format($p['jumlah'], 0, '.', ',');
649
+                                 } else {
650
+                                     $total = 0;
651
+                                 }
652 652
 
653
-              ?>
653
+                  ?>
654 654
 
655 655
 
656 656
                 <tr>
Please login to merge, or discard this patch.
modul/mod_user/aksi_user.php 1 patch
Switch Indentation   +77 added lines, -77 removed lines patch added patch discarded remove patch
@@ -1,70 +1,70 @@  discard block
 block discarded – undo
1
-<?php
2
-session_start();
3
-if (empty($_SESSION['username']) and empty($_SESSION['password'])) {
4
-    echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
1
+    <?php
2
+    session_start();
3
+    if (empty($_SESSION['username']) and empty($_SESSION['password'])) {
4
+        echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
5 5
 } else {
6
-    include './../../config/koneksi.php';
7
-    include './../../config/fungsi_thumb.php';
6
+        include './../../config/koneksi.php';
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
-    $date = date('d/m/Y');
13
-    $idate = date('Y-m-d');
14
-    $hour = time() - (1 * 1 * 60 * 60);
15
-    $datetime = date('Y-m-d G:i:s', $hour);
16
-    $userid = $_SESSION['userid'];
12
+        $date = date('d/m/Y');
13
+        $idate = date('Y-m-d');
14
+        $hour = time() - (1 * 1 * 60 * 60);
15
+        $datetime = date('Y-m-d G:i:s', $hour);
16
+        $userid = $_SESSION['userid'];
17 17
 
18
-    // Hapus modul
19
-    if ($module == 'user' and $act == 'hapus') {
20
-        $id = $_GET['id'];
21
-        $id_module = $_GET['id_module'];
18
+        // Hapus modul
19
+        if ($module == 'user' and $act == 'hapus') {
20
+            $id = $_GET['id'];
21
+            $id_module = $_GET['id_module'];
22 22
 
23
-        mysql_query('DELETE FROM '.$module.' WHERE id_'.$module." = '$id'");
23
+            mysql_query('DELETE FROM '.$module.' WHERE id_'.$module." = '$id'");
24 24
 
25
-        header('location:../../main.php?module='.$module.'&id_module='.$id_module);
26
-    }
25
+            header('location:../../main.php?module='.$module.'&id_module='.$id_module);
26
+        }
27 27
 
28
-    // Input group
29
-    elseif ($module == 'user' and $act == 'input') {
30
-        $id_module = $_POST['id_module'];
28
+        // Input group
29
+        elseif ($module == 'user' and $act == 'input') {
30
+            $id_module = $_POST['id_module'];
31 31
 
32
-        $lokasi_file = $_FILES['fupload']['tmp_name'];
33
-        $tipe_file = $_FILES['fupload']['type'];
34
-        $nama_file = $_FILES['fupload']['name'];
35
-        $acak = rand(1, 99);
36
-        $nama_file_unik = $acak.$nama_file;
32
+            $lokasi_file = $_FILES['fupload']['tmp_name'];
33
+            $tipe_file = $_FILES['fupload']['type'];
34
+            $nama_file = $_FILES['fupload']['name'];
35
+            $acak = rand(1, 99);
36
+            $nama_file_unik = $acak.$nama_file;
37 37
 
38
-        $pass = $_POST[password];
38
+            $pass = $_POST[password];
39 39
 
40
-        if ($_POST['r_input'] == 'Y') {
41
-            $r_input = 'Y';
42
-        } else {
43
-            $r_input = 'N';
44
-        }
40
+            if ($_POST['r_input'] == 'Y') {
41
+                $r_input = 'Y';
42
+            } else {
43
+                $r_input = 'N';
44
+            }
45 45
 
46
-        if ($_POST['r_edit'] == 'Y') {
47
-            $r_edit = 'Y';
48
-        } else {
49
-            $r_edit = 'N';
50
-        }
46
+            if ($_POST['r_edit'] == 'Y') {
47
+                $r_edit = 'Y';
48
+            } else {
49
+                $r_edit = 'N';
50
+            }
51 51
 
52
-        if ($_POST['r_delete'] == 'Y') {
53
-            $r_delete = 'Y';
54
-        } else {
55
-            $r_delete = 'N';
56
-        }
52
+            if ($_POST['r_delete'] == 'Y') {
53
+                $r_delete = 'Y';
54
+            } else {
55
+                $r_delete = 'N';
56
+            }
57 57
 
58
-        if ($_POST['r_admin'] == 'Y') {
59
-            $r_admin = 'Y';
60
-        } else {
61
-            $r_admin = 'N';
62
-        }
58
+            if ($_POST['r_admin'] == 'Y') {
59
+                $r_admin = 'Y';
60
+            } else {
61
+                $r_admin = 'N';
62
+            }
63 63
 
64
-        if ($_POST['ID']) {
65
-            if (empty($_POST['password'])) {
66
-                if (empty($lokasi_file)) {
67
-                    mysql_query("UPDATE user SET  username      = '$_POST[username]'
64
+            if ($_POST['ID']) {
65
+                if (empty($_POST['password'])) {
66
+                    if (empty($lokasi_file)) {
67
+                        mysql_query("UPDATE user SET  username      = '$_POST[username]'
68 68
                        ,id_groups     = '$_POST[groups]'  
69 69
                        ,nik           = '$_POST[nik]'  
70 70
                        ,r_input     = '$r_input'  
@@ -75,9 +75,9 @@  discard block
 block discarded – undo
75 75
                        ,updby       = '$userid' 
76 76
                        ,aktif         = '$_POST[aktif]'
77 77
                      WHERE id_user        = '$_POST[ID]'");
78
-                } else {
79
-                    ProfileImage($nama_file_unik);
80
-                    mysql_query("UPDATE user SET  username      = '$_POST[username]'
78
+                    } else {
79
+                        ProfileImage($nama_file_unik);
80
+                        mysql_query("UPDATE user SET  username      = '$_POST[username]'
81 81
                        ,id_groups     = '$_POST[groups]'  
82 82
                        ,nik           = '$_POST[nik]'  
83 83
                        ,r_input     = '$r_input'  
@@ -89,16 +89,16 @@  discard block
 block discarded – undo
89 89
                          ,updby       = '$userid' 
90 90
                          ,aktif         = '$_POST[aktif]'
91 91
                      WHERE id_user        = '$_POST[ID]'");
92
+                    }
92 93
                 }
93
-            }
94
-            // Apabila password diubah
95
-            else {
94
+                // Apabila password diubah
95
+                else {
96 96
 
97
-    //$pass=md5($_POST[password]);
98
-                $pass = $_POST[password];
97
+        //$pass=md5($_POST[password]);
98
+                    $pass = $_POST[password];
99 99
 
100
-                if (empty($lokasi_file)) {
101
-                    mysql_query("UPDATE user SET password     = '$pass'
100
+                    if (empty($lokasi_file)) {
101
+                        mysql_query("UPDATE user SET password     = '$pass'
102 102
                          ,username    = '$_POST[username]'
103 103
                          ,id_groups   = '$_POST[groups]'  
104 104
                          ,nik           = '$_POST[nik]'  
@@ -110,9 +110,9 @@  discard block
 block discarded – undo
110 110
                          ,updby     = '$userid' 
111 111
                          ,aktif       = '$_POST[aktif]'      
112 112
                        WHERE id_user      = '$_POST[ID]'");
113
-                } else {
114
-                    ProfileImage($nama_file_unik);
115
-                    mysql_query("UPDATE user SET password     = '$pass'
113
+                    } else {
114
+                        ProfileImage($nama_file_unik);
115
+                        mysql_query("UPDATE user SET password     = '$pass'
116 116
                          ,username    = '$_POST[username]'
117 117
                          ,id_groups   = '$_POST[groups]'  
118 118
                          ,nik           = '$_POST[nik]'  
@@ -125,13 +125,13 @@  discard block
 block discarded – undo
125 125
                          ,updby     = '$userid' 
126 126
                          ,aktif       = '$_POST[aktif]'      
127 127
                        WHERE id_user      = '$_POST[ID]'");
128
+                    }
128 129
                 }
129
-            }
130
-        } else {
131
-            if (!empty($lokasi_file)) {
132
-                ProfileImage($nama_file_unik);
130
+            } else {
131
+                if (!empty($lokasi_file)) {
132
+                    ProfileImage($nama_file_unik);
133 133
 
134
-                mysql_query("INSERT INTO user (id_user
134
+                    mysql_query("INSERT INTO user (id_user
135 135
                         ,username
136 136
                         ,password      
137 137
                         ,nik
@@ -161,8 +161,8 @@  discard block
 block discarded – undo
161 161
                        ,'$datetime'
162 162
                        ,'$userid'
163 163
                        ,'$_POST[aktif]')");
164
-            } else {
165
-                mysql_query("INSERT INTO user (id_user
164
+                } else {
165
+                    mysql_query("INSERT INTO user (id_user
166 166
                         ,username
167 167
                         ,password     
168 168
                         ,nik 
@@ -192,10 +192,10 @@  discard block
 block discarded – undo
192 192
                        ,'$datetime'
193 193
                        ,'$userid'
194 194
                        ,'$_POST[aktif]')");
195
+                }
195 196
             }
196
-        }
197 197
 
198
-        //header('location:../../main.php?module='.$module.'&id_module='.$id_module);?>
198
+            //header('location:../../main.php?module='.$module.'&id_module='.$id_module);?>
199 199
    
200 200
   <script language="javascript">
201 201
      window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module"; ?>";  
@@ -203,6 +203,6 @@  discard block
 block discarded – undo
203 203
    </script>
204 204
   
205 205
   <?php
206
-    }
206
+        }
207 207
 }
208
-?>
208
+    ?>
Please login to merge, or discard this patch.
modul/mod_user/user.php 1 patch
Switch Indentation   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@  discard block
 block discarded – undo
1
-<?php
1
+    <?php
2 2
 
3
-$outlet = $df_outlet;
3
+    $outlet = $df_outlet;
4 4
 
5 5
 switch ($_GET[act]) {
6 6
 
7
-default:
8
-  ?>
7
+        default:
8
+          ?>
9 9
 
10 10
  <div class="">
11 11
                    
@@ -52,59 +52,59 @@  discard block
 block discarded – undo
52 52
                          <?php
53 53
 
54 54
 
55
-                        $tampil = mysql_query("SELECT a.*,b.groups FROM user a INNER JOIN groups b 
55
+                                $tampil = mysql_query("SELECT a.*,b.groups FROM user a INNER JOIN groups b 
56 56
                                              ON a.id_groups=b.id_groups                                           
57 57
                                              WHERE a.role != 'SA'
58 58
                                              ORDER BY a.id_user DESC ");
59 59
 
60
-                                $no = 1;
61
-                                while ($r = mysql_fetch_array($tampil)) {
62
-                                    if ($r[r_input] == 'Y') {
63
-                                        $input = "<img src='images/cek.png' border=0> Input";
64
-                                    } else {
65
-                                        $input = "<img src='images/del.gif' width='20' border=0> Input";
66
-                                    }
60
+                                        $no = 1;
61
+                                        while ($r = mysql_fetch_array($tampil)) {
62
+                                            if ($r[r_input] == 'Y') {
63
+                                                $input = "<img src='images/cek.png' border=0> Input";
64
+                                            } else {
65
+                                                $input = "<img src='images/del.gif' width='20' border=0> Input";
66
+                                            }
67 67
 
68
-                                    if ($r[r_edit] == 'Y') {
69
-                                        $edit = "<img src='images/cek.png' border=0> Edit";
70
-                                    } else {
71
-                                        $edit = "<img src='images/del.gif' width='20' border=0> Edit";
72
-                                    }
68
+                                            if ($r[r_edit] == 'Y') {
69
+                                                $edit = "<img src='images/cek.png' border=0> Edit";
70
+                                            } else {
71
+                                                $edit = "<img src='images/del.gif' width='20' border=0> Edit";
72
+                                            }
73 73
 
74
-                                    if ($r[r_delete] == 'Y') {
75
-                                        $delete = "<img src='images/cek.png' border=0> Delete";
76
-                                    } else {
77
-                                        $delete = "<img src='images/del.gif' width='20' border=0> Delete";
78
-                                    }
74
+                                            if ($r[r_delete] == 'Y') {
75
+                                                $delete = "<img src='images/cek.png' border=0> Delete";
76
+                                            } else {
77
+                                                $delete = "<img src='images/del.gif' width='20' border=0> Delete";
78
+                                            }
79 79
 
80
-                                    if ($r[outlet] == '') {
81
-                                        $outlet = 'Semua Outlet';
82
-                                    } else {
83
-                                        $outlet = $r['outlet'];
84
-                                    }
80
+                                            if ($r[outlet] == '') {
81
+                                                $outlet = 'Semua Outlet';
82
+                                            } else {
83
+                                                $outlet = $r['outlet'];
84
+                                            }
85 85
 
86
-                                    echo'<tr>';
87
-                                    echo"<td>$r[id_user]</td>";
88
-                                    echo"<td>$r[username]</td>";
89
-                                    echo"<td>$r[nik]</td>";
90
-                                    echo"<td>$r[groups]</td>";
91
-                                    echo"<td>$r[r_input]</td>";
92
-                                    echo"<td>$r[r_edit]</td>";
93
-                                    echo"<td>$r[r_delete]</td>";
94
-                                    echo"<td style='text-align:center;'>$r[aktif]</td>";
95
-                                    echo" <td  style='text-align:center;'>";
96
-                                    if ($r_edit == 'Y') {
97
-                                        echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_user=$r[id_user]&id_module=$id&width=720&height=580&module=$module&TB_iframe=true' title='Update $nmmodule'><span class='icon'><i class='fa fa-pencil'></i></span></a>";
98
-                                    }
86
+                                            echo'<tr>';
87
+                                            echo"<td>$r[id_user]</td>";
88
+                                            echo"<td>$r[username]</td>";
89
+                                            echo"<td>$r[nik]</td>";
90
+                                            echo"<td>$r[groups]</td>";
91
+                                            echo"<td>$r[r_input]</td>";
92
+                                            echo"<td>$r[r_edit]</td>";
93
+                                            echo"<td>$r[r_delete]</td>";
94
+                                            echo"<td style='text-align:center;'>$r[aktif]</td>";
95
+                                            echo" <td  style='text-align:center;'>";
96
+                                            if ($r_edit == 'Y') {
97
+                                                echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_user=$r[id_user]&id_module=$id&width=720&height=580&module=$module&TB_iframe=true' title='Update $nmmodule'><span class='icon'><i class='fa fa-pencil'></i></span></a>";
98
+                                            }
99 99
 
100
-                                    // if($r_delete == 'Y') {
101
-                                    // echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$r[id_user]&id_module=$id' onClick=\"return confirm('Hapus data ?')\" title='Delete $nmmodule'><span class='icon'><i class='fa fa-trash'></i></span></a>";
102
-                                    // }
103
-                                    echo'</td>';
104
-                                    echo'</tr>';
105
-                                    $no++;
106
-                                }
107
-                                ?>
100
+                                            // if($r_delete == 'Y') {
101
+                                            // echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$r[id_user]&id_module=$id' onClick=\"return confirm('Hapus data ?')\" title='Delete $nmmodule'><span class='icon'><i class='fa fa-trash'></i></span></a>";
102
+                                            // }
103
+                                            echo'</td>';
104
+                                            echo'</tr>';
105
+                                            $no++;
106
+                                        }
107
+                                        ?>
108 108
                          </tbody>
109 109
                     </table>
110 110
                   </div>
Please login to merge, or discard this patch.
modul/mod_groupmodul/groupmodul.php 1 patch
Switch Indentation   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1
-  
2
-<?php
1
+      
2
+    <?php
3 3
 switch ($_GET[act]) {
4 4
 
5
-default:
6
-  ?>
5
+        default:
6
+          ?>
7 7
 
8 8
  <div class="">
9 9
                    
@@ -43,32 +43,32 @@  discard block
 block discarded – undo
43 43
                         <tbody>
44 44
                          <?php
45 45
 
46
-            $tampil = mysql_query("SELECT a.*,b.groups,c.nama_modul,c.status_menu FROM groupmodul a INNER JOIN groups b
46
+                    $tampil = mysql_query("SELECT a.*,b.groups,c.nama_modul,c.status_menu FROM groupmodul a INNER JOIN groups b
47 47
                        ON a.id_groups = b.id_groups
48 48
                        INNER JOIN modul c
49 49
                        ON a.id_modul = c.id_modul
50 50
                        WHERE c.status_menu = 'M'
51 51
                        ORDER BY a.id_groups,a.id_modul");
52 52
 
53
-                $no = 1;
54
-                                while ($r = mysql_fetch_array($tampil)) {
55
-                                    echo'<tr>';
56
-                                    echo"<td><b>$r[groups]</b></td>";
57
-                                    echo"<td><b>$r[nama_modul]</b></td>";
58
-                                    echo"<td style='text-align:center;'>$r[aktif]</td>";
59
-                                    echo" <td  style='text-align:center;'>";
60
-                                    if ($r_edit == 'Y') {
61
-                                        echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_groupmodul=$r[id_groupmodul]&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>";
62
-                                    }
53
+                        $no = 1;
54
+                                        while ($r = mysql_fetch_array($tampil)) {
55
+                                            echo'<tr>';
56
+                                            echo"<td><b>$r[groups]</b></td>";
57
+                                            echo"<td><b>$r[nama_modul]</b></td>";
58
+                                            echo"<td style='text-align:center;'>$r[aktif]</td>";
59
+                                            echo" <td  style='text-align:center;'>";
60
+                                            if ($r_edit == 'Y') {
61
+                                                echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_groupmodul=$r[id_groupmodul]&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>";
62
+                                            }
63 63
 
64
-                                    if ($r_delete == 'Y') {
65
-                                        echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$r[id_groupmodul]&id_module=$id' onClick=\"return confirm('Hapus Data ?')\" title='Delete $nmmodule'><span class='icon'><i class='fa fa-trash'></i></span></a>";
66
-                                    }
64
+                                            if ($r_delete == 'Y') {
65
+                                                echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$r[id_groupmodul]&id_module=$id' onClick=\"return confirm('Hapus Data ?')\" title='Delete $nmmodule'><span class='icon'><i class='fa fa-trash'></i></span></a>";
66
+                                            }
67 67
 
68
-                                    echo'</td>';
69
-                                    echo'</tr>';
68
+                                            echo'</td>';
69
+                                            echo'</tr>';
70 70
 
71
-                                    $dtampil = mysql_query("SELECT a.*,b.groups,c.nama_modul,c.status_menu FROM groupmodul a INNER JOIN groups b
71
+                                            $dtampil = mysql_query("SELECT a.*,b.groups,c.nama_modul,c.status_menu FROM groupmodul a INNER JOIN groups b
72 72
                        ON a.id_groups = b.id_groups
73 73
                        INNER JOIN modul c
74 74
                        ON a.id_modul = c.id_modul
@@ -77,24 +77,24 @@  discard block
 block discarded – undo
77 77
                        AND a.id_groups  = '$r[id_groups]'
78 78
                        ORDER BY a.id_groupmodul");
79 79
 
80
-                                    while ($d = mysql_fetch_array($dtampil)) {
81
-                                        echo'<tr>';
82
-                                        echo'<td></td>';
83
-                                        echo"<td>$d[nama_modul]</td>";
80
+                                            while ($d = mysql_fetch_array($dtampil)) {
81
+                                                echo'<tr>';
82
+                                                echo'<td></td>';
83
+                                                echo"<td>$d[nama_modul]</td>";
84 84
 
85
-                                        echo"<td style='text-align:center;'>$d[aktif]</td>";
86
-                                        echo"<td style='text-align:right;'>";
87
-                                        if ($r_delete == 'Y') {
88
-                                            echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$d[id_groupmodul]&id_module=$id' onClick=\"return confirm('Delete this record ?')\"><span class='icon'><i class='fa fa-trash'></i></span></a>";
89
-                                        }
90
-                                        echo'</td>';
85
+                                                echo"<td style='text-align:center;'>$d[aktif]</td>";
86
+                                                echo"<td style='text-align:right;'>";
87
+                                                if ($r_delete == 'Y') {
88
+                                                    echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$d[id_groupmodul]&id_module=$id' onClick=\"return confirm('Delete this record ?')\"><span class='icon'><i class='fa fa-trash'></i></span></a>";
89
+                                                }
90
+                                                echo'</td>';
91 91
 
92
-                                        echo'</tr>';
93
-                                    }
92
+                                                echo'</tr>';
93
+                                            }
94 94
 
95
-                                    $no++;
96
-                                }
97
-                                ?>
95
+                                            $no++;
96
+                                        }
97
+                                        ?>
98 98
                          </tbody>
99 99
                     </table>
100 100
                   </div>
Please login to merge, or discard this patch.
modul/mod_satuan/aksi_satuan.php 1 patch
Switch Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -1,28 +1,28 @@  discard block
 block discarded – undo
1
-<?php
2
-session_start();
3
-if (empty($_SESSION['username']) and empty($_SESSION['password'])) {
4
-    echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
1
+    <?php
2
+    session_start();
3
+    if (empty($_SESSION['username']) and empty($_SESSION['password'])) {
4
+        echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
5 5
 } else {
6
-    include './../../config/koneksi.php';
7
-    include './../../config/fungsi_thumb.php';
6
+        include './../../config/koneksi.php';
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
-    $date = date('d/m/Y');
13
-    $idate = date('Y-m-d');
14
-    $hour = time() - (1 * 1 * 60 * 60);
15
-    $datetime = date('Y-m-d G:i:s', $hour);
16
-    $userid = $_SESSION['userid'];
12
+        $date = date('d/m/Y');
13
+        $idate = date('Y-m-d');
14
+        $hour = time() - (1 * 1 * 60 * 60);
15
+        $datetime = date('Y-m-d G:i:s', $hour);
16
+        $userid = $_SESSION['userid'];
17 17
 
18
-    // Hapus modul
19
-    if ($module == 'satuan' and $act == 'hapus') {
20
-        $id = $_GET['id'];
21
-        $id_module = $_GET['id_module'];
18
+        // Hapus modul
19
+        if ($module == 'satuan' and $act == 'hapus') {
20
+            $id = $_GET['id'];
21
+            $id_module = $_GET['id_module'];
22 22
 
23
-        mysql_query('DELETE FROM '.$module.' WHERE id_'.$module." = $id");
23
+            mysql_query('DELETE FROM '.$module.' WHERE id_'.$module." = $id");
24 24
 
25
-        //header('location:../../main.php?module='.$module.'&id_module='.$id_module);?>
25
+            //header('location:../../main.php?module='.$module.'&id_module='.$id_module);?>
26 26
    
27 27
   <script language="javascript">
28 28
      window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module"; ?>";  
@@ -30,20 +30,20 @@  discard block
 block discarded – undo
30 30
    </script>
31 31
   
32 32
   <?php
33
-    }
33
+        }
34 34
 
35
-    // Input group
36
-    elseif ($module == 'satuan' and $act == 'input') {
37
-        $id_module = $_POST['id_module'];
35
+        // Input group
36
+        elseif ($module == 'satuan' and $act == 'input') {
37
+            $id_module = $_POST['id_module'];
38 38
 
39
-        if ($_POST['ID']) {
40
-            mysql_query("UPDATE satuan SET satuan   = '$_POST[satuan]'
39
+            if ($_POST['ID']) {
40
+                mysql_query("UPDATE satuan SET satuan   = '$_POST[satuan]'
41 41
                     ,upddt   = '$datetime' 
42 42
                   ,updby   = '$userid' 
43 43
                   ,aktif     = '$_POST[aktif]'  
44 44
                           WHERE id_satuan    = '$_POST[ID]'");
45
-        } else {
46
-            mysql_query("INSERT INTO satuan(satuan
45
+            } else {
46
+                mysql_query("INSERT INTO satuan(satuan
47 47
                    ,crtdt
48 48
                    ,crtby
49 49
                    ,upddt
@@ -55,9 +55,9 @@  discard block
 block discarded – undo
55 55
                   ,'$datetime'
56 56
                   ,'$userid'
57 57
                     ,'$_POST[aktif]')");
58
-        }
58
+            }
59 59
 
60
-        //header('location:../../main.php?module='.$module.'&id_module='.$id_module);?>
60
+            //header('location:../../main.php?module='.$module.'&id_module='.$id_module);?>
61 61
    
62 62
   <script language="javascript">
63 63
      window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module"; ?>";  
@@ -65,6 +65,6 @@  discard block
 block discarded – undo
65 65
    </script>
66 66
   
67 67
   <?php
68
-    }
68
+        }
69 69
 }
70
-?>
70
+    ?>
Please login to merge, or discard this patch.
modul/mod_satuan/satuan.php 1 patch
Switch Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1
-  
2
-<?php
1
+      
2
+    <?php
3 3
 switch ($_GET[act]) {
4 4
 
5
-default:
6
-  ?>
5
+        default:
6
+          ?>
7 7
 
8 8
  <div class="">
9 9
                    
@@ -43,28 +43,28 @@  discard block
 block discarded – undo
43 43
                             
44 44
                          <?php
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)) {
51
-                echo'<tr>';
52
-                echo"<td>$r[satuan]</td>";
53
-                echo"<td style='text-align:center;'>$r[aktif]</td>";
54
-                echo" <td  style='text-align:center;'>";
50
+                    while ($r = mysql_fetch_array($tampil)) {
51
+                        echo'<tr>';
52
+                        echo"<td>$r[satuan]</td>";
53
+                        echo"<td style='text-align:center;'>$r[aktif]</td>";
54
+                        echo" <td  style='text-align:center;'>";
55 55
 
56
-                if ($r_edit == 'Y') {
57
-                    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>";
58
-                }
56
+                        if ($r_edit == 'Y') {
57
+                            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>";
58
+                        }
59 59
 
60
-                // if($r_delete == 'Y') {
61
-                // 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>";
62
-                // }
63
-                echo'</td>';
64
-                echo'</tr>';
65
-                $no++;
66
-            }
67
-                                ?>
60
+                        // if($r_delete == 'Y') {
61
+                        // 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>";
62
+                        // }
63
+                        echo'</td>';
64
+                        echo'</tr>';
65
+                        $no++;
66
+                    }
67
+                                        ?>
68 68
                          </tbody>
69 69
                     </table>
70 70
                   </div>
Please login to merge, or discard this patch.