-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
executable file
·46 lines (35 loc) · 1.09 KB
/
index.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
<?php
require('common.php');
$date = i($QUERY,'date', 'guess');
if($date == 'guess') {
if(date('H:i:s') < '15:00:00') $date = date('Y-m-d', strtotime('yesterday'));
else $date = date('Y-m-d');
} else {
$date = date('Y-m-d', strtotime($date));
}
$new_people = array();
$title = 'Friendlee : ' . date('dS F, Y', strtotime($date));
iapp('template')->setTitle($title);
if(!empty($QUERY['action'])) {
getPeople('met');
getPeople('phone');
getPeople('message');
getPeople('other');
$url = getRefreshUrl();
if($new_people) {
$QUERY['success'] = 'Added new people to the system: ' . implode(', ', $new_people);
$url = getRefreshUrl(['success' => $QUERY['success']]);
}
header("Location: $url"); // Fix the resubmit on back issue.
exit;
}
require('includes/uncontacted.php');
iapp('template')->addResource("uncontacted.css", "css");
render();
function getPeople($type) {
global $QUERY, $sql, $t_person, $people, $new_people, $points, $i_plugin, $t_connection;
if(empty($QUERY[$type])) return;
$raw = $QUERY[$type];
$connection_id = $t_connection->parse($type, $raw);
return $connection_id;
}