<div style="clear:both"></div> <div class="app"> <section class="Search CreateChainSearch"> <div class="SearchWrap"> <h2>Step 2: Research</h2> <form id="searchTroveForm" name="searchTroveForm"> <input type="text" id="searchTroveInput" name="searchTroveInput" placeholder="Enter keywords, authors, public figures or events to begin your chain."/> <button id="searchTroveBtn" name="searchTroveBtn">Search</button> </form> <article class="SearchResults"> <div id="output"> <table id="results_table"> <?php if (isset($_GET['searchTroveInput'])) { if ($_GET['searchTroveInput'] === "") { $view->printMessage("Please enter a valid search term!"); } else { $controller->handleSearch($_GET['searchTroveInput'], $user); } } else { $view->printMessage("Start searching so we can show you some results!"); } ?> </table> </div> </article> </div> </section> <section class="TopChain CreateChainTimeline">
<a href="profile.php">Profile</a> </li> <li> <a href="about.php">About</a> </li> </ul> </nav> <section class="Search"> <div class="SearchWrap"> <h2>Search</h2> <form method="GET" action="index.php"> <input id="q" type="text" name="q" placeholder="Enter keywords, authors, public figures or events to begin your chain."/> </form> <article class="SearchResults"> <?php if (isset($_GET['q'])) { if ($_GET['q'] === "") { $view->printMessage("You haven't searched for anything!"); } else { $controller->handleChainSearch($_GET['q']); } } else { $view->printMessage("Search for other user's chains here, or proceed to 'Your Chains' to create one!"); } ?> </article> </div> </section> <section class="TopChain"> <h2>Top Chains</h2>
<?php /** * Created by PhpStorm. * User: phpstudent * Date: 1/14/16 * Time: 6:02 PM */ class View { public function printMessage() { echo 'Added automatically by Composer'; } } $view = new View(); $view->printMessage();