summaryrefslogtreecommitdiff
path: root/dockets.php
diff options
context:
space:
mode:
authorNathan Kinkade <nath@nkinka.de>2013-11-14 00:47:34 +0000
committerNathan Kinkade <nath@nkinka.de>2013-11-14 00:47:34 +0000
commit227281197ed5f4736fbba4df7bce975bcf3ca2e5 (patch)
tree8859a855f4ed24546950704996111ae2009f1917 /dockets.php
parent7b1f6355a295b4a324bf7e239204198f0adf9b36 (diff)
Files for the basic search interface.
Diffstat (limited to 'dockets.php')
-rw-r--r--dockets.php57
1 files changed, 57 insertions, 0 deletions
diff --git a/dockets.php b/dockets.php
new file mode 100644
index 0000000..f8416c2
--- /dev/null
+++ b/dockets.php
@@ -0,0 +1,57 @@
+<?php
+
+echo <<<HTML
+<!DOCTYPE html>
+
+<html>
+<head>
+ <title>Miami-Dade Clerk of Courts: Dockets</title>
+ <link rel='stylesheet' media='all' type='text/css' href='style.css' />
+</head>
+
+<body>
+HTML;
+
+$dbh = new PDO('mysql:host=localhost;dbname=mdcc', 'mdcc', 'Mdcc.');
+
+echo <<<HTML
+<table>
+ <tr class="tablehead">
+ <th>ID</th>
+ <th>Seq. No.</th>
+ <th>Date</th>
+ <th>Docket</th>
+ <th>Case ID</th>
+ </tr>
+HTML;
+
+
+$st = $dbh->prepare("SELECT court_case_no FROM cases WHERE id = '{$_GET['case_id']}'");
+if ( $st->execute() ) {
+ while ( $row = $st->fetch(PDO::FETCH_ASSOC) ) {
+ echo "<h3>Dockets for case <em>{$row['court_case_no']}</h3>";
+ }
+}
+
+$st = $dbh->prepare("SELECT * FROM dockets WHERE case_id = '{$_GET['case_id']}'");
+if ( $st->execute() ) {
+ $alt = 'alt';
+ while ( $row = $st->fetch(PDO::FETCH_ASSOC) ) {
+ $alt = $alt ? '' : 'alt';
+ echo " <tr class='$alt'>\n";
+ echo " <tr>\n";
+ foreach ( $row as $field ) {
+ echo " <td>$field</td>\n";
+ }
+ echo " </tr>\n";
+ }
+}
+
+echo <<<HTML
+</table>
+
+</body>
+</html>
+HTML;
+
+?>