<h3 id="myModalLabel">Edit Permission</h3> </div> <!-- tempat untuk menampilkan form mahasiswa --> <div class="modal-body"></div> <div class="modal-footer"> <button id="simpan-permission" class="submit">Update</button> </div> </div> <!-- akhir kode modal dialog --> <?php break; case 'rpt-akses': $l = anti($_GET['level']); echo '<h3>Settings Report Akses ' . $l . '</h3>'; echo '<hr width="445" align="left">'; if (NULL !== cekData('ypos_grouplvlmdl', "idlevel={$id} && modulID=7 && r='Y'")) { ?> <table> <tr bgcolor="#78d0ed"> <th width="25">No</th> <th align="centre" width="350">Report Name</th> <th align="center"></th> </tr> <form method="post" action="<?php echo $set->folder_modul . '/' . $modul; ?> /aksi.php?<?php echo $set->folder_modul . '=' . $modul . '&sub=rpt-akses&level=' . anti($_GET['level']) . '&id=' . $id; ?> " name="form" id="form"> <?php
<?php session_start(); include '../../config/connect.php'; include '../../config/function.php'; include '../../config/config.php'; if (NULL !== cekAkses("{$modul}", "{$_SESSION['ylevel']}", "{$act}")) { $kat = anti($_POST['kat']); switch ($_POST['tipe']) { case 'save': //cek data yang sama if (NULL !== cekData('ypos_kategori', "nama_kat='{$kat}'")) { header("location:../../{$set->folder_modul}={$modul}&msg=error&errno=1000&nama={$kat}"); } else { yposSQL('ADD', 'ypos_kategori', "ids='{$_SESSION['yids']}', nama_kat='{$kat}'"); header("location:../../{$set->folder_modul}={$modul}&msg=done"); } break; case 'edit': header("location:../../{$set->folder_modul}={$modul}&msg=error&errno=1000&nama={$kat}"); yposSQL('EDIT', 'ypos_kategori', "nama_kat='{$kat}'", "idkat={$id}"); header("location:../../{$set->folder_modul}={$modul}&msg=done"); break; } } else { header("location:../../{$set->folder_modul}={$modul}&msg=error&errno=1045"); }
session_start(); include '../../config/connect.php'; include '../../config/function.php'; include '../../config/config.php'; if (NULL !== cekAkses("{$modul}", "{$_SESSION['ylevel']}", "{$act}")) { $nama = anti($_POST['nm']); $hp = anti($_POST['hp']); $pass = md5($_POST['pass']); $lvl = anti($_POST['level']); $user = anti($_POST['username']); @($sts = anti($_POST['aktif'])); switch (@$_POST['tipe']) { case 'add': //cek apakah ada data yang sama if (NULL !== cekData('ypos_users', "username='******'")) { header("location:../../{$set->folder_modul}={$modul}&msg=error&errno=1000"); } else { yposSQL('ADD', 'ypos_users', "username='******', nama_lengkap='{$nama}', pass='******', hp='{$hp}', level='{$lvl}', ids='{$_SESSION['yids']}'"); header("location:../../index.php?{$set->folder_modul}={$modul}&msg=done"); } break; case 'edit': if (!empty($_POST['pass'])) { yposSQL('EDIT', 'ypos_users', "nama_lengkap='{$nama}', pass='******', hp='{$hp}', aktif='{$sts}', level='{$lvl}'", "username='******' && 1=1"); } else { yposSQL('EDIT', 'ypos_users', "nama_lengkap='{$nama}', hp='{$hp}', aktif='{$sts}', level='{$lvl}'", "username='******' && 1=1"); } header("location:../../index.php?{$set->folder_modul}={$modul}&msg=done"); break; }
header("location:../../index.php?{$set->folder_modul}={$modul}&sub=parameter&msg=error&errno=1000"); } else { yposSQL('EDIT', 'ypos_parameter', "nama_param='{$prm}', ket='{$desc}', userid='{$_SESSION['yuser']}'", "idpm={$id}"); header("location:../../index.php?{$set->folder_modul}={$modul}&sub=parameter&msg=done"); } break; case 'addPrmChild': $prm = anti($_POST['nm']); $desc = anti($_POST['desc']); if (NULL !== cekData('ypos_paramchild', "child_name='{$prm}'")) { header("location:../../index.php?{$set->folder_modul}={$modul}&sub=parameter-child&id={$id}&msg=error&errno=1000"); } else { yposSQL('ADD', 'ypos_paramchild', "child_name='{$prm}', idpm={$id}, ket='{$desc}', aktif='Y'"); header("location:../../index.php?{$set->folder_modul}={$modul}&sub=parameter-child&id={$id}&msg=done"); } break; case 'edPrmChild': $idpc = abs((int) $_GET['idpc']); $prm = anti($_POST['nm']); $desc = anti($_POST['desc']); if (NULL !== cekData('ypos_paramchild', "idpc != {$idpc} && child_name='{$prm}'")) { header("location:../../index.php?{$set->folder_modul}={$modul}&sub=parameter-child&id={$id}&msg=error&errno=1000"); } else { yposSQL('EDIT', 'ypos_paramchild', "child_name='{$prm}', idpm={$id}, ket='{$desc}', aktif='{$aktif}'", "idpc={$idpc}"); header("location:../../index.php?{$set->folder_modul}={$modul}&sub=parameter-child&id={$id}&msg=done"); } break; } } else { echo $akses; }