Skip to content

Instantly share code, notes, and snippets.

@izoel
Created December 22, 2012 17:23
Show Gist options
  • Save izoel/4360049 to your computer and use it in GitHub Desktop.
Save izoel/4360049 to your computer and use it in GitHub Desktop.
tampilkandata.php
<html>
<head>
<script>
function reloadpage()
{
location.reload()
}
</script>
<style>
table tr > td:first-child + td + td + td { background-color: #5ebff7;
font-weight:bold;
padding-left:3px;
padding-right:3px;} /* third column */
table tr > td:first-child + td + td + td:hover{
background: #52646e;
background: -webkit-gradient(linear, left top, left bottom, from(#c3cfd6), to(#52646e));
background: -webkit-linear-gradient(top, #c3cfd6, #52646e);
background: -moz-linear-gradient(top, #c3cfd6, #52646e);
background: -ms-linear-gradient(top, #c3cfd6, #52646e);
background: -o-linear-gradient(top, #c3cfd6, #52646e);
text-overflow:clip;
}
table
{
border: 1px solid #e3e3e3;
background-color: #f2f2f2;
width: 100%;
border-radius: 8px;
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
}
tr{
background:#e4edf2;
}
tr:hover{
background: #52646e;
background: -webkit-gradient(linear, left top, left bottom, from(#c3cfd6), to(#52646e));
background: -webkit-linear-gradient(top, #c3cfd6, #52646e);
background: -moz-linear-gradient(top, #c3cfd6, #52646e);
background: -ms-linear-gradient(top, #c3cfd6, #52646e);
background: -o-linear-gradient(top, #c3cfd6, #52646e);
text-overflow:clip;
}
td{
white-space:nowrap;
width:12em;
overflow:hidden;
text-overflow:clip;
}
th
{
font-size: 17px;
line-height: 20px;
font-style: normal;
font-weight: normal;
text-align: left;
font-color:#cccccc;
text-shadow: white 1px 1px 1px;
text-overflow:clip;
border-width:2px;
border-color:#ccc;
border-style:ridge;
background: #52646e;
background: -webkit-gradient(linear, left top, left bottom, from(#c3cfd6), to(#52646e));
background: -webkit-linear-gradient(top, #c3cfd6, #52646e);
background: -moz-linear-gradient(top, #c3cfd6, #52646e);
background: -ms-linear-gradient(top, #c3cfd6, #52646e);
background: -o-linear-gradient(top, #c3cfd6, #52646e);
}
#button{
text-overflow:clip;
border-width:2px;
border-color:#ccc;
border-style:ridge;
background: #52646e;
background: -webkit-gradient(linear, left top, left bottom, from(#c3cfd6), to(#52646e));
background: -webkit-linear-gradient(top, #c3cfd6, #52646e);
background: -moz-linear-gradient(top, #c3cfd6, #52646e);
background: -ms-linear-gradient(top, #c3cfd6, #52646e);
background: -o-linear-gradient(top, #c3cfd6, #52646e);
}
#button a{color:#ccc; padding-left:5px; padding-right:5px;}
#button a:hover{color:#000000; padding-left:5px; padding-right:5px; border-type:solid;}
#button1{
text-overflow:clip;
border-width:2px;
border-color:#ccc;
border-style:ridge;
background: #301515;
background: -webkit-gradient(linear, left top, left bottom, from(#ff7b29), to(#301515));
background: -webkit-linear-gradient(top, #ff7b29, #301515);
background: -moz-linear-gradient(top, #ff7b29, #301515);
background: -ms-linear-gradient(top, #ff7b29, #301515);
background: -o-linear-gradient(top, #ff7b29, #301515);
}
#button1 a{color:#ccc; padding-left:5px; padding-right:5px;}
</style>
</head>
<body>
<form action="fungsidelete.php" name="submit" method="post">
<div style="overflow: auto; border: 1px solid #CCC; margin: auto; padding: 3px; width: 95%; height: 400px; background-color: none; text-align: left;">
<?php
$kon=mysql_connect("localhost","root","")or die("gagal konek ke localhost".mysql_error());
mysql_select_db("dbunion",$kon);
$result = mysql_query("select * FROM tblinputmobil");
echo "<table >
<tr>
<th colspan='2'></th>
<th >TGL</th>
<th >No WO</th>
<th >Nama STNK</th>
<th>Nomor STNk</th>
<th >Alamat</th>
<th >No Telp 1</th>
<th >No Telp 2</th>
<th >Platno</th>
<th >Jenis</th>
<th >Tahun</th>
<th >KM</th>
<th>Nomor Rangka</th>
<th>Nomor Mesin</th>
</tr>";
while($row=mysql_fetch_array($result)){
echo "<tr>";
echo "<td>"; echo "<div id='button1' onClick='document.location.reload(true)'><a href=\"fungsidelete.php?id='$row[nowo]'\"?>Hapus</a></div>"; echo "</td>";
echo "<td>"; echo "<div id='button' onClick='document.location.reload(true)'><a href=\"formedit.php?id='$row[nowo]'\"?>Edit</a></div>"; echo "</td>";
echo "<td>".$row['tgl']."</td>";
echo "<td>".$row['nowo']."</td>";
echo "<td>".$row['nmstnk']."</td>";
echo "<td>".$row['nostnk']."</td>";
echo "<td>".$row['almt']."</td>";
echo "<td>".$row['notelp1']."</td>";
echo "<td>".$row['notelp2']."</td>";
echo "<td>".$row['platno']."</td>";
echo "<td>".$row['jenis']."</td>";
echo "<td>".$row['thn']."</td>";
echo "<td>".$row['km']."</td>";
echo "<td>".$row['nrangka']."</td>";
echo "<td>".$row['nmsin']."</td>";
echo "</tr>";
}
echo "</table>";
mysql_close($kon);
?>
</div>
</form>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment