diff options
| author | Nathan Kinkade <nkinkade@creativecommons.org> | 2014-05-19 18:18:52 -0400 |
|---|---|---|
| committer | Nathan Kinkade <nkinkade@creativecommons.org> | 2014-05-19 18:18:52 -0400 |
| commit | fea92fb73fc066701a4e5e578edee7d737045a41 (patch) | |
| tree | 8475a74fb159756896e90a802eca32e2545ed86d /charges.php | |
| parent | 03a01ac31a16cf7f44e827db15b7483b0ec330cd (diff) | |
| parent | c1ea47789989b08e919645d8b8133cfea0ad97c9 (diff) | |
Diffstat (limited to 'charges.php')
| -rw-r--r-- | charges.php | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/charges.php b/charges.php new file mode 100644 index 0000000..e0eb95d --- /dev/null +++ b/charges.php @@ -0,0 +1,50 @@ +<?php + +echo <<<HTML +<!DOCTYPE html> + +<html> +<head> + <title>Miami-Dade Clerk of Courts: Charges </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 class="results_table"> + <tr class="tablehead"> + <th>ID</th> + <th>Case ID</th> + <th>Seq. No.</th> + <th>Charge</th> + <th>Charge Type</th> + <th>Disposition</th> + </tr> +HTML; + +echo "<h3>Charges for case <a href='./search.php?case_id={$_REQUEST['case_id']}'><em>{$_GET['case_no']}</em></a></h3>"; + +$st = $dbh->prepare("SELECT * FROM charges 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"; + foreach ( $row as $field ) { + echo " <td>$field</td>\n"; + } + echo " </tr>\n"; + } +} + +echo <<<HTML +</table> + +</body> +</html> +HTML; + +?> |
