本文整理汇总了PHP中getReferralPage函数的典型用法代码示例。如果您正苦于以下问题:PHP getReferralPage函数的具体用法?PHP getReferralPage怎么用?PHP getReferralPage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getReferralPage函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: addAlert
addAlert("danger", lang("ACCESS_DENIED"));
if (isset($_POST['ajaxMode']) and $_POST['ajaxMode'] == "true") {
echo json_encode(array("errors" => 1, "successes" => 0));
} else {
header('Location: ../pm.php');
}
exit;
}
if (isset($msg_id) && $msg_id >= 1) {
$parent_id = $msg_id;
} else {
$parent_id = NULL;
}
// Call the function to create a message with the required data
if ($isreply = '0' or '1') {
if (!createMessage($sender_id, $receiver_id, $title, $message, $parent_id)) {
echo json_encode(array("errors" => 1, "successes" => 0));
exit;
}
} else {
addAlert("danger", "some bad data here");
echo json_encode(array("errors" => 1, "successes" => 0));
exit;
}
restore_error_handler();
if (isset($_POST['ajaxMode']) and $_POST['ajaxMode'] == "true") {
echo json_encode(array("errors" => 0, "successes" => 1));
} else {
header('Location: ' . getReferralPage());
exit;
}
开发者ID:ColeFortson,项目名称:UF-PMSystem,代码行数:31,代码来源:send_pm.php
示例2: foreach
// Add alerts for any failed input validation
foreach ($validator->errors as $error) {
addAlert("danger", $error);
}
if (count($validator->errors) > 0) {
apiReturnError($ajax, getReferralPage());
}
if ($user_id) {
// Special case to load groups for the logged in user
if ($user_id == "0") {
$user_id = $loggedInUser->user_id;
}
// Attempt to load group information for the specified user.
if (!($results = loadUserGroups($user_id))) {
apiReturnError($ajax, getReferralPage());
}
} else {
if ($group_id) {
// Attempt to load information for the specified group.
if (!($results = loadGroup($group_id))) {
apiReturnError($ajax, getReferralPage());
}
} else {
// Attempt to load information for all groups
if (!($results = loadGroups())) {
apiReturnError($ajax, getReferralPage());
}
}
}
restore_error_handler();
echo json_encode($results);
开发者ID:Vaibhav95g,项目名称:Bitsmun-user-management-portal,代码行数:31,代码来源:load_groups.php
示例3: checkLoggedInUser
function checkLoggedInUser($ajax)
{
if (!isUserLoggedIn()) {
addAlert("danger", lang("LOGIN_REQUIRED"));
apiReturnError($ajax, getReferralPage());
}
}
开发者ID:Vaibhav95g,项目名称:Bitsmun-user-management-portal,代码行数:7,代码来源:funcs.php
示例4: explode
} else {
$error_count++;
}
}
}
// Add groups
if (!empty($add_groups)) {
// Convert string of comma-separated group_id's into array
$group_ids_arr = explode(',', $add_groups);
foreach ($group_ids_arr as $group_id) {
if (addUserToGroup($user_id, $group_id)) {
$success_count++;
} else {
$error_count++;
}
}
}
// Set primary group (must be done after group membership is set)
if ($primary_group_id && $userdetails['primary_group_id'] != $primary_group_id) {
if (updateUserPrimaryGroup($user_id, $primary_group_id)) {
$success_count++;
} else {
$error_count++;
}
}
restore_error_handler();
if ($error_count > 0) {
apiReturnError($ajax, getReferralPage());
} else {
apiReturnSuccess($ajax, getReferralPage());
}
开发者ID:Vaibhav95g,项目名称:Bitsmun-user-management-portal,代码行数:31,代码来源:update_user.php
示例5: json_encode
require_once "../models/config.php";
// Recommended admin-only access
if (!securePage(__FILE__)) {
if (isset($_POST['ajaxMode']) and $_POST['ajaxMode'] == "true") {
echo json_encode(array("errors" => 1, "successes" => 0));
} else {
header("Location: " . getReferralPage());
}
exit;
}
$validator = new Validator();
// Look up specified user
$selected_user_id = $validator->requiredGetVar('id');
if (!is_numeric($selected_user_id) || !userIdExists($selected_user_id)) {
addAlert("danger", "I'm sorry, the user id you specified is invalid!");
header("Location: " . getReferralPage());
exit;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<title>PHP Reports Admin - User Details</title>
<?php
开发者ID:webcoderu,项目名称:php-reports,代码行数:31,代码来源:user_details.php
注:本文中的getReferralPage函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论