break; case "tambahmahasiswa": $thn_skrg = date("Y"); echo "<h2>Tambah Mahasiswa</h2>\n<form method=POST action='{$aksi}?module=mahasiswa&act=input' enctype='multipart/form-data'>\n<table>\n<tr>\n\t<td>NIM Mahasiswa</td>\n\t<td> : <input type=text name=nim size=15 maxlength=15></td>\n</tr>\n<tr>\n\t<td>Password</td>\n\t<td> : <input type=text name=password size=30 maxlength=30></td>\n</tr>\n<tr>\n\t<td>Nama Mahasiswa</td>\n\t<td> : <input type=text name=nama size=40 maxlength=100></td>\n</tr>\n<tr>\n\t\t<td>Jurusan</td>\n\t\t<td> : <select name=kdjur>\n\t\t<option value=0 selected>- Pilih Jurusan -</option>"; $sql = mysql_query("SELECT * FROM jurusan ORDER BY nmjur"); while ($data = mysql_fetch_array($sql)) { echo "<option value={$data['kdjur']}>{$data['nmjur']}</option>"; } echo "</select></td>\n</tr>\n<tr>\n\t<td>Angkatan</td>\n\t<td> : <select name=angkatan>\n\t<option value=0 selected>Angkatan</option>"; for ($ang = 2009; $ang <= $thn_skrg; $ang++) { echo "<option value={$ang}>{$ang}</option>"; } echo "</select>\n\t</td>\n</tr>\n<tr>\n\t<td>Foto</td>\n\t<td> : <input type=file name=fupload size=40></td>\n</tr>\n<tr>\n\t<td>Alamat</td>\n\t<td> : <textarea name=alamat cols=40 rows=3></textarea></td>\n</tr>\n<tr>\n\t<td>Tempat / Tanggal Lahir</td>\n\t<td> : <input type=text name='tplhr' size=35 max=50> / "; combotgl(1, 31, 'tanggal', $tgl_skrg); combobln(1, 12, 'bulan', $bln_skrg); combotgl(1990, $thn_skrg, 'tahun', $thn_skrg); echo "</td>\n</tr>\n<tr>\n\t<td>Jenis Kelamin</td>\n\t<td> :\t<input type='radio' name='jekel' value='L'>L\n\t\t\t<input type='radio' name='jekel' value='P'>P\n\t</td>\n</tr>\n<tr>\n<td>Agama</td>\n\t<td> : <select name='agama'>\n\t\t\t<option value='Islam' selected>Islam</option>\n\t\t\t<option value='Kristen Protestan'>Kristen Protestan</option>\n\t\t\t<option value='Kristen Katholik'>Kristen Katholik</option>\n\t\t\t<option value='Hindu'>Hindu</option>\n\t\t\t<option value='Budha'>Budha</option>\n\t\t\t</select>\n\t</td>\n</tr>\n<tr>\n\t<td>No. Telp</td>\n\t<td> : <input type=text name='notelp' size=15 maxlength=15></td>\n</tr>\n<tr>\n\t<td>Asal Sekolah</td>\n\t<td> : <input type=text name='asalsekolah' size=35 maxlength=50></td>\n</tr>\n<tr>\n\t<td>Tahun Lulus</td>\n\t<td> : <select name='thlulus'>\n\t<option value=0 selected>Tahun Lulus</option>"; for ($tl = 2009; $tl <= $thn_skrg; $tl++) { echo "<option value={$tl}>{$tl}</option>"; } echo "</select>\n\t</td>\n</tr>\n<tr>\n\t<td colspan=2><input type=submit value=Simpan>\n\t<input type=button value=Batal onclick=self.history.back()>\n\t</td>\n</tr>\n</table>\n</form>"; break; case "editmahasiswa": $edit = mysql_query("SELECT * FROM mahasiswa WHERE nim='{$_GET['id']}'"); $r = mysql_fetch_array($edit); $thn_skrg = date("Y"); echo "<h2>Edit Mahasiswa</h2>\n<form method=POST action='{$aksi}?module=mahasiswa&act=update' enctype='multipart/form-data'>\n<input type=hidden name=id value='{$r['nim']}'>\n<table>\n<tr>\n\t<td>NIM Mahasiswa</td>\n\t<td> : <input type=text name=nim size=15 maxlength=15 value='{$r['nim']}' disabled></td>\n</tr>\n<tr>\n\t<td>Password</td>\n\t<td> : <input type=text name=password size=30 maxlength=30> *) </td>\n</tr>\n<tr>\n\t<td>Nama Mahasiswa</td>\n\t<td> : <input type=text name=nama size=40 maxlength=100 value='{$r['nama']}'></td>\n</tr>\n<tr>\n\t\t<td>Jurusan</td>\n\t\t<td> : <select name=kdjur>"; $tampil = mysql_query("SELECT * FROM jurusan ORDER BY nmjur"); while ($w = mysql_fetch_array($tampil)) { if ($r['kdjur'] == $w['kdjur']) { echo "<option value='{$w['kdjur']}' selected>{$w['nmjur']}</option>";
echo "<dt><label>Agama</label></dt> <dd> : <select name=agama>\n <option value='{$r['agama']}' selected>{$r['agama']}</option>\n <option value='Islam'>Islam</option>\n <option value='Kristen'>Kristen</option>\n <option value='Katolik'>Katolik</option>\n <option value='Hindu'>Hindu</option>\n <option value='Buddha'>Buddha</option>\n </select></dd>\n <dt><label>Nama Ayah/Wali</label></dt> <dd> : <input type=text name='nama_ayah' size=30 value='{$r['nama_ayah']}'></dd>\n <dt><label>Nama Ibu</label></dt> <dd> : <input type=text name='nama_ibu' size=30 value='{$r['nama_ibu']}'></dd>\n <dt><label>Tahun Masuk</label></dt> <dd> : <input type=text name='th_masuk' size=10 value='{$r['th_masuk']}'></dd>\n <dt><label>Email</label></dt> <dd> : <input type=text name='email' size=30 value='{$r['email']}'></dd>\n <dt><label>No Telp/HP</label></dt> <dd> : <input type=text name='no_telp' size=20 value='{$r['no_telp']}'></dd>\n <dt><label>Foto</label></dt> <dd> : "; if ($r[foto] != '') { echo "<ul class='photos sortable'>\n <li>\n <img src='../foto_siswa/medium_{$r['foto']}'>\n <div class='links'>\n <a href='../foto_siswa/medium_{$r['foto']}' rel='facebox'>View</a>\n\t\t <div>\n </li>\n </ul>"; } echo "</dd>\n <dt><label>Ganti Foto</label></dt> <dd> : <input type=file name='fupload' size=40>\n <small>Tipe foto harus JPG/JPEG dan ukuran lebar maks: 400 px</small>\n <small>Apabila foto tidak diganti, dikosongkan saja</small></dd>"; if ($r[blokir] == 'N') { echo "<dt><label>Blokir</label></dt> <dd> : <label><input type=radio name='blokir' value='Y'> Y</label>\n <label><input type=radio name='blokir' value='N' checked> N </label></tr>"; } else { echo "<dt><label>Blokir</label></dt> <dd> : <label><input type=radio name='blokir' value='Y' checked> Y</label>\n <label><input type=radio name='blokir' value='N'> N </label></tr>"; } echo "</dl>\n <div class='buttons'>\n <input class='button blue' type=submit value=Update>\n <input class='button blue' type=button value=Batal onclick=self.history.back()>\n </div>\n </fieldset></form>"; } elseif ($_SESSION[leveluser] == 'siswa') { echo "<br><b class='judul'>Edit Profil</b><br><p class='garisbawah'></p>"; echo "<form method=POST action={$aksi_siswa}?module=siswa&act=update_profil_siswa enctype='multipart/form-data'>\n <input type=hidden name=id value='{$r['id_siswa']}'>\n <table>\n <tr><td>Nis</td> <td> : <input type=text name=nis value='{$r['nis']}' ></td></tr>\n <tr><td>Nama</td> <td> : <input type=text name='nama' value='{$r['nama_lengkap']}' size=40></td></tr> \n <tr><td>Alamat</td> <td> : <input type=text name='alamat' size=80 value='{$r['alamat']}'></td></tr>\n <tr><td>Tempat Lahir</td> <td> : <input type=text name='tempat_lahir' size=60 value='{$r['tempat_lahir']}'></td></tr>\n <tr><td>Tanggal Lahir</td><td> : "; $get_tgl = substr("{$r['tgl_lahir']}", 8, 2); combotgl(1, 31, 'tgl', $get_tgl); $get_bln = substr("{$r['tgl_lahir']}", 5, 2); combonamabln(1, 12, 'bln', $get_bln); $get_thn = substr("{$r['tgl_lahir']}", 0, 4); combothn(1950, $thn_sekarang, 'thn', $get_thn); echo "</td></tr>"; if ($r[jenis_kelamin] == 'L') { echo "<tr><td>Jenis Kelamin</td><td> : <input type=radio name='jk' value='L' checked>Laki - Laki\n <input type=radio name='jk' value='P'>Perempuan</tr></tr>"; } else { echo "<tr><td>Jenis Kelamin</td><td> : <input type=radio name='jk' value='L'>Laki - Laki\n <input type=radio name='jk' value='P' checked>Perempuan</tr></tr>"; } echo "<tr><td>Agama</td> <td> : <select name=agama>\n <option value='{$r['agama']}' selected>{$r['agama']}</option>\n <option value='Islam'>Islam</option>\n <option value='Kristen'>Kristen</option>\n <option value='Katolik'>Katolik</option>\n <option value='Hindu'>Hindu</option>\n <option value='Buddha'>Buddha</option>\n </select></td></tr>\n <tr><td>Nama Ayah/Wali</td> <td> : <input type=text name='nama_ayah' size=40 value='{$r['nama_ayah']}'></td></tr>\n <tr><td>Nama Ibu</td> <td> : <input type=text name='nama_ibu' size=40 value='{$r['nama_ibu']}'></td></tr>\n <tr><td>Tahun Masuk</td> <td> : <input type=text name='th_masuk' size=5 value='{$r['th_masuk']}'> *) Harus Angka</td></tr>\n <tr><td>Email</td> <td> : <input type=text name='email' size=30 value='{$r['email']}'></td></tr>\n <tr><td>No Telp/HP</td> <td> : <input type=text name='no_telp' size=20 value='{$r['no_telp']}'></td></tr>\n <tr><td>Foto</td> <td> : "; if ($r[foto] != '') { echo "<img src='foto_siswa/medium_{$r['foto']}'>"; } echo "</td></tr>\n <tr><td>Ganti Foto</td> <td> : <input type=file name='fupload' size=40>\n <br>**) Tipe foto harus JPG/JPEG dan ukuran lebar maks: 400 px<br>\n ***) Apabila foto tidak diganti, dikosongkan saja</td></tr>";
<?php session_start(); if (empty($_SESSION['username']) and empty($_SESSION['passuser'])) { echo "<link href='style.css' rel='stylesheet' type='text/css'>\n <center>Untuk mengakses modul, Anda harus login <br>"; echo "<a href=../../index.php><b>LOGIN</b></a></center>"; } else { echo "<h2>Laporan</h2>\n <input type=button value='Laporan Hari Ini' \n onclick=\"window.location.href='modul/mod_laporan/pdf_toko_sekarang.php';\">\n\n <form method=POST action='modul/mod_laporan/pdf_toko.php'>\n <table>\n <tr><td colspan=2><b>Laporan Per Periode</b></td></tr>\n <tr><td>Dari Tanggal</td><td> : "; combotgl(1, 31, 'tgl_mulai', $tgl_skrg); combonamabln(1, 12, 'bln_mulai', $bln_sekarang); combothn(2000, $thn_sekarang, 'thn_mulai', $thn_sekarang); echo "</td></tr>\n <tr><td>s/d Tanggal</td><td> : "; combotgl(1, 31, 'tgl_selesai', $tgl_skrg); combonamabln(1, 12, 'bln_selesai', $bln_sekarang); combothn(2000, $thn_sekarang, 'thn_selesai', $thn_sekarang); echo "</td></tr>\n <tr><td colspan=2><input type=submit value=Proses></td></tr>\n </table>\n </form>"; }
echo " <tr>\n\t \t\t\t<td>{$no}</td>\n\t \t\t\t<td>{$dt['nip']}</td>\n\t \t\t\t<td>{$dt['nama']}</td>\n\t\t\t\t\t<td>{$dt['nilai']}</td>\n\t \t\t\t</tr>"; $no++; } echo " \n\t\t</table>\n\t\t<div class='clearfix-bottom'></div>"; break; case "edit": $ambil = mysql_query("select * from pelatihan where id_pelatihan='{$_GET['id']}'"); $ed = mysql_fetch_array($ambil); echo "<h2 class='head'>Edit Data Pelatihan</h2>\n\t <p class='headings'>Kecamatan sentolo</p>\n\t<form action='{$aksi}?module=pelatihan&act=edit' method='post' enctype='multipart/form-data' >\n\t<input type='hidden' name='id' value='{$ed['id_pelatihan']}' >\n\t\t<table class='tabelform tabpad'>\n\t\t\t<tr>\n\t\t\t\t<td width='150'>Topik Pelatihan</td>\n\t\t\t\t<td><input class='form-controltxt' name='topik' type='text' value='{$ed['topik_pelatihan']}'></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>Tanggal Pelatihan</td>\n\t\t\t\t<td>"; $tg = explode("-", $ed['tgl_pelatihan']); $tpt = $tg[0]; $tpb = $tg[1]; $tph = $tg[2]; $now = date("Y"); $saiki = 2000; combotgl(1, 31, tp, $tph); combonamabln(1, 12, bp, $tpb); combothn(2000, $now, thp, $tpt); echo "\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>Penyelenggara</td>\n\t\t\t\t<td><input class='form-controltxt' name='pl' type='text' value='{$ed['penyelenggara']}'></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>Keterangan</td>\n\t\t\t\t<td><textarea class='form-controltextarea' name='ket'>{$ed['keterangan']}</textarea></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td></td>\n\t\t\t\t<td><input type=submit value=Simpan class='btn btn-primary'>\n\t\t\t\t\t<input type=button value=Batal class='btn btn-danger' onclick=self.history.back()></td>\n\t\t\t</tr>\n\t\t</table>\n\t</form>\n\t<div class='clearfix-bottom'></div>"; break; } } else { if ($_SESSION['leveluser'] == '3') { switch ($_GET['act']) { default: $tampil = mysql_query("select * from pelatihan order by id_pelatihan"); echo "<h2 class='head'>DATA PELATIHAN PEGAWAI</h2>\n\t\t\t\t<p class='headings'>Kecamatan sentolo</p>\n\t\t\t<table class='tabel'>\n\t\t\t<thead>\n\t \t\t\t<tr>\n\t\t\t\t <th class='style-table'>No</th>\n\t\t\t\t <th class='style-table'>Nama Pelatihan</th>\n\t\t\t\t\t<th class='style-table'>Tgl Pelatihan</th>\n\t\t\t\t\t<th class='style-table'>Penyelenggara</th>\n\t\t\t\t\t<th class='style-table'>Detail</th>\n\t \t\t\t</tr>\n\t \t\t</thead>"; $no = 1; while ($dt = mysql_fetch_array($tampil)) { echo " <tr>\n\t \t\t\t<td>{$no}</td>\n\t \t\t\t<td>{$dt['topik_pelatihan']}</td>\n\t\t\t\t\t<td>" . tgl_indo($dt['tgl_pelatihan']) . "</td>\n\t\t\t\t\t<td>{$dt['penyelenggara']}</td>\n\t\t\t\t\t<td><a class='a-style' href='?module=pelatihan&act=lihat&id={$dt['id_pelatihan']}'>Detail Pelatihan</a></td>\n\t \t\t\t</tr>"; $no++;
combothn(2000, $thn_sekarang, 'thn_1', $thn_sekarang); } else { echo combotgl(1, 31, 'tgl_1', $_POST[tgl_1]); combonamabln(1, 12, 'bln_1', $_POST[bln_1]); combothn(2000, $thn_sekarang, 'thn_1', $_POST[thn_1]); } ?> S/D<span style="margin-left:32px"></span> <?php if (empty($_POST['tanggal2'])) { echo combotgl(1, 31, 'tgl_2', $tgl_skrg); combonamabln(1, 12, 'bln_2', $bln_sekarang); combothn(2000, $thn_sekarang, 'thn_2', $thn_sekarang); } else { echo combotgl(1, 31, 'tgl_2', $_POST[tgl_2]); combonamabln(1, 12, 'bln_2', $_POST[bln_2]); combothn(2000, $thn_sekarang, 'thn_2', $_POST[thn_2]); } ?> <input style="align:center" type="submit" class="btn" name="report" value="tampilkan" /> <div class="btn-group"> <button class="btn btn-info">Cetak</button> <button data-toggle="dropdown" class="btn btn-info dropdown-toggle"><span class="caret"></span></button> <ul class="dropdown-menu"> <li><a href="<?php echo "lpb.pdf?tgl1={$tanggal1}&tgl2={$tanggal2}"; ?> " target='_blank'>PDF</a></li>
combothn(2000, $thn_sekarang, 'thn_1', $_POST[thn_1]); } else { echo combotgl(1, 31, 'tgl_1', 1); combonamabln(1, 12, 'bln_1', $bln_sekarang); combothn(2000, $thn_sekarang, 'thn_1', $thn_sekarang); } ?> S/D <?php if (empty($_POST['report'])) { echo combotgl(1, 31, 'tgl_2', $_POST[tgl_2]); combonamabln(1, 12, 'bln_2', $_POST[bln_2]); combothn(2000, $thn_sekarang, 'thn_2', $_POST[thn_2]); } else { echo combotgl(1, 31, 'tgl_2', $tgl_skrg); combonamabln(1, 12, 'bln_2', $bln_sekarang); combothn(2000, $thn_sekarang, 'thn_2', $thn_sekarang); } ?> <input type="submit" name="report" class="btn btn-success" value="tampilkan" /> </form> </div> </div> </div> <div class="col-md-12"> <!-- Advanced Tables -->
echo "<div class=\"pagination\"> {$linkHalaman}</div>"; break; case "tambahpemegang": echo "<h2>Tambah Pemegang Tiket</h2>\n <form method=POST action='{$aksi}?module=pemegang&act=input'>\n <table class='list'><tbody>\n <tr><td class='left'>Nama Pemegang Tiket</td> <td> : <input type=text name='nama_pemegang' size=50></td></tr>\n <tr><td class='left'>Nomor Telepon</td> <td> : <input type=text name='no_telp' size=20> </td></tr>\n <tr><td class='left' colspan=2><input type=submit value=Simpan>\n <input type=button value=Batal onclick=self.history.back()></td></tr>\n </tbody></table></form>"; break; case "editpemegang": if ($_SESSION[leveluser] == 'admin') { $edit = mysql_query("SELECT * FROM pemegang WHERE id='{$_GET['id']}'"); } else { $edit = mysql_query("SELECT * FROM pemegang WHERE id='{$_GET['id']}' AND username='******'namauser']}'"); } $r = mysql_fetch_array($edit); echo "<h2>Edit Pemegang Tiket</h2>\n <form method=POST action={$aksi}?module=pemegang&act=update>\n <input type=hidden name=id value={$r['id']}>\n <table class='list'><tbody>\n <tr><td class='left'>Tema</td> <td> : <input type=text name='tema' size=60 value='{$r['tema']}'></td></tr>\n <tr><td class='left'>Isi Pemegang Tiket</td> <td> <textarea name='isi_pemegang' id='loko' style='width: 600px; height: 150px;'>{$r['isi_pemegang']}</textarea></td></tr>\n <tr><td class='left'Tempat</td> <td> : <input type=text name='tempat' size=40 value='{$r['tempat']}'></td></tr>\n <tr><td class='left'>Pukul</td> <td> : <input type=text name='jam' size=40 value='{$r['jam']}'></td></tr>\n <tr><td class='left'>Tgl Mulai</td><td> : "; $get_tgl = substr("{$r['tgl_mulai']}", 8, 2); combotgl(1, 31, 'tgl_mulai', $get_tgl); $get_bln = substr("{$r['tgl_mulai']}", 5, 2); combonamabln(1, 12, 'bln_mulai', $get_bln); $get_thn = substr("{$r['tgl_mulai']}", 0, 4); $thn_skrg = date("Y"); combothn($thn_sekarang - 2, $thn_sekarang + 2, 'thn_mulai', $get_thn); echo "</td></tr>\n <tr><td class='left'>Tgl Selesai</td><td> : "; $get_tgl2 = substr("{$r['tgl_selesai']}", 8, 2); combotgl(1, 31, 'tgl_selesai', $get_tgl2); $get_bln2 = substr("{$r['tgl_selesai']}", 5, 2); combonamabln(1, 12, 'bln_selesai', $get_bln2); $get_thn2 = substr("{$r['tgl_selesai']}", 0, 4); combothn($thn_sekarang - 2, $thn_sekarang + 2, 'thn_selesai', $get_thn2); echo "</td></tr>\n <tr><td class='left'>Pengirim</td> <td> : <input type=text name='pengirim' size=40 value='{$r['pengirim']}'></td></tr>\n <tr><td class='left' colspan=2><input type=submit value=Update>\n <input type=button value=Batal onclick=self.history.back()></td></tr>\n </tbody></table></form>"; break; } }
<?php // Form indeks berita echo "<img src=images/indeksberita.jpg /><br /><br />\n <form method=POST action='indeks-berita.html'>"; combotgl(1, 31, 'tanggal', $tgl_skrg); echo " / "; combobln(1, 12, 'bulan', $bln_sekarang); echo " / "; combothn(2000, $thn_sekarang, 'tahun', $thn_sekarang); echo "<br /><input type=submit value=Go />\n </form>\n <hr color=#e0cb91 noshade=noshade /><br />"; // Download echo "<img src=images/download.jpg /><br /><ul>"; $download = mysql_query("SELECT * FROM download ORDER BY id_download DESC LIMIT 5"); while ($d = mysql_fetch_array($download)) { echo "<p><li><a href='downlot.php?file=files/{$d['nama_file']}'>{$d['judul']}</a></li></p>"; } echo "</ul><hr color=#e0cb91 noshade=noshade /><br />"; // Banner $banner = mysql_query("SELECT * FROM banner \n ORDER BY id_banner DESC LIMIT 4"); while ($b = mysql_fetch_array($banner)) { echo "<p align=center><a href={$b['url']} target=_blank title='{$b['judul']}'><img src='foto_banner/{$b['gambar']}' border=0></a></p>"; }
<tr> <td width="28%"> Tanggal Mulai </td> <td> <?php $thn_sekarang = date('Y'); combotgl(1, 31, 'tgl_mulai', Tgl); combobln(1, 12, 'bln_mulai', Bulan); combotgl($thn_sekarang - 2, $thn_sekarang + 2, 'thn_mulai', Tahun); ?> </td> </tr> <tr><td width="28%"> Tanggal Selesai </td> <td> <?php combotgl(1, 31, 'tgl_selesai', Tgl); combobln(1, 12, 'bln_selesai', Bulan); combotgl($thn_sekarang - 2, $thn_sekarang + 2, 'thn_selesai', Tahun); ?> </td> </tr> <tr> <td> <input type="submit" value="cetak Laporan" /> </td> </tr> </table> </form> </table> <br /> </body>
include "configurasi/koneksi.php"; $kelas = mysql_query("SELECT * FROM kelas ORDER BY id_kelas"); echo "<dd><select name='kelas'>\n <option value='pilih' selected>--Pilih--</option>"; while ($k = mysql_fetch_array($kelas)) { echo "<option value='{$k['id_kelas']}'>{$k['nama']}</option>"; } echo "</select></dd>"; ?> <dt><label>Alamat :</label></dt> <dd><textarea name="alamat" cols="43" rows="3"></textarea></dd> <dt><label>Tempat Lahir :</label></dt> <dd><input type="text" name="tempat_lahir" size="40"/></dd> <dt><label>Tanggal Lahir :</label></dt><dd> <?php include "configurasi/fungsi_combobox.php"; include "configurasi/library.php"; combotgl(1, 31, 'tgl_lahir', $tgl_skrg); combonamabln(1, 12, 'bln_lahir', $bln_sekarang); combothn(1950, $thn_sekarang, 'thn_lahir', $thn_sekarang); echo "</dd>"; ?> <dt><label>Jenis kelamin :</label></dt> <dd><input type="radio" name="jk" value="L">Laki - Laki <input type="radio" name="jk" value="P">Perempuan</dd> <dt><label>Agama :</label></dt> <dd><select name="agama"> <option value="pilih" selected>--Pilih--</option> <option value="islam">Islam</option> <option value="kristen">Kristen</option> <option value="katolik">Katolik</option> <option value="hindu">Hindu</option> <option value="budha">Budha</option><select></dd>
echo "<input name='jk' type='radio' value='P'"; if ($t['jenis_kelamin'] == 'P') { echo "checked"; } echo "/>Wanita "; echo "\t</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>Alamat</td>\n\t\t\t\t<td><textarea class='form-controltextarea' name='almt' >{$t['alamat']}</textarea></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>Tanggal Masuk</td>\n\t\t\t\t<td>"; $ta = explode("-", $t['tgl_masuk']); $ttm = $ta[0]; $btm = $ta[1]; $htm = $ta[2]; $now = date("Y"); $saiki = 2000; $ht = "ht"; $bt = "bt"; $tt = "tt"; combotgl(1, 31, $ht, $htm); combonamabln(1, 12, $bt, $btm); combothn($saiki, $now, $tt, $ttm); echo "\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>Golongan</td>\n\t\t\t\t<td><select name='golongan' class='formcontrol-select '>\n\t\t\t\t\t<option value=''>Pilih Golongan</option>"; $jab = mysql_query("select * from gol_pangkat"); while ($j = mysql_fetch_array($jab)) { if ($t['id_gol'] == $j['id_golongan']) { echo "<option value='{$j['id_golongan']}' selected>{$j['nama_pangkat']}</option>"; } else { echo "<option value='{$j['id_golongan']}'>{$j['nama_pangkat']}</option>"; } } echo " \t\t\t</select>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>Jabatan</td>\n\t\t\t\t<td><select name='jabatan' class='formcontrol-select '>\t\n\t\t\t\t\t<option value='' >Pilih Jabatan</option>"; $jab = mysql_query("select * from jabatan"); while ($j = mysql_fetch_array($jab)) { if ($t['id_jab'] == $j['id_jab']) {
} case "tambahmahasiswa": $thn_skrg = date("Y"); echo "<h2>Tambah Mahasiswa</h2>\n<form method=POST action='{$aksi}?module=mahasiswa&act=input' enctype='multipart/form-data'>\n<table>\n<tr>\n\t<td>NIM Mahasiswa</td>\n\t<td> : <input type=text name=nim size=18 maxlength=18></td>\n</tr>\n<tr>\n\t<td>Password</td>\n\t<td> : <input type=text name=password size=30 maxlength=30></td>\n</tr>\n<tr>\n\t<td>Nama Mahasiswa</td>\n\t<td> : <input type=text name=nama size=40 maxlength=100></td>\n</tr>\n<tr>\n\t<td>Jenis Kelamin</td>\n\t<td> :\t<input type='radio' name='jekel' value='L'>L\n\t\t\t<input type='radio' name='jekel' value='P'>P\n\t</td>\n</tr>\n<tr>\n\t\t<td>Jurusan</td>\n\t\t<td> : <select name=kdjur>\n\t\t<option value=0 selected>- Pilih Jurusan -</option>"; $sql = mysql_query("SELECT * FROM jurusan ORDER BY nmjur"); while ($data = mysql_fetch_array($sql)) { echo "<option value={$data['kdjur']}>{$data['nmjur']}</option>"; } echo "</select></td>\n</tr>\n<tr>\n\t<td>Angkatan</td>\n\t<td> : <select name=angkatan>\n\t<option value=0 selected>Angkatan</option>"; for ($ang = 2009; $ang <= $thn_skrg; $ang++) { echo "<option value={$ang}>{$ang}</option>"; } echo "</select>\n\t</td>\n</tr>\n<tr>\n\t<td>Foto</td>\n\t<td> : <input type=file name=fupload size=40></td>\n</tr>\n<tr>\n\t<td>Alamat</td>\n\t<td> : <input type=textarea name=alamat maxlength=200></td>\n</tr>\n<tr>\n\t<td>Tempat / Tanggal Lahir</td>\n\t<td> : <input type=text name='tplhr' size=35 max=50> / "; combotgl(1, 31, 'tanggal', $tgl_skrg); combobln(1, 12, 'bulan', @$bln_skrg); combotgl(1989, $thn_skrg, 'tahun', $thn_skrg); echo "</td>\n</tr>\n<tr>\n<td>Agama</td>\n\t<td> : <select name='agama'>\n\t\t\t<option value='Islam' selected>Islam</option>\n\t\t\t<option value='Kristen Protestan'>Kristen Protestan</option>\n\t\t\t<option value='Kristen Katholik'>Kristen Katholik</option>\n\t\t\t<option value='Hindu'>Hindu</option>\n\t\t\t<option value='Budha'>Budha</option>\n\t\t\t</select>\n\t</td>\n</tr>\n<tr>\n\t<td>No. Telp</td>\n\t<td> : <input type=text name='notelp' size=15 maxlength=15></td>\n</tr>\n<tr>\n\t<td>Asal Sekolah</td>\n\t<td> : <input type=text name='asalsekolah' size=35 maxlength=50></td>\n</tr>\n<tr>\n\t<td>Tahun Lulus</td>\n\t<td> : <select name='thlulus'>\n\t<option value=0 selected>Tahun Lulus</option>"; for ($tl = 2009; $tl <= $thn_skrg; $tl++) { echo "<option value={$tl}>{$tl}</option>"; } echo "</select>\n\t</td>\n</tr>\n<tr>\n\t<td colspan=2><input type=submit value=Simpan>\n\t<input type=button value=Batal onclick=self.history.back()>\n\t</td>\n</tr>\n</table>\n</form>"; break; case "editmahasiswa": $edit = mysql_query("SELECT * FROM mahasiswa WHERE nim='{$_GET['id']}'"); $r = mysql_fetch_array($edit); $thn_skrg = date("Y"); echo "<h2>Edit Mahasiswa</h2>\n<form method=POST action='{$aksi}?module=mahasiswa&act=update' enctype='multipart/form-data'>\n<input type=hidden name=id value='{$r['nim']}'>\n<table>\n<tr>\n\t<td>NIM Mahasiswa</td>\n\t<td> : <input type=text name=nim size=18 maxlength=18 value='{$r['nim']}'></td>\n</tr>\n<tr>\n\t<td>Password</td>\n\t<td> : <input type=text name=password size=30 maxlength=30> *) </td>\n</tr>\n<tr>\n\t<td>Nama Mahasiswa</td>\n\t<td> : <input type=text name=nama size=40 maxlength=100 value='{$r['nama']}'></td>\n</tr>\n<tr>\n\t<td>Jenis Kelamin</td>\n\t<td> :\t<input type='radio' name='jekel' value='L'>L\n\t\t\t<input type='radio' name='jekel' value='P'>P\n\t</td>\n</tr>\n<tr>\n\t\t<td>Jurusan</td>\n\t\t<td> : <select name=kdjur>"; $tampil = mysql_query("SELECT * FROM jurusan ORDER BY nmjur"); while ($w = mysql_fetch_array($tampil)) { if ($r['kdjur'] == $w['kdjur']) { echo "<option value='{$w['kdjur']}' selected>{$w['nmjur']}</option>";