This repository has been archived by the owner on Aug 30, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathlookup.php
135 lines (123 loc) · 4.94 KB
/
lookup.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<?php
/*****************************************
*
* index.php
* The head page for the expungement generator
*
* Copyright 2011-2015 Community Legal Services
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*********************************************/
// require_once("config.php");
// require_once("utils.php");
require_once("CPCMS.php");
include("head.php");
// the page header, including the menu bar, etc...
// include("header.php");
$submit = false;
// if this is from a submit, grab the post vars and place them into the form fields
// also prepare to do the CPCMS search
$first = "";
$last = "";
$dob = "";
if (!empty($_POST))
{
$submit = true;
$first = trim(htmlspecialchars(stripslashes($_POST['personFirst'])));
$last = trim(htmlspecialchars(stripslashes($_POST['personLast'])));
$dob = trim(htmlspecialchars(stripslashes($_POST['personDOB'])));
}
?>
<div class="main">
<div class="pure-u-8-24"> </div>
<div class="pure-u-12-24">
<form action="lookup.php" method="post" enctype="multipart/form-data">
<div class="form-item">
<label for="personFirst">Client's Name</label> <!--'-->
<div class="form-item-column">
<input type="text" name="personFirst" id="personFirst" class="form-text" value="<?php echo $first?> " />
</div>
<div class="form-item-column">
<input type="text" name="personLast" id="personLast" class="form-text" value="<?php echo $last?>" />
</div>
<div class="space-line"></div>
<div class="description">
<div class="form-item-column">
First Name
</div>
<div class="form-item-column">
Last Name
</div>
</div>
<div class="space-line"></div>
</div>
<div class="form-item">
</div>
<div class="form-item">
<label for="personDOB">Date of Birth</label>
<input type="date" name="personDOB" id='date' value="<?php echo $dob?>" maxlength="10"/>
<div class="description">MM/DD/YYYY</div>
</div>
<div class="form-item">
<input type="submit" name="submit" value="Search CPCMS" />
</div>
</form>
<?php
// do the CPCMS search and print the results
if ($submit)
{
$cpcms = new cpcms($first, $last, $dob);
$status = $cpcms->cpcmsSearch();
$statusMDJ = $cpcms->cpcmsSearch(true);
if (!preg_match("/0/",$status[0]) && !preg_match("/0/", $statusMDJ[0]))
{
print "<br/><b>Your search returned no results. This is probably because there is no one with the name $first $last in the court database. You can try searching <a href='http://ujsportal.pacourts.us' target='_blank'>CPCMS directly</a> if you think that there is some error.";
//print $status[0];
//print "<br/>" . $statusMDJ[0];
}
else
{
//only integrate the summary information if we have a DOB; otherwise what is the point?
if (!empty($dob))
$cpcms->integrateSummaryInformation();
// display a small form that will send a quick email to legalserver with the docket numbers
// and links to all of the dockets
print "
<form action='mailDockets.php' target='_blank' method='post' enctype='multipart/form-data'>
<div class='form-item'>
<label for='email'>Legal Server Case #</label>
<input type='text' name='lsNumber' id='lsnumber' value='' maxlength='10'/>
";
// include all of the docket numbers as hidden inputs, including the best docket
$bestdocket = $cpcms->findBestSummaryDocketNumber();
$dockets = array_merge($cpcms->getResults(), $cpcms->getMDJResults());
print "<input type='hidden' name='bestDocket' value='" . $bestdocket . "' />";
foreach ($dockets as $docket)
{
print "<input type='hidden' name='dockets[]' value='" . $docket[0] . "' />";
}
print "
<input type='submit' name='submit' value='Email Results to Legal Server' />
</div>
</form>
";
$cpcms->displayResultsInTable(basename(__FILE__), false);
}
}
?>
</div>
<div class="content-right"> </div>
</div>
<?php
include("foot.php");
?>