本文整理汇总了PHP中REDCap::allowProjects方法的典型用法代码示例。如果您正苦于以下问题:PHP REDCap::allowProjects方法的具体用法?PHP REDCap::allowProjects怎么用?PHP REDCap::allowProjects使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类REDCap
的用法示例。
在下文中一共展示了REDCap::allowProjects方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dirname
$base_path = dirname(dirname(dirname(dirname(__FILE__))));
require_once $base_path . "/redcap_connect.php";
require_once $base_path . '/plugins/includes/functions.php';
require_once $base_path . '/plugins/includes/timeline_functions.php';
require_once APP_PATH_DOCROOT . '/Config/init_project.php';
/**
* variables
*/
$subjid = $_GET['record'];
$project_id = !isset($project_id) ? $_GET['pid'] : $project_id;
$eventAtts = array();
/**
* restrict access to one or more pids
*/
$allowed_pids = array('26');
REDCap::allowProjects($allowed_pids);
/**
* set header so browser knows it's JSON
*/
header('Content-Type: application/json; charset=utf-8');
/**
* adverse events
*/
$fields = array('ae_aestdtc', 'ae_aeterm', 'ae_oth_aeterm', 'ae_aetoxgr', 'ae_aesev', 'trans_cmoccur', 'ae_aecontrt', 'ae_suppae_aexacerb', 'ae_aeser', 'ae_aesdth', 'ae_aeslife', 'ae_aeshosp', 'ae_aesdisab', 'ae_aescong', 'ae_aesmie', 'ae_suppae_aesosp', 'ae_aerel', 'ae_suppae_aeregmod', 'ifn_suppae_ifnacnd', 'rib_suppae_ribacnd', 'daa_suppae_daaacnd', 'ae_aeout', 'ae_aeendtc');
$ae_data = REDCap::getData('array', $subjid, $fields);
foreach ($ae_data AS $subject) {
foreach ($subject AS $event_id => $event) {
$desc_array = array();
if ($event['ae_aeser'] == 'Y') {
$color = 'red';
} else {
示例2: array
$debug = false;
$subjects = ''; // '' = ALL
$timer = array();
$timer['start'] = microtime(true);
/**
* includes
*/
$base_path = dirname(dirname(dirname(__FILE__)));
require_once $base_path . "/redcap_connect.php";
require_once $base_path . '/plugins/includes/functions.php';
require_once APP_PATH_DOCROOT . '/Config/init_project.php';
require_once APP_PATH_DOCROOT . '/ProjectGeneral/header.php';
/**
* restrict use of this plugin to the STEADFAST Labs project
*/
REDCap::allowProjects('26');
/**
* instantiate system-level variables
*/
global $Proj;
$first_event = $Proj->firstEventId;
$site_array = array();
$stream_array = array();
$dm_usubjid_array = array();
/**
* if we have a numeric file id in the query string...
*/
if (isset($_GET['id']) && is_numeric($_GET['id'])) {
/**
* cast it to an int so we can use it to retrieve the file from the repository
*/