<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>English Lesson Of Grammar</title>
<link href="css/rheyank_style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="css/ddsmoothmenu.css" />
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/ddsmoothmenu.js">
/***********************************************
* Smooth Navigational Menu- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
</script>
<script type="text/javascript">
ddsmoothmenu.init({
mainmenuid: "menu", //menu DIV id
orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
classname: 'ddsmoothmenu', //class added to menu's outer DIV
//customtheme: ["#1c5a80", "#18374a"],
contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
})
</script>
<style type="text/css">
<!--
.style1 {color: #75a62c}
.style2 {
color: #333;
font-weight: bold;
}
-->
</style>
</head>
<body>
<div id="body">
<div id="header"></div>
<!-- end of header -->
<div id="menu" class="ddsmoothmenu"></div>
<!-- end of menu -->
<div id="main">
<h2>Masukan Data Diri Anda !!! </h2>
<div class="col_2 float_l">
<br class="cleaner h20" />
<div id="data_form">
<form action="simpan2.php" method="post" NAME="input">
<label for="id">ID</label> <input type="text" id="id" name="id" class="input" />
<div class="cleaner h10"></div>
<label for="nama">Nama</label> <input type="text" id="nama" name="nama" class="input" />
<div class="cleaner h10"></div>
<label for="kelas">Kelas</label> <input type="text" id="kelas" name="kelas" class="input" />
<div class="cleaner h10"></div>
<label for="alamat">Alamat</label> <input type="text" id="alamat" name="alamat" class="input" />
<div class="cleaner h10"></div>
<label for="username">Username</label> <input type="text" id="username" name="username" class="input" />
<div class="cleaner h10"></div>
<label for="password">Password</label> <input type="password" id="password" name="password" class="input" />
<div class="cleaner h10"></div>
<input type="submit" value="Daftar" id="submit" name="submit" class="submit_btn float_l" />
<input type="reset" value="Reset" id="reset" name="reset" class="submit_btn float_r" />
</form>
</div>
</div>
<div class="col_2 float_l">
<h4 class="style1">Petunjuk ..</h4>
<p align="justify">Sebelum anda mengakses Aplikasi ini, Anda diharuskan untuk mengisi data diri anda pada form yang ada disebelah kiri tersebut. Setelah itu tekan <span class="style2">"Daftar"</span>. Maka anda akan dapat mengakses aplikasi ini dengan bebas kapanpun. </p>
<p align="justify">Jika anda sudah terdaftar, silakan <span class="style2">"Login"</span> untuk mengakses aplikasi ini.</p>
<p align="justify">terdapat materi yang dapat dibaca, dan didownload. Terdapat juga soal latihan untuk mengukur kemampuan anda mengenai materi grammar. </p>
<p align="justify">Selamat mencoba !!! </p>
<div class="cleaner h10"></div>
<form method="post" action="login.php">
<table width="329" height="198" border="0" align="center" background="backgroud.png">
<tr>
<th width="24" rowspan="3" scope="row"> </th>
<th height="35%" colspan="3" scope="row"> </th>
<td width="22" rowspan="3"> </td>
</tr>
<tr>
<th width="85" height="45" scope="row"> <div align="left">Username</div></th>
<td width="15">:</td>
<td width="161">
<input type="text" name="username" /> </td>
</tr>
<tr>
<th height="47" scope="row"><div align="left">Password</div></th>
<td>:</td>
<td><input type="password" name="password" /></td>
</tr>
<tr>
<th height="45" colspan="5" scope="row">
<input type="submit" name="Submit" value="Login" />
<input name="reset" type="reset" value="Reset" /></th>
</tr>
<tr>
<th height="27" colspan="5" scope="row"> </th>
</tr>
</table>
</form>
<a href="#" class="more">Lanjut</a>
</div>
<br class="cleaner" />
</div> <!-- end of main -->
<div id="footer">
<div class="footer_social_button">
<a href="#"><img src="images/facebook-32x32.png" title="facebook" alt="facebook" /></a>
<a href="#"><img src="images/flickr-32x32.png" title="flickr" alt="flickr" /></a>
<a href="#"><img src="images/twitter-32x32.png" title="twitter" alt="twitter" /></a>
<a href="#"><img src="images/youtube-32x32.png" title="youtube" alt="youtube" /></a>
<a href="#"><img src="images/rss-32x32.png" title="rss" alt="rss" /></a>
</div>
</div>
<div class="cleaner"></div>
</div> <!-- end of footer -->
<div id="cr_bar_wrapper">
<div id="cr_bar">
Copyright © 2013 Designed by <a href="http://www.facebook.com/rheyank.iwan">Rheyank Iwan</a> </div>
</div>
</body>
</html>
<?
//Cek Tombol
if ($_POST){
//Kirimkan Variabel
$id = $_POST['id'];
$nama = $_POST['nama'];
$kelas = $_POST['kelas'];
$alamat = $_POST['alamat'];
$username = $_POST['username'];
$password = $_POST['password'];
//validasi data jika pesan kosong
if (empty($_POST['id'])|| empty($_POST['nama'])|| empty($_POST['kelas'])|| empty($_POST['alamat'])|| empty($_POST['username'])|| empty($_POST['password']))
{
?>
<script language="JavaScript">
alert('Data Harap Dilengkapi');
document.location='inputsiswa.php';
</script>
<?
}
//Jika Validasi Terpenuhi
else
{
//Memanggil File Koneksi Database
mysql_connect("localhost", "root", "12345");
mysql_select_db("english");
//Masukan data ke Table user
$query ="INSERT INTO user VALUES('$id','$nama','$kelas','$alamat','$username','$password')";
$hasil = mysql_query($query);
if($hasil){
//Jika Sukses
//echo "Data telah diinput";
?>
<script language="JavaScript">
alert('Data Berhasil diinput');
document.location='index.php';
</script>
<?
}
else
{
//Jika Gagal
//echo "Data gagal diinput, Silakan Ulangi";
}
}
}
?>
<script language="JavaScript">
alert('Data Gagal diinput,, Silakan ulangi');
document.location='inputsiswa.php';
</script>
<?php
session_start();
include_once"koneksi.php";
$id=$_POST['id'];
$tpl_file="contoh izin KB.rtf";
if (file_exists($tpl_file)) {
// Alamat file hasil parser
$target = "Datalatihan.rtf";
// Membuka file template
$f = fopen($tpl_file, "r+");
$isi = fread($f, filesize($tpl_file));
fclose($f);
// Query menampilkan data
$sql1="select * from perusahaan WHERE id='$id'";
$qry1=mysql_query($sql1, $koneksi);
$data1 = mysql_fetch_array($qry1);
$sql2="SELECT * FROM alamat_us WHERE id='$id'";
$qry2=mysql_query($sql2, $koneksi)or die ("Gagal query pribadi");
$data2 = mysql_fetch_array($qry2);
$sql3="SELECT * FROM permohonan WHERE id='$id'";
$qry3=mysql_query($sql3, $koneksi)or die ("Gagal query pribadi");
$data3 = mysql_fetch_array($qry3);
$sql4="select * from perusahaan a, kanwil b where a.kanwil_id=b.id and a.id='$id'";
$qry4=mysql_query($sql4,$koneksi) or die(mysql_error());
$data4=mysql_fetch_array($qry4);
$sql5="SELECT * FROM pemeriksaan WHERE id='$id'";
$qry5=mysql_query($sql5, $koneksi)or die ("Gagal query pribadi");
$data5=mysql_fetch_array($qry5);
$sql6="SELECT * FROM alamat WHERE id='$id'";
$qry6=mysql_query($sql6, $koneksi)or die ("Gagal query pribadi");
$data6 = mysql_fetch_array($qry6);
$sql7="SELECT * FROM penanggungjawab WHERE id='$id'";
$qry7=mysql_query($sql7, $koneksi)or die ("Gagal query pribadi");
$data7 = mysql_fetch_array($qry7);
$sql8="SELECT * FROM batas_lokasi WHERE id='$id'";
$qry8=mysql_query($sql8, $koneksi)or die ("Gagal query pribadi");
$data8 = mysql_fetch_array($qry8);
$sql9="SELECT * FROM batas_lokasi WHERE id='$id'";
$qry9=mysql_query($sql9, $koneksi)or die ("Gagal query pribadi");
$data9 = mysql_fetch_array($qry9);
$sql10="SELECT * FROM jenis_hasil_produksi WHERE id='$id'";
$qry10=mysql_query($sql10, $koneksi)or die ("Gagal query pribadi");
$data10 = mysql_fetch_array($qry10);
$sql11="select * from perusahaan a, kppbc b where a.kppbc_id=b.id and a.id='$id'";
$qry11=mysql_query($sql11,$koneksi);
$data11=mysql_fetch_array($qry11);
// Menempatkan data pribadi kedalam template str_replace(yg mw diganti,diganti dengan, isinya)
$bnama=strtoupper($data1['nama']);
$balamat_us=strtoupper($data2['alamat_us']);
$bdesa_us=strtoupper($data2['desa_us']);
$bkecamatan_us=strtoupper($data2['kecamatan_us']);
$bkabupaten_us=strtoupper($data2['kabupaten_us']);
$bprovinsi_us=strtoupper($data2['provinsi_us']);
$bkota_us= strtoupper($data2['kota_us']);
$isi = str_replace('nama', $data1['nama'], $isi);
$isi = str_replace('bnma', $bnama, $isi);
$isi = str_replace('balamat_us', $balamat_us, $isi);
$isi = str_replace('bdesa_us', $bdesa_us, $isi);
$isi = str_replace('bkecamatan_us', $bkecamatan_us, $isi);
$isi = str_replace('bkabupaten_us', $bkabupaten_us, $isi);
$isi = str_replace('bprovinsi_us', $bprovinsi_us, $isi);
$isi = str_replace('bkota_us', $bkota_us, $isi);
$isi = str_replace('alamat_us', $data2['alamat_us'], $isi);
$isi = str_replace('desa_us', $data2['desa_us'], $isi);
$isi = str_replace('kecamatan_us', $data2['kecamatan_us'], $isi);
$isi = str_replace('kabupaten_us', $data2['kabupaten_us'], $isi);
$isi = str_replace('provinsi_us', $data2['provinsi_us'], $isi);
$isi = str_replace('kota_us', $data2['kota_us'], $isi);
$isi = str_replace('nomor_permohonan', $data3['nomor_permohonan'], $isi);
$isi = str_replace('tgl_permohonan', $data3['tgl_permohonan'], $isi);
$isi = str_replace('nama_kanwil', $data4['nama_kanwil'], $isi);
$isi = str_replace('nomor_suratbc', $data5['nomor_suratbc'], $isi);
$isi = str_replace('tgl_suratbc', $data5['tgl_suratbc'], $isi);
$isi = str_replace('perihal_suratbc', $data5['perihal_suratbc'], $isi);
$isi = str_replace('nomor_ba', $data5['nomor_ba'], $isi);
$isi = str_replace('tgl_ba', $data5['tgl_ba'], $isi);
$isi = str_replace('alamat', $data6['alamat'], $isi);
$isi = str_replace('desa', $data6['desa'], $isi);
$isi = str_replace('kecamatan', $data6['kecamatan'], $isi);
$isi = str_replace('kabupaten', $data6['kabupaten'], $isi);
$isi = str_replace('provinsi', $data6['provinsi'], $isi);
$isi = str_replace('kota', $data6['kota'], $isi);
$isi = str_replace('nama_pen', $data7['nama_pen'], $isi);
$isi = str_replace('alamat_pen', $data7['alamat_pen'], $isi);
$isi = str_replace('desa_pen', $data7['desa_pen'], $isi);
$isi = str_replace('kecamatan_pen', $data7['kecamatan_pen'], $isi);
$isi = str_replace('kabupaten_pen', $data7['kabupaten_pen'], $isi);
$isi = str_replace('provinsi_pen', $data7['provinsi_pen'], $isi);
$isi = str_replace('kota_pen', $data7['kota_pen'], $isi);
$isi = str_replace('tempat_lhr', $data7['tempat_lhr'], $isi);
$isi = str_replace('tangal_lhr', $data7['tangal_lhr'], $isi);
$isi = str_replace('npwp_pen', $data7['npwp_pen'], $isi);
$isi = str_replace('luas', $data1['luas'], $isi);
$isi = str_replace('barat', $data8['barat'], $isi);
$isi = str_replace('timur', $data8['timur'], $isi);
$isi = str_replace('utara', $data8['utara'], $isi);
$isi = str_replace('selatan', $data8['selatan'], $isi);
$isi = str_replace('barat_us', $data9['barat_us'], $isi);
$isi = str_replace('timur_us', $data9['timur_us'], $isi);
$isi = str_replace('utara_us', $data9['utara_us'], $isi);
$isi = str_replace('selatan_us', $data9['selatan_us'], $isi);
$isi = str_replace('nama_jenishslproduksi', $data10['nama_jenishslproduksi'], $isi);
$isi = str_replace('nama_kppbc', $data11['nama_kppbc'], $isi);
//merekam kembali file hasil parser
$f = fopen($target, "w+");
fwrite($f, $isi);
fclose($f);
echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=0;URL=$target>";
}
?>
<?php
include_once "library/inc.library.php";
include_once "library/inc.connection.php";
?>
<form action="kartu_tinggal_barcode128.php" method="post" name="frmadd" target="_blank">
<table width="600" cellpadding="2" cellspacing="1" class="table-list" style="margin-top:0px;">
<tr>
<th colspan="3">BUAT KARTU TINGGAL </th>
</tr>
<td width="24%"><strong>MASUKKAN NOMOR <font color="red" size="2"> *</font></strong></td>
<td width="2%"><b>:</b></td>
<td width="74%">
<select name="cmbNomor">
<?php
$arrayNomor = array("KODEPENGHUNI","NAMAPENGHUNI");
foreach ($arrayNomor as $index => $value) {
if ($arrayNomor==$value) {
$cek="selected";
} else { $cek = ""; }
echo "<option value='$value' $cek>$value</option>";
}
?>
</select>
<input name="txtNomor" id="txtNomor" size="30" maxlength="20" />
<input name="btnCari" type="submit" style="cursor:pointer;" value=" CARI " /></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td colspan="3"><a href="karyawan_cari.php" target="_blank"><img src="images/btn_cari_karyawan.png" height="25" border="0" /></a></td>
</tr>
</table>
</form>
<?php
include_once "library/inc.connection.php";
include_once "library/inc.library.php";
include_once "library/bar128.php";
if($_GET) {
# PERIKSA DATA DARI HALAMAN PENCARIAN
if(isset($_POST['btnCari'])){
if (trim($_POST['txtNomor'])=="") {
echo "KODE PENGHUNI ATAU NAMA PENGHUNI BELUM DIMASUKKAN";
include "kartu_tinggal.php";
exit;
}
# Jika yang dipilih TINGGAL (berarti NOMOR TINGGAL)
if($_POST['cmbNomor']=="KODEPENGHUNI") {
$cekSql = "SELECT K.*, T.no_tinggal, T.kd_dormitory FROM t_penghuni As K, t_tinggal As T
WHERE K.kd_penghuni = T.kd_penghuni AND K.kd_penghuni='".$_POST['txtNomor']."'";
$dataQry = mysql_query($cekSql, $koneksidb) or die ("Query barang salah : ".mysql_error());
$dataRow = mysql_fetch_array($dataQry);
if($dataRow['foto']=="") {
$foto = "nophoto.jpg";
}
else {
$foto = $dataRow['foto'];
}
$infoError = "TIDAK ADA DATA PENGHUNI DENGAN KODE PENGHUNI <b>".$_POST['txtNomor']."</b> DALAM DATABASE";
}
else {
# Jika bukan Tinggal, berarti Nomor Karyawan / Kode Karyawan
$cekSql = "SELECT K.*, T.no_tinggal, T.kd_dormitory FROM t_penghuni As K, t_tinggal As T
WHERE K.kd_penghuni = T.kd_penghuni AND K.kd_penghuni='".$_POST['txtNomor']."' AND t_penghuni.nm_penghuni LIKE '%".$_POST['txtCari']."%'";
$dataQry = mysql_query($cekSql, $koneksidb) or die ("Query barang salah : ".mysql_error());
$nomor = 0;
$dataRow = mysql_fetch_array($dataQry);
if($dataRow['foto']=="") {
$foto = "nophoto.jpg";
}
else {
$foto = $dataRow['foto'];
}
$infoError = "TIDAK ADA DATA PENGHUNI DENGAN NAMA <b>".$_POST['txtNomor']."</b> DALAM DATABASE";
}
}
} // Penutup GET
?>
<html>
<head>
<title> Kartu Tinggal Penghuni</title>
</head>
<body>
<table width="470" border="0" cellpadding="4" cellspacing="1" bgcolor="#000000" class="table-list">
<tr>
<td width="71" align="center" valign="top" bgcolor="#FFFFFF"><img src="foto/<?php echo $foto; ?>" width="65" height="104"></td>
<td width="360" valign="top" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="2" cellpadding="2">
<tr>
<td align="center" scope="col"><h2>Kartu Tinggal Dormitory</h2></td>
</tr>
<tr>
<td align="left">Kode Penghuni : <b><?php echo strtoupper($dataRow['kd_penghuni']); ?></b></td>
</tr>
<tr>
<td align="left">Nama Penghuni : <b><?php echo strtoupper($dataRow['nm_penghuni']); ?></b></td>
</tr>
<tr>
<td align="left">Kode Dormitory : <b><?php echo strtoupper($dataRow['kd_dormitory']); ?></b></td>
</tr>
<tr>
<td align="left">Agama : <b><?php echo strtoupper($dataRow['agama']); ?></b></td>
</tr>
<tr>
<td align="left">Nomor Telepon : <b><?php echo strtoupper($dataRow['no_telp']); ?></b></td>
</tr>
<tr>
<td align="center" scope="col"><?php echo bar128(stripslashes($dataRow['no_tinggal'])); ?></td>
</tr>
</table></td>
</tr>
</table>
</body>