PageRenderTime 38ms CodeModel.GetById 11ms RepoModel.GetById 1ms app.codeStats 0ms

/telorasinebrebes/transaksi_detail.php

https://gitlab.com/eandriyas/toko-agung
PHP | 369 lines | 324 code | 32 blank | 13 comment | 20 complexity | f9002cafa66fb0e26b97ed2929b44d1b MD5 | raw file
  1. <?php
  2. include("config.php");
  3. $id = $_GET['id'];
  4. $query = "select transaksitbl.*, pelanggantbl.nama from transaksitbl
  5. inner join pelanggantbl on transaksitbl.username = pelanggantbl.username
  6. where notransaksi = '".$id."'";
  7. $hasil = mysql_query($query);
  8. $temukan = mysql_num_rows($hasil);
  9. $data = mysql_fetch_array($hasil);
  10. $id = $data['notransaksi'];
  11. // print_r($data);die();
  12. // echo json_encode($data);
  13. ?>
  14. <?php session_start();
  15. if (ISSET($_SESSION['userlogin']))
  16. {
  17. }
  18. else
  19. header("location:index.php");
  20. ?>
  21. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  22. <html xmlns="http://www.w3.org/1999/xhtml">
  23. <head>
  24. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  25. <title>Bungahati Online</title>
  26. <style type="text/css">
  27. .Teks_Menu_Atas {
  28. font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
  29. font-size: 10px;
  30. }
  31. .Area_Login {
  32. height: auto;
  33. width: 175px;
  34. margin-left: 6px;
  35. font-family: Arial, Helvetica, sans-serif;
  36. font-size: 12px;
  37. }
  38. .Area_Menu_Kiri {
  39. height: auto;
  40. width: 175px;
  41. margin-left: 10px;
  42. font-family: Arial, Helvetica, sans-serif;
  43. font-size: 12px;
  44. }
  45. .Teks_Login {
  46. font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
  47. font-size: 11px;
  48. }
  49. .Teks_Informasi {
  50. font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
  51. font-size: 11px;
  52. }
  53. .Teks_Menu {
  54. font-family: Arial, Helvetica, sans-serif;
  55. font-size: 12px;
  56. font-weight: bold;
  57. }
  58. .Teks_Kategori {
  59. font-family: Arial, Helvetica, sans-serif;
  60. font-size: 14px;
  61. }
  62. .Teks_Testimonial {
  63. font-family: Tahoma, Geneva, sans-serif;
  64. font-size: 12px;
  65. }
  66. .Teks_Testi {
  67. font-family: Tahoma, Geneva, sans-serif;
  68. font-size: 14px;
  69. color: #0096C3;
  70. }
  71. .Area_Menu_Keranjang {
  72. height: auto;
  73. width: 175px;
  74. margin-left: 10px;
  75. font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
  76. font-size: 10px;
  77. }
  78. .Area_Menu_Keranjang_Total {
  79. height: auto;
  80. width: 175px;
  81. margin-left: 10px;
  82. font-family: Arial, Helvetica, sans-serif;
  83. font-size: 12px;
  84. }
  85. .Teks_Bank {
  86. font-size: 13px;
  87. font-family: Arial, Helvetica, sans-serif;
  88. }
  89. a:link {
  90. color: #006699;
  91. text-decoration: none;
  92. }
  93. a:hover {
  94. color: #5F9C9F;
  95. text-decoration: none;
  96. }
  97. a:visited {
  98. text-decoration: none;
  99. color: #006699;
  100. }
  101. a:active {
  102. text-decoration: none;
  103. color: #5F9C9F;
  104. }
  105. body {
  106. background-image: url(Gambar/Background.gif);
  107. }
  108. .Area_Informasi {
  109. height: auto;
  110. width: 375px;
  111. margin-top: 10px;
  112. font-family: Tahoma, Geneva, sans-serif;
  113. font-size: 12px;
  114. }
  115. .Teks_Transaksi {
  116. font-family: Tahoma, Geneva, sans-serif;
  117. font-size: 14px;
  118. color: #0096C3;
  119. }
  120. .Teks_Peringatan {
  121. font-family: Tahoma, Geneva, sans-serif;
  122. font-size: 12px;
  123. color: #FF0000;
  124. }
  125. .Teks_Total {
  126. font-family: Tahoma, Geneva, sans-serif;
  127. font-size: 12px;
  128. color: #0033FF;
  129. }
  130. .Teks_Faktur {
  131. font-family: Tahoma, Geneva, sans-serif;
  132. font-size: 12px;
  133. color: #0033FF;
  134. }
  135. </style>
  136. <script type="text/javascript">
  137. function MM_preloadImages() { //v3.0
  138. var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
  139. var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
  140. if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
  141. }
  142. function MM_swapImgRestore() { //v3.0
  143. var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
  144. }
  145. function MM_findObj(n, d) { //v4.01
  146. var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
  147. d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  148. if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  149. for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  150. if(!x && d.getElementById) x=d.getElementById(n); return x;
  151. }
  152. function MM_swapImage() { //v3.0
  153. var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
  154. if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
  155. }
  156. </script>
  157. <script type="text/javascript" src="jquery-2.1.4.min.js"></script>
  158. </head>
  159. <body onload="MM_preloadImages('Gambar/TLogin copy.jpg','Gambar/TSearch Rollover.jpg')">
  160. <table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
  161. <tr>
  162. <th width="200" align="left" valign="top" bgcolor="#F7FAE4" scope="col"><div class="Area_Login">
  163. <!-- <form id="form2" name="form2" method="post" action="">
  164. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  165. <tr>
  166. <th align="left" valign="middle" class="Teks_Login" scope="col">Search</th>
  167. <th align="left" valign="middle" scope="col"><label for="searchtxt"></label>
  168. <input name="searchtxt" type="text" id="searchtxt" size="15" /></th>
  169. <th align="left" valign="middle" scope="col"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image11','','Gambar/TSearch Rollover.jpg',1)"><img src="Gambar/TSearch.jpg" width="50" height="20" id="Image11" /></a></th>
  170. </tr>
  171. </table>
  172. </form> -->
  173. </div></th>
  174. <th colspan="2" align="right" valign="middle" bgcolor="#F8FBE6" class="Teks_Menu_Atas" scope="col"> <a href="logout.php" target="_self">logout</a> | <a href="cek_pengiriman.php">Cek Pengiriman</a> | selamat datang saudara/i
  175. <?php include("user.php") ?>
  176. &nbsp;</th>
  177. </tr>
  178. <tr>
  179. <td colspan="3"><img src="Gambar/Header.png" width="800" height="214" /></td>
  180. </tr>
  181. <tr>
  182. <td colspan="3"><img src="Gambar/Menu Tengah.jpg" width="800" height="25" usemap="#Map" border="0" /></td>
  183. </tr>
  184. <tr>
  185. <td align="left" valign="top" bgcolor="#E8EED7"><div class="Area_Login">
  186. <form id="form1" name="form1" method="post" action="login.php">
  187. <table width="100%" border="0" cellspacing="2" cellpadding="0">
  188. <tr>
  189. <td colspan="3" align="left" valign="top">
  190. <table width="100%" border="0" cellspacing="0" cellpadding="2">
  191. <tbody><tr>
  192. <!-- <th align="left" valign="top" scope="col"><img src="Gambar/Menu Kiri Kategori.jpg" alt="" width="175" height="25"></th> -->
  193. </tr>
  194. <tr>
  195. <th align="left" valign="top" scope="col">
  196. <ul>
  197. <img src="Gambar/Bullet.png" border="0" width="8" height="8"><a href="pelanggan.php">&nbsp;&nbsp;Transaksi</a>
  198. </ul>
  199. <ul>
  200. <img src="Gambar/Bullet.png" border="0" width="8" height="8"><a href="profile.php">&nbsp;&nbsp;Profile</a>
  201. </ul>
  202. <ul>
  203. <img src="Gambar/Bullet.png" border="0" width="8" height="8"><a href="home.php?kategori=Telor Asin Asap">&nbsp;&nbsp;Logout</a>
  204. </ul>
  205. </th>
  206. </tr>
  207. </tbody></table>
  208. </td>
  209. </tr>
  210. <tr>
  211. <td width="29%" align="left" valign="top">&nbsp;</td>
  212. <td width="3%" align="left" valign="top">&nbsp;</td>
  213. <td width="68%" align="left" valign="top">&nbsp;</td>
  214. </tr>
  215. <tr>
  216. <td colspan="3" align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2">
  217. </table></td>
  218. </tr>
  219. <tr>
  220. <td align="left" valign="top">&nbsp;</td>
  221. <td>&nbsp;</td>
  222. <td class="Teks_Menu">&nbsp;</td>
  223. </tr>
  224. </table>
  225. </form>
  226. </div>
  227. </td>
  228. <td width="400" align="center" valign="top" bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="Area_Informasi">
  229. <tr>
  230. <th width="25" align="left" valign="top" class="Teks_Transaksi" scope="col"><img src="Gambar/Transaksi Selesai.gif" width="25" height="25" /></th>
  231. <th width="350" align="left" valign="middle" class="Teks_Transaksi" scope="col">Daftar Transaksi Anda.</th>
  232. </tr>
  233. <tr>
  234. <th colspan="2" align="left" valign="top" class="Teks_Testi" scope="col"><hr /></th>
  235. </tr>
  236. <tr>
  237. <td colspan="2" align="center" valign="top">
  238. </td>
  239. </tr>
  240. </table>
  241. <table id="Cetak">
  242. <tr>
  243. <td>No transaksi</td>
  244. <td><?php echo $data['notransaksi']; ?></td>
  245. </tr>
  246. <tr>
  247. <td>Nama Penerima</td>
  248. <td><?php echo ucwords($data['nama']); ?></td>
  249. </tr>
  250. <tr>
  251. <td>Status</td>
  252. <td><?php echo $data['status_transaksi']; ?></td>
  253. </tr>
  254. <tr>
  255. <td>Alamat pengiriman</td>
  256. <td><?php echo $data['alamat']; ?></td>
  257. </tr>
  258. <tr>
  259. <td>Jasa</td>
  260. <td><?php echo $data['jasa']; ?></td>
  261. </tr>
  262. <tr>
  263. <td>Paket</td>
  264. <td><?php echo $data['paket']; ?></td>
  265. </tr>
  266. <tr>
  267. <td>Biaya Kirim</td>
  268. <td><?php echo $data['biaya_kirim']; ?></td>
  269. </tr>
  270. <tr>
  271. <td>Total Biaya</td>
  272. <td><?php echo $data['total_biaya']; ?></td>
  273. </tr>
  274. <tr>
  275. <td>No Resi</td>
  276. <td><?php echo $data['noresi']; ?></td>
  277. </tr>
  278. </table>
  279. <hr />
  280. <table style="border:1px solid #000">
  281. <tr>
  282. <td>Nama Barang</td>
  283. <td>Jumlah</td>
  284. </tr>
  285. <?php
  286. $query = "select * from transaksirincitbl where notransaksi= '$id' order by notransaksi desc";
  287. $hasil = mysql_query($query);
  288. while ($data = mysql_fetch_array($hasil))
  289. {
  290. echo "<tr>
  291. <td align=\"left\" width=\"80%\" bgcolor=\"#FFFFFF\">".$data['nama']."</td>
  292. <td align=\"left\" width=\"20%\" bgcolor=\"#FFFFFF\" >".$data['jumlah']."</td>
  293. </tr>";
  294. }
  295. ?>
  296. </table>
  297. </td>
  298. </tr>
  299. <tr>
  300. <td colspan="3" align="center" valign="top"><img src="Gambar/Footer.png" width="800" height="86" /></td>
  301. </tr>
  302. </table>
  303. <map name="Map" id="Map">
  304. <area shape="rect" coords="127,6,167,21" href="home.php" target="_self" />
  305. <area shape="rect" coords="200,7,251,21" href="produk.php" target="_self" />
  306. <area shape="rect" coords="288,8,357,20" href="caraorder.php" target="_self" />
  307. <area shape="rect" coords="394,7,455,20" href="download.php" target="_self" />
  308. <area shape="rect" coords="495,7,549,21" href="about.php" target="_self" />
  309. <area shape="rect" coords="573,4,649,20" href="contact.php" target="_top" />
  310. </map>
  311. <script>
  312. $(document).ready(function(){
  313. $('.aksi_pelanggan').on('change', function(){
  314. var aksi = $(this).val();
  315. // $.ajax({
  316. // type : "GET",
  317. // url : "transaksi_detail.php?id="+id,
  318. // dataType : 'json',
  319. // success : function(msg){
  320. // console.log(msg);
  321. // window.location.assign("transaksi_detail.php?id="+id);
  322. // }
  323. // });
  324. var id = $('.aksi_pelanggan option:selected').attr('data-id');
  325. if(aksi =='detail'){
  326. // alert(id);
  327. window.location.assign("transaksi_detail.php?id="+id);
  328. } else if(aksi =='konfirmasi'){
  329. window.location.assign("konfirmasi.php?id="+id);
  330. } else{
  331. // window.location.assign("transaksi_detail.php?id="+id);
  332. }
  333. });
  334. })
  335. </script>
  336. </body>
  337. </html>