if (isset($_POST['industry']) && $_POST['industry']) { $industry = $_POST['industry']; $industry1 = $_POST['industry']; } else { $industry = ""; $industry1 = ""; } include "./Class_Database.php"; $db = new database(); //$db->setup("root", "", "localhost", "jobportaldb"); if (isset($_POST['search']) && $_POST['search'] == "Search") { $query = "Select * from emp_personalinfo ep,emp_jobdetails ej where ep.id_emp=ej.id_emp"; $where = ""; if ($keyword != "") { //Remove Extra characters from the keyword and create the array containing words. $keywords_array = superExplode($keyword, " \t\n!,\":)(.{};="); $where1 = ""; foreach ($keywords_array as $k) { $k = addslashes(strip_tags($k)); if ($where1 == "") { $where1 = "(ej.title like '%" . $k . "%'"; } else { $where1 .= " or ej.title like '%" . $k . "%'"; } } if ($where1 != "") { $where .= " and " . $where1 . ") "; } } if ($employer != "") { $where .= " and ep.companyname like '%" . addslashes(strip_tags($employer)) . "%'";
if ($where1 == "") { $where1 = "(ej.title like '%" . $k . "%'"; } else { $where1 .= " or ej.title like '%" . $k . "%'"; } } if ($where1 != "") { $where .= " and " . $where1 . ") "; } } if (isset($exp) && $exp != "") { $where .= " and ej.experiencerequirement<=" . $exp; } if (isset($loc) && $loc != "") { //Remove all special characters and seperate each word to search in the database. $locations = superExplode($loc, " \t\n!,\":)(.{};="); $where1 = ""; foreach ($locations as $l) { $l = addslashes(strip_tags($l)); if ($where1 == "") { $where1 = "(ej.city like '%" . $l . "%' or ej.state like '%" . $l . "%' or ej.zip like '%" . $l . "%'"; } else { $where1 .= " or ej.city like '%" . $l . "%' or ej.state like '%" . $l . "%' or ej.zip like '%" . $l . "%'"; } } if ($where1 != "") { $where .= " and " . $where1 . ") "; } } if (isset($area) && $area != "") { $where .= " and ej.jobfunction like '%" . addslashes(strip_tags($area)) . "%'";
$workauthorization1 = ""; } if (isset($_POST['degreelevel']) && $_POST['degreelevel'] != "") { $degreelevel = $_POST['degreelevel']; $degreelevel1 = $_POST['degreelevel']; } else { $degreelevel = ""; $degreelevel1 = ""; } include "./Class_Database.php"; $db = new database(); $query = "Select * from js_personalinfo jp,js_skill js,js_edu jsedu where jp.id_js=js.id_js and jp.id_js= jsedu.id_js"; $where = ""; if (isset($keyword) && $keyword != "") { //Remove all special characters including space and seperate each word to search in the database. $keywords = superExplode($keyword, " \t\n!,\"':)(.{};="); $where1 = ""; foreach ($keywords as $k) { $k = addslashes(strip_tags($k)); if ($where1 == "") { $where1 = "(js.skill_name like '%" . $k . "%'"; } else { $where1 .= " or js.skill_name like '%" . $k . "%'"; } } if ($where1 != "") { $where .= " and " . $where1 . ") "; } } if (isset($gpa) && $gpa != "") { $where .= " and jsedu.edu_gpa>=" . $gpa;