<div id="main"> <h1>Nametag</h1> <h2>Automagic</h2> <div> <?php $pdo = new PDO('sqlite:../hovselist.db'); $statement = <<<EOF SELECT * FROM `moles` WHERE `alley` <> 'Social' EOF; $result = $pdo->prepare($statement); $result->execute(); while ($row = $result->fetchObject('Mole')) { generate_nametag($pdo, $row); } $result = $pdo->prepare($statement); $result->execute(); while ($row = $result->fetchObject('Mole')) { generate_nametag($pdo, $row, true); } ?> </div> </div> <?php print_footer('Copyright © 2016 Will Yu', 'A service of Blacker House'); ?> </body> </html>
<?php print_head('Nametag'); ?> </head> <body> <div id="main"> <h1>Nametag</h1> <?php if (array_key_exists('uid', $_GET)) { echo <<<EOF \t\t\t<h2>Automagic</h2> \t\t\t<div> EOF; $pdo = new PDO('sqlite:../sucker/hovselist.db'); generate_nametag($pdo, Mole::getMoleByUid($pdo, (int) $_GET['uid'])); echo <<<EOF \t\t\t</div> EOF; } else { echo <<<EOF \t\t\t<h2>Enter Your UID</h2> \t\t\t<form action="./" method="get"> \t\t\t\t<div class="form-control"> \t\t\t\t\t<label for="uid">UID</label> \t\t\t\t\t<div class="input-group"> \t\t\t\t\t\t<input type="text" id="uid" name="uid" /> \t\t\t\t\t</div> \t\t\t\t</div> \t\t\t\t<div class="form-control">