Update status.php
[clinton/MarylandElectronicPetitionSignature.git] / header.php
index b4611af..a5be395 100644 (file)
@@ -1,4 +1,5 @@
 <?PHP 
+include_once('session.php');
 if (isset($_GET['debug'])){
   if ($_GET['debug'] == 'on'){ 
     setcookie("debug", 'on'); 
@@ -26,7 +27,10 @@ if (empty($_COOKIE['start_time'])){
   <meta property="og:title"         content="Maryland Electronic Petition Software" />
   <meta property="og:description"   content="Socially Distant Petitions" />
   <meta property="og:image"         content="http://md-petition.com/files/maryland-flag-graphic.png" />
-  
+  <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
+  <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
+  <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
+  <link rel="manifest" href="/site.webmanifest">
   <!-- Global site tag (gtag.js) - Google Analytics -->
   <script async src="https://www.googletagmanager.com/gtag/js?id=UA-165887820-1"></script>
   <script>
@@ -38,6 +42,7 @@ if (empty($_COOKIE['start_time'])){
   </script>
   <?PHP 
   include_once('/var/www/secure.php'); //outside webserver
+  presign(); // requires db connection
   include_once('slack.php');
   ?>
   <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
@@ -65,9 +70,12 @@ input:focus {
       $q = "select * from petitions where web_short_name = '$invite'";
       $r = $petition->query($q);
       $d = mysqli_fetch_array($r);
-      echo "<div class='row'><div class='col-sm-10' style='text-align:center;'><h1 style='text-align:center; background-color:$d[web_color];'>$d[petition_name]</h1></div></div>";
+      echo "<div class='row'><div class='col-sm-10' style='text-align:center;'><h1 style='text-align:center; color:$d[web_color_text]; background-color:$d[web_color];'>$d[petition_name]</h1></div></div>";
       if ($d['social_phone'] != ''){
-        echo "<div class='row'><div class='col-sm-10' style='text-align:center;'><h3 style='text-align:center; background-color:$d[web_color];'>Support: <a href='tel:".$d['social_phone']."'>".$d['social_phone']."</a> <a href='mailto:".$d['social_email']."'>".$d['social_email']."</a></h3></div></div>";
+        echo "<div class='row'><div class='col-sm-10' style='text-align:center;'><h3 style='text-align:center; color:$d[web_color_text]; background-color:$d[web_color];'>Support: <a style='color:$d[web_color_text];' href='tel:".$d['social_phone']."'>".$d['social_phone']."</a> <a style='color:$d[web_color_text];' href='mailto:".$d['social_email']."'>".$d['social_email']."</a></h3></div></div>";
+      }
+      if ($d['social_email'] != '' && $d['social_phone'] == ''){
+        echo "<div class='row'><div class='col-sm-10' style='text-align:center;'><h3 style='text-align:center; color:$d[web_color_text]; background-color:$d[web_color];'>Support: <a style='color:$d[web_color_text];' href='mailto:".$d['social_email']."'>".$d['social_email']."</a></h3></div></div>";
       }
       } 
     ?>