” => “http://www.sherlockphotography.org/Customisations/Client-login-system/Please-enter-your-name/n-JKpHP”, // Displayed when no name is entered
” => “http://www.sherlockphotography.org/Customisations/Client-login-system/Account-not-found/n-K2pmp”, // Displayed when the name doesn’t exist
“jomark” => “http://www.owenmathiasclients.com/Clients/Jomark”,
“Kousaka Kirino” => “http://www.sherlockphotography.org/Customisations/Client-login-system/Kousaka-Kirino/n-FZwsb”,
);

foreach ($redirects as $name => $url) {
$redirects[strtolower(trim($name))] = $url;
}

function get_redirect($name) {
global $redirects;

$name = strtolower(trim($name));

if (isset($redirects[$name])) {
return $redirects[$name];
}

return false;
}

if (empty($_POST[‘clientname’])) {
$redirect = get_redirect(‘‘);
} else {
$redirect = get_redirect($_POST[‘clientname’]);
}

if (!$redirect) {
$redirect = get_redirect(‘‘);

if (!$redirect) {
//This page is used if you haven’t defined a “” page:
$redirect = ‘http://www.smugmug.com/’;
}
}

header(‘Expires: 0’);
header(‘Cache-Control: private, no-cache, max-age=0’);
header(‘Location: ‘ . $redirect);
die();