Example #1
0
function departemen_r(&$a, $s = 0)
{
    $ADMIN = admin_get();
    $dept = array();
    $in = false;
    $d = 0;
    if ($s == 1) {
        $dept[0] = '- Semua -';
    }
    $s = "SELECT * FROM departemen ORDER BY urut";
    // var_dump($s);exit();
    $t = mysql_query($s);
    while ($r = mysql_fetch_array($t)) {
        $dept[$r['replid']] = $r['nama'];
        if ($d == 0) {
            $d = $r['replid'];
        }
        if ($r['replid'] == $a) {
            $in = true;
        }
    }
    if (!$in) {
        // $in == true
        if (!empty($_SESSION['sdepartemen'])) {
            $a = $_SESSION['sdepartemen'];
        } else {
            $a = $s == 0 ? $d : 0;
        }
    }
    if ($ADMIN['dept'] != 0) {
        $a = $ADMIN['dept'];
    }
    $_SESSION['sdepartemen'] = $a;
    return $dept;
}
Example #2
0
function admin_is_alldept()
{
    $ADMIN = admin_get();
    if ($ADMIN['dept'] == 0) {
        return true;
    } else {
        return false;
    }
}
Example #3
0
            } else {
                echo "3";
            }
        } else {
            echo "2";
        }
    } else {
        echo "1";
    }
    //echo "UPDATE admin SET passwd='$new' WHERE replid='$cid'";
    exit;
}
// form Module
$fmod = "setting";
$dbtable = "Pengaturan";
$admin = admin_get();
$fform = new fform($fmod, $opt, $admin['id'], 'Pengaturan akun');
$fform->reg['title_uf'] = '<idata>';
$inp = app_form_gpost('cicilan', 'keterangan');
if ($opt == 'a' || $opt == 'u' || $opt == 'd') {
    $q = false;
    if ($opt == 'a') {
        // add
        $q = dbInsert($dbtable, $inp);
    } else {
        if ($opt == 'u') {
            // edit
            $q = dbUpdate($dbtable, $inp, "replid='{$cid}'");
        } else {
            if ($opt == 'd') {
                // delete
Example #4
0
function guru_pegawaiId(){
	$a=admin_get();
	return $a['pegawai'];
}
Example #5
0
?>
<div id="loader2" class="loader" style="display:none"></div>
<table id="ctable" class="xtable" style="float:left" border="1" cellspacing="1px" cellpadding="4px" width="100%">
<tr>
	<th>Kriteria</th>
	<th>Golongan</th>
	<th class="alr" width="150px">Besar Biaya Pendaftaran</th>
	<th class="alr" width="150px">Besar Uang Pangkal</th>
	<th class="alr" width="150px">Besar Uang Sekolah</th>
</tr>
<?php 
$x = $ndata > 2 ? 1 : 0;
$tfield = 'x';
$tfield2 = 'x';
$t = mysql_query("SELECT * FROM psb_kriteria");
$ADMIN = admin_get();
while ($r = mysql_fetch_array($t)) {
    $q = mysql_query("SELECT * FROM psb_golongan");
    $ng = mysql_num_rows($q);
    $fr = true;
    $x = $x == 0 ? 1 : 0;
    ?>
	<tr class="xtrx">
		<td width="250px" rowspan="<?php 
    echo $ng;
    ?>
"><?php 
    echo $r['kriteria'] . ($r['keterangan'] == '' ? '' : ' : ' . $r['keterangan']);
    ?>
</td>
	<?php