This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
LAMPIRAN
1. Listing Program Aplikasi Absensi Berbasis SMS Gateway
Default.php * {
margin: 0;
padding: 0;
}
body {
margin-top: 220px;
background: #000000 url(images/img01.png) no-repeat center top;
font: normal small Verdana, Arial, Helvetica, sans-serif;
color: #999999;
}
h1, h2, h3 {
color: #FFFFFF;
}
h2 {
}
h3 {
}
p, blockquote, ul, ol {
margin-bottom: 1.4em;
line-height: 1.8em;
text-align: justify;
}
p {
}
blockquote {
margin-left: 2em;
Universitas Sumatera Utara
margin-right: 2em;
font-style: italic;
}
ul {
margin-left: 3em;
}
ul li {
}
ol {
margin-left: 3em;
}
ol li {
}
a {
text-decoration: none;
color: #FFFFFF;
}
a:hover {
text-decoration: underline;
}
img {
border: 4px solid #C4C2C2;
}
/* Boxed Style */
.boxed {
margin-bottom: 20px;
}
.boxed .title {
margin: 0;
Universitas Sumatera Utara
padding: 5px 0;
background: url(images/img07.gif) repeat-x left bottom;
font-size: 1em;
}
.boxed .content {
padding: 15px;
}
/* Post */
.post {
}
.post .title {
padding: 10px 0;
background: url(images/img07.gif) repeat-x left bottom;
font-size: 1.6em;
font-weight: normal;
}
.post .date {
padding-top: 5px;
font-size: .8em;
font-weight: normal;
}
.post .date .month {
}
.post .date .day {
}
.post .date .year {
Universitas Sumatera Utara
}
.post .meta {
padding-bottom: 10px;
background: url(images/img07.gif) repeat-x left bottom;
<html> <head> <title>CV. Utama Teknik Jaya</title> <link href="default.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="header"></div> <div id="wrapper" align="center"> <div align="center"><h2>Silahkan Isi Daftar Hadir Anda</h2></div><br> <form action="proses_absen.php" method="post"> <? if(isset($err1)){ echo "<table width=363 border=0 align=center><tr><td><blink>Data anda masih
kosong</blink></div></td></tr></table>"; } else if (isset($err2)){
echo "<table><tr><td><blink>Password anda Salah</blink></div></td></tr></table>"; } else if (isset($err3)){ echo "<table><tr><td><blink>NIK anda Salah</blink></div></td></tr></table>"; } else if (isset($err4)){
echo "<table><tr><td><blink>Nama anda Salah</blink></div></td></tr></table>"; }
mysql_query("UPDATE `absen1`.`absensi` SET `JAM_PULANG` = CURTIME( ) WHERE CONVERT( `absensi`.`NIK` USING utf8 ) = '$nik' AND `absensi`.`TANGGAL` = CURDATE( ) AND (`absensi`.`Nama`)='$nama' LIMIT 1 ;");
?><script language="JavaScript">alert('Sampai Jumpa'); document.location='index.php?kategori=index'</script><? } ?> smsterjadwal.php <html> <head> <title>SMS Terjadwal</title> <!-- refresh script setiap 10 detik --> <meta http-equiv="refresh" content="10; url=<?php $_SERVER['PHP_SELF']; ?>"> </head> <body> <h1> <? $jam1=date("H"); $jam2=$jam1-1; $ms=date("is"); $jam=$jam2.$ms; ?> Tanggal : <?=date("Y-m-d")?> Jam : <?=$jam?> SMS Absensi Pegawai Running...</h1> <?php // koneksi ke database mysql mysql_connect("localhost", "root", ""); $db=mysql_select_db("absen1"); $noSibos="+6281376596923"; // baca jam sekarang // cari data teman yang bulan lahir dan tanggal lahir sesuai pada current date $tgl=date("Y-m-d"); if($jam>=80000 && $jam<=80009) { $i=0; $query = "SELECT Nama, JAM_MASUK, TANGGAL from absensi where TEPAT_WAKTU='1' and
TANGGAL='$tgl' order by Nama ASC"; $hasil = mysql_query($query); while($row=mysql_fetch_array($hasil)) { $isi[$i]="$row[Nama], Pukul : $row[JAM_MASUK]"; $i=$i+1; $tanggal="$row[TANGGAL]"; } $PesanSMS = "Pegawai Hadir Tepat Waktu Pukul 08.00 WIB Tanggal ".$tanggal." Atas Nama
mysql_query($query3); } else if($jam>=83000 && $jam<=83009) { $i=0; $query = "SELECT Nama, JAM_MASUK, TANGGAL FROM absensi where TELAT='1' and
TANGGAL='$tgl' order by Nama ASC"; $hasil = mysql_query($query); while($row=mysql_fetch_array($hasil)) { $isi[$i]="$row[Nama], Pukul : $row[JAM_MASUK]"; $i=$i+1; $tanggal="$row[TANGGAL]"; } $PesanSMS = "Pegawai yang Terlambat Pukul 08.30 WIB Tanggal ".$tanggal." Atas Nama :