Advertisement
fahmihilmansyah

teknologi2.php

Mar 15th, 2014
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.04 KB | None | 0 0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <?php
  4. include('config.php');
  5. ?>
  6. <head>
  7. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  8. <title>Berita Sport</title>
  9. <link rel="stylesheet" type="text/css" href="css/global.css" />
  10. <link rel="stylesheet" type="text/css" href="css/teknologi.css"/>
  11. </head>
  12.  
  13. <body background="img/teknologi/albarnation2_zpsb5a883df.jpg">
  14.  
  15. <!-- BEGIN TOP -->
  16. <div id="top">
  17. <ul>
  18. <li><a href="#">About</a></li>
  19. <li><a href="#">Submit a Story</a></li>
  20. <li><a href="#">Feedback</a></li>
  21. <li><a href="#">Support</a></li>
  22. </ul>
  23. </div>
  24.  
  25. <!-- END TOP -->
  26. <!-- BEGIN HEADER -->
  27.  
  28. <div id="kolomutama">
  29.  
  30. <div id="header">
  31. <div id="logo"> <a href="index.html"><img src="img/localimage/Untitled-1-Recovered.png" alt="" /></a> </div>
  32. </div>
  33. <!-- END HEADER -->
  34. <!-- BEGIN NAV -->
  35.  
  36. <div id="nav">
  37. <ul>
  38. <li><a href="index.html">Home</a></li>
  39. <li><a href="#">Berita</a></li>
  40. <li><a href="#">Lingkungan</a></li>
  41. <li><a href="sport.html">Sports</a></li>
  42. <li class="last"><a href="#">Teknologi</a></li>
  43. </ul>
  44. </div>
  45.  
  46. <!-- END NAV -->
  47. <!-- BEGIN SUB NAV -->
  48.  
  49. <div id="sub-nav">
  50. <ul>
  51. <li class="title">Stay in the know:</li>
  52. <li><img src="img/icons/fb.PNG" /><a href="#">Facebook</a></li>
  53. <li>|</li>
  54. <li><img src="img/icons/twitter.png" alt="" /><a href="#">Twitter</a></li>
  55. </ul>
  56. </div>
  57.  
  58. <!-- END SUB NAV -->
  59. <!-- BEGIN CONTENT WRAPPER -->
  60.  
  61. <div id="content-wrapper">
  62.  
  63. <!-- BEGIN MAIN -->
  64.  
  65. <div id="main">
  66. <div id="headlines" class="berita">
  67. <hr size=2 noshade=noshade color=#CCCCCC />
  68. <?php
  69. include('config.php');
  70. $id=$_GET['id'];
  71. $query=mysql_query("select * from tabelteknologi where id_teknologi='$id'") or die(mysql_error());
  72. while ($data=mysql_fetch_array($query)){
  73. echo "";
  74. echo "<h2><b>$data[2]</h2></b><br></a>";
  75. $tanggal=substr($data[5],0,10);
  76. $jam=substr($data[5],10,6);
  77. echo "<p class=author> $data[3] | <span>$tanggal | $jam </span></p><br>";
  78. echo "<p>";
  79.  
  80. echo "<img src='$data[6]' width='600px'>";
  81.  
  82. echo"<p>";
  83.  
  84. echo nl2br($data['isi']);
  85.  
  86. echo"<hr size=2 noshade=noshade color=#CCCCCC />";
  87. }
  88. ?>
  89.  
  90.  
  91.  
  92.  
  93. <div id="komentarutama">
  94. <font face="Comic Sans MS, cursive" class="komentar" ><strong class="tulisan">Komentar</strong></font>
  95. </div>
  96.  
  97.  
  98. <div id="isikomentar">
  99. <?php
  100.  
  101. $id="2";
  102. $sql = "select * from komentar ";
  103. $result = mysql_query($sql);
  104. while($row = mysql_fetch_array($result))
  105. {
  106.  
  107. echo "<h4>";
  108. echo $row['nama'];
  109. echo "</h4>";
  110. echo "<p>";
  111. echo $row['komentar'];
  112.  
  113. }
  114. ?>
  115. </div>
  116.  
  117.  
  118.  
  119.  
  120. <form name="form1" method="post" action="insertkomentar.php?id=1">
  121. <table width="500" border="0" cellspacing="0" cellpadding="5">
  122. <tr>
  123. <td width="132"><strong><font size="2" face="Arial, Helvetica, sans-serif">nama</font></strong></td>
  124. <td width="348"><label>
  125. <input name="nama" type="text" id="nama" size="40">
  126. Kategori :
  127. <select name="kategori">
  128. <?php
  129.  
  130. /*menampilkan data tabelteknologi kedalam combobox*/
  131. $sql1 = mysql_query("select id_teknologi, kategori from tabelteknologi ");
  132. while($data = mysql_fetch_array($sql1)):
  133.  
  134.  
  135. ?>
  136. <option value="<?php echo $data['id_teknologi'];?>"> <?php echo $data['kategori'] ?></option>
  137. <?php endwhile;?>
  138.  
  139.  
  140.  
  141. </select>
  142. </label></td>
  143. </tr>
  144. <tr>
  145. <td valign="top"><strong><font size="2" face="Arial, Helvetica, sans-serif">komentar</font></strong></td>
  146. <td valign="top"><label>
  147. <textarea name="komentar" id="komentar" cols="30" rows="5"></textarea>
  148. </label></td>
  149. </tr>
  150. <tr>
  151. <td>&nbsp;</td>
  152. <td><label>
  153. <input type="submit" name="button" id="button" value="Submit">
  154. <input type="reset" name="reset" id="reset" value="reset" />
  155. </label></td>
  156. </tr>
  157.  
  158. </table>
  159. </form>
  160.  
  161. </div>
  162. </div>
  163.  
  164.  
  165.  
  166.  
  167. <!-- END MAIN -->
  168. <!-- BEGIN SIDEBARS -->
  169.  
  170. <div id="sidebars">
  171. <!-- BEGIN ADS -->
  172.  
  173. <!-- END ADS -->
  174.  
  175. <h2 class="heading">Sports Headlines</h2>
  176. <a href="#"><img src="img/teknologi/pasang iklan.jpg" alt="" rel="img/teknologi/pasang iklan.jpg" /></a><a href="#"><img src="img/teknologi/sony.png" alt="" rel="img/teknologi/sony.png" /></a>
  177. <h3 class="heading"><a href="#">Coach Indra Akui Punya Banyak PR</a></h3>
  178. <p class="author">Ragil D | <span>22-02-2014</span></p>
  179. <p>Jakarta - Pelatih Timnas U-19 Indra Sjafri mengaku timnya mendapatkan kesulitan saat melawan tim Pra PON Jawa Timur malam ini, Jumat (21/2/2014), di Stadion Gelora Bangkalan, Madura.
  180.  
  181. Di pertandingan tersebut skuat "Garuda Muda" ...
  182. </p>
  183. <p class="next"><a href="sport.php">Selengkapnya &raquo;</a></p>
  184.  
  185. <hr size="1" noshade="noshade" color="#CCCCCC" />
  186. <br />
  187.  
  188. <h2 class="heading">Halaman Login</h2>
  189.  
  190. <form action="log.php?op=masuk" method="post">
  191. <table border="0">
  192. <tr>
  193. <td>User ID</td>
  194. <td> : </td>
  195. <td><input type="text" name="userid"></td>
  196. </tr>
  197. <tr>
  198. <td>Password</td>
  199. <td> : </td>
  200. <td><input type="password" name="psw"></td>
  201. </tr>
  202. </table>
  203. <p>
  204. <input type="submit" value="Login">
  205. <br />
  206.  
  207. <h2 class="heading">In the Community</h2>
  208.  
  209. </div>
  210. <!-- END SIDEBARS -->
  211. </div>
  212. <!-- END CONTENT WRAPPER-->
  213.  
  214. <!-- BEGIN EXTRAS -->
  215. <div id="extras">
  216. <div id="recommended">
  217. <h2 class="heading">Artikel Lainnya</h2>
  218. <ul>
  219. <li><a href="#">Lorem ipsum dolor sit amet, consectetur adipiscing elit &raquo;</a></li>
  220. <li><a href="#">Lorem ipsum dolor sit amet, consectetur adipiscing elit &raquo;</a></li>
  221. <li><a href="#">Lorem ipsum dolor sit amet, consectetur adipiscing elit &raquo;</a></li>
  222. <li class="last"><a href="#">Lorem ipsum dolor sit amet, consectetur adipiscing elit &raquo;</a></li>
  223. </ul>
  224. </div>
  225. <div id="programs">
  226. <h2 class="heading">What's On Today</h2>
  227. <img src="img/localimage/sejumlah-kendaraan-terjebak-kemacetan-ketika-hujan-deras.jpg" height="150" width="312"/>
  228. <br />
  229. <h3><a href="#">Dini hari Jakarta Diguyur Hujan Deras, Waspada Macet di Pagi Hari</a></h3>
  230.  
  231. </div>
  232.  
  233. </div>
  234. </div>
  235. <!-- END EXTRAS -->
  236. <!-- BEGIN FOOTER -->
  237. <div id="footer">
  238. <ul>
  239.  
  240. <li><font color="#3c81e0">&copy;2014 </font><a href="#">beregunews.com</a></li>
  241. <li>|</li>
  242. <li><font color="#f32020">Designed by </font><a href="#">beregunews.com team </a></li>
  243. <li>|</li>
  244. <li><font color="#3c81e0">Template by </font><a href="http://www.skyrocketlabs.com/">Skyrocket Labs </a></li>
  245. <li>|<li>
  246. <li><font color="#f32020">Editor by <a href="#">beregunews.com team</font></a></li>
  247.  
  248. </ul>
  249. </div>
  250.  
  251.  
  252. <!-- END FOOTER -->
  253.  
  254.  
  255.  
  256.  
  257.  
  258. <?php
  259. //nanti ini pasti berguna, simpen aja buat belajar ^_^ ada di ebook nahar hal 74 lengkapnya di hal 104
  260. $tanggal = date("d F Y");
  261. echo "Tanggal ".$tanggal;
  262. ?>
  263.  
  264. <script type="text/javascript" >
  265. <!--
  266. var m_names = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
  267. var d_names = new Array("Senin", "Selasa", "Rabu", "Kamis", "Jum'at", "Sabtu", "Minggu");
  268.  
  269. var currentTime = new Date()
  270. var day = currentTime.getDay() - 1
  271. var month = currentTime.getMonth()
  272. var date = currentTime.getDate()
  273. var year = currentTime.getFullYear()
  274. document.write( d_names[day] + ", " + date + " " + m_names[month] + " " + year + ", ")
  275. var currentTime = new Date()
  276. var hours = currentTime.getHours()
  277. var minutes = currentTime.getMinutes()
  278. if (minutes < 10){
  279. minutes = "0" + minutes
  280. }
  281. document.write(hours + ":" + minutes + " ")
  282. if(hours > 11){
  283. document.write("PM")
  284. } else {
  285. document.write("AM")
  286. }
  287. //-->
  288. </script>
  289. </body>
  290. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement