<td style='white-space:pre;'>$d[browser_string]</td>
</tr>";
}
- $petition->query("insert into follow_up (name, email, php_session, petition_id) values ('$name','$email','$php_session_id','$_GET[follow_up]') ");
+ $petition->query("insert into follow_up (name, email, php_session, petition_id, date_sent) values ('$name','$email','$php_session_id','$_GET[follow_up]','".date('Y-m-d')."') ");
$petition->query("update presign set presign_status = 'DONE' where php_session_id = '$php_session_id' ");
$petition->query("update presign set presign_status = 'DONE' where email_for_follow_up = '$email' ");
echo "</table>";
<tr>
-<td valign="top">
+<td valign="top" colspan='2'>
<h2>Pre-Sign</h2>
<div>Follow up requested - never signed.</div>
<form method='GET'><input name='email'><input type='submit' value='SEARCH E-MAIL'></form><table>
<?PHP
-$q="SELECT distinct php_session_id FROM presign where presign_status = 'NEW' and email_for_follow_up <> '' order by id desc";
+$q="SELECT distinct php_session_id FROM presign where presign_status = 'NEW' and email_for_follow_up <> '' order by id";
$r = $petition->query($q);
while($d = mysqli_fetch_array($r)){
$q2="SELECT * FROM presign where php_session_id = '$d[php_session_id]' order by id desc";
$r2 = $petition->query($q2);
$d2 = mysqli_fetch_array($r2);
- echo "<tr><td>$d2[action_on]</td><td><a href='?php_session_id=$d2[php_session_id]'>$d2[name]</a></td><td>$d2[email_for_follow_up]</td><td>".id2petition($d2['petition'])."</td><td>$d2[invite]</td></tr>";
+ $sig = '';
+ if ($d2['name'] != ''){
+ $q3 = "SELECT date_time_signed FROM signatures where signed_name_as = '$d2[name]'";
+ $r3 = $petition->query($q3);
+ $d3 = mysqli_fetch_array($r3);
+ if ($d3['date_time_signed'] != ''){
+ $sig = "<br><b><a href='?sign_email=$d2[email_for_follow_up]'>SIGNATURE $d3[date_time_signed]</a></b>";
+ }
+ }
+ echo "<tr><td><a href='?php_session_id=$d2[php_session_id]'>$d2[action_on]</a></td><td>$d2[name] $sig</td><td><a href='?email=$d2[email_for_follow_up]'>$d2[email_for_follow_up]</a></td><td>".id2petition($d2['petition'])."</td><td>$d2[invite]</td></tr>";
}
?></table>
</td>
-<td valign="top">
+ </tr>
+ <tr>
+<td valign="top" colspan='2'>
<h2>Signatures</h2>
<div>Last 10</div><ol>
<?PHP