本文整理匯總了PHP中phpCAS::getServiceURL方法的典型用法代碼示例。如果您正苦於以下問題:PHP phpCAS::getServiceURL方法的具體用法?PHP phpCAS::getServiceURL怎麽用?PHP phpCAS::getServiceURL使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類phpCAS
的用法示例。
在下文中一共展示了phpCAS::getServiceURL方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: toggle_auth_checked_in_redirect
function toggle_auth_checked_in_redirect()
{
$url = phpCAS::getServiceURL();
$without_auth_checked = removeParameterFromUrl('auth_checked', $url);
if ($url == $without_auth_checked) {
$url .= (strpos($url, '?') === false ? '?' : '&') . 'auth_checked=true';
} else {
$url = $without_auth_checked;
debug_msg("removing auth_checked from url to have a clean final url: {$url}");
}
phpCAS::setFixedServiceURL($url);
}
示例2: mysqli_real_escape_string
$res = $mysqli->query("SELECT * FROM users WHERE onid='{$onid}'");
$userrow = $res->fetch_array(MYSQLI_ASSOC);
//keep an array of elements in the user's table for easy access
if (isset($_REQUEST['payment_method']) && $_REQUEST['payment_method'] != 0) {
$payment_method = mysqli_real_escape_string($mysqli, check_input($_REQUEST['payment_method']));
} else {
echo '<h2>You need to select a payment method</h2>';
exit;
}
if ($payment_method == 3) {
phpCAS::client(SAML_VERSION_1_1, 'login.oregonstate.edu', 443, 'cas');
phpCAS::setNoCasServerValidation();
phpCAS::forceAuthentication();
//$t = phpCAS::getAttributes();
//print_r($t);
$service = $url = strtok(phpCAS::getServiceURL(), '?');
if (strtolower(phpCAS::getUser()) != NULL) {
//Logged in
echo 'User: ' . strtolower(phpCAS::getUser());
} else {
echo 'User needs to login';
}
} else {
if ($payment_method == 1) {
echo "<div class='row'><div class='col-sm-8 col-sm-offset-2'><strong>When paying by credit card...</strong></div></div>\n\t<div class='row' style='padding-top:1%;'><div class='col-sm-4 col-sm-offset-2'><b>Your Email:</b> (Must be valid to confirm order)</div>\n<div class='col-sm-4'><input class='fi form-control' type='email' pattern='[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,4}\$' name='email'></div></div>\n<div class='row' style='padding-top:1%;'><div class='col-sm-4 col-sm-offset-2'><b>First Name:</b></div>\n<div class='col-sm-4'><input class='fi form-control' type=text size=55 name='firstname'></div></div>\n<div class='row' style='padding-top:1%;'><div class='col-sm-4 col-sm-offset-2'><b>Last Name:</b></div>\n<div class='col-sm-4'><input class='fi form-control' type=text size=55 name='lastname'></div></div>";
} else {
if ($payment_method == 2) {
echo "<div class='row' style='padding-top:1%;'><div class='col-sm-4 col-sm-offset-2'><b>Your Email:</b> (Must be valid to confirm order)</div>\n<div class='col-sm-4'><input class='fi form-control' type='email' pattern='[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,4}\$' name='email'></div></div>\n<div class='row' style='padding-top:1%;'><div class='col-sm-4 col-sm-offset-2'><b>First Name: </b></div>\n<div class='col-sm-4'><input class='fi form-control' type=text size=55 name='firstname'></div></div>\n<div class='row' style='padding-top:1%;'><div class='col-sm-4 col-sm-offset-2'><b>Last Name: </b></div>\n<div class='col-sm-4'><input class='fi form-control' type=text size=55 name='lastname'></div></div>\n<div class='row' style='padding-top:1%;'><div class='col-sm-4 col-sm-offset-2'><b>OSU Grant Account Code: </b></div>\n<div class='col-sm-4'><input class='fi form-control' type=text size=55 name='account'></div></div>";
}
}
}