Commit | Line | Data |
---|---|---|
7ae2b7fd PM |
1 | <?PHP |
2 | include_once('../slack.php'); | |
3 | include_once('security.php'); | |
4 | if ($_COOKIE['level'] == 'user'){ | |
5 | slack_general('ADMIN: Redirect User Home ('.$_COOKIE['name'].') ('.$_COOKIE['level'].')','md-petition'); | |
6 | header('Location: user_home.php'); | |
7 | } | |
8 | if ($_COOKIE['level'] == 'manager'){ | |
9 | slack_general('ADMIN: Redirect Manager Home ('.$_COOKIE['name'].') ('.$_COOKIE['level'].')','md-petition'); | |
10 | header('Location: manager_home.php'); | |
11 | } | |
12 | include_once('header.php'); | |
a2b8c54c PM |
13 | $list1 = ''; |
14 | $list2 = ''; | |
15 | $list3 = ''; | |
16 | ||
17 | $q="SELECT * FROM follow_up where status = 'NEW'"; | |
18 | $r = $petition->query($q); | |
19 | while($d = mysqli_fetch_array($r)){ | |
20 | $list3 .= "<li>$d[email] $d[name]</li>"; | |
21 | } | |
94f5d5b9 | 22 | |
7ae2b7fd PM |
23 | $q="SELECT * FROM follow_up where status <> 'NEW'"; |
24 | $r = $petition->query($q); | |
25 | while($d = mysqli_fetch_array($r)){ | |
35e7632f PM |
26 | $sig = ''; |
27 | if ($d['name'] != ''){ | |
28 | $q3 = "SELECT date_time_signed FROM signatures where signed_name_as = '$d[name]'"; | |
29 | $r3 = $petition->query($q3); | |
30 | $d3 = mysqli_fetch_array($r3); | |
31 | if ($d3['date_time_signed'] != ''){ | |
32 | $sig = "<b>SIGNATURE $d3[date_time_signed]</b>"; | |
33 | } | |
34 | } | |
35 | $presig=''; | |
36 | $q4="SELECT * FROM presign where email_for_follow_up = '$d[email]' and php_page like '/sign.php%'"; | |
37 | $r4 = $petition->query($q4); | |
38 | $d4 = mysqli_fetch_array($r4); | |
39 | if ($d4['action_on']){ | |
40 | $presig = "<b>PRESIG $d4[action_on]</b>"; | |
41 | } | |
94f5d5b9 PM |
42 | if ($presig != '' || $sig != ''){ |
43 | $list1 .= "<li>$d[email] $presig $d[name] $sig</li>"; | |
44 | }else{ | |
45 | $list2 .= "<li>$d[date_sent] $d[email] $d[name]</li>"; | |
46 | } | |
47 | ||
7ae2b7fd | 48 | } |
a2b8c54c PM |
49 | ob_start(); |
50 | echo "<h1>Outbox</h1>"; | |
51 | echo "<ol>"; | |
52 | echo $list3; | |
53 | echo "</ol>"; | |
54 | $buffer = ob_get_clean(); | |
55 | if ($list3 != ''){ | |
56 | echo $buffer; | |
57 | } | |
94f5d5b9 PM |
58 | echo "<h1>Signed</h1>"; |
59 | echo "<ol>"; | |
60 | echo $list1; | |
61 | echo "</ol>"; | |
62 | echo "<h1>Sent</h1>"; | |
63 | echo "<ol>"; | |
64 | echo $list2; | |
7ae2b7fd PM |
65 | echo "</ol>"; |
66 | include_once('footer.php'); |