Exemple #1
0
        if (preg_match("/^[0-9]+\$/", $_GET['prof'])) {
            $prof_id = intvalPgSql(trim($_POST['prof']));
        } else {
            $prof_link = $_POST['prof'];
            $prof_id = professions::GetProfId($_POST['prof']);
        }
    }
}
//------------------------------------------------------------------------------
if (isset($_GET['profession_db_id']) && !($prof_id > 0 && $prof_id == $_GET['profession_db_id'] || $prof_group_id > 0 && $prof_group_id == $_GET['profession_db_id'])) {
    $link = null;
    if ($_GET['profession_db_id'] > 0) {
        if ($_GET['profession_column_id'] > 0) {
            $link = professions::GetProfLink($_GET['profession_db_id']);
        } else {
            $link = professions::GetGroupLink($_GET['profession_db_id']);
        }
    }
    unset($_GET['profession_db_id'], $_GET['profession_columns'], $_GET['profession_column_id'], $_GET['profession'], $_GET['prof']);
    $query_string = stripslashes(http_build_query($_GET));
    header("HTTP/1.1 301 Moved Permanently");
    header("Location: /freelancers/" . ($link ? "{$link}/" : "") . "?{$query_string}");
    exit(0);
}
//------------------------------------------------------------------------------
$page = intval(trim($_GET['page']));
if (!$page) {
    $page = 1;
} elseif ($page == 1) {
    $sLocation = e_url('page');
    header("HTTP/1.1 301 Moved Permanently");