Esempio n. 1
0
function Edit($md, $gel, $id)
{
    $sisfo = GetFields('identitas', 'Kode', KodeID, '*');
    if ($md == 0) {
        $jdl = 'Edit Data PMB';
        $w = GetFields('pmb', 'PMBID', $id, '*');
        CekSudahProsesNIM($w);
        $JumlahPilihan = GetaField('pmbformulir', "PMBFormulirID = '{$w['PMBFormulirID']}' and KodeID", KodeID, 'JumlahPilihan');
        if (empty($JumlahPilihan)) {
            $JumlahPilihan = 3;
        }
        if ($JumlahPilihan == 1) {
            $da2 = "disabled";
            $da3 = "disabled";
        } else {
            if ($JumlahPilihan == 2) {
                $da2 = '';
                $da3 = "disabled";
            } else {
                $da2 = '';
                $da3 = '';
            }
        }
        $_PMBID = "<b>{$w['PMBID']}</b>";
    } elseif ($md == 1) {
        $jdl = 'Masukkan Data PMB';
        $w = array();
        $w['TanggalLahir'] = date('Y-m-d');
        $_PMBID = "<font color=red>Auto-generated</font>";
        $da2 = '';
        $da3 = '';
    } else {
        die(ErrorMsg('Error', "Mode edit <b>{$md}</b> tidak dikenali.<br />\r\n    Hubungi Sysadmin untuk informasi lebih lanjut.\r\n    <hr size=1 color=silver />\r\n    <input type=button name='Tutup' value='Tutup' onClick=\"window.close()\" />"));
    }
    // Parameters
    $TanggalLahir = GetDateOption($w['TanggalLahir'], 'TanggalLahir');
    $optfrm = GetOption2('pmbformulir', "concat(Nama, ' (', JumlahPilihan, ' pilihan)')", 'Nama', $w['PMBFormulirID'], "KodeID='" . KodeID . "'", 'PMBFormulirID');
    $optstawal = GetOption2('statusawal', "concat(StatusAwalID, ' - ', Nama)", 'StatusAwalID', $w['StatusAwalID'], '', 'StatusAwalID');
    $optkel = GetOption2('kelamin', "concat(Kelamin, ' - ', Nama)", 'Kelamin', $w['Kelamin'], '', 'Kelamin');
    $optagm = GetOption2('agama', "concat(Agama, ' - ', Nama)", 'Agama', $w['Agama'], '', 'Agama');
    $optagamaayah = GetOption2('agama', "concat(Agama, ' - ', Nama)", 'Agama', $w['AgamaAyah'], '', 'Agama');
    $optagamaibu = GetOption2('agama', "concat(Agama, ' - ', Nama)", 'Agama', $w['AgamaIbu'], '', 'Agama');
    $optsipil = GetOption2('statussipil', "concat(StatusSipil, ' - ', Nama)", 'StatusSipil', $w['StatusSipil'], '', 'StatusSipil');
    $optpendidikan = GetOption2('pendidikanterakhir', "PendidikanTerakhir", 'Urutan', $w['PendidikanTerakhir'], '', 'PendidikanTerakhir');
    $optpendidikanayah = GetOption2('jenjang', "concat(JenjangID, '. ', Nama)", 'JenjangID', $w['PendidikanAyah'], '', 'JenjangID');
    $optpendidikanibu = GetOption2('jenjang', "concat(JenjangID, '. ', Nama)", 'JenjangID', $w['PendidikanIbu'], '', 'JenjangID');
    $opthidupayah = GetOption2('hidup', 'Nama', 'Hidup', $w['HidupAyah'], '', 'Hidup');
    $opthidupibu = GetOption2('hidup', 'Nama', 'Hidup', $w['HidupIbu'], '', 'Hidup');
    $optprg = GetOption2('program', "concat(ProgramID, ' - ', Nama)", 'ProgramID', $w['ProgramID'], "KodeID='" . KodeID . "'", 'ProgramID');
    $optwarganegara = GetOption2('warganegara', "WargaNegara", 'WargaNegara', $w['WargaNegara'], '', 'WargaNegara');
    $Pilihan2 = GetPilihan2($w, $da2, $da3);
    $arraytinggal = array('Orang Tua', 'Wali', 'Sendiri');
    $opttinggaldengan = GetOptionsFromData($arraytinggal, $w['TinggalDengan']);
    $optpenghasilanayah = GetOption2('penghasilanortu', "Nama", 'PenghasilanOrtuID', $w['PenghasilanAyah'], '', 'Nama');
    $optpenghasilanibu = GetOption2('penghasilanortu', "Nama", 'PenghasilanOrtuID', $w['PenghasilanIbu'], '', 'Nama');
    $arrPrestasiTambahan = explode('~', $w['PrestasiTambahan']);
    $s1 = "select PMBFormulirID, JumlahPilihan from pmbformulir where KodeID='" . KodeID . "' and NA='N'";
    $r1 = _query($s1);
    while ($w1 = _fetch_array($r1)) {
        $hiddenformdata .= "<input type=hidden id='Form{$w1['PMBFormulirID']}' name='Form{$w1['PMBFormulirID']}' value='{$w1['JumlahPilihan']}' />";
    }
    // Tampilkan
    TampilkanJudul($jdl);
    CheckFormScript("Nama,TempatLahir,Kelamin,ProgramID,PMBFormulirID");
    JumlahPilihanScript();
    echo "<table class=bsc cellspacing=1 width=800>\r\n  <form name='frmisi' action='?mnux={$_SESSION['mnux']}' method=POST onSubmit=\"return CheckForm(this)\" />\r\n  <input type=hidden name='gel' value='{$gel}' />\r\n  <input type=hidden name='md' value='{$md}' />\r\n  <input type=hidden name='gos' value='Simpan' />\r\n  {$hiddenformdata}\r\n  \r\n  <tr>\r\n      <td class=inp>No. Peserta:</td>\r\n      <td class=ul1>{$_PMBID}</td>\r\n\t  <td class=inp>Status:</td>\r\n\t  <td class=ul1><select name='StatusAwalID' disabled>{$optstawal}</select></td>\r\n  </tr>\r\n  \r\n  <tr><th class=ttl colspan=4>Data Pribadi Cama</th></tr>\r\n  <tr><td class=inp>Nama Lengkap:</td>\r\n      <td class=ul1 colspan=3>\r\n      <input type=text name='Nama' value='{$w['Nama']}' size=30 maxlength=50 />\r\n      </td></tr>\r\n  <tr><td class=inp>Warga Negara:</td>\r\n      <td class=ul1><select name='WargaNegara'>{$optwarganegara}</select></td>\r\n      <td class=inp>Kebangsaan:</td>\r\n      <td class=ul1><input type=text name='Kebangsaan' value='{$w['Kebangsaan']}' size=20 maxlength=50 /></td>\r\n      </tr>\r\n  <tr><td class=inp>Tanggal Lahir:</td>\r\n      <td class=ul1>{$TanggalLahir}</td>\r\n\t  <td class=inp>Tempat Lahir:</td>\r\n      <td class=ul1><input type=text name='TempatLahir' value='{$w['TempatLahir']}' size=20 maxlength=50 /></td>\r\n      </tr>\r\n  <tr><td class=inp>Jenis Kelamin:</td>\r\n      <td class=ul1><select name='Kelamin'>{$optkel}</select></td>\r\n      <td class=inp>Golongan Darah:</td>\r\n      <td class=ul1><input style='text-transform: uppercase' type=text name='GolonganDarah' value='{$w['GolonganDarah']}' size=5 maxlength=10 /></td>\r\n      </tr>\r\n  <tr><td class=inp>Agama:</td>\r\n      <td class=ul1><select name='Agama'>{$optagm}</select></td>\r\n      <td class=inp>Status Perkawinan:</td>\r\n      <td class=ul1><select name='StatusSipil'>{$optsipil}</select></td>\r\n      </tr>\r\n  <tr><td class=inp>Tinggi Badan:</td>\r\n      <td class=ul1><input type=text name='TinggiBadan' value='{$w['TinggiBadan']}' size=3 maxlength=5 /> cm</td>\r\n      <td class=inp>Berat Badan:</td>\r\n      <td class=ul1><input type=text name='BeratBadan' value='{$w['BeratBadan']}' size=3 maxlength=5 /> kg</td>\r\n      </tr>\r\n\t  \r\n  <tr><th class=ttl colspan=4>Pilihan Program Studi</th></tr>\r\n  <tr>\r\n      <td class=inp>Formulir:</td>\r\n      <td class=ul1 colspan=3>\r\n        <select name='PMBFormulirID' onChange=\"UbahJumlahPilihan()\">{$optfrm}</select > <br />\r\n        </td>\r\n      </tr>\r\n  <tr><td class=inp>Program Pendidikan:</td>\r\n      <td class=ul1 colspan=3>\r\n      <select name='ProgramID'>{$optprg}</select>\r\n      </td></tr>    \r\n  {$Pilihan2}\r\n  <tr><th class=ttl colspan=4>Pendidikan Terakhir dan Prestasi Lainnya:</th></tr>\r\n  <tr><td class=inp>Pendidikan Terakhir:</td>\r\n      <td class=ul1><select name='PendidikanTerakhir'>{$optpendidikan}</select></td>\r\n      <td class=inp>Asal Sekolah:</td>\r\n      <td class=ul1><input type=text name='AsalSekolah' value='{$w['AsalSekolah']}' size=20 maxlength=50 /></td>\r\n      </tr>\r\n  <tr><td class=inp>Tahun Lulus:</td>\r\n      <td class=ul1><input type=text name='TahunLulus' value='{$w['TahunLulus']}' size=10 maxlength=10 /></td>\r\n      <td class=inp>Nilai Ijazah:</td>\r\n      <td class=ul1><input type=text name='NilaiSekolah' value='{$w['NilaiSekolah']}' size=10 maxlength=10 />\r\n\t\t\t\t\t<br><font color=red>*) Masukkan dalam rentang 0.00-10.00</font></td>\r\n      </tr>\r\n  <tr><td class=inp>Prestasi Lainnya:</td>\r\n\t  <td class=ul1 colspan=3><input type=text name='PrestasiTambahan1' value='{$arrPrestasiTambahan['0']}' size=80 maxlength=100 ></td>\r\n  </tr>\r\n  <tr><td></td>\r\n\t  <td class=ul1 colspan=3><input type=text name='PrestasiTambahan2' value='{$arrPrestasiTambahan['1']}' size=80 maxlength=100></td>\r\n  </tr>\r\n  <tr><td></td>\r\n      <td class=ul1 colspan=3><input type=text name='PrestasiTambahan3' value='{$arrPrestasiTambahan['2']}' size=80 maxlength=100></br>\r\n\t  *) <i>Prestasi dapat berupa prestasi apa saja di bidang <b>seni</b>, <b>olahraga</b>, atau <b>akademik</b>. </i></br>\r\n\t  *) <i>Harap menuliskan <b>peringkat</b>, <b>nama lengkap kompetisi/event</b> dan <b>tahun</b> peraihan prestasi bila memungkinkan<i> \r\n\t  </td>\r\n  </tr>\r\n  \r\n  <tr><th class=ttl colspan=4>Alamat</th></tr>\r\n  <tr><td class=inp>Alamat lengkap:</td>\r\n      <td class=ul1 colspan=3>\r\n      <textarea name='Alamat' cols=70 rows=4>{$w['Alamat']}</textarea>\r\n      </td></tr>\r\n  <tr><td class=inp>RT/RW:</td>\r\n      <td class=ul1><input type=text name='RT' value='{$w['RT']}' size=10 maxlength=10 />\r\n      / <input type=text name='RW' value='{$w['RW']}' size=10 maxlength=10 /></td>\r\n      <td class=inp>Kode Pos:</td>\r\n      <td class=ul1><input type=text name='KodePos' value='{$w['KodePos']}' size=10 maxlength=10 /></td>\r\n      </tr>\r\n  <tr><td class=inp>Kota/Kabupaten:</td>\r\n      <td class=ul1><input type=text name='Kota' value='{$w['Kota']}' size=20 maxlength=50 /></td>\r\n      <td class=inp>Propinsi:</td>\r\n      <td class=ul1><input type=text name='Propinsi' value='{$w['Propinsi']}' size=20 maxlength=50 /></td>\r\n      </tr>\r\n  <tr><td class=inp>Telpon/ponsel:</td>\r\n      <td class=ul1>\r\n        <input type=text name='Telepon' value='{$w['Telepon']}' size=10 maxlength=50 /> /\r\n        <input type=text name='Handphone' value='{$w['Handphone']}' size=10 maxlength=50 />\r\n      </td>\r\n      <td class=inp>E-mail:</td>\r\n      <td class=ul1>\r\n        <input type=text name='Email' value='{$w['Email']}' size=20 maxlength=50 />\r\n      </td></tr>\r\n  \r\n  <tr><th class=ttl colspan=4>Data Orangtua</th></tr>\r\n  <tr><td class=inp>Nama Ayah:</td>\r\n      <td class=ul1><input type=text name='NamaAyah' value='{$w['NamaAyah']}' size=20 maxlength=50 /></td>\r\n      <td class=inp>Nama Ibu:</td>\r\n      <td class=ul1><input type=text name='NamaIbu' value='{$w['NamaIbu']}' size=20 maxlength=50 /></td>\r\n      </tr>\r\n  <tr><td class=inp>Agama Ayah:</td>\r\n      <td class=ul1><select name='AgamaAyah' />{$optagamaayah}</td>\r\n      <td class=inp>Agama Ibu:</td>\r\n      <td class=ul1><select name='AgamaIbu' />{$optagamaibu}</td>\r\n      </tr>\r\n  <tr><td class=inp>Pendidikan Ayah:</td>\r\n      <td class=ul1><select name='PendidikanAyah'>{$optpendidikanayah}</select></td>\r\n      <td class=inp>Pendidikan Ibu:</td>\r\n      <td class=ul1><select name='PendidikanIbu'>{$optpendidikanibu}</select></td>\r\n      </tr>\r\n  <tr><td class=inp>Pekerjaan Ayah:</td>\r\n      <td class=ul1><input type=text name='PekerjaanAyah' value='{$w['PekerjaanAyah']}' size=20 maxlength=50 /></td>\r\n      <td class=inp>Pekerjaan Ibu:</td>\r\n      <td class=ul1><input type=text name='PekerjaanIbu' value='{$w['PekerjaanIbu']}' size=20 maxlength=50 /></td>\r\n      </tr>\r\n  <tr><td class=inp>Penghasilan/bulan:</td>\r\n      <td class=ul1><select name='PenghasilanAyah'>{$optpenghasilanayah}</select></td>\r\n      <td class=inp>Penghasilan/bulan:</td>\r\n      <td class=ul1><select name='PenghasilanIbu'>{$optpenghasilanibu}</select></td>\r\n      </tr>\r\n  <tr><td class=inp>Status Kehidupan:</td>\r\n      <td class=ul1><select name='HidupAyah'>{$opthidupayah}</select></td>\r\n      <td class=inp>Status kehidupan:</td>\r\n      <td class=ul1><select name='HidupIbu'>{$opthidupibu}</select></td>\r\n      </tr>\r\n  \r\n  <tr><th class=ttl colspan=4>Alamat Orangtua</th></tr>\r\n  <tr><td class=inp>Alamat lengkap:</td>\r\n      <td class=ul1 colspan=3>\r\n      <textarea name='AlamatOrtu' cols=70 rows=4>{$w['AlamatOrtu']}</textarea>\r\n      </td></tr>\r\n  <tr><td class=inp>RT/RW:</td>\r\n      <td class=ul1><input type=text name='RTOrtu' value='{$w['RTOrtu']}' size=10 maxlength=10 />\r\n      / <input type=text name='RWOrtu' value='{$w['RWOrtu']}' size=10 maxlength=10 /></td>\r\n      <td class=inp>Kode Pos:</td>\r\n      <td class=ul1><input type=text name='KodePosOrtu' value='{$w['KodePosOrtu']}' size=10 maxlength=10 /></td>\r\n      </tr>\r\n  <tr><td class=inp>Kota:</td>\r\n      <td class=ul1><input type=text name='KotaOrtu' value='{$w['KotaOrtu']}' size=20 maxlength=50 /></td>\r\n      <td class=inp>Propinsi:</td>\r\n      <td class=ul1><input type=text name='PropinsiOrtu' value='{$w['PropinsiOrtu']}' size=20 maxlength=50 /></td>\r\n      </tr>\r\n  <tr><td class=inp>Telpon/ponsel:</td>\r\n      <td class=ul1>\r\n        <input type=text name='TeleponOrtu' value='{$w['TeleponOrtu']}' size=10 maxlength=50 /> /\r\n        <input type=text name='HandphoneOrtu' value='{$w['HandphoneOrtu']}' size=10 maxlength=50 />\r\n      </td>\r\n      <td class=inp>E-mail:</td>\r\n      <td class=ul1>\r\n        <input type=text name='EmailOrtu' value='{$w['EmailOrtu']}' size=20 maxlength=50 />\r\n      </td></tr>\r\n  \r\n  <tr><td class=ul1 colspan=4 align=center>\r\n      <input type=submit name='Simpan' value='Simpan' />\r\n      <input type=button name='Batal' value='Batal' onClick=\"window.close()\" />\r\n      </td></tr>\r\n  \r\n  </form>\r\n  </table>";
}
Esempio n. 2
0
function Edit($md, $gel, $id)
{
    $sisfo = GetFields('identitas', 'Kode', KodeID, '*');
    if ($md == 0) {
        $jdl = 'Edit Data PMB';
        $w = GetFields('pmb', 'PMBID', $id, '*');
        CekSudahProsesNIM($w);
        $JumlahPilihan = GetaField('pmbformulir', "PMBFormulirID = '{$w['PMBFormulirID']}' and KodeID", KodeID, 'JumlahPilihan');
        if (empty($JumlahPilihan)) {
            $JumlahPilihan = 3;
        }
        if ($JumlahPilihan == 1) {
            $da2 = "disabled";
            $da3 = "disabled";
        } else {
            if ($JumlahPilihan == 2) {
                $da2 = '';
                $da3 = "disabled";
            } else {
                $da2 = '';
                $da3 = '';
            }
        }
        $_PMBID = "<input type=hidden id='id' name='id' value='{$w['PMBID']}'><b>{$w['PMBID']}</b>";
    } elseif ($md == 1) {
        $jdl = 'Masukkan Data PMB';
        $w = array();
        $w['StatusAwalID'] = 'B';
        $w['StatusAwalID2'] = 'N';
        $w['TanggalLahir'] = date('Y-m-d');
        $_PMBID = "<font color=red>Auto-generated</font><input type=hidden id='id' name='id' value='{$w['PMBID']}'><b>{$w['PMBID']}</b>";
        $da2 = '';
        $da3 = '';
    } else {
        die(ErrorMsg('Error', "Mode edit <b>{$md}</b> tidak dikenali.<br />\r\n    Hubungi Sysadmin untuk informasi lebih lanjut.\r\n    <hr size=1 color=silver />\r\n    <input type=button name='Tutup' value='Tutup' onClick=\"window.close()\" />"));
    }
    // Parameters
    $TanggalLahir = GetDateOption($w['TanggalLahir'], 'TanggalLahir');
    $optfrm = GetOption2('pmbformulir', "concat(Nama, ' (', JumlahPilihan, ' pilihan)')", 'Nama', $w['PMBFormulirID'], "KodeID='" . KodeID . "'", 'PMBFormulirID');
    if ($_SESSION[_LevelID] == 50) {
        $StatusAwalID = "PM";
        $where = " StatusAwalID = 'PM' ";
    } else {
        $StatusAwalID = $w['StatusAwalID'];
        $where = "";
    }
    $optstawal = GetOption2("statusawal", "concat(StatusAwalID, ' - ', Nama)", "StatusAwalID", $StatusAwalID, $where, "StatusAwalID");
    $statusawalid2checked = $w['StatusAwalID2'] == 'Y' ? 'checked' : '';
    $optkel = GetOption2('kelamin', "concat(Kelamin, ' - ', Nama)", 'Kelamin', $w['Kelamin'], '', 'Kelamin');
    $optagm = GetOption2('agama', "concat(Agama, ' - ', Nama)", 'Agama', $w['Agama'], '', 'Agama');
    $optagamaayah = GetOption2('agama', "concat(Agama, ' - ', Nama)", 'Agama', $w['AgamaAyah'], '', 'Agama');
    $optagamaibu = GetOption2('agama', "concat(Agama, ' - ', Nama)", 'Agama', $w['AgamaIbu'], '', 'Agama');
    $optsipil = GetOption2('statussipil', "concat(StatusSipil, ' - ', Nama)", 'StatusSipil', $w['StatusSipil'], '', 'StatusSipil');
    $optpendidikan = GetOption2('pendidikanterakhir', "PendidikanTerakhir", 'Urutan', $w['PendidikanTerakhir'], '', 'PendidikanTerakhir');
    $optpendidikanayah = GetOption2('jenjang', "concat(JenjangID, '. ', Nama)", 'JenjangID', $w['PendidikanAyah'], '', 'JenjangID');
    $optpendidikanibu = GetOption2('jenjang', "concat(JenjangID, '. ', Nama)", 'JenjangID', $w['PendidikanIbu'], '', 'JenjangID');
    $opthidupayah = GetOption2('hidup', 'Nama', 'Hidup', $w['HidupAyah'], '', 'Hidup');
    $opthidupibu = GetOption2('hidup', 'Nama', 'Hidup', $w['HidupIbu'], '', 'Hidup');
    $optprg = GetOption2('program', "concat(ProgramID, ' - ', Nama)", 'ProgramID', $w['ProgramID'], "KodeID='" . KodeID . "'", 'ProgramID');
    $optwarganegara = GetOption2('warganegara', "WargaNegara", 'WargaNegara', $w['WargaNegara'], '', 'WargaNegara');
    $Pilihan2 = GetPilihan2($w, $da2, $da3);
    $optpenghasilanayah = GetOption2('penghasilanortu', "Nama", 'PenghasilanOrtuID', $w['PenghasilanAyah'], '', 'Nama');
    $optpenghasilanibu = GetOption2('penghasilanortu', "Nama", 'PenghasilanOrtuID', $w['PenghasilanIbu'], '', 'Nama');
    $opttempattinggal = GetOption2('tempattinggal', "Nama", 'TempatTinggalID', $w['TempatTinggal'], '', '');
    $optbiayastudi = GetOption2('biayastudi', "Nama", 'BiayaStudiID', $w['BiayaStudi'], '', '');
    $arrPrestasiTambahan = explode('~', $w['PrestasiTambahan']);
    $NamaSekolah = GetaField('asalsekolah', 'SekolahID', $w['AsalSekolah'], "concat(Nama, ', ', Kota)");
    $opttempatkuliah = GetOption2('tempatkuliah', 'Nama', 'TempatKuliahID', $w['TempatKuliahID'], '', 'Nama', 0, 0);
    $s1 = "select PMBFormulirID, JumlahPilihan from pmbformulir where KodeID='" . KodeID . "' and NA='N'";
    $r1 = _query($s1);
    while ($w1 = _fetch_array($r1)) {
        $hiddenformdata .= "<input type=hidden id='Form{$w1['PMBFormulirID']}' name='Form{$w1['PMBFormulirID']}' value='{$w1['JumlahPilihan']}' />";
    }
    // Tampilkan
    TampilkanJudul($jdl);
    echo "<script>\r\n\tfunction carinomor(frm)\r\n\t{\t\r\n\t\ttemp = frm.AplikanID.value;\r\n\t\t\r\n\t\tif(temp!='')\r\n\t\t{\r\n\t\t\t\tid = document.getElementById('id').value;\r\n\t\t\t\tlnk = '../{$_SESSION['mnux']}.isi.cari.php?gel='+frmisi.gel.value+'&id='+id+'&n='+temp;\r\n\t\t\t\twin2 = window.open(lnk, '', 'width=900, height=600, scrollbars, status');\r\n\t\t\t\twin2.creator = self;\r\n\t\t}\r\n\t\telse\r\n\t\t{\talert('Masukkan nomor atau nama aplikan terlebih dahulu');\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction carisekolah(frm){\r\n\t\tlnk = 'carisekolah.php?SekolahID='+frm.AsalSekolah.value+'&Cari='+frm.NamaSekolah.value+'&frm='+frm.name;\r\n\t\twin2 = window.open(lnk, '', 'width=600, height=600, scrollbars, status');\r\n\t\twin2.creator = self;\r\n\t}\r\n\tfunction caript(frm){\r\n\t\tlnk = 'cariperguruantinggi.php?SekolahID='+frm.AsalSekolah.value+'&Cari='+frm.NamaSekolah.value+'&frm='+frm.name;\r\n\t\twin2 = window.open(lnk, '', 'width=600, height=600, scrollbars, status');\r\n\t\twin2.creator = self;\r\n\t}\r\n\tfunction tambahsekolah(frm) {\r\n\t\tlnk = 'pmbasalsek.edit.php?md=1';\r\n\t\twin2 = window.open(lnk, '', 'width=600, height=600, scrollbars, status');\r\n\t\twin2.creator = self;\r\n\t}\r\n\tfunction tambahpt(frm) {\r\n\t\tlnk = 'pmbasalpt.edit.php?md=1';\r\n\t\twin2 = window.open(lnk, '', 'width=600, height=600, scrollbars, status');\r\n\t\twin2.creator = self;\r\n    }\r\n  </script>\r\n  ";
    CheckFormScript("Nama,TempatLahir,Kelamin,StatusAwalID, ProgramID, PMBFormulirID");
    JumlahPilihanScript();
    echo "<table class=bsc cellspacing=1 width=100%>\r\n  <form name='frmisi' id='frmisi' action='../{$_SESSION['mnux']}.isi.php' method=POST onSubmit=\"return CheckForm(this)\">\r\n  <input type=hidden name='gel' value='{$gel}' />\r\n  <input type=hidden name='md' value='{$md}' />\r\n  <input type=hidden name='gos' value='Simpan' />\r\n  {$hiddenformdata}\r\n  \r\n  <tr>\r\n      <td class=inp>No. Pendaftaran:</td>\r\n      <td class=ul1>{$_PMBID}</td>\r\n      <td class=inp>Status Cama:</td>\r\n      <td class=ul1><select name='StatusAwalID'>{$optstawal}</select></td>\r\n  </tr>\r\n  <tr>\r\n\t  <td class=inp>No. Aplikan: </td>\r\n\t  <td class=ul1 colspan=3><input type=text id='aplikan' name='AplikanID' value='{$w['AplikanID']}'>\r\n\t\t\t\t\t\t\t  <input type=button name='CariAplikan' value='Cari Aplikan' onClick=\"carinomor(frmisi)\"/>\r\n\t  <br>\r\n\t  <font color=red>*) Dapat dicari melalui nomor aplikan atau nama aplikan.</font>\r\n\t  </td>\r\n  </tr>\r\n  <tr><td class=inp>Mahasiswa Transfer?</td>\r\n\t  <td class=ul1>\r\n\t\t\t<input type=checkbox name='StatusAwalID2' value='Y' {$statusawalid2checked}>\r\n      </td>\r\n  </tr>\r\n  \r\n  <tr><th class=ttl colspan=4>Pilihan Program Studi</th></tr>\r\n  <tr>\r\n      <td class=inp>Formulir:</td>\r\n      <td class=ul1 colspan=3>\r\n        <select name='PMBFormulirID' onChange=\"UbahJumlahPilihan()\">{$optfrm}</select > <br />\r\n        </td>\r\n      </tr>\r\n  <tr><td class=inp>Program Pendidikan:</td>\r\n      <td class=ul1 colspan=3>\r\n      <select name='ProgramID'>{$optprg}</select>\r\n      </td></tr>\t  \r\n  {$Pilihan2}\r\n  <tr><td class=inp>Pilihan Tempat Kuliah:</td>\r\n\t  <td class=ul1 colspan=3>\r\n\t  <select name='TempatKuliahID'>{$opttempatkuliah}</select>\r\n\t  </td></tr>\r\n  \r\n  <tr><th class=ttl colspan=4>Data Pribadi Cama</th></tr>\r\n  <tr><td class=inp>Nama Lengkap:</td>\r\n      <td class=ul1 colspan=3>\r\n      <input type=text name='Nama' value='{$w['Nama']}' size=30 maxlength=50 />\r\n      </td></tr>\r\n  <tr><td class=inp>Warga Negara:</td>\r\n      <td class=ul1><select name='WargaNegara'>{$optwarganegara}</select></td>\r\n      <td class=inp>Kebangsaan:</td>\r\n      <td class=ul1><input type=text name='Kebangsaan' value='{$w['Kebangsaan']}' size=20 maxlength=50 /></td>\r\n      </tr>\r\n  <tr><td class=inp>Tanggal Lahir:</td>\r\n      <td class=ul1>{$TanggalLahir}</td>\r\n\t  <td class=inp>Tempat Lahir:</td>\r\n      <td class=ul1><input type=text name='TempatLahir' value='{$w['TempatLahir']}' size=20 maxlength=50 /></td>\r\n      </tr>\r\n  <tr><td class=inp>Jenis Kelamin:</td>\r\n      <td class=ul1><select name='Kelamin'>{$optkel}</select></td>\r\n      <td class=inp>Golongan Darah:</td>\r\n      <td class=ul1><input style='text-transform: uppercase' type=text name='GolonganDarah' value='{$w['GolonganDarah']}' size=5 maxlength=10/></td>\r\n      </tr>\r\n  <tr><td class=inp>Agama:</td>\r\n      <td class=ul1><select name='Agama'>{$optagm}</select></td>\r\n      <td class=inp>Status Perkawinan:</td>\r\n      <td class=ul1><select name='StatusSipil'>{$optsipil}</select></td>\r\n      </tr>\r\n  <tr><td class=inp>Tinggi Badan:</td>\r\n      <td class=ul1><input type=text name='TinggiBadan' value='{$w['TinggiBadan']}' size=3 maxlength=5 /> cm</td>\r\n      <td class=inp>Berat Badan:</td>\r\n      <td class=ul1><input type=text name='BeratBadan' value='{$w['BeratBadan']}' size=3 maxlength=5 /> kg</td>\r\n      </tr>\r\n  <tr><td>&nbsp;</td></tr>\r\n  <tr><td class=ul1 colspan=4 align=center>\r\n      <input type=submit name='Simpan' value='Simpan Cepat' />\r\n      <input type=button name='Batal' value='Batal' onClick=\"window.close()\" />\r\n      </td></tr>\r\n  <tr><td>&nbsp;</td></tr>\r\n  <tr><th class=ttl colspan=4>Pendidikan Terakhir:</th></tr>\r\n  <tr><td class=inp>Pendidikan Terakhir:</td>\r\n      <td class=ul1><select name='PendidikanTerakhir'>{$optpendidikan}</select></td>\r\n\t  <td class=inp>Jurusan Sekolah :</td>\r\n      <td class=ul1>\r\n      <input type=text name='JurusanSekolah' value='{$w['JurusanSekolah']}' size=40 maxlength=50 />\r\n      </td>\r\n  </tr>\r\n  <tr><td class=inp>ID Sekolah :</td>\r\n      <td class=ul1>\r\n\t\t<input type='text' name='AsalSekolah' value='{$w['AsalSekolah']}' size=20 maxlength=50 disabled>\r\n\t\t<input type='hidden' name='SavAsalSekolah' value='{$w['AsalSekolah']}' ></td>\r\n\t  </tr>\r\n  <tr><td class=inp>Nama Sekolah :</td>\r\n\t  <td class=ul1 colspan=3><input type=text name='NamaSekolah' value='{$NamaSekolah}' size=50 maxlength=255>\r\n\t    <a class=\"info\" href=\"javascript:void(0)\"><font size=0.8>Tips</font><span>Masukkan <b>nama sekolah parsial</b> diikuti dengan <b>tanda koma</b> dan <b>nama kota</b> di mana sekolah terebut berada. <br \\>\r\n\t\t\t\t\t  Contoh: 'Budi Utomo, Jakarta' ATAU 'Negeri 1, Surabaya'.<br \\><br \\>\r\n\t\t\t\t\t  <b>TIPS: Hindari penggunaan kata-kata umum</b>, seperti SMA, SMU, SLTA, SEKOLAH, SCHOOL, dll. <br \\>\r\n\t\t\t\t\t  Gunakan kata-kata yang dapat mengidentifikasi sekolah yang dicari secara unik.</span></a>\r\n\t\t<br><a href='#self' onClick=\"javascript:frmisi.AsalSekolah.value='';frmisi.NamaSekolah.value='';\">Reset</a> &bull;\r\n\t\t<a href='javascript:carisekolah(frmisi)'>Cari Sekolah</a> &bull; \r\n\t\t<a href='javascript:caript(frmisi)'>Cari Perguruan Tinggi</a> &bull; \r\n\t\t<a href='javascript:tambahsekolah(frmisi)'>Tambah Sekolah</a> &bull;\r\n\t\t<a href='javascript:tambahpt(frmisi)'>Tambah Perguruan Tinggi</a>\r\n\t\t</td></tr>\r\n  </tr>\r\n  <tr><td class=inp>Alamat Sekolah :</td>\r\n\t  <td class=ul1 colspan=3><input type=text name='AlamatSekolah' value='{$w['AlamatSekolah']}' size=50 maxlength=255></td>\r\n\t  </tr>\r\n\t\r\n  <tr><td class=inp>Tahun Lulus :</td>\r\n      <td class=ul1>\r\n      <input type=text name='TahunLulus' value='{$w['TahunLulus']}' size=5 maxlength=5 />\r\n      </td>\r\n\t  <td class=inp>Nilai UAN :</td>\r\n      <td class=ul1>\r\n      <input type=text name='NilaiSekolah' value='{$w['NilaiSekolah']}' size=5 maxlength=5 />\r\n      </td>\r\n      </tr>\r\n  <tr><td class=inp>Prestasi Lainnya:</td>\r\n\t  <td class=ul1 colspan=3><input type=text name='PrestasiTambahan1' value='{$arrPrestasiTambahan['0']}' size=80 maxlength=100 ></td>\r\n  </tr>\r\n  <tr><td></td>\r\n\t  <td class=ul1 colspan=3><input type=text name='PrestasiTambahan2' value='{$arrPrestasiTambahan['1']}' size=80 maxlength=100></td>\r\n  </tr>\r\n  <tr><td></td>\r\n      <td class=ul1 colspan=3><input type=text name='PrestasiTambahan3' value='{$arrPrestasiTambahan['2']}' size=80 maxlength=100></br>\r\n\t  *) <i>Prestasi dapat berupa prestasi apa saja di bidang <b>seni</b>, <b>olahraga</b>, atau <b>akademik</b>. </i></br>\r\n\t  *) <i>Harap menuliskan <b>peringkat</b>, <b>nama lengkap kompetisi/event</b> dan <b>tahun</b> peraihan prestasi bila memungkinkan<i> \r\n\t  </td>\r\n  </tr>\r\n  \r\n  <tr><th class=ttl colspan=4>Alamat</th></tr>\r\n  <tr><td class=inp>Tempat Tinggal:</td>\r\n\t  <td class=ul1 colspan=3><select name='TempatTinggal'>{$opttempattinggal}</select></td></tr>\r\n  <tr><td class=inp>Alamat lengkap:</td>\r\n      <td class=ul1 colspan=3>\r\n      <textarea name='Alamat' cols=70 rows=4>{$w['Alamat']}</textarea>\r\n      </td></tr>\r\n  <tr><td class=inp>RT/RW:</td>\r\n      <td class=ul1><input type=text name='RT' value='{$w['RT']}' size=10 maxlength=10 />\r\n      / <input type=text name='RW' value='{$w['RW']}' size=10 maxlength=10 /></td>\r\n      <td class=inp>Kode Pos:</td>\r\n      <td class=ul1><input type=text name='KodePos' value='{$w['KodePos']}' size=10 maxlength=10 /></td>\r\n      </tr>\r\n  <tr><td class=inp>Kota/Kabupaten:</td>\r\n      <td class=ul1><input type=text name='Kota' value='{$w['Kota']}' size=20 maxlength=50 /></td>\r\n      <td class=inp>Propinsi:</td>\r\n      <td class=ul1><input type=text name='Propinsi' value='{$w['Propinsi']}' size=20 maxlength=50 /></td>\r\n      </tr>\r\n  <tr><td class=inp>Telpon/ponsel:</td>\r\n      <td class=ul1>\r\n        <input type=text name='Telepon' value='{$w['Telepon']}' size=10 maxlength=50 /> /\r\n        <input type=text name='Handphone' value='{$w['Handphone']}' size=10 maxlength=50 />\r\n      </td>\r\n      <td class=inp>E-mail:</td>\r\n      <td class=ul1>\r\n        <input type=text name='Email' value='{$w['Email']}' size=20 maxlength=50 />\r\n      </td></tr>\r\n  \r\n  <tr><th class=ttl colspan=4>Data Orangtua</th></tr>\r\n  <tr><td class=inp>Nama Ayah:</td>\r\n      <td class=ul1><input type=text name='NamaAyah' value='{$w['NamaAyah']}' size=20 maxlength=50 /></td>\r\n      <td class=inp>Nama Ibu:</td>\r\n      <td class=ul1><input type=text name='NamaIbu' value='{$w['NamaIbu']}' size=20 maxlength=50 /></td>\r\n      </tr>\r\n  <tr><td class=inp>Agama Ayah:</td>\r\n      <td class=ul1><select name='AgamaAyah' />{$optagamaayah}</td>\r\n      <td class=inp>Agama Ibu:</td>\r\n      <td class=ul1><select name='AgamaIbu' />{$optagamaibu}</td>\r\n      </tr>\r\n  <tr><td class=inp>Pendidikan Ayah:</td>\r\n      <td class=ul1><select name='PendidikanAyah'>{$optpendidikanayah}</select></td>\r\n      <td class=inp>Pendidikan Ibu:</td>\r\n      <td class=ul1><select name='PendidikanIbu'>{$optpendidikanibu}</select></td>\r\n      </tr>\r\n  <tr><td class=inp>Pekerjaan Ayah:</td>\r\n      <td class=ul1><input type=text name='PekerjaanAyah' value='{$w['PekerjaanAyah']}' size=20 maxlength=50 /></td>\r\n      <td class=inp>Pekerjaan Ibu:</td>\r\n      <td class=ul1><input type=text name='PekerjaanIbu' value='{$w['PekerjaanIbu']}' size=20 maxlength=50 /></td>\r\n      </tr>\r\n  <tr><td class=inp>Penghasilan/bulan:</td>\r\n      <td class=ul1><select name='PenghasilanAyah'>{$optpenghasilanayah}</select></td>\r\n      <td class=inp>Penghasilan/bulan:</td>\r\n      <td class=ul1><select name='PenghasilanIbu'>{$optpenghasilanibu}</select></td>\r\n      </tr>\r\n  <tr><td class=inp>Status Kehidupan:</td>\r\n      <td class=ul1><select name='HidupAyah'>{$opthidupayah}</select></td>\r\n      <td class=inp>Status kehidupan:</td>\r\n      <td class=ul1><select name='HidupIbu'>{$opthidupibu}</select></td>\r\n      </tr>\r\n  <tr><td class=inp>Biaya Studi:</td>\r\n\t  <td class=ul1 colspan=3><select name='BiayaStudi'>{$optbiayastudi}</select></td>\r\n\t  </tr>\r\n  \r\n  <tr><th class=ttl colspan=4>Alamat Orangtua</th></tr>\r\n  <tr><td class=inp>Alamat lengkap:</td>\r\n      <td class=ul1 colspan=3>\r\n      <textarea name='AlamatOrtu' cols=70 rows=4>{$w['AlamatOrtu']}</textarea>\r\n      </td></tr>\r\n  <tr><td class=inp>RT/RW:</td>\r\n      <td class=ul1><input type=text name='RTOrtu' value='{$w['RTOrtu']}' size=10 maxlength=10 />\r\n      / <input type=text name='RWOrtu' value='{$w['RWOrtu']}' size=10 maxlength=10 /></td>\r\n      <td class=inp>Kode Pos:</td>\r\n      <td class=ul1><input type=text name='KodePosOrtu' value='{$w['KodePosOrtu']}' size=10 maxlength=10 /></td>\r\n      </tr>\r\n  <tr><td class=inp>Kota:</td>\r\n      <td class=ul1><input type=text name='KotaOrtu' value='{$w['KotaOrtu']}' size=20 maxlength=50 /></td>\r\n      <td class=inp>Propinsi:</td>\r\n      <td class=ul1><input type=text name='PropinsiOrtu' value='{$w['PropinsiOrtu']}' size=20 maxlength=50 /></td>\r\n      </tr>\r\n  <tr><td class=inp>Telpon/ponsel:</td>\r\n      <td class=ul1>\r\n        <input type=text name='TeleponOrtu' value='{$w['TeleponOrtu']}' size=10 maxlength=50 /> /\r\n        <input type=text name='HandphoneOrtu' value='{$w['HandphoneOrtu']}' size=10 maxlength=50 />\r\n      </td>\r\n      <td class=inp>E-mail:</td>\r\n      <td class=ul1>\r\n        <input type=text name='EmailOrtu' value='{$w['EmailOrtu']}' size=20 maxlength=50 />\r\n      </td></tr>\r\n  \r\n  <tr><th class=ttl colspan=4>Detail Pekerjaan (Jika sudah bekerja)</th></tr>\r\n  <tr><td class=inp>Nama Perusahaan:</td>\r\n      <td class=ul1 colspan=3>\r\n      <input type=text name='NamaPerusahaan' value='{$w['NamaPerusahaan']}' size=30/></td></tr>\r\n  <tr><td class=inp>Alamat Perusahaan:</td>\r\n      <td class=ul1 colspan=3><input type=text name='AlamatPerusahaan' value='{$w['AlamatPerusahaan']}' size=50/></td>\r\n      </tr>\r\n  <tr><td class=inp>No Telp. dan Fax</td>\r\n      <td class=ul1><input type=text name='TeleponPerusahaan' value='{$w['TeleponPerusahaan']}' size=30/></td>\r\n      </tr>\r\n  <tr><td class=inp>Jabatan Saat Ini:</td>\r\n      <td class=ul1><input type=text name='JabatanPerusahaan' value='{$w['JabatanPerusahaan']}' size=20s></td>\r\n      </tr>\r\n  \r\n  \r\n  <tr><td class=ul1 colspan=4 align=center>\r\n      <input type=submit name='Simpan' value='Simpan' />\r\n      <input type=button name='Batal' value='Batal' onClick=\"window.close()\" />\r\n      </td></tr>\r\n  \r\n  </form>\r\n  </table>";
}