Lampiran 1. Flowchart perancangan sistem Mulai Identifikasi Data Desain Program Desain Basis Data Input Data Desain Layout Programming Diagnosa Program idak Benar idak a Uji ampilan Data Benar idak a Dokumentasi Selesai
Lampiran 2. Flowchart Halaman Home Start ampil Halaman Home entukan Pilihan A Login Admin Login Administrator Home Page Home Berita Page Berita Galery Foto Page Galery Foto Hub. Kami Page Hub. Kami
Lampiran 3. Flowchart Validasi Administrator A Masukkan Username & Password Ada ampil Halaman Administrator A1
Lampiran 4. Flowchart halaman Administrator A1 2 ampil Halaman Administrator entukan Pilihan List Informasi Page List Informasi List Buku amu Page Buku amu A1.1 ambah Informasi Page ambah Informasi Logout
Lampiran 5. Flowchart Halaman ambah Informasi A1.1 R List Informasi Edit ampil Form Edit Informasi Perbaiki Data Simpan Simpan Ke abel Delete Hapus Record Data Informasi R R ambah Form ambah Masukkan Data Informasi Simpan Simpan Ke abel Back o Admin 2
Lampiran 6. Contoh kode program dengan PHP Kode Program index.php <html> <head> <meta http-equiv="content-ype" content="text/html; charset=utf-8" /> <script type="text/javascript" src="myportal.js"></script> <link href="css/style.css" rel="stylesheet" type="text/css"> <title>sistem Informasi Alat Mesin Pertanian</title> </head> <body bgcolor=#ccccff> include "db_fungsi.php"; <table border=0 width=980 align=center bgcolor="white"> <td> include "frmfind.php"; <td> include "header.php" <td bgcolor="#ccccff" width=100%> <table width=100%> <td width = 70% background=images/back.jpg> <Marquee behavior="alternate"><font size=3 color=red><b>kami MENAJIKAN ANG ERBAIK UNUK ANDA</b></font></Marquee> </table> <td valign=top height="10" width=100% background=images/back.jpg>
include "menutop.php"; <td height=900 valign=top> include "maintengah.php" <td align=center valign="middle" height=50> <td background=images/back.jpg height=20> include "menubawah.php" </table> <br /> </body> </html> Kode program koneksi.php mysql_connect("localhost","root",""); $db = mysql_select_db("db_pertanian"); Kode program berita.php $awal = 0; $akhir = 4; include "koneksi.php"; $jenis = $_REQUES["jenis"]; $skey = $_REQUES["skey"]; $sql = "select * from berita where jenis = '$jenis' limit $awal,$akhir"; $rs = mysql_query($sql); $i=1; $c=0; echo " <table border=0>"; while ($brs = mysql_fetch_array($rs))
$c=$c+1; $gmb = "images/$brs[image1]"; $kata = $brs[info]; if($i==1) echo ""; $j=1; if ($j<=2) <td width=50% valign=top style="border-bottom:#c7c7c7 1px dashed;border-left:#c7c7c7 1px dashed;border-right:#c7c7c7 1px dashed;bordertop:#c7c7c7 1px dashed;"> <img src="images/hdbullet.gif"><span class="midtitle"><a href="index.php?slink=detail.php&id1==$brs[id]&jenis==$jenis">= $brs[judul]</a></span> <br /> <p> <div id="gambarkiri"> <img src='images/=$brs[image1]' style="height: 60px; weight: 50px; border: 0;"> </div> <div id=urut>=$brs[info]</div> </p> $j=$j+1; $i=$i+1; if($i==1) echo ""; if ($j==3) $i=1; if (($c % 2 ) <> 0 ) <td width=50% valign=top style="border-bottom:#c7c7c7 1px dashed;border-left:#c7c7c7 1px dashed;border-buttom:#c7c7c7 1px dashed;border-right:#c7c7c7 1px dashed;border-top:#c7c7c7 1px dashed;"> -
echo "</table><br>"; <table border=0 width=100%> $awal = $akhir; $akhir = 5; $sql = "select * from berita where jenis = '$jenis' limit $awal,$akhir"; $rs = mysql_query($sql); $i=1; $c=0; while ($brs = mysql_fetch_array($rs)) $gmb = "images/$brs[image1]"; $kata = $brs[info]; <td width=50% valign=top style="border-bottom:#c7c7c7 1px dashed;border-left:#c7c7c7 1px dashed;border-right:#c7c7c7 1px dashed;bordertop:#c7c7c7 1px dashed;"> <img src="images/hdbullet.gif"><span class="midtitle"> <a href="index.php?slink=detail.php&id1==$brs[id]&jenis==$jenis">= $brs[judul]</a></span> <br /> <p> <div class="pic_box" title="image"> <img src='=$gmb' style="height: 60px; weight: 50px; border: 0;" border="0" alt="image"> </div> <div id=urut>=$kata</div> </p> </table> Kode program frm_artikel.php include "header.php"; include("fckeditor.php") ;
<html> <head> <meta http-equiv="content-ype" content="text/html; charset=utf- 8"> <meta name="robots" content="noindex, nofollow"> <link href="../sample.css" rel="stylesheet" type="text/css" /> <title></title> </head> <body> <font color=white> </font> <table bgcolor=white width=80% align=center height=80%> <td> <a href=index.php>kembali Ke Home</a> <td> include "koneksi.php"; $_jenis = $_REQUES["xjenis"]; $_info = $_REQUES["FCKeditor2"]; $_headline = $_REQUES["xheadline"]; $_judul = $_REQUES["xjudul"]; $_isi = $_REQUES["FCKeditor1"]; $_image1 = $_REQUES["ximage1"]; $pil = $_REQUES["pil"]; $id = $_REQUES["id"]; $asal = $_REQUES["xasal"]; if($_reques["submit"]) if($_reques["aksi"]=="add") $query = "INSER INO berita (headline,judul,isi,image1,asal,jenis,info)"; $query = $query." VALUES ('$_headline','$_judul','$_isi','$_file','$asal','$_jenis','$_info')"; $jalankan = mysql_query($query); if($jalankan) echo "<h3 align=center> DAA BERHASIL DI SIMPAN</h3>"; else echo "<h3 align=center> DAA GAGAL DI SIMPAN</h3>";
if($_reques["aksi"]=="edit") $query = "UPDAE berita SE headline='$_headline',judul='$_judul',isi='$_isi',image1='$_file',asal='$asal',jenis= '$_jenis',info='$_info'"; $query = $query." where id = '$id'"; $jalankan = mysql_query($query); if($jalankan) echo "<h3 align=center> DAA BERHASIL DI SIMPAN</h3>"; else echo "<h3 align=center> DAA GAGAL DI SIMPAN</h3>"; //echo $query; <form name=frm action="=$php_self" method="post" enctype="multipart/form-data"> <table border=0 width=100% cellpadding=0 cellspacing=0 style=bordercollapse: collapse bordercolor=#111111 align=center> <td> <table border=0 width=100%> $id=$_reques["id"]; if($pil=="t") echo "<td colspan=3 bgcolor=green><font color=white size=4><b> ADD DAA ARIKEL </b></font> "; echo ("<input type=hidden name=aksi size=45 value=add>"); if($pil=="e") echo "<td bgcolor=green colspan=3><font color=white size=4><b> EDI DAA ARIKEL </b></font>"; $query = "Select * from berita where id = '$id'"; $ok = mysql_query($query); $rs = mysql_fetch_array($ok); $_kode = $rs["id"]; if($ok)
echo ("<input type=hidden name=aksi size=45 value=edit> <input type=hidden name=id size=45 value=$_kode>"); <td colspan=5> <td align=right>jenis BERIA <td> : <td align=left> <Select name=xjenis> $query = "Select * from menu_atas"; $s_ok = mysql_query($query); </option>"; </option>"; </option>"; </option>"; while($s_rs = mysql_fetch_array($s_ok)) if ($s_rs["jenis"]== $rs["jenis"]) echo "<option value=$s_rs[jenis] selected>$s_rs[namamenu] else echo "<option value=$s_rs[jenis]>$s_rs[namamenu] $query = "Select * from menu_kiri"; $s_ok = mysql_query($query); while($s_rs = mysql_fetch_array($s_ok)) if ($s_rs["jenis"]== $rs["jenis"]) echo "<option value=$s_rs[jenis] selected>$s_rs[namamenu] else echo "<option value=$s_rs[jenis]>$s_rs[namamenu]
</Select> <td align=right>judul <td> : <td align=left><textarea name=xjudul rows=1 cols=80>=$rs[judul]</textarea> <td align=right>asal ARIKEL <td> : <td align=left><textarea name=xasal rows=1 cols=80>=$rs[asal]</textarea> <td align=right>informasi Awal <td> : <td align=left> php $info = $rs[info]; $sbasepath = $_SERVER['PHP_SELF'] ; $sbasepath = substr( $sbasepath, 0, strpos( $sbasepath, "_samples" ) ) ; $sfckeditor = new FCKeditor('FCKeditor2') ; $sfckeditor->basepath = $sbasepath ; $sfckeditor->height = 400; $sfckeditor->width = "80%"; $sfckeditor->value = $info ; $sfckeditor->create() ; <td align=left colspan=3> Detail Informasi <hr /><br> php $ss = $rs[isi]; $sbasepath = $_SERVER['PHP_SELF'] ; $sbasepath = substr( $sbasepath, 0, strpos( $sbasepath, "_samples" ) ) ; $ofckeditor = new FCKeditor('FCKeditor1') ; $ofckeditor->basepath = $sbasepath ; $ofckeditor->height = 600; $ofckeditor->width = "100%"; $ofckeditor->value = $ss ; $ofckeditor->create() ;
</table> <td><hr /> <td align=left> <input type=submit name=submit value=' SIMPAN '> <input type=reset name=reset value=' CANCEL '> </table> </form> </table> <font color=white> <a href=index.php>kembali Ke Home</a> </font>