default: echo "<h2>Jurusan</h2>\n<input type=button value='Tambah Jurusan' onclick=\"window.location.href='?module=jurusan&act=tambahjurusan';\">\n<table>\n<tr>\n\t<th>No.</th>\n\t<th>Kode Jurusan</th>\n\t<th>Nama Jurusan</th>\n\t<th>Kode Fakultas</th>\n\t<th>Nama Ketua</th>\n\t<th>Alamat Jurusan</th>\n\t<th>Aksi</th>\n</tr>"; $p = new Paging(); $batas = 10; $posisi = $p->cariposisi($batas); $tampil = mysql_query("SELECT * FROM jurusan ORDER BY kdjur limit {$posisi},{$batas}"); $no = $posisi + 1; while ($r = mysql_fetch_array($tampil)) { echo "<tr>\n\t\t\t<td>{$no}</td>\n\t\t\t<td>{$r['kdjur']}</td>\n\t\t\t<td>{$r['nmjur']}</td>\n\t\t\t<td>{$r['kdfak']}</td>\n\t\t\t<td>{$r['nmketua']}</td>\n\t\t\t<td>{$r['almtjur']}</td>\n\t\t\t<td><a href=?module=jurusan&act=editjurusan&id={$r['kdjur']}><img src='images/edit-icon.gif' alt='edit' /></a>\n\t\t\t<a href={$aksi}?module=jurusan&act=hapus&id={$r['kdjur']}><img src='images/hapus-icon.gif' alt='hapus' /></a>\n\t\t\t</td>\n\t\t</tr>"; $no++; } echo "</table>"; $tampil2 = mysql_query("select * from jurusan"); $jmldata = mysql_num_rows($tampil2); $jmlhalaman = $p->jumlahHalaman($jmldata, $batas); $linkHalaman = $p->navHalaman(@$_GET[halaman], $jmlhalaman); echo "<p>{$linkHalaman}</p>"; break; case "tambahjurusan": echo "<h2>Form Jurusan</h2>\n<form name=form1 method=POST action='{$aksi}?module=jurusan&act=input'>\n<table>\n\t<tr>\n\t\t<td>Fakultas</td>\n\t\t<td> : <select name=kdfak>\n\t\t<option value=0 selected>- Pilih Fakultas -</option>"; $sql = mysql_query("SELECT * FROM fakultas ORDER BY kdfak"); while ($data = mysql_fetch_array($sql)) { echo "<option value={$data['kdfak']}>{$data['nmfak']}</option>"; } echo "</select></td>\n\t</tr>\n\t<tr>\n\t\t<td>Kode Jurusan</td>\n\t\t<td> : <input type=text name=kdjur size=23 maxlength=15></td>\n\t</tr>\n\t<tr>\n\t\t<td>Nama Jurusan</td>\n\t\t<td> : <input type=text name=nmjur size=50 maxlength=100></td>\n\t</tr>\n\t<tr>\n\t\t<td>NIP Ketua</td>\n\t\t<td> : <input type=text name=nipketua size=50 maxlength=100></td>\n\t</tr>\n\t<tr>\n\t\t<td>Nama Ketua</td>\n\t\t<td> : <input type=text name=nmketua size=50 maxlength=100></td>\n\t</tr>\n\t<tr>\n\t\t<td>Alamat Jurusan</td>\n\t\t<td> : <input type=text name=almtjur size=50 maxlength=100></textarea>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=2><input type=submit value=Simpan>\n\t\t<input type=button value=Batal onclick=self.history.back()></td>\n\t</tr>\n</table>\n</form>"; break; case "editjurusan": $edit = mysql_query("SELECT * FROM jurusan WHERE kdjur='{$_GET['id']}'"); $r = mysql_fetch_array($edit); echo "<h2>Edit Jurusan</h2>\n<form method=POST action={$aksi}?module=jurusan&act=update>\n\t<input type=hidden name=id value={$r['kdjur']}>\n\t<table>\n\t\t<tr>\n\t\t\t<td>Fakultas</td>\n\t\t\t<td> : <select name=kdfak>"; $tampil = mysql_query("SELECT * FROM fakultas ORDER by nmfak");
<?php } $nov++; } ?> </div> <!-- **bx-pager - Ends** --> </div> <!-- **recent-gallery-container - Ends** --> <div class="dt-sc-margin30"></div> <!-- **pagination - Starts** --> <div class="pagination"> <ul> <?php $getpage = $val->validasi($_GET['page'], 'sql'); $jmldata = $tablevid->numRowBy(id_album, $idalb); $jmlhalaman = $p->jumlahHalaman($jmldata, $batas); $linkHalaman = $p->navHalaman($getpage, $jmlhalaman, $website_url, "video/{$title}", "page", "1"); echo "{$linkHalaman}"; ?> </ul> </div> <!-- **pagination - Ends** --> <div class="dt-sc-margin50"></div> </div> </article> </section> </div> <!-- **container - Ends** --> </div> <!-- **Main - Ends** --> <?php } else { header('location:' . $website_url . '/404.php'); } ?>
echo "<h2>Mahasiswa</h2>\n<table>\n<tr>\n\t<th>No.</th>\n\t<th>NIM Mahasiswa</th>\n\t<th>Nama</th>\n\t<th>No. Telpon</th>\n\t<th>Jenis Kelamin</th>\n\t<th>Tempat/Tgl Lahir</th>\n\t<th>Jurusan</th>\n\t<th>Angkatan</th>\n\t<th>Aksi</th>\n</tr>"; $p = new Paging(); $batas = 10; $posisi = $p->cariposisi($batas); $tampil = mysql_query("SELECT * FROM mahasiswa,jurusan WHERE mahasiswa.kdjur=jurusan.kdjur AND mahasiswa.nim='{$_SESSION['namauser']}' ORDER BY nim limit {$posisi},{$batas}"); $no = $posisi + 1; while ($r = mysql_fetch_array($tampil)) { $tglhr = tgl_indo($r['tglhr']); echo "<tr><td>{$no}</td>\n\t\t\t\t<td>{$r['nim']}</td>\n\t\t\t\t<td>{$r['nama']}</td>\n\t\t\t\t<td>{$r['notelp']}</td>\n\t\t\t\t<td>{$r['jekel']}</td>\n\t\t\t\t<td>{$r['tplhr']}, {$tglhr}</td>\n\t\t\t\t<td>{$r['nmjur']}</td>\n\t\t\t\t<td>{$r['angkatan']}</td>\n\t\t\t\t<td><a href=?module=mahasiswa&act=editmahasiswa&id={$r['nim']}><img src='images/edit-icon.gif' alt='edit' /></a>\n\t\t\t</tr>"; $no++; } echo "</table>"; $tampil2 = mysql_query("SELECT * FROM mahasiswa,jurusan WHERE mahasiswa.kdjur=jurusan.kdjur AND mahasiswa.nim='{$_SESSION['namauser']}' ORDER BY nim"); $jmldata = mysql_num_rows($tampil2); $jmlhalaman = $p->jumlahHalaman($jmldata, $batas); $linkHalaman = $p->navHalaman($_GET['halaman'], $jmlhalaman); echo "<p>{$linkHalaman}</p>"; 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);
...</div> </div> </div> <?php } ?> </div> <div class="row"> <div class="col-md-12"> <div class="text-center"> <ul class="pagination"> <?php $getpage = $val->validasi($_GET['page'], 'sql'); $jmldata = $tabledcpost->numRowByAnd(id_category, "{$iddcat}", active, "Y"); $jmlhalaman = $p->jumlahHalaman($jmldata, $batas); $linkHalaman = $p->navHalaman($getpage, $jmlhalaman, $website_url, "category", $currentDcat->seotitle, "1"); echo "{$linkHalaman}"; ?> </ul> </div> </div> </div> </div> </section> <?php } else { header('location:' . $website_url . '/404.php'); } ?>
...</div></div> </div> </div> <?php } ?> </div> <div class="row"> <div class="col-md-12"> <div class="text-center"> <ul class="pagination"> <?php $getpage = $val->validasi($_GET['page'], 'sql'); $jmldata = $tablesearch->numRowSearchPost($kata); $jmlhalaman = $p->jumlahHalaman($jmldata, $batas); $linkHalaman = $p->navHalaman($getpage, $jmlhalaman, $website_url, "search-result", $kata); echo "{$linkHalaman}"; ?> </ul> </div> </div> </div> <?php } else { ?> <div class="col-md-12"> <h1 class="text-center">Your keyword entered not found, please try again.</h1> </div> <?php } ?>
</time> <p class="text"><?php echo autolink($comcontent); ?> </p> <?php } ?> <div class="pagination magz-pagination"> <ul class="pagination pull-right"> <?php $getpage = $val->validasi($_GET['page'], 'sql'); $jmldata = $tabledcom->numRowByAnd(id_post, $idpost, active, 'Y'); $jmlhalaman = $p->jumlahHalaman($jmldata, $batas); $linkHalaman = $p->navHalaman($getpage, $jmlhalaman, $website_url, "detailpost", $currentDpost->seotitle); echo "{$linkHalaman}"; ?> </ul> <div class="clearfix"></div> </div> <?php } ?> </div> <div class="col-sm-16"> <div class="main-title-outer pull-left"> <div class="main-title">leave a comment</div> </div> <div class="col-xs-16 wow zoomIn animated"> <form method="post" action="<?php
?> ...</a> </li> <?php } } ?> </ul> <div class="row"> <p> </p> <ul class="pagination clearfix page_margin_top_section"> <?php $getpage = $val->validasi($_GET['page'], 'sql'); $jmldata = $tablegal->numRow(); $jmlhalaman = $p->jumlahHalaman($jmldata, $batas); $linkHalaman = $p->navHalaman($getpage, $jmlhalaman, $website_url, "gallery", "page", "1"); echo "{$linkHalaman}"; ?> </ul> </div> </div> <?php include_once "po-content/{$folder}/sidebar.php"; ?> </div> </div> </div> <!-- *******************************************************
</div> <!-- **entry-detail - Ends** --> </div> </article> <!-- **Blog-post - Ends** --> </div> <?php $nov++; } ?> <!-- **pagination - Starts** --> <div class="pagination"> <ul> <?php $getpage = $val->validasi($_GET['page'], 'sql'); $jmldata = $tableevt->numRow(); $jmlhalaman = $p->jumlahHalaman($jmldata, $batas); $linkHalaman = $p->navHalaman($getpage, $jmlhalaman, $website_url, "listevent", "page", "1"); echo "{$linkHalaman}"; ?> </ul> </div> <!-- **pagination - Ends** --> <div class="dt-sc-margin50"></div> </div> <!-- **container - Ends** --> </section> </div> </div> <!-- **Main - Ends** --> <!-- ******************************************************* Include Footer Template *******************************************************
</a></h5> </div> </div> <!-- **portfolio-detail - Ends** --> </div> <?php } ?> </div> <!-- **portfolio-container - Ends** --> <!-- **pagination - Starts** --> <div class="pagination"> <ul> <?php $getpage = $val->validasi($_GET['page'], 'sql'); $jmldata = $tablealb->numRow(); $jmlhalaman = $p->jumlahHalaman($jmldata, $batas); $linkHalaman = $p->navHalaman($getpage, $jmlhalaman, $website_url, "album", "page", "1"); echo "{$linkHalaman}"; ?> </ul> </div> <!-- **pagination - Ends** --> <div class="dt-sc-margin50"></div> </section> </div> <!-- **container - Ends** --> </div> <!-- **Main - Ends** --> <!-- ******************************************************* Include Footer Template ******************************************************* -->
$QProduct = mysql_query("SELECT ISBN, judul, fileGambar, harga\n\t\t\t\t\t\tFROM buku LIMIT {$posisi}, {$batas}") or die('<meta http-equiv="refresh" content="0;url=index.php">'); echo "<table align='center'>"; $i = 0; $kolom = 4; while ($r = mysql_fetch_array($QProduct)) { $ISBN = $r['ISBN']; $Judul = $r['judul']; $FileGambar = 'dashboard/img/thumb_' . $r['fileGambar']; $Harga = number_format($r['harga'], 2, ",", "."); if ($i >= $kolom) { echo "\n\t\t\t<tr>\n\t\t\t"; $i = 0; } echo "<td align='center' width='150'>\n\t\t{$Judul}<br />"; if (file_exists($FileGambar)) { echo "<a href='?v=show_product_detail&id={$ISBN}'><img src='{$FileGambar}' alt='{$Judul}' width='100' height='150'\\></a><br />"; } else { echo "<a href='?v=show_product_detail&id={$ISBN}'><img src='dashboard/img/photo_not_available.jpg' width='100' height='150'></a><br />"; } echo "\n\t\tRp {$Harga}<br /> \n\t\t<form action='InsertProduct.php' method='POST'>\n\t\t<input type='hidden' name='ISBN' value='{$ISBN}'>\n\t\t<input type='hidden' name='jml' value='1' size='2' \\>\n\t\t<input type='submit' value='Beli' name='submit' \\>\n\t\t</form>\n\t\t</td>"; $i++; } echo "</table>"; $jmldata = mysql_num_rows(mysql_query("SELECT ISBN, judul, fileGambar, harga\n\t\t\t\t\t\t\t\tFROM buku")); $jmlhalaman = $p->jumlahHalaman($jmldata, $batas); $linkHalaman = $p->navHalaman($hal, $jmlhalaman); echo "<div id=paging>Hal: {$linkHalaman}</div><br>"; if ($_GET['halaman'] > $jmlhalaman) { echo '<meta http-equiv="refresh" content="0;url=index.php">'; exit; }