public static function Search($workType, $experience, $education, $salary, $zip, $distance, $page) { if (($tmp = Client::getZipCodes($zip, $distance)) !== false) { $i = 0; $query = "SELECT * FROM staff WHERE ("; foreach ($tmp as $data) { if ($i === 0) { $query .= "zip='" . $data[code] . "'"; } else { $query .= " OR zip='" . $data[code] . "'"; } $i++; } $query .= ") AND experience >= '{$experience}' AND workType='{$workType}' AND education>='{$education}' AND salary<='{$salary}' AND available=1"; $paginator = new Paginator($query); if (!($results = $paginator->getData($page))) { $GLOBALS['message'] = "No potential candidates fit that criteria."; return false; } else { $results->links = $paginator->createLinks(2, 'pages'); return $results; } } else { return false; } }
die('Conference not found.'); } $con = $con->fetch_object(); $id = $con->c_id; $name = $con->c_name; $start = $con->c_start_date; $end = $con->c_end_date; $dur = $con->duration; $place = $con->venue; $check1 = 1; $limit = isset($_GET['limit']) ? $_GET['limit'] : 25; $page = isset($_GET['page']) ? $_GET['page'] : 1; $links = isset($_GET['links']) ? $_GET['links'] : 7; $query = "SELECT * FROM Conference_Reviews WHERE c_id = '{$id}'"; $Paginator = new Paginator($db, $query); $results = $Paginator->getData($limit, $page); if (isset($_SESSION['id'])) { $check1 = $db->query("SELECT * FROM Member_Attends_Conference \n\t\t\t\tWHERE con_id = {$_GET['id']}\n\n\t\t\t\tAND m_id = {$_SESSION['id']}\n\n\t\t\t\t"); if ($check1->num_rows) { $check1 = 3; } else { $check1 = 2; } } ?> <div id="popup1" class="overlay"> <div class="popup"> <h2>Select a geme</h2> <a class="close" href="">x</a> <div class="content"> <form method="post" action="">
<?php require_once 'Paginator.class.php'; $conn = new mysqli('127.0.0.1', 'root', 'password', 'ci_bootstrap'); $limit = isset($_GET['limit']) ? $_GET['limit'] : 1; $page = isset($_GET['page']) ? $_GET['page'] : 1; $links = isset($_GET['links']) ? $_GET['links'] : 7; $query = "SELECT noplate,charges from park"; //$query = "SELECT tbl_users.user_id,tbl_users.user_name,tbl_users.status,tbl_trainer.fname,tbl_trainer.lname from tbl_users inner join tbl_trainer on tbl_users.user_id = tbl_trainer.userid order by tbl_trainer.fname"; $Paginator = new Paginator($conn, $query); $results = $Paginator->getData($page, $limit); ?> <body> <div id="wrapper"> <div id="page-wrapper"> <div class="row"> <div class="col-lg-12"> <h3 class="page-header">USER LIST</h3> </div> <!-- /.col-lg-12 --> </div> <!-- /.row --> <div class="row">
function imageResults() { require 'template/header.php'; echo ' <header> <nav class="navbar navbar-default"> <div class="container-fluid"> <div class="navbar-header inline-block"> <a class="navbar-brand" href="index.php"> <img alt="FBpp logo" src="images/logo.png"> </a> </div> <form action="search.php" method="POST" class="form-inline reset-margin" enctype="multipart/form-data"> <div class="form-group"> <input type="file" name="image" class="form-control"> <button type="submit" name="submit" class="btn btn-primary form-control"><span class="glyphicon glyphicon-search" aria-hidden="true"></span></button> </div> </form> </div> </nav> </header> '; echo '<div class="container"><!--container-->'; require 'config.php'; require 'classes/paginator.class.php'; $limit = isset($_GET['limit']) ? $_GET['limit'] : 10; $page = isset($_GET['page']) ? $_GET['page'] : 1; $links = isset($_GET['links']) ? $_GET['links'] : 7; $starttime = microtime(true); $queryResults = mysqli_query($con, Search::imageHashing()); $checkRows = mysqli_num_rows($queryResults); if ($checkRows > 0) { $numRows = mysqli_num_rows($queryResults); $endtime = microtime(true); echo "<p>About " . $numRows . " results (" . ($duration = $endtime - $starttime . " seconds)</p>"); $Paginator = new Paginator($con, Search::imageHashing()); $results = $Paginator->getData($limit, $page); echo '<div class="col-md-10 col-md-offset-1"> <table class="table table-striped table-condensed table-bordered table-rounded"><tbody>'; for ($i = 0; $i < count($results->data); $i++) { echo '<tr>'; $fid = $results->data[$i]['fid']; echo '<td>'; echo "<a href='https://www.facebook.com/{$fid}/' target='_blank'>https://www.facebook.com/{$fid}/</a>"; echo "<a href='https://www.facebook.com/{$fid}/' target='_blank'><img src='https://graph.facebook.com/{$fid}/picture?type=large' alt='' class='img-responsive'></a>"; $name = 'https://graph.facebook.com/' . $fid . '?fields=name&access_token=748352698603001|94fc98094ca42f974879c56f3229c5e4'; $response = file_get_contents($name); $user = json_decode($response, true); echo $user['name']; echo '</td>'; echo '</tr>'; } if ($numRows <= 10) { echo '</tbody></table>'; echo "</div>"; echo "</div>"; require 'template/search_footer.php'; } else { echo '</tbody></table>'; echo $Paginator->createLinks($links, 'pagination pagination-sm'); echo "</div>"; echo "</div>"; require 'template/search_footer.php'; } } else { echo "<br />We found 0 results for the uploaded image please upload another one or try later when we scrap more pictures."; echo "</div>"; require 'template/footer.php'; } }