Example #1
0
 } elseif ($prof_group_id > 0) {
     $profs = professions::GetProfs($prof_group_id);
     $filter_prof = array();
     foreach ($profs as $prof) {
         $filter_prof[1][$prof['id']] = 1;
     }
 }
 $filter = array("is_pro" => $is_pro, 'prof' => $filter_prof);
 $string_professions = '';
 if ($action == "search_advanced") {
     $filter = array("active" => "t", "prof" => $filter_prof, "cost_type" => intval(@$_POST['cost_type_db_id']), "from_cost" => $from_cost, "to_cost" => $to_cost, "curr_type" => intval(@$_POST['curr_type_db_id']), "exp" => is_array($_POST['exp']) ? array_map("intval", $_POST['exp']) : @$_POST['exp'], "exp_from" => $exp[0], "exp_to" => $exp[1], "age" => is_array($_POST['age']) ? array_map("intval", $_POST['age']) : @$_POST['age'], "age_from" => $age[0], "age_to" => $age[1], "country" => (int) @$_POST['location_columns'][0], "city" => (int) @$_POST['location_columns'][1], "in_office" => (bool) @$_POST['in_office'], "in_fav" => (bool) @$_POST['in_fav'], "only_free" => (bool) @$_POST['only_free'], "is_pro" => $is_pro, "is_verify" => (bool) @$_POST['is_verify'], "is_preview" => (bool) @$_POST['is_preview'], "sbr_is_positive" => (bool) @$_POST['sbr_is_positive'], "sbr_not_negative" => (bool) @$_POST['sbr_not_negative'], "opi_is_positive" => (bool) @$_POST['sbr_is_positive'], "opi_not_negative" => (bool) @$_POST['sbr_not_negative']);
     if ($filter['cost_type']) {
         $filter['cost'][] = array('cost_type' => $filter['curr_type'], 'cost_from' => $filter['from_cost'], 'cost_to' => $filter['to_cost'], 'type_date' => $filter['cost_type']);
     }
     $countryObj = new country();
     $countryCityName = $countryObj->getCountryAndCityNames($filter['country'], $filter['city']);
     $countryCityName = @$countryCityName['name'];
 }
 if (!empty($filter["prof"]) && is_array($filter["prof"][1])) {
     $raw_professions = professions::GetProfessionsTitles(array_keys($filter["prof"][1]));
     $a_professions = array();
     foreach ($raw_professions as $profession_item) {
         $a_professions[$profession_item["name"]] = '(@name_prof "' . $profession_item["name"] . '" | @additional_specs "' . $profession_item["name"] . '")';
     }
     $string_professions = '(' . join(" | ", $a_professions) . ')';
 }
 $string_query = $search_string;
 // @todo Кажется, это никогда не используется?
 $string_query .= !empty($string_professions) ? ' ' . $string_professions : '';
 $type = 'users_ext';
 require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/search/search_ext.php";