Beispiel #1
0
    }
    $fform->notif($q);
} else {
    if ($opt == 'uf' || $opt == 'df') {
        // Prepocessing form
        $r = dbSFA("*", $dbtable, "W/replid='{$cid}'");
    } else {
        $r['departemen'] = gpost('departemen');
        $r['tahunajaran'] = gpost('tahunajaran');
    }
    $fform->head();
    if ($opt == 'af' || $opt == 'uf') {
        require_once MODDIR . 'control.php';
        // Add or Edit form
        $fform->fl('Departemen', departemen_name($r['departemen']));
        $fform->fl('Departemen', tahunajaran_name($r['tahunajaran']));
        $fform->fi('Semester', iText('nama', $r['nama'], 'width:100px'));
        $fform->fa('Keterangan', iTextarea('keterangan', $r['keterangan'], $fform->rwidths, 3));
    } else {
        if ($opt == 'df') {
            // Delete form
            if (intval($r['aktif']) == 1) {
                $fform->reg['dlg_del'] = 'Semester ini masih aktif.<br/ >Apakah anda yakin untuk menghapus <idata> <data>?';
                $fform->dlg_delw($r['nama']);
            } else {
                $fform->dlg_del($r['nama']);
            }
            //$fform->dlg_del($r['nilai']);
        }
    }
    $fform->foot();
Beispiel #2
0
                 $db = siswa_db_bytahunajaran($refid, "sppbulan");
                 $t = $db->query();
                 log_print("mysql_num_rows(t):" . mysql_num_rows($t) . ";");
                 while ($r = mysql_fetch_array($t)) {
                     $pemb['siswa'] = $r['replid'];
                     $pemb['nominal'] = $r['sppbulan'] * 12;
                     $pemb['cicilan'] = $r['sppbulan'];
                     $q = dbInsert("keu_pembayaran", $pemb);
                     if ($q) {
                         $piut += $pemb['nominal'];
                     }
                 }
                 $jur = array();
                 $jur[0] = array('rek' => $inp['rek3'], 'debet' => $piut, 'kredit' => 0);
                 $jur[1] = array('rek' => $inp['rek2'], 'debet' => 0, 'kredit' => $piut);
                 $q = transaksi_posting_auto("Target pendapatan sekolah tahun ajaran " . tahunajaran_name($refid) . ".", $jur);
             }
         }
     }
 } else {
     if ($opt == 'u') {
         // edit
         $q = dbUpdate($dbtable, $inp, "replid='{$cid}'");
     } else {
         if ($opt == 'd') {
             // delete
             $q = dbDel($dbtable, "replid='{$cid}'");
         }
     }
 }
 $fform->notif($q);
Beispiel #3
0
        }
    }
    $fform->notif($q);
} else {
    if ($opt == 'uf' || $opt == 'df') {
        // Prepocessing form
        $r = dbSFA("*", $dbtable, "W/replid='{$cid}'");
    } else {
        $r = app_form_gpost('departemen', 'tahunajaran', 'nama', 'keterangan');
    }
    $fform->head();
    if ($opt == 'af' || $opt == 'uf') {
        require_once MODDIR . 'control.php';
        // Add or Edit form
        $fform->fl('Departemen', departemen_name($r['departemen']));
        $fform->fl('Tahun ajaran', tahunajaran_name($r['tahunajaran']));
        $fform->fi('Nama Kelompok', iText('nama', $r['nama'], $fform->rwidths));
        $fform->fa('Keterangan', iTextarea('keterangan', $r['keterangan'], $fform->rwidths, 3));
    } else {
        if ($opt == 'df') {
            // Delete form
            if (0 > 0) {
                $fform->reg['dlg_del'] = 'Tingkat masih digunakan. Apakah anda yakin untuk menghapus <idata> <data>?';
                $fform->dlg_delw($r[$fmod], 'Data-data kelas dan siswa yang termasuk dalam tingkat ini juga akan dihapus. Data yang sudah dihapus tidak dapat dikembalikan.');
            } else {
                $fform->dlg_del(matapelajaran_name($r['nama']));
            }
            //$fform->dlg_del($r['nilai']);
        }
    }
    $fform->foot();
         kelas_warn(0, 'float:left');
         $PSBar->pass = false;
     }
 }
 $PSBar->end();
 // view
 if ($PSBar->pass) {
     if ($opt == 'af' || $opt == 'uf') {
         //form :: add n edit
         require_once VWDIR . 'siswa_form.php';
     } else {
         // tabel :: view
         $xtable = new xtable($fmod, 'siswa');
         $xtable->search_keyon('nis=>aka_siswa.nis:EQ', 'nama=>aka_siswa.nama:LIKE');
         $xtable->docname = "Data Siswa Kelas " . kelas_name($kls) . " T.A. " . tahunajaran_name($tajar);
         $xtable->printparams = array('kelas' => kelas_name($kls), 'tahunajaran' => tahunajaran_name($tajar));
         $db = siswa_db_bykelas($kls, $ting, "nisn,tmplahir,tgllahir");
         $db->where_and($xtable->search_sql_get());
         $t = $xtable->use_db($db, $xtable->pageorder_sql('nis', 'nisn', 'nama'));
         $xtable->btnbar_f('add', 'print', 'srcbox');
         if ($xtable->ndata > 0) {
             $xtable->head('@!NIS', '@!NISN', '@nama', 'Tempat Tanggal lahir');
             while ($r = mysql_fetch_array($t)) {
                 $xtable->row_begin();
                 $xtable->td($r['nis'], 80);
                 $xtable->td($r['nisn'], 200);
                 $xtable->td($r['nama']);
                 $xtable->td($r['tmplahir'] . ', ' . fftgl($r['tgllahir']), 100);
                 $s = '<button class="btn" title="Keluarkan siswa dari kelas ini." onclick="siswa_pendataan_kelas_form(\'df\',\'' . $r['replid'] . '\')"><div class="bi_canb">&nbsp;</div></button>';
                 $xtable->opt($r['replid'], 'v', $s);
                 $xtable->row_end();