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
/
trackingsheet.php
84 lines (76 loc) · 3 KB
/
trackingsheet.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
<?php
/*****************************************
*
* trackingsheet.php
* A page that allows for generation of a spreadsheet for tracking cases post expungement clincs
*
* 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");
include("head.php");
// the page header, including the menu bar, etc...
include("header.php");
?>
<div class="main">
<div class="pure-u-8-24"> </div>
<div class="pure-u-12-24">
<?php
// if the user isn't logged in, then don't display this page. Tell them they need to log in.
if (!isLoggedIn())
{
include("displayNotLoggedIn.php");
}
// only display the rest of the page if the person is part of an organization that writes to the database
else if ($attorney->getSaveCIToDatabase()==1)
{
// kill old session information that might screw things up on the search page
resetSession();
// check to see if we want to create a CSV file b/c there was a previous submit
if (isset($_POST['submit']) and isset($_POST['names']))
{
$link = createTrackingSpreadsheet($_POST['names'], $attorney->getProgramID());
print "<a href='secureServe.php?serveFile=" . basename($link). "'>Download Tracking Sheet</a><br/><br/>";
}
// Print out the form where names will be put in. Names are to be put in as first, last on each line
?>
<br />
<div class="pure-u-14-24">Create a tracking speadsheet to track all of the cases for a group of clients who have already been run through the EG.</div>
<br />
<div class="pure-u-14-24">Enter names below (one name per line with a comma between the first and last names) and hit submit; this page will return with a CSV file link that can be opened in excel and will contain every case that was run through the EG for each person.</div>
<br />
<form action="trackingsheet.php" method="post" enctype="multipart/form-data">
<div class="form-item pure-input-1">
<label for="names">Client Names</label>
<div class="pure-input-1">
<textarea rows="20" name="names" id="names" class="pure-input-1" placeholder="Bob, Barker,
Phillis, Diller
Holden, Caulfield
First, Last"><?php printIfSet('names');?></textarea>
</div>
</div>
<div class="form-item">
<input type="submit" name="submit" value="Create Spreadsheet" />
</div>
</form>
<?php
} // else isloggedin()
?>
</div>
<div class="content-right"> </div>
</div>
<?php
include("foot.php");
?>