Perancanagn Sistem Informasi Berita Online Berbasis Php Dan Mysql

(1)

LISTENING PROGRAM Tampilan index.php

File:Index.php

<html> <head>

<title>E-News Berita Online</title>

<link rel="icon" type="image/jpg" href="images/014.JPG">

<link rel="stylesheet" type="text/css" href="style1.css" media="all"/>

<link href="themes/js/js- image-slider.css" rel="stylesheet" type="text/css" /> <script src="themes/js/js- image-slider.js" type="text/javascript"></script>

<body background="images/1.png" width="700" height="1200">

</head> <a

href="http://newopenx.detik.com/delivery/ck.php?oaparams=2__bannerid=25005 __zoneid=329__cb=fab5dc2e59__oadest=http%3A%2F%2Fsahabatpegadaian.co


(2)

m%2Fkemilauemas%2F%3Futm_source%3DDetikcom%26utm_medium%3DBa nner%26utm_campaign%3DKemilauemas" target="_blank"><img

src="http://newopenx.detik.com/images/b686c40e3cde41c09dfc188f1935c035.gif "

style="width:940; height:50px; padding-left:200px; top:30px; "></a> </a>

<body>

<div class="main-wrapper"> <div class="left-wrapper">

<div class="top"><marquee bgcolor="rgb(240, 81, 105)"><h1>BERITA ONLINE || TAPIYANTY SIMANJUNTAK</h1></marquee></div>

<div id="sliderFrame"> <div id="slider">

<img src="images/14.PNG" alt="Selamat Datang di Website Kami" /> <img src="images/013.JPG" alt="Tim Penyusun" />

<img src="images/ah.JPG" alt="Berita Online" /> <img src="images/01.JPG" alt="Berita terupdate" /> <img src="images/08.JPG" alt="Berita terbaru"/>

<img src="images/14.PNG" alt="E-NEWS BERITA ONLINE" />

</div> </div>

<div id="wrapper"> <div id="header">

<div class="top_banner" body id="body">

</div> </div>

<div class="menu">

<table border="0" align="center" width="40%" margin top="3px"> <ul>

<li><a href="index.php"><H3> HOME </H3> </a></li> <li><a href="berita.php"><H3> BERITA </H3> </a></li> <li><h3><a href="http://sports.okezone.com/">Olahraga</a></li> <li><h3><a href="http://foto.okezone.com/">Foto</a></li> <li><h3><a href="http://video.okezone.com/">Video</a></li> <li><h3><a href="http://index.okezone.com/">Index</a></li>


(3)

<li><h3><a href="http://news.okezone.com/autos/">Berita zone</a></li> <li><h3><a href="tentangkami.php"><H3> Detik kom</H3> </a></li>

</table> </div>

<div id="page_content"> <div class="left_side_bar"> <div class="col_1">

<div align=center><embed src=free-flash-clock-152.swf width=150 height=50 wmode=transparent type=application/x-shockwave- flash></embed> </div>

</div>

<div class="col_1"> <a

href="http://newopenx.detik.com/delivery/ck.php?oaparams=2__bannerid=25439 __zoneid=331__cb=8a4aa930ae__oadest=https%3A%2F%2Fwww.trac.astra.co.i d%2Fearly-bird-promo-book-your-car- for- idul-fitri-now%2F"

target="_blank"><img

src="http://newopenx.detik.com/images/116a82b369409e1281aee85eea30b846.gi f" width="180" height="600" alt="" title="" border="0"></a>

<div class="box">

</div> </div>

<div class="col_1">

<div class="box">

</div> </div> </div>`

<div class="right_section"> <div class="common_content"> <h2>Welcome</h2>

<hr>

<p>Selamat datang di situs Berita Online.com </p>

<p>Situs ini menyediakan berbagai informasi tentang berita Online . </p> </div>

<div class="common_content"> <h2>What's New?</h2>

<p> Berikut ini beberapa Berita terbaru </p> </div>


(4)

<div class="top_content"> <div class="column_one">

<img src="images/jokowi.jpg" height="200" width="170"> <p>

Presiden Jokowi Tiba di Jerman untuk Kunjungan Kenegaraan </p> <br> <p><a class="btn" href="read1.php">Read more</a></p></div>

<div class="column_two border_left">

<img src="images/kaks.jpg" height="200" width="178">

<p>Perkuat Pengawasan, Menteri Susi Akan Beli Kapal Induk </p> <br> <p><a class="btn" href="read2.php">Read more</a></p></div>

</div> </div>

<div class="right_section">

<div class="top_content"> <div class="column_one">

<img src="images/lk.jpg" height="200" width="178"> <p>

Perkuat Pengawasan, Menteri Susi Akan Beli Kapal Induk </p>

<br>

<p><a class="btn" href="read3.php">Read more</a></p></div> <div class="column_two border_left">

<img src="images/ah.jpg" height="200" width="178">

<p>Ahok Menolak Proyek Reklamasi Disamakan dengan Proyek Hambalang </p> <br>

<p><a class="btn" href="read4.php">Read more</a></p></div> </div>

</div> </table>

<div class="footer">Copyright &copy; 2016 e-News Berita Online.com<br>

</div> </div> </div> </body> </html>


(5)

File : tampilan berita.php

<html> <head>

<title>E-News Berita Online</title>

<link rel="icon" type="image/jpg" href="images/014.JPG">

<link rel="stylesheet" type="text/css" href="style1.css" media="all"/>

<link href="themes/js/js- image-slider.css" rel="stylesheet" type="text/css" /> <script src="themes/js/js- image-slider.js" type="text/javascript"></script>

<body background="images/1.png" width="700" height="1200">

</head> <a

href="http://newopenx.detik.com/delivery/ck.php?oaparams=2__bannerid=25005 __zoneid=329__cb=fab5dc2e59__oadest=http%3A%2F%2Fsahabatpegadaian.co m%2Fkemilauemas%2F%3Futm_source%3DDetikcom%26utm_medium%3DBa nner%26utm_campaign%3DKemilauemas" target="_blank"><img

src="http://newopenx.detik.com/images/b686c40e3cde41c09dfc188f1935c035.gif "

style="width:940; height:50px; padding-left:200px; top:10px; "></a> </a>

<body>


(6)

<div class="left-wrapper">

<div class="top"><marquee bgcolor="rgb(240, 81, 105)"><h1>BERITA ONLINE || TAPIYANTY SIMANJUNTAK</h1></marquee></div>

<div id="sliderFrame"> <div id="slider">

<img src="images/14.PNG" alt="Selamat Datang di Website Kami" /> <img src="images/013.JPG" alt="Tim Penyusun" />

<img src="images/ah.JPG" alt="Berita Online" /> <img src="images/01.JPG" alt="Berita terupdate" /> <img src="images/08.JPG" alt="Berita terbaru"/>

<img src="images/14.PNG" alt="E-NEWS BERITA ONLINE" />

</div> </div>

<div id="wrapper"> <div id="header">

<div class="top_banner" body id="body">

</div> </div>

<div class="menu">

<table border="0" align="center" width="90%" margin top="3px"> <ul>

<li><a href="index.php"><H3> HOME </H3> </a></li> <li><a href="berita.php"><H3> Berita </H3> </a></li>

<li><h3><a href="http://sports.okezone.com/">Olahraga</a></li> <li><h3><a href="http://foto.okezone.com/">Foto</a></li> <li><h3><a href="http://video.okezone.com/">Video</a></li> <li><h3><a href="http://index.okezone.com/">Index</a></li>

<li><h3><a href="tentangkami.php"><H3> Tentang Profil</H3> </a></li> <li><h3><a href="http://news.okezone.com/autos/">Berita zone</a></li> <li><h3><a href="tentangkami.php"><H3> Detik kom</H3> </a></li>

</table> </div>


(7)

<script type="text/javascript">

function MM_preloadImages() { //v3.0

var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();

var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} }

</script> </head>

<body onload="MM_preloadImages('Gambar/TLogin copy.jpg')"> <div class="top">

<table width="900" border="0" align="center" cellpadding="0" cellspacing="0" b="rgba(235, 235, 235, 1)">

<tr>

<th width="245" height="22" align="left" valign="top" bgcolor="#FFFFFF" scope="col">&nbsp;</th>

<th colspan="2" align="right" valign="middle" bgcolor="#FFFFFF" class="Teks_Menu_Atas" scope="col">&nbsp;</th>

</tr> <tr>

<td align="left" valign="top" bgcolor="#FFFFFF"><div class="Area_Menu_Kiri">

<form id="form1" name="form1" method="post" action="login.php"> <table width="100%" border="0" cellspacing="2" cellpadding="0"> <tr>

<td height="60" colspan="3" align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2">

<tr>

<th align="left" valign="top" scope="col"><img src="images/kate.jpg" alt="" width="203" height="32" /></th>

</tr> <tr>

<th align="left" valign="top" class="Teks_Kategori" scope="col"><?php include "kategori.php"; ?></th>

</tr>

</table></td> </tr>

<tr>

<td colspan="3" align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2">

<tr>


(8)

</tr> <tr>

<td align="left" valign="top" class="Teks_News" scope="col">&nbsp;</td>

</tr>

</table></td> </tr>

<tr>

<td width="29%" align="left" valign="top">&nbsp;</td> <td width="3%" align="left" valign="top">&nbsp;</td> <td width="68%" align="left" valign="top">&nbsp;</td> </tr>

<tr>

<td colspan="3" align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2">

<tr>

<th align="left" valign="top" scope="col">&nbsp;</th> </tr>

<tr>

<td align="left" valign="top" class="Teks_Testimonial" scope="col"><div></div>

<br /></td> </tr>

</table></td> </tr>

<tr>

<td align="left" valign="top">&nbsp;</td> <td>&nbsp;</td>

<td class="Teks_Menu">&nbsp;</td> </tr>

</table> </form> </div></td>

<th width="685" align="left" valign="top" bgcolor="#FFFFFF"><table width="486" border="0" cellpadding="0" cellspacing="0" class="Area_berita">

<td align="center" valign="top"><div class="Area_berita"> <?php include "berita_catalog.php"; ?>

</div></td> </tr>

</table></th>

</div></td> </tr>

</table>


(9)

<div class="footer">Copyright &copy; 2016 e-News Berita Online.com<br>

</div> </div> </div> </body> </html>

File :berita_catalog.php

<style type="text/css"> .teks_judul_berita {

font-family: Arial, Helvetica, sans-serif; font-size: 14px;

width: 210px; height: 50px; color: #000000;} .teks_tanggal_berita {

font-family: Arial, Helvetica, sans-serif; font-size: 14px;

color: #000000; }

.footer{

clear:both; margin-top:18px;

padding:12px 0 12px 0; height:20px;

text-align:center;

font-family:Arial, Helvetica, sans-serif; font-size:12px;

line-height:20px;

background-color:#E4E1DF;

-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px;

border:#95AE71 dotted 1px; }

</style> <?php

include("config.php");

$query = "select * from tb_input order by id desc"; $hasil = mysql_query($query);


(10)

//Paging Data sebanyak 30 data product perlembar $jumlah = mysql_num_rows($hasil);

$limit = 30;

if (empty($offset)) { $offset = 0; }

if(isset($_GET['offset'])){$offset = $_GET['offset']; } $seleksi = "SELECT * FROM tb_input ORDER BY id DESC LIMIT $offset, $limit";

$result = mysql_query($seleksi); echo "<div align=\"right\">"; $halaman = intval($jumlah/$limit); if ($jumlah%$limit) {

$halaman++; }

for ($i=1;$i<=$halaman;$i++) { $newoffset=$limit*($i-1);

if ($offset!=$newoffset) {

echo "<b><font face=\"arial\" size=\"2\">[<a style=\"color: black\"

href=\"berita.php?offset=$newoffset\">$i</a>]</font></B>"; } else {

echo "<b><font face=\"arial\" size=\"3\" color=\"red\">[$i]</font></b>";

} }

echo "</div>"; //Batas kode paging data

?>

<table border=0px cellpadding='10' cellspacing="2" bgcolor="" bordercolor="" align="left">

<tr>

<?php

$kolom=3; $x = 0;

if($numrows > 0){

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

if ($x >= $kolom) {

echo "</tr><tr>"; $x = 0;


(11)

} $x++;

?>

<td align=center>

<div class ="teks_judul_berita"> <?php echo $data['judul']; ?><br><br> </div>

<div class ="teks_tanggal_berita">

<?php echo $data['tanggal']; ?><br><br> </div>

<div><img width='200px' height='238px' valign='top' border='1,5' src="images/<?php echo $data['gambar']; ?>" /><br><br>

</div>

<?php

echo '

<a href="berita_detail.php?id='.$data['id'].'"><img src="images/TDetail.jpg"\ title="Detail Berita" border="0" width=\"50\" height=\"30\"></a>';

?> </div> <hr />

</td> <?php

} } ?>

</tr> </table>


(12)

File :berita_detail.php

<?php session_start();

if (ISSET($_SESSION['userlogin'])) {

} else ?>

<!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>E-Commerce Alat Musik</title>

<link rel="icon" type="image/jpg" href="images/leo1.JPG"> <style type="text/css">

ul, ol, li{

list-style: none; }

.top{

width: 1040px; margin: 20px 0px; display: inline-block; }

.right-wrapper{ background: ;

background-color: gray; width: 300px;

height: 300%; position: absolute; right: 0px;


(13)

top: -64px; float: left; }

.logo{

position: fixed; margin-top: 92px; margin- left: -10px; background: ; padding: 0px 15px; color: #fff;

} .main{

width: 1040px;

background: rgba(235, 235, 235, 1); }

.main-nav{ position: fixed; margin-top: 192px; margin- left: -15px; }

.main-nav li{

margin-bottom: 20px; text-align: left;

}

.main-nav li:last-child{ margin-bottom: 0px; }

.main-nav a{ padding: 5px 0px; line-height: 24px; font-size: 17px;

border-left: 3px solid transparent; padding-left: 15px;

}

.main-nav a:hover{

border-left: 3px solid rgb(240, 81, 105); color: rgb(240, 81, 105);

} #current{

color: rgb(240, 81, 105);

border-left: 3px solid rgb(240, 81, 105); }

.Teks_Menu_Atas {

font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; font-size: 10px;

}


(14)

height: auto; width: 175px; margin- left: 6px;

font-family: Arial, Helvetica, sans-serif; font-size: 12px;

}

.Area_Menu_Kanan { height: auto;

width: 175px; margin- left: 10px;

font-family: Arial, Helvetica, sans-serif; font-size: 12px;

text-align: left; }

.Teks_Menu {

font-family: Arial, Helvetica, sans-serif; font-size: 12px;

font-weight: bold; }

.Teks_Kategori {

font-family: Arial, Helvetica, sans-serif; font-size: 12px;

}

.Teks_Informasi {

font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; font-size: 11px;

}

}

.Teks_Produk {

font-family: Tahoma, Geneva, sans-serif; font-size: 14px;

color: #0096C3; }

.Area_Produk { height: auto; width: 375px; margin-top: 10px; font-size: 10px;


(15)

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

.footer{ height: 25px; background: #fff; display: inline-block; width: 100%;

text-align: center;

}

.footer span{ line-height: 25px; color: #d1d1d1; }

.footer a{

color: #d1d1d1; }

.footer a:hover{ color: #333; }

a:link {

color: #006699; text-decoration: none; }

a:hover {

color: #5F9C9F; text-decoration: none; }

a:visited {

text-decoration: none; color: #1d1d1d; }

a:active {

text-decoration: none; color: #5F9C9F; }

body {

background-image: url(images/Background.gif); }

</style>

<script type="text/javascript">

function MM_preloadImages() { //v3.0


(16)

var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} }

</script> </head>

<body onload="MM_preloadImages('Gambar/TLogin copy.jpg')"> <div class="main">

<div class="top"><marquee bgcolor="rgb(240, 81, 105)"><h1>Berita Online</h1></marquee></div>

<table width="930" border="0" align="center" cellpadding="0" cellspacing="0"> <tr>

<th width="200" height="22" align="left" valign="top" scope="col"><div class="Area_Menu_Kiri">

<form id="form2" name="form2" method="post" action="">

</form> </div></th>

</tr>

<td align="left" valign="top" bgcolor="#FFFFFF"><div class="Area_Menu_Kiri">

<form id="form1" name="form1" method="post" action="login.php"> <table width="100%" border="0" cellspacing="2" cellpadding="0"> <tr>

<td colspan="3" align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2">

<tr>

<th align="left" valign="top" scope="col"><img src="images/Kate.jpg" alt="" width="230" height="25" /></th>

</tr> <tr>

<th align="left" valign="top" class="Teks_Kategori" scope="col"><?php include "kategori.php"; ?></th>

</tr>

</table></td> </tr>

<tr>

<td colspan="3" align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2">

<tr>

<th align="left" valign="top" scope="col">&nbsp;</th> </tr>

<tr>

<td align="left" valign="top" class="Teks_News" scope="col">&nbsp;</td>


(17)

</tr>

</table></td> </tr>

<tr>

<td width="29%" align="left" valign="top">&nbsp;</td> <td width="3%" align="left" valign="top">&nbsp;</td> <td width="68%" align="left" valign="top">&nbsp;</td> </tr>

<tr>

<td colspan="3" align="left" valign="top">&nbsp;</td> </tr>

<tr>

<td align="left" valign="top">&nbsp;</td> <td>&nbsp;</td>

<td class="Teks_Menu">&nbsp;</td> </tr>

</table> </form> </div></td>

<th width="400" align="center" valign="top" bgcolor="#FFFFFF"><table width="100%" align="left" border="0" cellpadding="0" cellspacing="0" class="Area_berita">

<tr>

<th align="left" valign="top" class="Teks_berita" scope="col">BERITA DETAIL !!!</th>

</tr> <tr>

<th align="left" valign="top" class="Teks_berita" scope="col"><hr /></th> </tr>

<tr>

<td align="center" valign="top"><div class="Area_berita"> <?php include "berita_detail_info.php"; ?>

</div></td> </tr>

</table></th>

</div></td> </tr>

</table>

<div class="right-wrapper"> <div class="logo">

<img width="290px" height="80px" src="images/kakk.JPG"> </div>

<ul class="main- nav">

<li><h2><a href="index.php"> HOME </a></li> <li><h2><a href="berita.php">Berita </a></li>


(18)

<li><h2><a href="http://sports.okezone.com/">Olahraga</a></li> <li><h2><a href="http://foto.okezone.com/">Foto</a></li> <li><h2><a href="http://video.okezone.com/">Video</a></li> <li><h2><a href="http://index.okezone.com/">Index</a></li> <li><h2><a href="tentangkami.php">Tentang profil </a></li>

<li><h2><a href="http://news.okezone.com/autos/">Berita zone</a></li> <li><h2><a href="tentangkami.php">Detik kom</a></li>

</ul> </div>

<div class="footer">

<span> copyright 2016 | Berita Online | All Right reserved</span> </div>

</div> </body> </html>

File : berita_detain_info

<style type="text/css"> .teks_info_berita {

font-family: times, Helvetica, sans-serif; font-size: 16px;

text-align: justify; color: black; }

.teks_judul_berita {

font-family: Arial, Helvetica, sans-serif; font-size: 18px;

color: blue; font-weight: bold; }

</style> <?php

include("config.php"); $id = $_GET['id'];

$query = "select * from tb_input where id = '".$id."'"; $hasil = mysql_query($query);

$temukan = mysql_num_rows($hasil); $data = mysql_fetch_array($hasil); if($temukan==0){

}else{ ?>

<table border=0px cellpadding='10' cellspacing="2" bgcolor="" bordercolor="" align="center">

<tr>


(19)

<td align=center>

<div class ="teks_judul_berita"> <?php echo $data['judul']; ?><br><br>

</div>

<div>

<img width='400px' height='300px' valign='top' border='1,5' src="images/<?php echo $data['gambar']; ?>"><br><br>

</div>

<div class ="teks_info_berita">

<?php echo $data['tanggal']; ?><br><br> <?php echo $data['isi']; ?><br><br> </div>

<div>

</div> <hr />

<?php

} ?>

</td> </tr> </table>

File :berita_kategori.php <style type="text/css"> .teks_judul_berita {

font-family: Arial, Helvetica, sans-serif; font-size: 14px;

width: 210px; height: 65px; color: #000000;} .teks_tanggal_berita {

font-family: Arial, Helvetica, sans-serif; font-size: 14px;

color: #000000; }

.footer{ clear:both; margin-top:18px;

padding:12px 0 12px 0; height:20px;


(20)

font-family:Arial, Helvetica, sans-serif; font-size:12px;

line-height:20px;

background-color:#E4E1DF;

-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px; border:#95AE71 dotted 1px;

} </style> <?php

if(isset($_GET['kategori'])){$kategori = $_GET['kategori']; } include("config.php");

if((isset($kategori)) ==''){

$query = "select * from tb_input order by id "; $hasil = mysql_query($query);

$numrows = mysql_num_rows($hasil); }else{

echo "<table width=\"100%\"> <tr>

<td align=\"center\"><b><font color=\"maroon\" size=\"2.5\">[ ".$_GET['kategori']." ]</b></font></td>

</tr> </table>";

$query = "select * from tb_input where kategori = '$kategori' order by id desc LIMIT 0,12";

$hasil = mysql_query($query);

$numrows = mysql_num_rows($hasil); }

?>

<table border=0px cellpadding='10' cellspacing="2" bgcolor="" bordercolor="" align="left">

<tr> <?php $kolom=3; $x = 0;

if($numrows > 0){

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

if ($x >= $kolom) {

echo "</tr><tr>"; $x = 0;

} $x++; ?>


(21)

<td align=center>

<div class ="teks_judul_berita">

<?php echo $data['judul']; ?><br><br> </div>

<div class ="teks_tanggal_tanggal"> <?php echo $data['tanggal']; ?><br><br> </div>

<div>

<img width='200px' height='238px' valign='top' border='1,5' src="images/<?php echo $data['gambar']; ?>"><br><br> </div>

<?php echo '

<a href="berita_detail.php?id='.$data['id'].'"><img src="images/TDetail.jpg"\ title="Detail Barang" border="0" width=\"50\" height=\"30\"></a>';

?> </div> <hr /> </td>

<?php } } ?> </tr> </table>

File :kategor.php

<?php

include("config.php");

$cek="Select * from tb_kategori order by id asc"; $hasil=mysql_query($cek);

if ($hasil > 0) {

if ((ISSET($_SESSION['userlogin'])) == ''){

echo "<ul><img src=\"images/Bullet.jpg\" border=\"1\" width=\"30\" height=\"30\"><a

href=\"berita.php?kategori=All\">&nbsp;&nbsp;All</a></li></ul>"; }else{

echo "<ul><img src=\"images/Bullet.jpg\" border=\"1\" width=\"30\" height=\"30\"><a

href=\"berita.php?kategori=All\">&nbsp;&nbsp;All</a></li></ul>"; }


(22)

{

if ((ISSET($_SESSION['userlogin'])) == ''){ echo "<ul><img src=\"images/Bullet.jpg\" border=\"1\" width=\"30\" height=\"30\"><a

href=\"kategori_berita.php?kategori=$data[kategori]\">&nbsp;&nbsp;$data[kateg ori]</a></li></ul>";

} else{

echo "<ul><img src=\"images/Bullet.jpg\" border=\"1\" width=\"30\" height=\"30\"><a

href=\"kategori_berita.php?kategori=$data[kategori]\">&nbsp;&nbsp;$data[kateg ori]</a></li></ul>";

} }

} ?>

File : kategori_berita.php

<html> <<html> <head>

<title>E-News Berita Online</title>

<link rel="icon" type="images/jpg" href="images/9.jpg">

<link rel="stylesheet" type="text/css" href="style1.css" media="all"/>

<link href="themes/js/js- image-slider.css" rel="stylesheet" type="text/css" /> <script src="themes/js/js- image-slider.js" type="text/javascript"></script>

<body background="images/1.png" width="700" height="1200">

</head> <a

href="http://newopenx.detik.com/delivery/ck.php?oaparams=2__bannerid=25005 __zoneid=329__cb=fab5dc2e59__oadest=http%3A%2F%2Fsahabatpegadaian.co m%2Fkemilauemas%2F%3Futm_source%3DDetikcom%26utm_medium%3DBa nner%26utm_campaign%3DKemilauemas" target="_blank"><img

src="http://newopenx.detik.com/images/b686c40e3cde41c09dfc188f1935c035.gif "

style="width:940; height:50px; padding-left:200px; top:5px; "></a> </a>

<body>

<div class="main-wrapper"> <div class="left-wrapper">

<div class="top"><marquee bgcolor="rgb(240, 81, 105)"><h1>BERITA ONLINE || TAPIYANTY SIMANJUNTAK</h1></marquee></div>

<div id="sliderFrame"> <div id="slider">


(23)

<img src="images/013.JPG" alt="Tim Penyusun" /> <img src="images/ah.JPG" alt="Berita Online" /> <img src="images/01.JPG" alt="Berita terupdate" /> <img src="images/08.JPG" alt="Berita terbaru"/>

<img src="images/14.PNG" alt="E-NEWS BERITA ONLINE" />

</div> </div>

<div id="wrapper"> <div id="header">

<div class="top_banner" body id="body">

</div> </div>

<div class="menu">

<table border="0" align="center" width="90%" margin top="3px"> <ul>

<li><a href="index.php"><H3> HOME </H3> </a></li> <li><a href="berita.php"><H3> Berita </H3> </a></li>

<li><h3><a href="http://sports.okezone.com/">Olahraga</a></li> <li><h3><a href="http://foto.okezone.com/">Foto</a></li> <li><h3><a href="http://video.okezone.com/">Video</a></li> <li><h3><a href="http://index.okezone.com/">Index</a></li> <li><h3><a href="tentangkami.php"><H3> Tentang Profil </H3> </a></li>

<li><h3><a href="http://news.okezone.com/autos/">Berita zone</a></li> <li><h3><a href="tentangkami.php"><H3> Detik kom</H3> </a></li>

</table> </div> </nav> </div>

<script type="text/javascript">

function MM_preloadImages() { //v3.0


(24)

var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} }

</script> </head>

<body onload="MM_preloadImages('Gambar/TLogin copy.jpg')"> <div class="main">

<div class="top"><marquee bgcolor="rgb(240, 81, 105)"><h1>Berita Online</h1></marquee></div>

<table width="930" border="0" align="center" cellpadding="0" cellspacing="0"> <tr>

<th width="245" height="22" align="left" valign="top" bgcolor="#FFFFFF" scope="col">&nbsp;</th>

<th colspan="2" align="right" valign="middle" bgcolor="#FFFFFF" class="Teks_Menu_Atas" scope="col">&nbsp;</th>

</tr> <tr>

<td align="left" valign="top" bgcolor="#FFFFFF"><div class="Area_Menu_Kiri">

<form id="form1" name="form1" method="post" action="login.php"> <table width="100%" border="0" cellspacing="2" cellpadding="0"> <tr>

<td height="60" colspan="3" align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2">

<tr>

<th align="left" valign="top" scope="col"><img src="images/Menu Kategori.jpg" alt="" width="203" height="32" /></th>

</tr> <tr>

<th align="left" valign="top" class="Teks_Kategori" scope="col"><?php include "kategori.php"; ?></th>

</tr>

</table></td> </tr>

<tr>

<td colspan="3" align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2">

<tr>

<th align="left" valign="top" scope="col">&nbsp;</th> </tr>

<tr>

<td align="left" valign="top" class="Teks_News" scope="col">&nbsp;</td>


(25)

</table></td> </tr>

<tr>

<td width="29%" align="left" valign="top">&nbsp;</td> <td width="3%" align="left" valign="top">&nbsp;</td> <td width="68%" align="left" valign="top">&nbsp;</td> </tr>

<tr>

<td colspan="3" align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2">

<tr>

<th align="left" valign="top" scope="col">&nbsp;</th> </tr>

<tr>

<td align="left" valign="top" class="Teks_Testimonial" scope="col"><div></div>

<br /></td> </tr>

</table></td> </tr>

<tr>

<td align="left" valign="top">&nbsp;</td> <td>&nbsp;</td>

<td class="Teks_Menu">&nbsp;</td> </tr>

</table> </form> </div></td>

<th width="685" align="left" valign="top" bgcolor="#FFFFFF"><table width="486" border="0" cellpadding="0" cellspacing="0" class="Area_berita">

<tr>

<td align="center" valign="top"><div class="Area_berita"> <?php include "berita_kategori.php"; ?>

</div></td> </tr>

</table></th>

</div></td> </tr>

</table>

<div class="footer">

<span> copyright 2016 | Tapiyanty S</span> </div>


(26)

</body> </html>

File : Read.php

<html> <head>

<title>E-News Berita Online</title>

<link rel="icon" type="image/jpg" href="images/014.JPG">

<link rel="stylesheet" type="text/css" href="style1.css" media="all"/>

<link href="themes/js/js- image-slider.css" rel="stylesheet" type="text/css" /> <script src="themes/js/js- image-slider.js" type="text/javascript"></script>

<body background="images/1.png" width="700" height="1200">

</head> <a

href="http://newopenx.detik.com/delivery/ck.php?oaparams=2__bannerid=25005 __zoneid=329__cb=fab5dc2e59__oadest=http%3A%2F%2Fsahabatpegadaian.co m%2Fkemilauemas%2F%3Futm_source%3DDetikcom%26utm_medium%3DBa nner%26utm_campaign%3DKemilauemas" target="_blank">< img

src="http://newopenx.detik.com/images/b686c40e3cde41c09dfc188f1935c035.gif "

style="width:940; height:50px; padding-left:200px; top:30px; "></a> </a>

<body>

<div class="main-wrapper"> <div class="left-wrapper">

<div class="top"><marquee bgcolor="rgb(240, 81, 105)"><h1>BERITA ONLINE || TAPIYANTY SIMANJUNTAK</h1></marquee></div>

<div id="sliderFrame"> <div id="slider">

<img src="images/14.PNG" alt="Selamat Datang di Website Kami" /> <img src="images/013.JPG" alt="Tim Penyusun" />

<img src="images/ah.JPG" alt="Berita Online" /> <img src="images/01.JPG" alt="Berita terupdate" /> <img src="images/08.JPG" alt="Berita terbaru"/>

<img src="images/14.PNG" alt="E-NEWS BERITA ONLINE" />

</div> </div>

<div id="wrapper"> <div id="header">


(27)

</div> </div>

<div class="menu">

<table border="0" align="center" width="40%" margin top="3px"> <ul>

<li><a href="index.php"><H3> HOME </H3> </a></li> <li><a href="berita.php"><H3> BERITA </H3> </a></li> <li><h3><a href="http://sports.okezone.com/">Olahraga</a></li> <li><h3><a href="http://foto.okezone.com/">Foto</a></li> <li><h3><a href="http://video.okezone.com/">Video</a></li> <li><h3><a href="http://index.okezone.com/">Index</a></li> <li><h3><a href="tentangkami.php"><H3> Tentang Profil </H3> </a></li>

<li><h3><a href="http://news.okezone.com/autos/">Berita zone</a></li> <li><h3><a href="tentangkami.php"><H3> Detik kom</H3> </a></li>

</table> </div>

<div id="page_content"> <div class="left_side_bar"> <div class="col_1">

<div align=center><embed src=free-flash-clock-152.swf width=150 height=50 wmode=transparent type=application/x-shockwave- flash></embed> </div>

</div>

<div class="col_1"> <a

href="http://newopenx.detik.com/delivery/ck.php?oaparams=2__bannerid=25439 __zoneid=331__cb=8a4aa930ae__oadest=https%3A%2F%2Fwww.trac.astra.co.i d%2Fearly-bird-promo-book-your-car- for- idul-fitri-now%2F"

target="_blank"><img

src="http://newopenx.detik.com/images/116a82b369409e1281aee85eea30b846.gi f" width="180" height="600" alt="" title="" border="0"></a>

<div class="box">

</div> </div>


(28)

<div class="box">

</div> </div> </div>`

<div class="right_section"> <div class="common_content">

<h2> Presiden Jokowi Tiba di jerman Untuk kunjungan kenegaraan</h2> <hr>

<center>

<img src="images/jokowi.jpg" height="300" width="500" >

<justify> <p>JAKARTA - Posisi direktur jenderal (dirjen) dan deputi di kementerian dan lembaga negara juga ikut memengaruhi kinerja Pemerintahan Joko Widodo-Jusuf Kalla (Jokowi-JK). Maka itu, pengawasan harusnya tidak dilakukan Jokowi sebatas level menteri saja, tapi hingga ke level bawahan menteri masing- masing.</p>

<p>

"Kalau birokrasinya tidak benar akan menghambat kementerian atau lembaga tersebut untuk menjalankan tugas presiden itu sendiri," ujar Maftuhan dalam acara diskusi bertajuk, Gaduh Partai Jelang Reshuffle Jilid II: Mau Ke Mana? ", di kawasan Menteng, Jakarta Pusat, Minggu (17/4/2016).</p>

<p>Dia mencontohkan, jika Badan Nasional Penanggulangan Terorisme (BNPT) sulit memberantas teroris bisa memengaruhi citra Presiden Jokowi. Maka itu, menurutnyareshuffle seharusnya tidak sampai level menteri saja, tapi hingga level dirjen dan deputi kementerian dan lembaga negara. </p>

<table border="0"> <tr>

<td > </td>

</table>

</center> </div>

</div>

<div class="clear"></div>

<div id="footer">Copyright &copy; 2014 ShoppaHolic.com<br>


(29)

</div> </div> </div>

</body> </html>

Tampilan Tentang Profil

File :Tentang_profil.php

<html> <head>

<title>E-News Berita Online</title>

<link rel="icon" type="image/jpg" href="images/014.JPG">

<link rel="stylesheet" type="text/css" href="style1.css" media="all"/>

<link href="themes/js/js- image-slider.css" rel="stylesheet" type="text/css" /> <script src="themes/js/js- image-slider.js" type="text/javascript"></script>

<body background="images/1.png" width="700" height="1200">

</head> <a

href="http://newopenx.detik.com/delivery/ck.php?oaparams=2__bannerid=25005 __zoneid=329__cb=fab5dc2e59__oadest=http%3A%2F%2Fsahabatpegadaian.co m%2Fkemilauemas%2F%3Futm_source%3DDetikcom%26utm_medium%3DBa nner%26utm_campaign%3DKemilauemas" target="_blank"><img

src="http://newopenx.detik.com/images/b686c40e3cde41c09dfc188f1935c035.gif "

style="width:940; height:50px; padding-left:200px; top:30px; "></a> </a>


(30)

<body>

<div class="main-wrapper"> <div class="left-wrapper">

<div class="top"><marquee bgcolor="rgb(240, 81, 105)"><h1>BERITA ONLINE || TAPIYANTY SIMANJUNTAK</h1></marquee></div>

<div id="sliderFrame"> <div id="slider">

<img src="images/14.PNG" alt="Selamat Datang di Website Kami" /> <img src="images/013.JPG" alt="Tim Penyusun" />

<img src="images/ah.JPG" alt="Berita Online" /> <img src="images/01.JPG" alt="Berita terupdate" /> <img src="images/08.JPG" alt="Berita terbaru"/>

<img src="images/14.PNG" alt="E-NEWS BERITA ONLINE" />

</div> </div>

<div id="wrapper"> <div id="header">

<div class="top_banner" body id="body">

</div> </div>

<div class="menu">

<table border="0" align="center" width="40%" margin top="3px"> <ul>

<li><a href="index.php"><H3> HOME </H3> </a></li> <li><a href="berita.php"><H3> BERITA </H3> </a></li> <li><h3><a href="http://sports.okezone.com/">Olahraga</a></li> <li><h3><a href="http://foto.okezone.com/">Foto</a></li> <li><h3><a href="http://video.okezone.com/">Video</a></li> <li><h3><a href="http://index.okezone.com/">Index</a></li>

<li><h3><a href="tentangkami.php"><H3> Tentang kami </H3> </a></li> <li><h3><a href="http://news.okezone.com/autos/">Berita zone</a></li> <li><h3><a href="tentangkami.php"><H3> Detik kom</H3> </a></li>

</table> </div>


(31)

<div id="page_content"> <div class="left_side_bar"> <div class="col_1">

<div align=center><embed src=free-flash-clock-152.swf width=150 height=50 wmode=transparent type=application/x-shockwave- flash></embed> </div>

</div>

<div class="col_1"> <a

href="http://newopenx.detik.com/delivery/ck.php?oaparams=2__bannerid=25439 __zoneid=331__cb=8a4aa930ae__oadest=https%3A%2F%2Fwww.trac.astra.co.i d%2Fearly-bird-promo-book-your-car- for- idul-fitri-now%2F"

target="_blank"><img

src="http://newopenx.detik.com/images/116a82b369409e1281aee85eea30b846.gi f" width="180" height="600" alt="" title="" border="0"></a>

<div class="box">

</div> </div>

<div class="col_1">

<h1><a href="what.php">What's New?</a></h1>

<h1><a href="want.php">Want a Discount?</a> </h1>

<div class="box">

</div> </div> </div>`

<div class="right_section"> <div class="common_content"> <h2>Berita Online.com</h2> <hr>

<p>Saya disini menyediakan berbagai kategori berita yang bisa dilihat di situs berita online </p>

<p>Situs ini menyediakan berbagai informasi tentang berita yang terupdate yang dapat kita lihat . </p>

</div>

<div class="common_content"> <h2>Sebagai Pemilik akun</h2> <p> </p>

</div>


(32)

<p>untuk informasi lebih lanjut :</p>

<br>

<table width="auto" height="200px" border="0" cellpadding="0" cellspacing="0" margin-top:"10px">

<tr>

<td>Alamat email</td> <td>&nbsp;:</td>

<td>&nbsp;&nbsp;Tapiaynty SImanjuntak, sumatera utara</td>

</tr> <tr>

<td>No Telepon</td> <td>&nbsp;:</td> <td>&nbsp;&nbsp;082272059716</td>

</tr> <tr>

<td>Pin BB</td> <td>&nbsp;:</td> <td>&nbsp;&nbsp;1000056R5</td>

</tr> <tr>

<td>Email</td> <td>&nbsp;:</td> <td>&nbsp;&nbsp;BeritaONline@gmail.com</td>

</tr> <tr>

<td>Website</td> <td>&nbsp;:</td> <td>&nbsp;&nbsp;<a href="http://www.Berita oNLINE.com">www.BeritaOnline.com</a></td>

</tr> </table>

<div class="footer"> </div>

</div> </body>


(33)

File: Style.css

/* General Reset */

html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, hr, button {

margin:0; padding:0; border:0; outline:0; font-size:100%; vertical-align:baseline; }

ol, ul {

list-style-type:none; }

h1, h2, h3, h4, h5, h6, li {

line-height:100%; }

blockquote, q {

quotes:none; }

q:before, q:after {

content:""; }

input, textarea, select {

font:12px Arial, Helvetica, sans-serif; vertical-align:middle;

padding:0; margin:0; }

textarea {

overflow:auto; resize:none; }

.menu {


(34)

height: 50px;

border-bottom: solid 0px #fe8917; position: relative;

}

div {user agent stylesheet display: block;

}

.menu li:first-child {

border-left: solid 0px blue; }

.menu ul li { padding: 0 20px; }

.menu ul li { margin: 0; padding: 0 14px; list-style: none; float: left;

border-left: solid 1px #2c59d6; border-right: solid 1px #193177; }

ul li {

margin: 3px 0; }

user agent stylesheet li {

display: list-item;

text-align: -webkit-match-parent; }

Inherited from ul ul {

list-style-type: none; }

user agent stylesheet ul, menu, dir { display: block; list-style-type: disc;

-webkit-margin-before: 1em; -webkit-margin-after: 1em; -webkit-margin-start: 0px; -webkit-margin-end: 0px; -webkit-padding-start: 40px; }

.main-wrapper{

width: 90; margin: auto;


(35)

margin- left: 200; position:center; margin-top: -5; }

.skin{ width:60px; margin-top:20px; margin- left:-90px;

} .top{

margin-top: 0px; }

.clearfix {

clear: both !important; height: 0 !important; padding: 0;

float: none !important; }

.bn_skin1 { left: 50%;

margin- left: -851px; }

.bn_skin { position: fixed; width: 300px; top: 45px; }

.left-wrapper{

display: inline-block;

background: rgba(235, 235, 235, 1); padding: 0px 20px;

box-sizing: border-box;

-webkit-box-sizing: border-box; -moz-box-sizing: border-box; float: left;

} #body {

margin:0px; padding:0px; font-size:13px; line-height:21px;

font-family:Arial, Helvetica, sans-serif; background-attachment: fixed;


(36)

background-size:100% 100%; }

h1, h2, h3, h4, h5, h6 {

font-weight:normal; }

h1 {

font-size:33px; margin-bottom:15px; }

h2 {

font-size:25px; margin-bottom:15px; }

h3 {

font-size:18px; margin-bottom:15px; }

h4 {

font-size:16px; margin-bottom:15px; }

h5 {

font-size:14px; margin-bottom:15px; }

h6 {

font-size:12px; margin-bottom:15px; }

/* links

******************************/

a {color: #516322;text-decoration: underline;} a:hover {color: #516322;text-decoration: none;} /* superscript and subscript

******************************/

sup, sub {vertical-align: baseline;position: relative;top: -0t4em;} sub { top: 0.4em; }


(37)

******************************/ ul, ol {padding:0;margin:0;}

ul li {list-style-type:disc;} ol li {list-style-type:decimal;} ul li,

ol li {font-size: 12px; line-height: 16px;margin: 0 0 10px 15px;} /* tables

******************************/ table,th,td {border:1px;}

th {padding:3px; font-weight:bold;color:#5c5a45;} tr {margin:0 0 5px 0;padding:3px;}

td {padding:5px;margin:0 1px;} /* horizontal lines

******************************/

hr {border-top: left: right: none;border-bottom: 3px solid #acacbb;margin:5px 0;padding:0;height:2px;width:100%; margin-bottom:10px;}

.clear {

clear:both; }

.left {

float:left; }

.right {

float:right; }

.copyright {

border: 0px; height: 1px; width: 1px; }

#wrapper {

width:900px; margin:0 auto;

padding:20px 0 10px 0; }

/*----start header----*/ #header {


(38)

padding:0px 0px 5px; }

#header .top_banner{

background:url(images/014.jpg) no-repeat left top; background-color:rgba(0,0,0,0.1);

height:160px;

padding:65px 95px 0 65px; border:#3e768f solid 1px;

-moz-box-shadow:0 0 2px 0px #888888; -webkit-box-shadow:0 0 2px 0px #888888; box-shadow:0 0 2px 0px #888888;

-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px;

}

#header h1{

font-size:34px;

font-family:'Lucida Grande', 'Lucida Sans Unicode', Arial, Helvetica, Sans-Serif;

color:white; margin:0px;

font-weight:normal; padding:0px 0px 10px; }

#header h1 a {

color:#2F1B09; text-decoration: none; }

#header h1 a:hover {

text-decoration: none; }

#header p{

font-size:18px;

font-family:'Lucida Grande', 'Lucida Sans Unicode', Arial, Helvetica, Sans-Serif;

margin- left:2px; color:#2F1B09; }

.navigation{ width:900;

background-color:pink; border-left:2px;


(39)

border-right:4px; height: 60px; width: 880px;

border-right-color:red; border:hidden;

padding:2px 2px 2px 2px; padding top:50px;

}

.navigation ul{

margin:0px; padding:0px; }

.navigation ul li:last-child {

border-right:none; }

/*----end header----*/ /*----start page content----*/ #page_content{

background-color:rgba(675,899,279,0.9); padding:10px;

-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px;

-moz-box-shadow:0 0 2px 0px #888888; -webkit-box-shadow:0 0 2px 0px #888888; box-shadow:0 0 2px 0px #888888;

}

#page_content .right_section{ width:620px; float:right;

padding:0px 20px; }

#page_content .right_section .top_content{ padding:15px 0 0px 0; }


(40)

width:295px; float:left;

margin-bottom:20px; }

#page_content .right_section .top_content .column_two{ width:295px;

float:right;

margin-bottom:20px; }

a.btn{

color:#4F4F50;

background:#FAEFE3; font-size:12px;

text-decoration:none;

padding:7px 15px 7px 15px; font-weight:bold;

display:inline-block;

border:#A4AD8D solid 1px;

-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px;

}

a.btn:hover{

text-decoration:underline; }

.common_content{

padding:0 0 20px 0; }

.border_left{

border-left:#cacfbb dotted 1px; padding-left:20px;

}

.border_none{

border:none!important; margin:0px!important; }

.left_side_bar{

width:210px; float:left; }


(41)

font-size:18px; padding:0 0 0 35px; margin-bottom:20px; color:red;

background:url(arrow.png) no-repeat 10px center; }

.left_side_bar .col_1{

padding:15px 5px 15px 10px; margin-bottom:20px;

border:#d2d7c3 solid 3px;

-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px;

}

.left_side_bar .col_1 .box{

padding:5px 11px 5px; }

.left_side_bar .col_1 .box ul{ margin:0px; padding:0px; }

.left_side_bar .col_1 .box ul li{

margin:0px 0px 8px; padding:0px 0px 0px 20px; font-size:13px;

list-style-type:none;

background:url(li.png) no-repeat left center; }

.left_side_bar .col_1 .box ul li a{ color:#364b38;

text-decoration:underline; }

.cycle-headline { float: left; }

.slidenumbwp { text-align: right; }

.cycle-slide{ width: 100%; }

.header { padding: 0;


(42)

.header_top {

margin-top: 10px; }

.news-headline{ position: relative; margin-bottom: 5px; height: 450px; max-height: 450px; }

.left_side_bar .col_1 .box ul li a:hover{ color:#364b38;

text-decoration:none; }

/*----end page content----*/

/*----start footer content----*/ .footer{

clear:both; margin-top:30px;

padding:18px 0 12px 0; height:20px;

text-align:center;

font-family:Arial, Helvetica, sans-serif; font-size:12px;

line-height:20px;

background-color:#E4E1DF;

-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px;

border:#95AE71 dotted 1px; }

/*----end footer content----*/

File :p_catalog.php

<style type="text/css"> .teks_judul_berita {

font-family: Arial, Helvetica, sans-serif; font-size: 14px;

color: #000000; }


(43)

font-family: Arial, Helvetica, sans-serif; font-size: 12px;

color: #990000; font-weight: bold; }

</style> <?php

include("config.php");

$query = "select * from tb_input order by id desc"; $hasil = mysql_query($query);

$numrows = mysql_num_rows($hasil);

//Paging Data sebanyak 30 data product perlembar $jumlah = mysql_num_rows($hasil);

$limit = 30;

if (empty($offset)) { $offset = 0; }

if(isset($_GET['offset'])){$offset = $_GET['offset']; } $seleksi = "SELECT * FROM tb_input ORDER BY id DESC LIMIT $offset, $limit";

$result = mysql_query($seleksi); echo "<div align=\"right\">"; $halaman = intval($jumlah/$limit); if ($jumlah%$limit) {

$halaman++; }

for ($i=1;$i<=$halaman;$i++) { $newoffset=$limit*($i-1);

if ($offset!=$newoffset) {

echo "<b><font face=\"arial\" size=\"2\">[<a style=\"color: black\"

href=\"produk.php?offset=$newoffset\">$i</a>]</font></B>"; } else {

echo "<b><font face=\"arial\" size=\"3\" color=\"red\">[$i]</font></b>";

} }

echo "</div>"; //Batas kode paging data


(44)

<table border=0px cellpadding='10' cellspacing="2" bgcolor="" bordercolor="" align="left">

<tr>

<?php

$kolom=3; $x = 0;

if($numrows > 0){

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

if ($x >= $kolom) {

echo "</tr><tr>"; $x = 0;

} $x++;

?>

<td align=center>

<div class ="teks_judul_berita"> <?php echo $data['judul']; ?><br><br> </div>

<div><img width='200px' height='238px' valign='top' border='1,5' src="images/<?php echo $data['gambar']; ?>" /><br><br>

</div>

<div class ="teks_tanggal_berita">

<?php $data = $data['judul'] ?><br><br> </div>

<div> <?php

echo '

<a href="berita_detail.php?id='.$data['id'].' "><img src="images/TDetail.jpg"\ title="Detail beria" border="0" width=\"50\" height=\"30\"></a>';

?> </div> <hr />

</td> <?php

} } ?>


(45)

</tr> </table>

File :gabrconfig.php

<?php

include "config.php";

$fileName = $_FILES['picture']['name']; //get the file name $fileSize = $_FILES['picture']['size']; //get the size

$fileError = $_FILES['picture']['error']; //get the error when upload if($fileSize > 0 || $fileError == 0){ //check if the file is corrupt or error $move = move_uploaded_file($_FILES['picture']['tmp_name'],

'C:/xampp/htdocs/E-Newsberitaonline/images/'.$fileName); //save image to the folder

if($move){

echo "<h3>Success! </h3>";

$q = "INSERT into tb_image VALUES('','$fileName','images/$fileName')"; //insert image property to database

$result = mysql_query($q);

$q1 = "SELECT location from tb_image where filename = '$fileName' limit 1 "; //get the image that have been uploaded

$result = mysql_query($q1);

while ($data = mysql_fetch_array($result)) { $loc = $data['location']; ?>

<br/>

<h2> This is the Image : </h2>

<img src="<?php echo $loc; ?>" /> <!-- show the image using img src --> <?php

} } else{

echo "<h3>Failed! </h3>"; }

} else {

echo "Failed to Upload : ".$fileError; }

?>

File :config.php

<?php

$host="localhost"; $user="root"; $pass="";

$namadb="beritaonline";

$koneksi=mysql_connect("$host","$user","$pass","$namadb") or die("Gagal mengkoneksikan");

$pilihdb=mysql_select_db("$namadb"); if($pilihdb) {


(46)

} else {

header('location:install.php'); }

?>

File : Conec.php

conek<?php

mysql_connect("localhost","root","") or die ("Koneksi Gagal");

mysql_select_db("beritaonline") or die("Database Tidak Ditemukan"); ?>

File :beritaonline.sql

-- phpMyAdmin SQL Dump -- version 4.2.7.1

-- http://www.phpmyadmin.net --

-- Host: 127.0.0.1

-- Generation Time: 02 Apr 2016 pada 18.12 -- Versi Server: 5.5.39

-- PHP Version: 5.4.31

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00";

/*!40101 SET

@OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET

@OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;

/*!40101 SET

@OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */;

--

-- Database: `beritaonline` --

-- --- --

-- Struktur dari tabel `tb_admin` --

CREATE TABLE IF NOT EXISTS `tb_admin` ( `id` int(11) NOT NULL,


(47)

`username` varchar(35) CHARACTER SET utf8 NOT NULL, `password` text CHARACTER SET utf8 NOT NULL

) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ; --

-- Dumping data untuk tabel `tb_admin` --

INSERT INTO `tb_admin` (`id`, `username`, `password`) VALUES (1, 'Tapiyanty', 'aaaa'),

(2, 'medan', 'admin');

-- --- --

-- Table structure for table `tb_input` --

CREATE TABLE IF NOT EXISTS `tb_input` ( `id` int(30) NOT NULL,

`kategori` int(12) NOT NULL, `judul` varchar(15) NOT NULL, `tanggal` date NOT NULL, `gambar` text(200) NOT NULL, `isi` varchar(500) NOT NULL

) ENGINE=InnoDB DEFAULT CHARSET=latin1; --

-- Dumping data for table `tb_input` --

INSERT INTO `tb_input` (`id`, `kategori`, `judul`, `tanggal`, `gambar`, `isi`) VALUES

('1','politik' , 'Indonesia dan Selandia Baru Jalin Kerja Sama Pendidikan','01-04-2016','ip.jpg', 'Selandia Baru menjadi salah satu patner strategis Indonesia dalam mengembangkan kerja sama pendidikan. Program beasiswa, pertukaran pelajar, dan riset jadi salah satu program unggulan. Selandia Baru berkomitmen ingin membantu Indonesia lewat dunia pendidikan.

Demikian terungkap dalam pertemuan Ketua Grup Kerja Sama Parlemen (GKSP) DPR RI dengan Selandia Baru, Firmandez (F-PG) bersama Ketua Indonesia Education Partnership Brook William Ross, Senin 25 April 2016 di Gedung DPR. Brook mengungkapkan, ada 8 universitas ternama di Selandia Baru yang siap menjalin kerja sama pendidikan dengan sejumlah universitas di Tanah Air. Hadir mendampingi Firmandez, Sutan Adil Hendra (F-Gerindra) dan Ali Taher Parasong (F-PAN). DPR menyambut baik sekaligus mengapresiasi Selandia Baru


(48)

yang serius memberi bantuan beasiswa dan riset bagi para mahasiswa dan dosen di Indonesia. Dalam waktu dekat sudah akan terjalin kerja sama Selandia Baru dengan universitas di Jambi.

Brook mengungkapkan, ada program diskon biaya pendidikan S3 di Selandia baru hingga 80 persen, khusus bagi para mahasiswa Indonesia. Bahkan, para dosen yang ingin mengembangkan riset di Selandia Baru, akan segera difasilitasi.

Program penguatan kurikulum perkuliahan di Indonesia juga akan dilakukan, agar sejumlah kampus di Indonesia bisa disejajarkan dengan kampus-kampus di Selandia Baru dan kampus internasional lainnya.

Bantuan pendidikan juga akan digalakkan untuk kawasan Indonesia timur. Selama ini kerja sama pendidikan, kata Firmandez, lebih banyak terpusat di Pulau Jawa. Ali Taher putra asli NTT juga berharap agar bantuan pendidikan bisa sampai ke timur Indonesia. Hanya saja menurut Brook, mahasiswa dari Indonesia timur masih minim penguasaan bahasa Inggrisnya. Untuk itu, akan diberi bantuan pula berupa pelatihan bahasa, agar mahasiswa dari kawasan timur bisa bersaing dengan para mahasiswa dari Pulau Jawa.');

-- --- --

-- Struktur dari tabel `tb_kategori` --

CREATE TABLE IF NOT EXISTS `tb_kategori` ( `id` int(11) NOT NULL,

`kategori` varchar(25) CHARACTER SET utf8 NOT NULL

) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=12 ; --

-- Dumping data untuk tabel `tb_kategori` --

INSERT INTO `tb_kategori` (`id`, `kategori`) VALUES (1, 'Berita Politik'),

(2, 'Berita Ekonomi');

-- --- --

-- Struktur dari tabel `tb_image` --

CREATE TABLE IF NOT EXISTS `tb_image` ( `id` int(11) NOT NULL,

`filename` varchar(255) NOT NULL, `location` varchar(255) NOT NULL


(49)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=9 ; --

-- Indexes for dumped tables --

--

-- Indexes for table `tb_admin` --

ALTER TABLE `tb_admin`

ADD PRIMARY KEY (`id`), ADD KEY `id` (`id`), ADD KEY `id_2` (`id`); --

-- Indexes for table `tb_input` --

ALTER TABLE `tb_input` ADD PRIMARY KEY (`id`); --

-- Indexes for table `kategoritbl` --

ALTER TABLE `tb_kategori` ADD PRIMARY KEY (`id`); --

-- Indexes for table `tb_image` --

ALTER TABLE `tb_image` ADD PRIMARY KEY (`id`); --

-- AUTO_INCREMENT for dumped tables --

--

-- AUTO_INCREMENT for table `admintbl` --

ALTER TABLE `tb_admin` MODIFY `id` int(11) NOT NULL

AUTO_INCREMENT,AUTO_INCREMENT=5; --

-- AUTO_INCREMENT for table `barangtbl` --

ALTER TABLE `tb_input`

MODIFY `id` int(11) NOT NULL

AUTO_INCREMENT,AUTO_INCREMENT=39; --


(50)

--

ALTER TABLE `tb_kategori` MODIFY `id` int(11) NOT NULL

AUTO_INCREMENT,AUTO_INCREMENT=12; --

-- AUTO_INCREMENT for table `tb_image` --

ALTER TABLE `tb_image` MODIFY `id` int(11) NOT NULL

AUTO_INCREMENT,AUTO_INCREMENT=9; /*!40101 SET

CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET

CHARACTER_SET_RESULTS=@OLD_CHARACTER_S ET_RESULTS */; /*!40101 SET

COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

Tampilan Admin

File : Admin.php

<?php session_start();

if (ISSET($_SESSION['adminlogin'])) {

//Tidak ada event, dalam artian menghindari jump page }

else

header("location:index.php"); ?>

<!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>Admin Berita Online</title>

<style type="text/css"> .Menu_Kiri {

width: 150px;

font-family: Tahoma, Geneva, sans-serif; font-size: 14px;


(51)

margin-top: 10px; margin-bottom: 10px; }

body {

background-image: url(../Gambar/Background.gif); }

a:link {

color: #006699; }

a:visited {

color: #006699; }

a:hover {

color: #5F9C9F; }

a:active {

color: #5F9C9F; }

.Menu_Tengah {

margin-top: 10px; margin-bottom: 10px; width: 600px;

margin- left: 25px;

font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; font-size: 12px;

}

.Teks_Keterangan {

font-family: Tahoma, Geneva, sans-serif; font-size: 12px;

color: #0096C3; }

</style> </head> <body>

<table width="800" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">

<tr>

<td colspan="2" align="center" valign="top"><img src="../images/11.JPG" width="1133" height="167" /></td>

</tr> <tr>

<td width="150" align="left" valign="top"><div class="Menu_Kiri"> <ul>

<li><a href="admin.php">Admin</a></li>

<li><a href="kategori.php">Menu kategori</a></li> <li><a href="input.php">input berita</a></l>


(52)

<li><a href="logout.php">Logout</a></li> </ul>

</div></td>

<td width="650" align="center" valign="top"><div

class="Menu_Tengah"><table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<th align="left" valign="top" class="Teks_Keterangan" scope="col">Menu Admin</th>

</tr> <tr>

<td align="center" valign="top" scope="col"><hr/></td> </tr>

<tr>

<td align="center" valign="top" scope="col"><?php include "admin_form.php" ?></td>

</tr> <tr>

<td align="center" valign="top"><hr /></td> </tr>

<tr>

<td align="center" valign="top"><?php include "admin_data.php" ?></td> </tr>

</table> </div></td> </tr> <tr>

<td colspan="2" align="center" valign="top"><img src="../images/p.PNG" width="1133" height="117" /></td>

</tr> </table> </body> </html>


(53)

File :Admin_php <?php

if (ISSET($_SESSION['adminlogin'])) {

} else

header("location:index.php"); ?>

<table width="600" border="1" cellpadding="0" cellspacing="0" bgcolor="#E8EED7">

<tr>

<th width="20%" align="left" scope="col" >ID</th>

<th width="600" align="left" scope="col">User Name</th> <th width="25%" scope="col">Aksi</th>

</tr> <?php

require("config.php");

$query = "select * from tb_admin order by id asc"; $hasil = mysql_query($query);

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

echo "<tr>

<td align=\"left\" width=\"20%\" bgcolor=\"#FFFFFF\">".$data['id']."</td> <td align=\"left\" width=\"70%\"

bgcolor=\"#FFFFFF\">".$data['username']."</td>

<td align=\"center\" width=\"10%\" bgcolor=\"#FFFFFF\"><a

href=\"admin_ubah.php?user=$data[username]\"><img width=\"15\" src=\"../images/Ubah.png\" height=\"15\" border=\"0\"

valign=\"middle\"></a>&nbsp;&nbsp;<a

href=\"admin_hapus.php?id=$data[id]\"><img width=\"15\" src=\"../images/Hapus.png\" height=\"15\" border=\"0\" valign=\"middle\"></a></td>

</tr>"; } ?> </table>


(54)

File : Kategori .php <?php session_start();

if (ISSET($_SESSION['adminlogin'])) {

//Tidak ada event, dalam artian menghindari jump page }

else

header("location:index.php"); ?>

<!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>Berita Online</title>

<link rel="icon" type="image/jpg" href="images/013.JPG"> <style type="text/css">

.Menu_Kiri {

width: 150px;

font-family: Tahoma, Geneva, sans-serif; font-size: 14px;

margin-top: 10px; margin-bottom: 10px; }

body {

background-image: url(../Gambar/Background.gif); }

a:link {

color: #006699; }

a:visited {


(55)

}

a:hover {

color: #5F9C9F; }

a:active {

color: #5F9C9F; }

.Menu_Tengah {

margin-top: 10px; margin-bottom: 10px; width: 600px;

margin- left: 25px;

font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; font-size: 12px;

}

.Teks_Keterangan {

font-family: Tahoma, Geneva, sans-serif; font-size: 12px;

color: #0096C3; }

</style> </head> <body>

<table width="800" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">

<tr>

<td colspan="2" align="center" valign="top"><img src="../images/11.jpg" width="1133" height="170" /></td>

</tr> <tr>

<td width="150" align="left" valign="top"><div class="Menu_Kiri"> <ul>

<li><a href="admin.php">Admin</a></li>

<li><a href="kategori.php">Menu kategori</a></li> <li><a href="input.php">Input berita</a></li> <li><a href="logout.php">Logout</a></li> </ul>

</div></td>

<td width="650" align="center" valign="top"><div

class="Menu_Tengah"><table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<th align="left" valign="top" class="Teks_Keterangan" scope="col">Menu Kategori</th>

</tr> <tr>


(1)

INFORMATION SYSTEM BASED ONLINE NEWS AND PHP MYSQL

ABSTRACT

This final project aims to build the website News Online . System design in manufacturing with the PHP Online news website was developed using some software that is XAMPP which is a combination of the Apache Web Server , PHP , and MySQL . By using this website then progress will be faster and easier . With the PHP -based online news website is accessing news online can be easier and also much wider so you can access news news online quickly and everyone can easily get the latest information . The advantages of online news could be on this website is to save time and costs as compared with the usual form of newspapers and needs time to print it out and have to include news and updates automatically every person can immediately see the latest news seen on the web page .


(2)

DAFTAR ISI

Halaman

Persetujuan i

Pernyataan ii

Penghargaan iii

Abstrak iv

Abstract v

Daftar Isi vi

Daftar Tabel viii

Daftar Gambar ix

Daftar Lampiran x

BAB 1. Pendahuluan

1.1. Latar Belakang 1

1.2. Rumusan Masalah 2

1.3. Batasan Masalah 3

1.4. Maksud dan Tujuan 3

1.5. Metodologi 4

1.7. Sistematika Penulisan 5

BAB 2. Tinjauan Teori

2.1. Pengertian Komputer 7

2.2. Pengenalan Internet 8 2.2.1. Fasilitas Dalam Dunia Internet 9

2.3. Pengenalan HTML 11

2.3.1 Pendahuluan HTML 11

2.3.2 Bagian-bagian HTML 11

2.4. HTTP 13

2.5. Bahasa Pemograman PHP 14

2.5.1 Penggabungan Script PHP dan HTML 15

2.6. MYSQL 17

2.6.1 Pengenalan MYSQL 17

2.6.2 Kelebihan MYSQL 18

2.6.3 Perintah Dasar MYSQL 17

2.7. Database 19

2.8 Model Data 20

BAB 3. Perancangan Sistem

3.1. Perancangan Sistem 23

3.2. Desain Database 23

3.2.1 Tabel Admin 23

3.2.2 Tabel Input 24

3.2.3 Tabel Kategori 24


(3)

3.3.1 Tampilan Flowcahart Menu Utama 25 3.3.1 Tampilan Flowcahart Administrator 26 3.3.1 Tampilan Flowcahart Berita 27 3.3.1 Tampilan Flowcahart Input Berita 28 3.3.1 Tampilan Flowcahart Kategori 29

3.4. Algoritma Program 30

3.4.1 Algoritma Menu Utama 30

3.4.2 Algoritma Admin 30

BAB 4. Implementasi Sistem

4.1. Pengertian dan Tujuan Implementasi Sistem 31 4.2. Komponen Utama dalam Implementasi Sistem 32 4.3.1. Perangkat Keras (Hardware) 32 4.3.2. Perangkat Lunak (Software) 32

4.3.3. Brainware 33

4.3. Instalisasi PHP dan MySQL 34

4.4 Prosedur Pengunaan Program 35

BAB 5. Penutup

5.1. Kesimpulan 37

5.2. Saran 38

Daftar Pustaka Lampiran


(4)

DAFTAR TABEL

Nomor Judul Halaman Tabel

3.2.1 Tabel Admi 23

3.2.2 Tabel Input 24

3.2.3 Tabel Kategori 24


(5)

DAFTAR GAMBAR

Nomor Judul Halaman Gambar

3.3.1 Tampila Flowchart Mneu Utama 25

3.3.2 Tampilan Flowchart Administrator 26

3.3.3 Tampilan Flowchart Berita 27

3.3.4 Tampilan Flowchart Input Berita 28

3.3.5 Tampilan Flowchart Menu Kategori 29 4.4 Tampilan Website pada Web Browser 35


(6)

DAFTAR LAMPIRAN

Lampiran A : Kartu Bimbingan Tugas Akhir Mahasiswa

Lampiran B : Surat Keterangan Hasil Uji Program Tugas Akhir Mahasiswa Lampiran C : Listing Program