Advertisement
EeePC

list.php

Apr 30th, 2016
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.96 KB | None | 0 0
  1. <html>
  2. <head>
  3.  
  4. <!-- table border=1> --><br>
  5.  
  6. <tr><th>transaction_ID</th>
  7. <th>account ID</th>
  8. <th>Transaction Type ID</th>
  9. <th>Amount</th>
  10. <th>Date</th><br>
  11.  
  12. <th>account ID</th>
  13. <th>user ID</th>
  14. <th>name</th><br>
  15. <th>balance</th>
  16.  
  17. <th>transaction_type_ID</th>
  18. <th>name</th><br>
  19.  
  20. <th>user ID</th>
  21. <th>name</th><br>
  22.  
  23.  
  24.  
  25. <?php
  26. $servername = "localhost";
  27. $username = "timn_admin";
  28. $password = "purdue91dan";
  29. $dbname = "timn_Dan-Os-Budget-DB";
  30.  
  31. // Create connection
  32.  
  33.  
  34.  
  35. $conn = new mysqli($servername, $username, $password, $dbname);
  36. // Check connection
  37. if ($conn->connect_error) {
  38. die("Connection failed: " . $conn->connect_error);
  39. }
  40.  
  41.  
  42.  
  43. $sql = "SELECT * FROM Transaction";
  44. $result = $conn->query($sql);
  45.  
  46. if ($result->num_rows > 0) {
  47. // output data of each row
  48.  
  49.  
  50. while($row = $result->fetch_assoc()) {
  51. echo " " . $row["transaction_id"]. " " . $row["account_id"]. " " . $row["transaction_type_id"]. " " . $row["amount"]. " " . $row["create_date"].
  52.  
  53. $sql = "SELECT * FROM Account";
  54. $result = $conn->query($sql);
  55.  
  56. if ($result->num_rows > 0) {
  57. // output data of each row
  58.  
  59.  
  60. while($row = $result->fetch_assoc()) {
  61. echo " " . $row["account_id"]. " " . $row["user_id"]. " " . $row["name"]. " " . $row["balance"]. " " .
  62.  
  63.  
  64. $sql = "SELECT * FROM TransactionType";
  65. $result = $conn->query($sql);
  66.  
  67. if ($result->num_rows > 0) {
  68. // output data of each row
  69.  
  70.  
  71. while($row = $result->fetch_assoc()) {
  72. echo " " . $row["transaction_type_id"]. $row["name"].
  73.  
  74.  
  75. $sql = "SELECT * FROM User";
  76. $result = $conn->query($sql);
  77.  
  78. if ($result->num_rows > 0) {
  79. // output data of each row
  80.  
  81.  
  82. while($row = $result->fetch_assoc()) {
  83. echo " " . $row["user_id"]. " " . $row["name"]. " " .
  84.  
  85.  
  86. ;
  87. }
  88. } else {
  89. echo "0 results";
  90. }
  91.  
  92. $conn->close();
  93. ?>
  94.  
  95. <br><br>
  96.  
  97.  
  98. ;
  99. }
  100. } else {
  101. echo "0 results";
  102. }
  103.  
  104. $conn->close();
  105. ?>
  106.  
  107. <br><br>
  108.  
  109.  
  110. ;
  111. }
  112. } else {
  113. echo "0 results";
  114. }
  115.  
  116. $conn->close();
  117. ?>
  118.  
  119. <br><br>
  120.  
  121.  
  122. ;
  123. }
  124. } else {
  125. echo "0 results";
  126. }
  127.  
  128. $conn->close();
  129. ?>
  130.  
  131. <br><br>
  132.  
  133.  
  134.  
  135. <th> Please overlook the underneath, it is just me experimenting... </th>
  136. <br> <br>
  137. <th>Borrower_id</th>
  138. <th>Borrower Name</th>
  139. <th>Borrower Surname</th></tr>
  140.  
  141. </head>
  142.  
  143. <!DOCTYPE html>
  144. <html xmlns="http://www.w3.org/1999/xhtml">
  145. <head>
  146. <title>Advanced Table CSS formatting</title>
  147. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  148. <meta http-equiv="Author" content="Alexander Bell" />
  149. <meta http-equiv="Copyright" content="2011-2015 Infosoft International Inc" />
  150. <meta http-equiv="Expires" content="0" />
  151. <meta http-equiv="Cache-control" content="no-cache" />
  152. <meta name="Robots" content="all" />
  153. <meta name="Distribution" content="global" />
  154.  
  155. <style type="text/css">
  156. #divContainer {
  157. max-width: 600pt;
  158. width: 90%;
  159. margin: 0 auto;
  160. margin-top: 10pt;
  161. font-family: Georgia;
  162. padding: 0.5em 1em 1em 1em;
  163. /* rounded corners */
  164. -moz-border-radius: 10px;
  165. -webkit-border-radius: 10px;
  166. border-radius: 10px;
  167. /* add gradient */
  168. background-color: #ababab;
  169. background: -webkit-gradient(linear, left top, left bottom, from(#909090), to(#ababab));
  170. background: -moz-linear-gradient(top, #909090, #a0a0a0);
  171. /* add box shadows */
  172. -moz-box-shadow: 5px 5px 10px rgba(0,0,0,0.3);
  173. -webkit-box-shadow: 5px 5px 10px rgba(0,0,0,0.3);
  174. box-shadow: 5px 5px 10px rgba(0,0,0,0.3);
  175. }
  176.  
  177. #divContainer h2 { color: #efefef; font-size: 1em; }
  178.  
  179. table.formatHTML5 {
  180. width: 100%;
  181. border-collapse: collapse;
  182. text-align: left;
  183. color: #014421;
  184. }
  185.  
  186. table.formatHTML5 td {
  187. vertical-align: middle;
  188. padding: 0.5em;
  189. }
  190.  
  191. table.formatHTML5 thead tr td {
  192. background-color: White;
  193. vertical-align: middle;
  194. padding: 0.6em;
  195. font-size: 0.8em;
  196. }
  197.  
  198. table.formatHTML5 thead tr th,
  199. table.formatHTML5 tbody tr.separator {
  200. padding: 0.5em;
  201. background-color: #909090;
  202. background: -webkit-gradient(linear, left top, left bottom, from(#909090), to(#ababab));
  203. background: -moz-linear-gradient(top, #909090, #ababab);
  204. color: #efefef;
  205. }
  206.  
  207. table.formatHTML5 tbody tr:nth-child(odd) {
  208. background-color: #fafafa;
  209. }
  210.  
  211. table.formatHTML5 tbody tr:nth-child(even) {
  212. background-color: #efefef;
  213. }
  214.  
  215. table.formatHTML5 tbody tr:last-child {
  216. border-bottom: solid 1px #404040;
  217. }
  218.  
  219. table.formatHTML5 tbody tr:hover {
  220. cursor: pointer;
  221. background-color: #909090;
  222. background: -webkit-gradient(linear, left top, left bottom, from(#909090), to(#ababab));
  223. background: -moz-linear-gradient(top, #909090, #ababab);
  224. color: #dadada;
  225. }
  226.  
  227. table.formatHTML5 tfoot {
  228. text-align: center;
  229. color: #303030;
  230. text-shadow: 0 1px 1px rgba(255,255,255,0.3);
  231. }
  232. </style>
  233. </head>
  234. <body>
  235.  
  236. <!-- HERE HERE HERE HERE -->
  237.  
  238.  
  239.  
  240.  
  241. <!-- CENTERED-->
  242. <div id="divContainer">
  243.  
  244. <h2>ANNUALIZED INFLATION RATE ON SELECTED PRODUCTS |NYC 2000-2010</h2>
  245.  
  246. <!-- HTML5 TABLE FORMATTED VIA CSS3-->
  247. <table class="formatHTML5">
  248. <!-- TABLE HEADER-->
  249. <thead>
  250. <tr><td colspan="4">DISCLAIMER:
  251. ALL DATA PROVIDED 'AS IS' FOR DEMO PURPOSE ONLY</td></tr>
  252. <tr>
  253. <th>transaction_ID</th>
  254. <th> account ID </th>
  255. <th>Transaction Type ID</th>
  256. <th>Amount</th>
  257. <th>dAte</th>
  258.  
  259. </tr>
  260. </thead>
  261.  
  262. <!-- TABLE BODY: MAIN CONTENT-->
  263.  
  264.  
  265. <tbody>
  266. <tr>
  267. <td>Coke® Inflation Index</td>
  268. <td>7.23%</td>
  269. <td>Yeah, it's about $2/bottle now</td>
  270. <td>CheeseBurger Bobby's</td>
  271. </tr>
  272. <tr>
  273. <td>Gas Inflation Index</td>
  274. <td>6.94%</td>
  275. <td><a href="http://infosoft.biz/Inflation.aspx"
  276. target="_blank"
  277. title="Yeah, pain at the pump!">Inflation Calculator</a></td>
  278. </tr>
  279. <tr>
  280. <td>NY subway fare Inflation Index</td>
  281. <td>4.14%</td>
  282. <td><a href="http://infosoft.biz/bus.aspx"
  283. target="_blank"
  284. title="Take a virtual Bus ride">NYC Realtime Bus Map</a></td>
  285. </tr>
  286. <tr>
  287. <td>Oil (WTI) Inflation Index estimated</td>
  288. <td>13.59%</td>
  289. <td>Wow!</td>
  290. </tr>
  291. <tr>
  292. <td>Post Stamp Inflation Index</td>
  293. <td>2.92%</td>
  294. <td><a href="http://infosoft.biz/geocoder.aspx"
  295. target="_blank" title="You can see Paris
  296. from here">Online Geocoder</a></td>
  297. </tr>
  298. <tr>
  299. <td>PC RAM (memory) Inflation Index</td>
  300. <td>-28.34%</td>
  301. <td><a href="http://infosoft.biz/download.aspx"
  302. target="_blank" title="Rejoyce 'Intel
  303. Inside'!">Rejoyce, "Intel Insides"!</a></td>
  304. </tr>
  305.  
  306. <!--SEPARATOR ROW USED DIFFERENT STYLE-->
  307. <tr class="separator">
  308. <td colspan="3">Precious metals Price Index: shown for comparison</td>
  309. </tr>
  310. <tr>
  311. <td>Silver</td>
  312. <td>20.94%</td>
  313. <td><a href=
  314. "http://www.codeproject.com/Tips/262546/HTML-Tables-formating-best-practices"
  315. target="_blank" title="Read the article on Codeproject.com">
  316. Read the article</a></td>
  317. </tr>
  318. <tr>
  319. <td>Gold</td>
  320. <td>17.86%</td>
  321. <td>AU is Golden!</td>
  322. </tr>
  323. <tr>
  324. <td>Platinum</td>
  325. <td>10.98%</td>
  326. <td></td>
  327. </tr>
  328. <tr>
  329. <td>Palladium</td>
  330. <td>-1.86% </td>
  331. <td>Element Pd</td>
  332. </tr>
  333. </tbody>
  334.  
  335. <!-- TABLE FOOTER-->
  336. <tfoot>
  337. <tr><td colspan="3">Copyright
  338. Ⓒ 2011-2015 Infosoft International Inc</td></tr>
  339. </tfoot>
  340. </table>
  341. </div>
  342. </body>
  343. </html>
  344.  
  345.  
  346. <body>
  347.  
  348.  
  349.  
  350. </html>
  351. </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement