<?php
  $sjson = file_get_contents('./signatures.json', true);
  $sobj = json_decode($sjson);
  $peopleAry = [];
  foreach ($sobj -> people as $people) {
    foreach ($people as $person) {
      array_push($peopleAry, $person);
    }
  }
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
            "http://www.w3.org/TR/html4/strict.dtd">
<head>
    <style>
        body {
            font-family: Arial, sans-serif;
            padding: 40px;
        }
        h2,h3 {
            color: #666;
        }
        .name {
            margin-top: 20px;
        }
        .sm, .med, .lg {
            margin: 40px 0;
        }
        hr {
            color: #E0E0E0;
        }
    </style>
</head>
<body>

<?php
// Get data
foreach($peopleAry as $person) {
  echo '<div id="'.$person -> first.'-'.$person -> last.'" class="name"><h2>'.$person -> first.' '.$person -> last.'</h2></div>';
  echo '<div class="sm">';
    echo '<h5>Small</h5>';
      echo '<table cellspacing="0" cellpadding="3">';
          echo '<tr><td style="font-weight:bold; font-size:12px; color: #434343;font-family: Arial, sans-serif;">M &nbsp;</td></tr>';
          echo '<tr><td style="color:#434343; font-size:11px; font-family: Arial, sans-serif;">'. $person -> first .' '. $person -> last .'';
          echo '<br><em>'.$person -> title.'</em></td></tr>';
          echo '<tr><td style="font-size:11px; color: #999; font-family: Arial, sans-serif;">'. $person -> email .'</td></tr>';
      echo '</table>';
  echo '</div>';

  echo '<div class="med">';
    echo '<h5>Medium</h5>';
      echo '<table cellspacing="0" cellpadding="3">';
          echo '<tr><td style="font-weight:bold; font-size:12px; color: #434343;font-family: Arial, sans-serif;">M &nbsp;</td></tr>';
          echo '<tr><td style="color:#434343; font-size:11px; font-family: Arial, sans-serif;">'.$person -> first.' '.$person -> last.'<br><em>'.$person -> title.'</em></td></tr>';
          echo '<tr><td style="font-size:11px; color: #999; font-family: Arial, sans-serif;">'. $person -> email .'';
          echo '<br>mobile: '.substr($person -> mobile,0,3).'-'.substr($person -> mobile ,3,3).'-'.substr($person -> mobile,6).'';
          echo '<br><a href="http://agency-m.com" target="_blank">agency-m.com</a>';
          echo '</td></tr>';
      echo '</table>';
  echo '</div>';

  echo '<div class="lg">';
    echo '<h5>Large</h5>';
        echo '<table cellspacing="0" cellpadding="3">';
            echo '<tr><td style="font-weight:bold; font-size:12px; color: #434343;font-family: Arial, sans-serif;">M &nbsp;</td></tr>';
            echo '<tr><td style="color:#434343; font-size:11px; font-family: Arial, sans-serif;">'.$person -> first.' '.$person -> last.'<br><em>'.$person -> title.'</em></td></tr>';
            echo '<tr><td style="font-size:11px; color: #999; font-family: Arial, sans-serif;">'. $person -> email .'';
            echo '<br>mobile: '.substr($person -> mobile,0,3).'-'.substr($person -> mobile ,3,3).'-'.substr($person -> mobile,6).'</td></tr>';
            echo '<tr><td style="font-size:11px; color: #999; font-family: Arial, sans-serif;">217 Church Street<br>Philadelphia, PA 19106';
            echo '<br><a href="http://agency-m.com" target="_blank">agency-m.com</a>';
            echo '</td></tr>';
        echo '</table>';
  echo '</div>';

  echo '<hr>';
}

?>

</body>
</html>
