Commit | Line | Data |
---|---|---|
2e8a2b0a PM |
1 | <?PHP |
2 | session_start(); | |
3 | // this will overlay our current system | |
9dc52bb0 | 4 | function presign(){ |
0b7a4e49 PM |
5 | global $petition; |
6 | $id = session_id(); | |
7 | $page = $petition->real_escape_string($_SERVER['REQUEST_URI']); | |
8 | $email = $petition->real_escape_string($_COOKIE['email']); | |
9 | $name = $petition->real_escape_string($_COOKIE['pNAME']); | |
10 | $phone = $petition->real_escape_string($_COOKIE['pPHONE']); | |
11 | if (!empty($_SERVER['HTTP_CLIENT_IP'])) { | |
12 | $ip = $_SERVER['HTTP_CLIENT_IP']; | |
80997c8f | 13 | } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { |
0b7a4e49 | 14 | $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; |
80997c8f | 15 | } else { |
0b7a4e49 | 16 | $ip = $_SERVER['REMOTE_ADDR']; |
80997c8f | 17 | } |
0b7a4e49 PM |
18 | $petition_name = $petition->real_escape_string($_COOKIE['pID']); |
19 | $invite = $petition->real_escape_string($_COOKIE['invite']); | |
20 | $invite_error = $petition->real_escape_string($_COOKIE['invite_error']); | |
21 | $ip = $petition->real_escape_string($ip); | |
22 | $browser_string = $petition->real_escape_string($_SERVER['HTTP_USER_AGENT']); | |
23 | $now = $petition->real_escape_string(date('r')); | |
87b276ef PM |
24 | $only_date = $petition->real_escape_string(date('Y-m-d')); |
25 | $petition->query("insert into presign (only_date,invite_error,invite,petition,php_session_id,php_page,name,email_for_follow_up,phone_for_validation,ip_address,browser_string,action_on) | |
26 | values ('$only_date','$invite_error','$invite','$petition_name','$id','$page','$name','$email','$phone','$ip','$browser_string','$now') "); | |
9dc52bb0 | 27 | } |
2e8a2b0a | 28 | ?> |