当前位置: 首页>>代码示例>>PHP>>正文


PHP REDCap::allowProjects方法代码示例

本文整理汇总了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 {
开发者ID:hcv-target,项目名称:redcap_plugins,代码行数:31,代码来源:ae_json.php

示例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
	 */
开发者ID:hcv-target,项目名称:redcap_plugins,代码行数:31,代码来源:process_samples.php


注:本文中的REDCap::allowProjects方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。