Update eligible.php
authorPatrick McGuire <insidenothing@gmail.com>
Thu, 14 May 2020 13:48:50 +0000 (09:48 -0400)
committerGitHub <noreply@github.com>
Thu, 14 May 2020 13:48:50 +0000 (09:48 -0400)
eligible.php

index c9ceb06..643b334 100644 (file)
@@ -49,7 +49,7 @@ while($d2 = mysqli_fetch_array($r2)){
  $d4 = mysqli_fetch_array($r4);
 if ($d4['id'] > 0){
   $available .= "<div class='row'>
-  <div class='col-sm-2'></div>
+  <div class='col-sm-2'><a target='_Blank' href='soft_copy.php?id=$d4[id]'>Already Signed - View</a> or <a target='_Blank' href='?remove=$d4[id]'>Remove</a></div>
   <div class='col-sm-6'>$d2[petition_name]</div>
   <div class='col-sm-4'>$field == $pass</div>
     </div>"; 
@@ -68,9 +68,15 @@ if ($d4['id'] > 0){
    if($_COOKIE['invite'] != '' && strtoupper($_COOKIE['invite']) == strtoupper($d2['web_short_name'])){
      $available .= '<script>document.getElementById("form").submit();</script>';
    }
- }
+ }else{
+   $checked = '';
+   if($_COOKIE['invite'] != '' && strtoupper($_COOKIE['invite']) == strtoupper($d2['web_short_name'])){
+     $checked = 'checked';
+   }else{
+     $checked = '';
+   }
   $available .= "<div class='row'>
-  <div class='col-sm-2'><input type='radio' id='petition' name='petition' value='$d2[petition_id]' checked > </div>
+  <div class='col-sm-2'><input type='radio' id='petition' name='petition' value='$d2[petition_id]' $checked > </div>
   <div class='col-sm-6'>$d2[petition_name]</div>
   <div class='col-sm-4'>$field != $pass</div>
     </div>";