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