Tugas WEB

Download as pdf or txt
Download as pdf or txt
You are on page 1of 35

Pendaftaran

Banner :

<kosong>

Content :

<a href="?load=pendaftar.php">Pendaftar</a><br>

<a href="?load=rekap.php">Rekapitulasi</a><br>

Index :

<?

include "init.php";

include "koneksi.php";

?>

<html>

<head>

<title><?=$title?></title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<link href="style.css" rel="stylesheet" type="text/css">

</head>

<body>

<table width="800">

<tr>

<td colspan="3" class="banner"><?include "banner.php"?></td>

</tr>

<tr>

<td width="160" class="content" valign="top"><?include "content.php"?></td>


<td width="5">&nbsp;</td>

<td width="635"><?include "main.php"?></td>

</tr>

<tr>

<td colspan="3"><?include "info.php"?></td>

</tr>

</table>

</body>

</html>

Info :

Pendaftaran Mahasiswa Baru &copy; <?=$pembuat?>, Amik Almasoem 2010.

Init :

<?

$title="BackEnd Pendaftaran ONLine";

$pembuat="team BackEnd";

?>

Koneksi :

<?

function OpenDb(){

$con = mysql_connect('localhost','root','');

if(!$con) return false;

else {

$sel=mysql_select_db('db_07232030');

if(!$sel) return false;

else return true;


}

?>

Main :

<?

$load=@$_GET['load'];

if(!empty($load)) include $load;

?>

Pendaftar :

<h1>Daftar Calon Mahasiswa</h1>

<table>

<tr>

<td width="40"><strong>NO</strong></td>

<td width="180"><strong>NAMA</strong></td>

<td width="240"><strong>ALAMAT</strong></td>

<td width="140"><strong>KOTA</strong></td>

<td width="80"><strong>JENIS</strong></td>

</tr>

<?

if(!OpenDb) die)'error database');

$sql="SELECT * from t_pendaftaran

order by nopen desc";

$result=mysql_query($sql);

while($data=mysql_fetch_object(result)){

$nama= $data -> nama;


$alamat= $data -> alamat;

$kota= $data -> kota;

$telp= $data -> telp;

echo "$id. $menu <br/>";

?>

<?

?>

<tr>

<td width="40"><?=$no?></td>

<td width="180"><?=$nama?></td>

<td width="240"><?=alamat?></td>

<td width="140"><?=kota?></td>

<td width="80"><?=$tlp?></td>

</tr>

</table>

<p>&nbsp;</p>

Rekap :

<h4>Rekapitulasi</h4>

<table>

<tr>

<td width="40"><strong>No</strong></td>

<td width="70"><strong>Tahun</strong></td>

<td width="100"><strong>Bulan</strong></td>

<td width="70"><strong>Jumlah</strong></td>
</tr>

<?

if(!opendb) die('error database');

$th=date('Y');

for($i=1; $i<=12; $i++){

//cari bulan

$bln="00$i"; $bln=substr($bln,strlen($bln)-2,2);

?>

<tr>

<td><?=$i?></td>

<td><?=$th?></td>

<td><?=$aBulan[$i]?></td>

<td>&nbsp;</td>

</tr>

</table>

Simpan :

<?

header('content-type: text/vnd.wap.wml');

echo '<?xml version="1.0" encoding="iso-8859-1"?>';

?>

<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN"


"http://www.wapforum.org/DTD/wml13.dtd" >

<wml>

<card>

<p>
<?

//ambil data dari form

$nama =$_GET['nama'];

$alamat =$_GET['alamat'];

$kota =$_GET['kota'];

$telp =$_GET['telp'];

$email =$_GET['email'];

// validasi

if(empty($nama) or empty($alamat) or empty($kota)

or empty($telp) or empty($email)) {

echo "Data harus diisi semua.<br/>

<a href=\"index.php\">klik</a>";

else {

//simpan

mysql_connect('localhost','root','');

mysql_select_db('db_aan');

// cari no pendaftaran

$thn=date("Ym");

$sql="select count(*) as jml from t_pendaftaran";

$data=mysql_fetch_object(mysql_query($sql));

$jml=$data->jml;

$jml++;

$nourut="0000$jml"; $nourut=substr($nourut,strlen($nourut)-4,4);

$nopen=$thn.$nourut;
//sql simpan

$sql="insert into t_pendaftaran (nopen,nama,alamat,kota,telp,email)

values ('$nopen','$nama','$alamat','$kota','$telp','$email')";

$simpan = mysql_query($sql);

if(!$simpan)

echo "Maaf, proses menyimpan tidak berhasil.<br/>

<a href=\"index.php\">Klik</a>";

else

echo "Data saudara sudah tersimpan.<br/>

nanti petugas kami akan menghubungi sdr.<br/>

<a href=\"index.php\">Klik</a>";

?>

</p>

</card>

</wml>

Style :

body {

font-family: Verdana, Geneva, Arial, helvetica, sans-serif;

td {

font-family: Verdana, Geneva, Arial, helvetica, sans-serif;

}
th {

font-family: Verdana, Geneva, Arial, helvetica, sans-serif;

.banner{

font-family: Verdana, Arial, Helvetica, sans-serif;

background-color: #CC9966;

font-size: 12px;

color: #003366;

.content{

background-color: #FFCC99;

Seminar
Di Backend :

Banner :

<h2>Seminar Hacking</h2>

<p><strong>Aplikasi Pendaftaran ONLine</strong></p>

Content :

<a href="?load=pemesan.php">Pemesan</a><br>

<a href="?load=rekap.php">Rekapitulasi</a><br>

Index :

<?

include "init.php";
include "koneksi.php";

?>

<html>

<head>

<title><?=$title?></title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<link href="style.css" rel="stylesheet" type="text/css">

</head>

<body>

<table width="800">

<tr>

<td colspan="3" class="banner"><?include "banner.php"?></td>

</tr>

<tr>

<td width="160" class="content" valign="top"><?include "content.php"?></td>

<td width="5">&nbsp;</td>

<td width="635" class="main"><?include "main.php"?></td>

</tr>

<tr>

<td colspan="3" class="info"><?include "info.php"?></td>

</tr>

</table>

</body>

</html>
Info :

Seminar Hacking ONLine&copy; <?=$pembuat?>, Amik Almasoem 2010.

Init :

<?

$title="BackEnd Pendaftaran ONLine";

$pembuat="team BackEnd";

?>

Koneksi :

<?

function OpenDb(){

$con = mysql_connect('localhost','root','');

if(!$con) return false;

else {

$sel=mysql_select_db('db_NIM');

if(!$sel) return false;

else return true;

?>

Main :

<?

$load=@$_GET['load'];

if(!empty($load)) include $load;

?>
Pemesan :

<h2>Daftar Calon Peserta</h2>

<table>

<tr>

<td width="37"><strong>NO</strong></td>

<td width="159"><strong>NAMA</strong></td>

<td width="212"><strong>ALAMAT</strong></td>

<td width="129"><strong>TELEPON</strong></td>

<td width="67"><strong>KATEGORI</strong></td>

<td width="99"><strong>JENIS</strong></td>

<td width="52"><strong>KOTA</strong></td>

<td width="52"><strong>ENTRI</strong></td>

</tr>

<tr>

<td width="37">&nbsp;</td>

<td width="159">&nbsp;</td>

<td width="212">&nbsp;</td>

<td width="129">&nbsp;</td>

<td width="67">&nbsp;</td>

<td width="99">&nbsp;</td>

<td width="52">&nbsp;</td>

<td width="52"><a href="#">sudah bayar</a></td>

</tr>

</table>
<p>* Klik sudah bayar, jika valid melakukan pembayaran. </p>

<h2>Daftar Peserta</h2>

<table>

<tr>

<td width="37"><strong>NO</strong></td>

<td width="159"><strong>NAMA</strong></td>

<td width="212"><strong>ALAMAT</strong></td>

<td width="129"><strong>TELEPON</strong></td>

<td width="67"><strong>KATEGORI</strong></td>

<td width="99"><strong>JENIS</strong></td>

<td width="52"><strong>KOTA</strong></td>

</tr>

<tr>

<td width="37">&nbsp;</td>

<td width="159">&nbsp;</td>

<td width="212">&nbsp;</td>

<td width="129">&nbsp;</td>

<td width="67">&nbsp;</td>

<td width="99">&nbsp;</td>

<td width="52">&nbsp;</td>

</tr>

</table>

<p>&nbsp; </p>
Rekap :

<h2>Rekapitulasi</h2>

<h4>Hari :</h4>

<table width="75%" border="0">

<tr>

<td width="9%"><strong>NO</strong></td>

<td width="36%"><strong>JENIS</strong></td>

<td width="37%"><strong>KATEGORI</strong></td>

<td width="18%"><strong>QTY</strong></td>

</tr>

<tr>

<td>&nbsp;</td>

<td>&nbsp;</td>

<td>&nbsp;</td>

<td>&nbsp;</td>

</tr>

</table>

<p>&nbsp;</p>

Style :

body {

font-family: Verdana, Geneva, Arial, helvetica, sans-serif;

td {

font-family: Verdana, Geneva, Arial, helvetica, sans-serif;


}

th {

font-family: Verdana, Geneva, Arial, helvetica, sans-serif;

.banner{

font-family: Verdana, Arial, Helvetica, sans-serif;

background-color: #CC9966;

font-size: 12px;

color: #993300;

.content{

background-color: #FFEBD7;

.main{

font-family: Verdana, Arial, Helvetica, sans-serif;

color: #993300;

.info{

font-family: Verdana, Arial, Helvetica, sans-serif;

font-size: 10px;

}
Seminar :
Index :

<?

header('content-type: text/vnd.wap.wml');

echo '<?xml version="1.0" encoding="iso-8859-1"?>';

?>

<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN"


"http://www.wapforum.org/DTD/wml13.dtd" >

<wml>

<card id="a">

<p align="center">

<b>Seminar Hacking</b><br/>

Amik Almasoem<br/>

<br/>

<a href="#b">Next</a>

</p>

</card>

<card id="b">

<do type="accept">

<go href="simpan.php">

<postfield name="nama" value="$nama"/>

<postfield name="alamat" value="$alamat"/>

<postfield name="kota" value="$kota"/>

<postfield name="telp" value="$telp"/>

<postfield name="email" value="$email"/>

<postfield name="id_kategori" value="$id_kategori"/>


<postfield name="id_jenis" value="$id_jenis"/>

</go>

</do>

<p>

<b>Form Pendaftaran:</b><br/>

<?

include "koneksi.php";

if(OpenDb()) {

echo "Nama Pendaftar: <input type=\"text\" name=\"nama\" />

Alamat: <input type=\"text\" name=\"alamat\" />

Kota: <input type=\"text\" name=\"kota\" />

Telepon: <input type=\"text\" name=\"telp\" />

E-mail: <input type=\"text\" name=\"email\" />";

echo "Kategori: <select name=\"id_kategori\">";

$sql="SELECT * FROM t_kategori ORDER BY id_kategori";

$result=mysql_query($sql);

while($data=mysql_fetch_object($result)) {

// baca

$id_kategori =$data->id_kategori;

$kategori =$data->id_kategori;

echo "<option value=\"$id_kategori\">$kategori</option>";

echo "</select>";

echo "Jenis: <select name=\"id_jenis\">";


$sql="SELECT * FROM t_sh_jenis ORDER BY id_jenis";

$result=mysql_query($sql);

while($data=mysql_fetch_object($result)) {

// baca

$id_jenis =$data->id_jenis;

$jenis =$data->id_jenis;

echo "<option value=\"$id_jenis\">$jenis</option>";

echo "</select>";

?>

</p>

</card>

</wml>

Koneksi :

<?

function OpenDb(){

$con = mysql_connect('localhost','root','');

if(!$con) return false;

else {

$sel=mysql_select_db('db_07232030');

if(!$sel) return false;

else return true;

}
?>

Rekap :

<?

header('content-type: text/vnd.wap.wml');

echo '<?xml version="1.0" encoding="iso-8859-1"?>';

?>

<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN"


"http://www.wapforum.org/DTD/wml13.dtd" >

<wml>

<card id="a">

<p>

Rekap Peserta:<br/>

<?

include "koneksi.php";

if(OpenDb()){

// baca data

$sql="SELECT * FROM t_jenis ORDER BY id_jenis";

$result=mysql_query($sql);

while($data=mysal_fetch_object($result)) {

// baca

$id_jenis =$data->id_jenis;

$jenis =$data->id_jenis;

// cari jumlah peserta

$jml=$data->jml;

// tampilkan
echo "- $jenis : $jml<br/>";

} // OpenDb

?>

</p>

</card>

</wml>

Selesai :

<?

header('content-type: text/vnd.wap.wml');

echo '<?xml version="1.0" encoding="iso-8859-1"?>';

?>

<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN"


"http://www.wapforum.org/DTD/wml13.dtd" >

<wml>

<card id="a">

<p align="center">

Terimakasih.

</p>

</card>

</wml>

Simpan :

<?

header('content-type: text/vnd.wap.wml');

echo '<?xml version="1.0" encoding="iso-8859-1"?>';


?>

<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN"


"http://www.wapforum.org/DTD/wml13.dtd" >

<wml>

<card id="a">

<p>

<?

include "koneksi.php";

if(OpenDb()){

// ambil data dari form

$nama =$_GET['nama'];

$alamat =$_GET['alamat'];

$kota =$_GET['kota'];

$telp =$_GET['telp'];

$email =$_GET['email'];

$id_kategori=$_GET['id_kategori'];

$id_jenis =$_GET['id_jenis'];

// nama, kota dan telp tidak boleh kosong

if(empty($nama) or empty($kota) or empty($telp) ) {

echo "Data saudara tidak lengkap, <a href=\"?\">klik</a> untuk


kembali";

else {

// simpan

$sql="insert into t_pendaftar


(nama,alamat,kota,telp,email,id_kategori,id_jenis)
values
('$nama','$alamat','$kota','$telp','$email','$id_kategori','$id_jenis')";

$simpan = mysql_query($sql);

if(!$simpan) {

echo"Maaf, data tidak dapat disimpan";

else {

echo "Data saudara sudah disimpan, silahkan melakukan


pembayaran via

bank mandiri cabang tanjung priok. <a


href=\"?\">Selesai</a> atau

lihat <a href=\"rekap.php\">Rekap</a>";

} // OpenDb

?>

</p>

</card>

</wml>
Tiket KA
Backnd :

Banner :

<h2>PT.KAI Indonesia</h2>

<p><strong>Pemesanana Tiket Pemberangkatan</strong></p>

Conten :

<a href="?load=pemesan.php">Pemesan</a><br>

<a href="?load=rekap.php">Rekapitulasi</a><br>

Index :

<?

include "init.php";

include "koneksi.php";

?>

<html>

<head>

<title><?=$title?></title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<link href="style.css" rel="stylesheet" type="text/css">

</head>

<body>

<table width="800">

<tr>

<td colspan="3" class="banner"><?include "banner.php"?></td>

</tr>
<tr>

<td width="160" class="content" valign="top"><?include "content.php"?></td>

<td width="5">&nbsp;</td>

<td width="635" class="main"><?include "main.php"?></td>

</tr>

<tr>

<td colspan="3" class="info"><?include "info.php"?></td>

</tr>

</table>

</body>

</html>

Info :

PT.KAI. Pemesan Tiket ONLine&copy; <?=$pembuat?>, Amik Almasoem 2010.

Init :

<?

$title="BackEnd Pendaftaran ONLine";

$pembuat="team BackEnd";

?>

Koneksi :

<?

function OpenDb(){

$con = mysql_connect('localhost','root','');

if(!$con) return false;

else {

$sel=mysql_select_db('db_NIM');
if(!$sel) return false;

else return true;

?>

Main :

<?

$load=@$_GET['load'];

if(!empty($load)) include $load;

?>

Pemesan :

<h2>Daftar Pemesan</h2>

<table>

<tr>

<td width="37"><strong>NO</strong></td>

<td width="159"><strong>NAMA</strong></td>

<td width="212"><strong>ALAMAT</strong></td>

<td width="129"><strong>TELEPON</strong></td>

<td width="67"><strong>KERETA</strong></td>

<td width="99"><strong>TUJUAN</strong></td>

<td width="52"><strong>QTY</strong></td>

</tr>

<tr>

<td width="37">&nbsp;</td>

<td width="159">&nbsp;</td>
<td width="212">&nbsp;</td>

<td width="129">&nbsp;</td>

<td width="67">&nbsp;</td>

<td width="99">&nbsp;</td>

<td width="52">&nbsp;</td>

</tr>

</table>

<p>&nbsp; </p>

Rekap :

<h2>Rekapitulasi</h2>

<h4>Hari :</h4>

<table width="75%" border="0">

<tr>

<td width="9%"><strong>NO</strong></td>

<td width="36%"><strong>TUJUAN</strong></td>

<td width="37%"><strong>KERETA</strong></td>

<td width="18%"><strong>QTY</strong></td>

</tr>

<tr>

<td>&nbsp;</td>

<td>&nbsp;</td>

<td>&nbsp;</td>

<td>&nbsp;</td>

</tr>

</table>
<p>&nbsp;</p>

Style :

body {

font-family: Verdana, Geneva, Arial, helvetica, sans-serif;

td {

font-family: Verdana, Geneva, Arial, helvetica, sans-serif;

th {

font-family: Verdana, Geneva, Arial, helvetica, sans-serif;

.banner{

font-family: Verdana, Arial, Helvetica, sans-serif;

background-color: #CC9966;

font-size: 12px;

color: #993300;

.content{

background-color: #FFEBD7;

.main{

font-family: Verdana, Arial, Helvetica, sans-serif;


color: #993300;

.info{

font-family: Verdana, Arial, Helvetica, sans-serif;

font-size: 10px;

TiketKa :

Index :

<?

header('content-type: text/vnd.wap.wml');

echo '<?xml version="1.0" encoding="iso-8859-1"?>';

?>

<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN"


"http://www.wapforum.org/DTD/wml13.dtd" >

<wml>

<card id="a">

<p align="center">

<b>Selamat Datang</b><br/>

Portal PT.KAI Indonesia<br/>

<br/>

<a href="#b">Next</a>

</p>

</card>

<card id="b">

<do type="accept">

<go href="tujuan.php">
<postfield name="id_kota" value="$id_kota"/>

<postfield name="id_hari" value="$id_hari"/>

</go>

</do>

<p>

<b>Pemberangkatan:</b><br/>

<?

include "koneksi.php";

if (openDb()){

echo" Tujuan: ";

$sql="select * from t_kota

ORDER BY nama_kota";

$result=mysql_query($sql);

echo"<select name=\"id_kota\">";

while($data=mysql_fetch_array($result)){

$id_kota=$data['id_kota'];

$nama_kota=$data['nama_kota'];

echo" <option value=\"$id_kota\">

$nama_kota</option>";

echo"</select>";

echo" Hari: ";

$sql="select * from t_hari

ORDER BY id_hari";

$result=mysql_query($sql);
echo"<select name=\"id_hari\">";

while($data=mysql_fetch_array($result)){

$id_hari=$data['id_hari'];

$nama_hari=$data['nama_hari'];

echo" <option value=\"$id_hari\">

$nama_hari</option>";

echo"</select>";

?>

</p>

</card>

</wml>

Koneksi :

<?

function OpenDb(){

$con = mysql_connect('localhost','root','');

if(!$con) return false;

else {

$sel=mysql_select_db('db_07232030');

if(!$sel) return false;

else return true;

}
?>

Simpan :

<?xml version="1.0" encoding="iso-8859-1"?>

<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN"


"http://www.wapforum.org/DTD/wml13.dtd" >

<wml>

<card>

<?

include"koneksi.php";

//ambil data

$id_jadwal=$_GET['id_jadwal'];

$nama=$_GET['nama'];

$nama=$_GET['alamat'];

$nama=$_GET['telp'];

$nama=$_GET['qty'];

$nama=$_GET['tanggal'];

//simpan

</card>

</wml>

Tujuan :

<?

header('content-type: text/vnd.wap.wml');

echo '<?xml version="1.0" encoding="iso-8859-1"?>';

?>

<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN"


"http://www.wapforum.org/DTD/wml13.dtd" >
<wml>

<card id="a" title="Pemesanan">

<do type="accept">

<go href="simpan.php">

<postfield name="nama" value="$nama"/>

<postfield name="alamat" value="$alamat"/>

<postfield name="qty" value="$qty"/>

<postfield name="tanggal" value="$tanggal"/>

<postfield name="id_jadwal" value="$id_jadwal"/>

</go>

</do>

<p>

<?

$id_kota=$_GET['id_kota'];

$id_hari=$_GET['id_hari'];

include "koneksi.php";

if(OpenDb(07232030)){

$sql="SELECT a.*,b.* from t_jadwal a, t_kereta b

WHERE a.id_kota=$id_kota and

a.id_hari=$id_hari and

a.id_kereta=b.id_kereta

ORDER BY a.pukul";

$result = mysql_query($sql);

echo "<b>Pemberangkatan:</b> <select name=\"id_jadwal\">";


while($data=mysql_fetch_object($result)){

$id_jadwal =$data->id_jadwal;

$nama_kereta=$data->nama_kereta;

$pukul =$data->pukul;

$tarip =$data->tarip;

echo "<option value=\"$id_jadwal\">$pukul, $nama_kereta, $tarip


</option>";

echo "</select>";

?>

Pemesan <br/>

Nama:<input type="text" name="nama"/>

Alamat:<input type="text" name="alamat"/>

Telp:<input type="text" name="telp"/>

Qty:<input type="text" name="qty"/>

Tanggal:<input type="text" name="tanggal"/>

<?

?>

</p>

</card>

</wml>
Amik :
<?

header('content-type:text/vnd.wap.wml');

echo'<?xml version="1.0" encoding="iso-8859-1"?>';

?>

<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN"


"http://www.wapforum.org/DTD/wml13.dtd" >

<wml>

<card title="AMIK ALMASOEM">

<p align="center">

Selamat datang di<br/>

Portal WAP AMIK ALMASOEM

</p>

<p>

<b>Menu Pilihan</b><br/>

<? mysql_connect('localhost','root','');

mysql_select_db(db_07232030);

$sql="select * from t_menu where aktif";

$result=mysql_query($sql);

while($data=mysql_fetch_object($result)){

$id= $data -> id;

$menu= $data -> menu;

$aktif= $data -> aktif;

echo "$id. $menu <br/>";

?>

<?
}

?>

</p>

</card>

</wml>

Contoh 1 :
<?xml version="1.0" encoding="iso-8859-1"?>

<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN"


"http://www.wapforum.org/DTD/wml13.dtd" >

<wml>

<card>

<p align="center">

<b> Hallo WAP</p><br/>

Hallo word!

</p>

</card>

</wml>

Contoh 2 :
<?xml version="1.0" encoding="iso-8859-1"?>

<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN"


"http://www.wapforum.org/DTD/wml13.dtd" >

<wml>

<card id="a" title="kuliner">

<p>
contoh-contoh masakan/kuliner indonesia:<br/>

1. <a href="#b">kupat tahu</a><br/>

2. <a href="#c">lontong kari</a><br/>

3. <a href="#d">bubur ayam</a><br/>

</p>

</card>

<card id="b" title="kupat tahu">

<p>

Masakan ini adalah ciri khas jawa barat, tetapi umumnya dari indonesia

</p>

</card>

</wml>

You might also like