This repository was 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
Expand file tree
/
Copy pathsecureServe.php
More file actions
51 lines (44 loc) · 1.62 KB
/
secureServe.php
File metadata and controls
51 lines (44 loc) · 1.62 KB
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
<?php
/****************************************************************
*
* secureServe.php
* Serves any file from the data dir, but only to users who are logged in. This is done to avoid
* anyone from coming and downloading files from teh data dir, which may have client info in it.
*
* 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("Attorney.php");
?>
<?php
// if the user is logged in, tell them they they are already logged in
if (!isLoggedIn())
{
print "<div class='main'><div class='content-left'> ";
include("messagedisplay.php");
print "</div><div class='content-center'>";
require_once("head.php");
require_once("header.php");
print "<div class='titleMessage'>You must be logged in to download this file. </div>";
print "</div><div class='content-right'> </div></div>";
include("foot.php");
}
// else, we want to serve the file
else
{
serveFile($_REQUEST['serveFile']);
} // end else !isLoggedIn();
?>