本文整理匯總了PHP中UserUtils::add_staff_to_module方法的典型用法代碼示例。如果您正苦於以下問題:PHP UserUtils::add_staff_to_module方法的具體用法?PHP UserUtils::add_staff_to_module怎麽用?PHP UserUtils::add_staff_to_module使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類UserUtils
的用法示例。
在下文中一共展示了UserUtils::add_staff_to_module方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: check_var
* @author Simon Wilkinson
* @version 1.0
* @copyright Copyright (c) 2014 The University of Nottingham
* @package
*/
require_once '../include/admin_auth.inc';
require_once '../include/errors.inc';
require_once '../classes/userutils.class.php';
$userID = check_var('userID', 'REQUEST', true, false, true);
if (isset($_POST['submit'])) {
// Clear the team of all members.
UserUtils::clear_staff_modules_by_userID($_POST['userID'], $mysqli);
// Insert a record for each team member.
for ($i = 0; $i < $_POST['module_no']; $i++) {
if (isset($_POST["mod{$i}"]) and $_POST["mod{$i}"] != '') {
UserUtils::add_staff_to_module($userID, $_POST["mod{$i}"], $mysqli);
}
}
?>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="content-type" content="text/html;charset=<?php
echo $configObject->get('cfg_page_charset');
?>
" />
<title><?php
echo $string['manageteams'] . ' ' . $configObject->get('cfg_install_type');
?>
</title>
<script type="text/javascript" src="../js/jquery-1.11.1.min.js"></script>
示例2: add_staff_to_module
/**
* add current user to module as staff
*
* @param $idMod
*/
public function add_staff_to_module($idMod)
{
$return = UserUtils::add_staff_to_module($this->get_user_ID(), $idMod, $this->db);
$this->load_staff_modules();
return $return;
}
示例3: sprintf
$msg = sprintf($string['furtherassistance'], $configObject->get('support_email'), $configObject->get('support_email'));
$notice->display_notice_and_exit($mysqli, $string['pagenotfound'], $msg, $string['pagenotfound'], '../artwork/page_not_found.png', '#C00000', true, true);
}
if (!$userObject->has_role(array('SysAdmin', 'Admin'))) {
if ($module_details['add_team_members'] == 0) {
$msg = sprintf($string['furtherassistance'], $configObject->get('support_email'), $configObject->get('support_email'));
$notice->display_notice_and_exit($mysqli, $string['pagenotfound'], $msg, $string['pagenotfound'], '../artwork/page_not_found.png', '#C00000', true, true);
}
}
if (isset($_POST['submit'])) {
// Clear the team of all members.
UserUtils::clear_staff_modules_by_moduleID($moduleID, $mysqli);
// Insert a record for each team member.
for ($i = 0; $i < $_POST['staff_no']; $i++) {
if (isset($_POST["staff{$i}"]) and $_POST["staff{$i}"] != '') {
UserUtils::add_staff_to_module($_POST["staff{$i}"], $moduleID, $mysqli);
}
}
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=<?php
echo $configObject->get('cfg_page_charset');
?>
" />
<title><?php
echo $string['teammembers'] . ' ' . $module_details['moduleid'];
?>
</title>
<script type="text/javascript" src="../js/jquery-1.11.1.min.js"></script>