Commit | Line | Data |
---|---|---|
2e8a2b0a PM |
1 | <?PHP |
2 | session_start(); | |
3 | // this will overlay our current system | |
9dc52bb0 PM |
4 | function presign(){ |
5 | global $petition; | |
6 | $id = session_id(); | |
80997c8f PM |
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']; | |
13 | } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { | |
14 | $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; | |
15 | } else { | |
16 | $ip = $_SERVER['REMOTE_ADDR']; | |
17 | } | |
52d1ff53 | 18 | $petition_name = $petition->real_escape_string($_COOKIE['invite']).'-'.$petition->real_escape_string($_COOKIE['pID']); |
80997c8f PM |
19 | $ip = $petition->real_escape_string($ip); |
20 | $browser_string = $petition->real_escape_string($_SERVER['HTTP_USER_AGENT']); | |
0bda652a | 21 | $now = $petition->real_escape_string(date('r')); |
52d1ff53 PM |
22 | $petition->query("insert into presign (petition,php_session_id,php_page,name,email_for_follow_up,phone_for_validation,ip_address,browser_string,action_on) |
23 | values ('$petition_name','$id','$page','$name','$email','$phone','$ip','$browser_string','$now') "); | |
9dc52bb0 | 24 | } |
2e8a2b0a | 25 | ?> |