@@ -2,39 +2,39 @@ discard block |
||
| 2 | 2 | session_start(); |
| 3 | 3 | include 'config/koneksi.php'; |
| 4 | 4 | |
| 5 | - if ($_SESSION['role'] == 'SA') { |
|
| 6 | - $sql = mysql_query("select * from modul where aktif='Y' and status_menu = 'M' order by urutan"); |
|
| 5 | + if ($_SESSION['role'] == 'SA') { |
|
| 6 | + $sql = mysql_query("select * from modul where aktif='Y' and status_menu = 'M' order by urutan"); |
|
| 7 | 7 | |
| 8 | - $gjml = '1'; |
|
| 9 | - } else { |
|
| 10 | - $sql = mysql_query("select distinct c.* from groupmodul b
|
|
| 8 | + $gjml = '1'; |
|
| 9 | + } else { |
|
| 10 | + $sql = mysql_query("select distinct c.* from groupmodul b
|
|
| 11 | 11 | inner join modul c |
| 12 | 12 | on b.id_modul = c.id_modul |
| 13 | 13 | where b.id_groups = '$groups' and c.aktif='Y' and status_menu='M' |
| 14 | 14 | order by c.urutan"); |
| 15 | 15 | |
| 16 | - $gsql = mysql_query("select *
|
|
| 16 | + $gsql = mysql_query("select *
|
|
| 17 | 17 | from modul a inner join groupmodul b |
| 18 | 18 | on a.id_modul = b.id_modul |
| 19 | 19 | where link = 'general_setting' |
| 20 | 20 | and b.id_groups = '$groups' |
| 21 | 21 | "); |
| 22 | - $gjml = mysql_num_rows($gsql); |
|
| 23 | - } |
|
| 24 | - |
|
| 25 | - while ($r = mysql_fetch_array($sql)) { |
|
| 26 | - if ($r[status_menu] == 'M' and !empty($r[link])) { |
|
| 27 | - echo "<li><a href='$r[link]&id_module=$r[id_modul]'><i class='$r[icon]'></i> $r[nama_modul]</a>"; |
|
| 28 | - } elseif ($r[status_menu] == 'M' and empty($r[link])) { |
|
| 29 | - echo "<li><a href='#'><i class='$r[icon]'></i> $r[nama_modul] <span class='fa fa-chevron-down'></span></a>"; |
|
| 30 | - } |
|
| 31 | - |
|
| 32 | - echo'<ul class="nav child_menu" style="display: none">'; |
|
| 33 | - |
|
| 34 | - if ($_SESSION['role'] == 'SA') { |
|
| 35 | - $detil = mysql_query("select * from modul where aktif='Y' and status_menu = 'C' and parentid = '$r[id_modul]' order by urutan"); |
|
| 36 | - } else { |
|
| 37 | - $detil = mysql_query("select distinct c.*
|
|
| 22 | + $gjml = mysql_num_rows($gsql); |
|
| 23 | + } |
|
| 24 | + |
|
| 25 | + while ($r = mysql_fetch_array($sql)) { |
|
| 26 | + if ($r[status_menu] == 'M' and !empty($r[link])) { |
|
| 27 | + echo "<li><a href='$r[link]&id_module=$r[id_modul]'><i class='$r[icon]'></i> $r[nama_modul]</a>"; |
|
| 28 | + } elseif ($r[status_menu] == 'M' and empty($r[link])) { |
|
| 29 | + echo "<li><a href='#'><i class='$r[icon]'></i> $r[nama_modul] <span class='fa fa-chevron-down'></span></a>"; |
|
| 30 | + } |
|
| 31 | + |
|
| 32 | + echo'<ul class="nav child_menu" style="display: none">'; |
|
| 33 | + |
|
| 34 | + if ($_SESSION['role'] == 'SA') { |
|
| 35 | + $detil = mysql_query("select * from modul where aktif='Y' and status_menu = 'C' and parentid = '$r[id_modul]' order by urutan"); |
|
| 36 | + } else { |
|
| 37 | + $detil = mysql_query("select distinct c.*
|
|
| 38 | 38 | from groupmodul b |
| 39 | 39 | inner join modul c |
| 40 | 40 | on b.id_modul = c.id_modul |
@@ -43,17 +43,17 @@ discard block |
||
| 43 | 43 | and c.status_menu='C' |
| 44 | 44 | and c.parentid = '$r[id_modul]' |
| 45 | 45 | order by c.urutan"); |
| 46 | - } |
|
| 47 | - while ($d = mysql_fetch_array($detil)) { |
|
| 48 | - if ($d[is_form] == 'Y') { |
|
| 49 | - echo"<li><a href='modul/mod_$d[link]/form_$d[link].php?width=$d[f_width]&height=$d[f_height]&module=$d[link]&imodule=$imodule&id_module=$id&imenu=$imenu&isub=$isub&TB_iframe=true' title='$d[nama_modul]' class='thickbox' ><i class='$d[fa_icon]'></i>  $d[nama_modul]</a></li>"; |
|
| 50 | - } else { |
|
| 51 | - echo"<li><a href='$d[link]&id_module=$d[id_modul]'><i class='$d[fa_icon]'></i>  $d[nama_modul]</a></li>"; |
|
| 52 | - } |
|
| 53 | - } |
|
| 54 | - |
|
| 55 | - echo'</ul>'; |
|
| 56 | - } |
|
| 46 | + } |
|
| 47 | + while ($d = mysql_fetch_array($detil)) { |
|
| 48 | + if ($d[is_form] == 'Y') { |
|
| 49 | + echo"<li><a href='modul/mod_$d[link]/form_$d[link].php?width=$d[f_width]&height=$d[f_height]&module=$d[link]&imodule=$imodule&id_module=$id&imenu=$imenu&isub=$isub&TB_iframe=true' title='$d[nama_modul]' class='thickbox' ><i class='$d[fa_icon]'></i>  $d[nama_modul]</a></li>"; |
|
| 50 | + } else { |
|
| 51 | + echo"<li><a href='$d[link]&id_module=$d[id_modul]'><i class='$d[fa_icon]'></i>  $d[nama_modul]</a></li>"; |
|
| 52 | + } |
|
| 53 | + } |
|
| 54 | + |
|
| 55 | + echo'</ul>'; |
|
| 56 | + } |
|
| 57 | 57 | |
| 58 | 58 | ?> |
| 59 | 59 | |
@@ -2,7 +2,7 @@ discard block |
||
| 2 | 2 | session_start(); |
| 3 | 3 | include 'config/koneksi.php'; |
| 4 | 4 | |
| 5 | - if ($_SESSION['role'] == 'SA') { |
|
| 5 | + if ($_SESSION['role']=='SA') { |
|
| 6 | 6 | $sql = mysql_query("select * from modul where aktif='Y' and status_menu = 'M' order by urutan"); |
| 7 | 7 | |
| 8 | 8 | $gjml = '1'; |
@@ -23,15 +23,15 @@ discard block |
||
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | while ($r = mysql_fetch_array($sql)) { |
| 26 | - if ($r[status_menu] == 'M' and !empty($r[link])) { |
|
| 26 | + if ($r[status_menu]=='M' and !empty($r[link])) { |
|
| 27 | 27 | echo "<li><a href='$r[link]&id_module=$r[id_modul]'><i class='$r[icon]'></i> $r[nama_modul]</a>"; |
| 28 | - } elseif ($r[status_menu] == 'M' and empty($r[link])) { |
|
| 28 | + } elseif ($r[status_menu]=='M' and empty($r[link])) { |
|
| 29 | 29 | echo "<li><a href='#'><i class='$r[icon]'></i> $r[nama_modul] <span class='fa fa-chevron-down'></span></a>"; |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | echo'<ul class="nav child_menu" style="display: none">'; |
| 33 | 33 | |
| 34 | - if ($_SESSION['role'] == 'SA') { |
|
| 34 | + if ($_SESSION['role']=='SA') { |
|
| 35 | 35 | $detil = mysql_query("select * from modul where aktif='Y' and status_menu = 'C' and parentid = '$r[id_modul]' order by urutan"); |
| 36 | 36 | } else { |
| 37 | 37 | $detil = mysql_query("select distinct c.*
|
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | order by c.urutan"); |
| 46 | 46 | } |
| 47 | 47 | while ($d = mysql_fetch_array($detil)) { |
| 48 | - if ($d[is_form] == 'Y') { |
|
| 48 | + if ($d[is_form]=='Y') { |
|
| 49 | 49 | echo"<li><a href='modul/mod_$d[link]/form_$d[link].php?width=$d[f_width]&height=$d[f_height]&module=$d[link]&imodule=$imodule&id_module=$id&imenu=$imenu&isub=$isub&TB_iframe=true' title='$d[nama_modul]' class='thickbox' ><i class='$d[fa_icon]'></i>  $d[nama_modul]</a></li>"; |
| 50 | 50 | } else { |
| 51 | 51 | echo"<li><a href='$d[link]&id_module=$d[id_modul]'><i class='$d[fa_icon]'></i>  $d[nama_modul]</a></li>"; |
@@ -1,13 +1,13 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | - session_start(); |
|
| 3 | + session_start(); |
|
| 4 | 4 | |
| 5 | - session_destroy(); |
|
| 5 | + session_destroy(); |
|
| 6 | 6 | |
| 7 | - $userid = $_GET['userid']; |
|
| 8 | - $module = $_GET['module']; |
|
| 7 | + $userid = $_GET['userid']; |
|
| 8 | + $module = $_GET['module']; |
|
| 9 | 9 | |
| 10 | - header('location:index.php?userid='.$userid.'&module='.$module.''); |
|
| 10 | + header('location:index.php?userid='.$userid.'&module='.$module.''); |
|
| 11 | 11 | |
| 12 | 12 | // Apabila setelah logout langsung menuju halaman utama website, aktifkan baris di bawah ini: |
| 13 | 13 | |
@@ -47,8 +47,8 @@ discard block |
||
| 47 | 47 | function fnReadDir(&$aReturn, $path) |
| 48 | 48 | { |
| 49 | 49 | $rDir = opendir($path); |
| 50 | - while (($file = readdir($rDir)) !== false) { |
|
| 51 | - if ($file == '.' || $file == '..' || $file == '.DS_Store') { |
|
| 50 | + while (($file = readdir($rDir))!==false) { |
|
| 51 | + if ($file=='.' || $file=='..' || $file=='.DS_Store') { |
|
| 52 | 52 | continue; |
| 53 | 53 | } elseif (is_dir($path.'/'.$file)) { |
| 54 | 54 | fnReadDir($aReturn, $path.'/'.$file); |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | $aFiles = []; |
| 64 | 64 | fnReadDir($aFiles, 'tests'); |
| 65 | 65 | |
| 66 | - for ($i = 0; $i < count($aFiles); $i++) { |
|
| 66 | + for ($i = 0; $i<count($aFiles); $i++) { |
|
| 67 | 67 | $sTemplate; |
| 68 | 68 | $fp = fopen($aFiles[$i], 'r'); |
| 69 | 69 | fscanf($fp, '// DATA_TEMPLATE: %s', $sTemplate); |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | - /* MySQL connection */ |
|
| 2 | + /* MySQL connection */ |
|
| 3 | 3 | include $_SERVER['DOCUMENT_ROOT'].'/datatables/mysql.php'; /* ;-) */ |
| 4 | 4 | |
| 5 | 5 | $gaSql['link'] = mysql_pconnect($gaSql['server'], $gaSql['user'], $gaSql['password']) or |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | <script type="text/javascript" src="../unit_test.js"></script> |
| 21 | 21 | <?php |
| 22 | 22 | $aScripts = explode(':', $_GET['scripts']); |
| 23 | - for ($i = 0; $i < count($aScripts); $i++) { |
|
| 23 | + for ($i = 0; $i<count($aScripts); $i++) { |
|
| 24 | 24 | echo '<script type="text/javascript" src="../'.$aScripts[$i].'?rand='.rand().'"></script>'."\n"; |
| 25 | 25 | } |
| 26 | 26 | ?> |
@@ -82,7 +82,7 @@ |
||
| 82 | 82 | </script> |
| 83 | 83 | <?php |
| 84 | 84 | $aScripts = explode(':', $_GET['scripts']); |
| 85 | - for ($i = 0; $i < count($aScripts); $i++) { |
|
| 85 | + for ($i = 0; $i<count($aScripts); $i++) { |
|
| 86 | 86 | echo '<script type="text/javascript" src="../'.$aScripts[$i].'?rand='.rand().'"></script>'."\n"; |
| 87 | 87 | } |
| 88 | 88 | ?> |
@@ -2,22 +2,22 @@ |
||
| 2 | 2 | |
| 3 | 3 | include 'config/koneksi.php'; |
| 4 | 4 | |
| 5 | - $tampil = mysql_query("SELECT * FROM modul where link !='' ORDER BY urutan"); |
|
| 5 | + $tampil = mysql_query("SELECT * FROM modul where link !='' ORDER BY urutan"); |
|
| 6 | 6 | |
| 7 | - while ($r = mysql_fetch_array($tampil)) { |
|
| 8 | - $p = strlen($r['link']); |
|
| 9 | - $mod = substr($r['link'], 8, $p); |
|
| 7 | + while ($r = mysql_fetch_array($tampil)) { |
|
| 8 | + $p = strlen($r['link']); |
|
| 9 | + $mod = substr($r['link'], 8, $p); |
|
| 10 | 10 | |
| 11 | - // echo"$mod<br>"; |
|
| 12 | - // echo"$_GET[module]<br>"; |
|
| 13 | - // echo"modul/mod_$mod.php<br>"; |
|
| 11 | + // echo"$mod<br>"; |
|
| 12 | + // echo"$_GET[module]<br>"; |
|
| 13 | + // echo"modul/mod_$mod.php<br>"; |
|
| 14 | 14 | // |
| 15 | 15 | |
| 16 | - if ($_GET['module'] == $mod) { |
|
| 17 | - //include "modul/mod_$mod.php"; |
|
| 18 | - include "modul/mod_$mod/$mod.php"; |
|
| 19 | - } |
|
| 20 | - } |
|
| 16 | + if ($_GET['module'] == $mod) { |
|
| 17 | + //include "modul/mod_$mod.php"; |
|
| 18 | + include "modul/mod_$mod/$mod.php"; |
|
| 19 | + } |
|
| 20 | + } |
|
| 21 | 21 | |
| 22 | 22 | // Apabila modul tidak ditemukan |
| 23 | 23 | //else{ |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | // echo"modul/mod_$mod.php<br>"; |
| 14 | 14 | // |
| 15 | 15 | |
| 16 | - if ($_GET['module'] == $mod) { |
|
| 16 | + if ($_GET['module']==$mod) { |
|
| 17 | 17 | //include "modul/mod_$mod.php"; |
| 18 | 18 | include "modul/mod_$mod/$mod.php"; |
| 19 | 19 | } |
@@ -2,11 +2,11 @@ discard block |
||
| 2 | 2 | session_start(); |
| 3 | 3 | include 'config/koneksi.php'; |
| 4 | 4 | |
| 5 | -if ($_SESSION[role] == 'dev') { |
|
| 5 | +if ($_SESSION[role]=='dev') { |
|
| 6 | 6 | $sql = mysql_query("select * from modul where aktif='Y' order by urutan"); |
| 7 | -} elseif ($_SESSION[role] == 'admin') { |
|
| 7 | +} elseif ($_SESSION[role]=='admin') { |
|
| 8 | 8 | $sql = mysql_query("select * from modul where status !='dev' and aktif='Y' order by urutan"); |
| 9 | -} elseif ($_SESSION[role] == 'user') { |
|
| 9 | +} elseif ($_SESSION[role]=='user') { |
|
| 10 | 10 | $sql = mysql_query("select * from modul where status='user' and aktif='Y' order by urutan"); |
| 11 | 11 | } else { |
| 12 | 12 | $sql = mysql_query("SELECT * FROM modul a inner join usermenu b on a.id_modul = b.id_modul where a.status='user' and a.aktif='Y' and b.m_aktif='Y' and b.username='$_SESSION[id_user]' ORDER BY a.urutan"); |
@@ -23,16 +23,16 @@ discard block |
||
| 23 | 23 | //$njml = '('.$cjml.')'; |
| 24 | 24 | //} |
| 25 | 25 | |
| 26 | - if ($r[status_menu] == 'M' and !empty($r[link])) { |
|
| 27 | - if ($r[nama_modul] == 'Notice') { |
|
| 26 | + if ($r[status_menu]=='M' and !empty($r[link])) { |
|
| 27 | + if ($r[nama_modul]=='Notice') { |
|
| 28 | 28 | echo "<a class='menuitem' href='$r[link]'>$r[nama_modul] $njml</a>"; |
| 29 | 29 | } else { |
| 30 | 30 | echo "<a class='menuitem' href='$r[link]'>$r[nama_modul]</a>"; |
| 31 | 31 | } |
| 32 | - } elseif ($r[status_menu] == 'M' and empty($r[link])) { |
|
| 32 | + } elseif ($r[status_menu]=='M' and empty($r[link])) { |
|
| 33 | 33 | echo "<a class='menuitem submenuheader' href='$r[link]'>$r[nama_modul]</a> "; |
| 34 | 34 | |
| 35 | - if ($_SESSION[role] == 'dev' or $_SESSION[role] == 'admin') { |
|
| 35 | + if ($_SESSION[role]=='dev' or $_SESSION[role]=='admin') { |
|
| 36 | 36 | $detil = mysql_query("select * from modul where id_submenu='$r[id_modul]' and status_menu='C' and aktif='Y' order by urutan"); |
| 37 | 37 | } else { |
| 38 | 38 | $detil = mysql_query("select * from modul where id_submenu='$r[id_modul]' and status_menu='C' and aktif='Y' and (id_role = '5' or id_role = '$_SESSION[role]') and (id_group = '1' or id_group = '$_SESSION[group]')order by urutan"); |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | |
| 33 | 33 | $user = $_SESSION['userid']; |
| 34 | 34 | |
| 35 | - $sql = mysql_query("select * from modul where aktif='Y' order by urutan"); |
|
| 35 | + $sql = mysql_query("select * from modul where aktif='Y' order by urutan"); |
|
| 36 | 36 | |
| 37 | 37 | while ($r = mysql_fetch_array($sql)) { |
| 38 | 38 | if ($r[status_menu] == 'M' and !empty($r[link])) { |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | echo'</ul>'; |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | - ?> |
|
| 59 | + ?> |
|
| 60 | 60 | |
| 61 | 61 | |
| 62 | 62 | |
@@ -35,9 +35,9 @@ discard block |
||
| 35 | 35 | $sql = mysql_query("select * from modul where aktif='Y' order by urutan"); |
| 36 | 36 | |
| 37 | 37 | while ($r = mysql_fetch_array($sql)) { |
| 38 | - if ($r[status_menu] == 'M' and !empty($r[link])) { |
|
| 38 | + if ($r[status_menu]=='M' and !empty($r[link])) { |
|
| 39 | 39 | echo "<li class='Aktif'><a href='$r[link]&menu=$r[nama_modul]'>$r[nama_modul]</a>"; |
| 40 | - } elseif ($r[status_menu] == 'M' and empty($r[link])) { |
|
| 40 | + } elseif ($r[status_menu]=='M' and empty($r[link])) { |
|
| 41 | 41 | echo "<li class='Aktif'><a href='#'>$r[nama_modul]</a>"; |
| 42 | 42 | } |
| 43 | 43 | |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | $detil = mysql_query("select * from modul where parentid='$r[id_modul]' and status_menu='C' and aktif='Y' order by urutan"); |
| 47 | 47 | |
| 48 | 48 | while ($d = mysql_fetch_array($detil)) { |
| 49 | - if ($d[is_form] == 'Y') { |
|
| 49 | + if ($d[is_form]=='Y') { |
|
| 50 | 50 | echo"<li><a href='form/form_$d[link].php?width=850&height=600&module=$d[link]&imodule=$imodule&imenu=$imenu&isub=$isub&TB_iframe=true' title='$d[nama_modul]' class='thickbox' >$d[nama_modul]</a></li>"; |
| 51 | 51 | } else { |
| 52 | 52 | echo"<li><a href='$d[link]&menu=$r[nama_modul]&sub=$d[nama_modul]'>$d[nama_modul]</a></li>"; |