本文整理汇总了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>";
}
}
}