Exemple #1
0
$prof_group_id = 0;
$prof_group_parent_id = 0;
if (isset($_GET['prof'])) {
    if (preg_match("/^[0-9]+\$/", $_GET['prof'])) {
        $link = professions::GetProfLink($_GET['prof']);
        if ($link) {
            header("HTTP/1.1 301 Moved Permanently");
            header("Location: /freelancers/{$link}/");
            exit(0);
        }
    } else {
        $prof_link = htmlspecialchars($_GET['prof']);
        $prof_id = professions::GetProfId($_GET['prof']);
        $prof_group_parent_id = professions::GetProfGroupParentId($_GET['prof']);
        if (!$prof_id) {
            $prof_group_id = professions::GetProfGroupId($_GET['prof']);
        }
    }
    if (!$prof_id && !$prof_group_id) {
        $prof_link = '';
        $_GET['region_filter_city'] = $_GET['region_filter_country'];
        $_GET['region_filter_country'] = $_GET['prof'];
    }
} else {
    if (isset($_POST['prof'])) {
        if (preg_match("/^[0-9]+\$/", $_GET['prof'])) {
            $prof_id = intvalPgSql(trim($_POST['prof']));
        } else {
            $prof_link = $_POST['prof'];
            $prof_id = professions::GetProfId($_POST['prof']);
        }