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


PHP UserRights::getRoles方法代码示例

本文整理汇总了PHP中UserRights::getRoles方法的典型用法代码示例。如果您正苦于以下问题:PHP UserRights::getRoles方法的具体用法?PHP UserRights::getRoles怎么用?PHP UserRights::getRoles使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UserRights的用法示例。


在下文中一共展示了UserRights::getRoles方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: outputCreateReportTable

 public static function outputCreateReportTable($report_id = null)
 {
     global $lang, $Proj, $surveys_enabled, $user_rights;
     // Get report_id
     $report_id = $report_id == null ? 0 : $report_id;
     // Get report attributes
     $report = self::getReports($report_id);
     // Create array of all field validation types and their attributes
     $allValTypes = getValTypes();
     // Set counter for number of fields in report + number of limiters used
     $field_counter = $limiter_counter = 1;
     // Get all field drop-down options
     $rc_field_dropdown_options = self::getFieldDropdownOptions();
     //Form::getFieldDropdownOptions();
     $rc_field_dropdown_options_orderby = self::getFieldDropdownOptions(true);
     //Form::getFieldDropdownOptions(true);
     /*		// Get all forms as drop-down list
     		$addFormFieldsDropDownOptions = array(''=>'-- '.$lang['report_builder_101'].' --');
     		foreach ($Proj->forms as $key=>$attr) {
     			$addFormFieldsDropDownOptions[$key] = $attr['menu'];
     		}		*/
     // Get list of User Roles
     $role_dropdown_options = array();
     foreach (UserRights::getRoles() as $role_id => $attr) {
         $role_dropdown_options[$role_id] = $attr['role_name'];
     }
     // Get list of all DAGs, events, users, and records
     $dag_dropdown_options = $Proj->getGroups();
     $user_dropdown_options = User::getProjectUsernames(array(), true);
     $event_dropdown_options = $event_dropdown_options_with_all = array();
     //		if ($Proj->longitudinal) {
     foreach ($Proj->eventInfo as $this_event_id => $attr) {
         $event_dropdown_options[$this_event_id] = $attr['name_ext'];
     }
     $event_dropdown_options_with_all = array('' => $lang['dataqueries_136']) + $event_dropdown_options;
     //		}
     $user_access_radio_custom_checked = $report['user_access'] != 'ALL' ? 'checked' : '';
     $user_access_radio_all_checked = $report['user_access'] == 'ALL' ? 'checked' : '';
     if ($report['user_access'] == 'ALL') {
         // If ALL is selected, then remove custom options
         $report['user_access_users'] = $report['user_access_roles'] = $report['user_access_dags'] = array();
     }
     // Add blank values onto the end of some attributes to create empty row for user to enter a new field, filter, etc.
     $report['fields'][] = "";
     $report['limiter_fields'][] = array('field_name' => '', 'limiter_group_operator' => 'AND', 'limiter_event_id' => '', 'limiter_operator' => '', 'limiter_value' => '');
     // Instructions
     print RCView::div(array('style' => 'max-width:800px;margin:5px 0 20px;'), $lang['report_builder_118']);
     // Initialize table rows
     print "<div style='max-width:800px;'>\n\t\t\t\t <form id='create_report_form'>\n\t\t\t\t\t<table id='create_report_table' class='form_border' style='width:100%;'>";
     // Report title
     print RCView::tr(array(), RCView::td(array('class' => 'header nowrap', 'style' => 'text-align:center;padding-right:0;padding-left:0;color:#800000;height:50px;width:120px;font-size: 14px;'), $lang['report_builder_16']) . RCView::td(array('clas ... //#注:代码行过长, 已省略后续字符...
     ## USER ACCESS
     print RCView::tr(array(), RCView::td(array('class' => 'labelrc create_rprt_hdr', 'colspan' => 4, 'valign' => 'bottom', 'style' => 'padding:0;background:#fff;border-left:0;border-right:0;height:45px;'), RCView::div(array('style' => 'color:#444 ... //#注:代码行过长, 已省略后续字符...
     print RCView::tr(array(), RCView::td(array('class' => 'labelrc create_rprt_hdr', 'colspan' => 4, 'valign' => 'bottom'), RCView::div(array('style' => ''), RCView::img(array('src' => 'group_add.png', 'class' => 'imgfix')) . $lang['extres_35'])) ... //#注:代码行过长, 已省略后续字符...
     print RCView::tr(array(), RCView::td(array('class' => 'labelrc', 'colspan' => 4, 'style' => 'padding-top:6px;padding-bottom:6px;'), RCView::div(array('style' => 'float:left;'), RCView::radio(array('name' => 'user_access_radio', 'onchange' =>  ... //#注:代码行过长, 已省略后续字符...
     ## FIELDS USED IN REPORT
     print RCView::tr(array(), RCView::td(array('class' => 'labelrc create_rprt_hdr', 'colspan' => 4, 'valign' => 'bottom', 'style' => 'padding:0;background:#fff;border-left:0;border-right:0;height:45px;'), RCView::div(array('style' => 'color:#444 ... //#注:代码行过长, 已省略后续字符...
     // "Fields" section header
     print RCView::tr(array(), RCView::td(array('class' => 'labelrc create_rprt_hdr', 'colspan' => 4, 'valign' => 'bottom'), RCView::div(array('style' => 'float:left;'), RCView::img(array('id' => 'dragndrop_tooltip_trigger', 'title' => $lang['repo ... //#注:代码行过长, 已省略后续字符...
     // Fill rows of fields (only for existing reports)
     foreach ($report['fields'] as $this_field) {
         $fname = self::getFieldFromEventField($this_field);
         print RCView::tr(array('class' => 'field_row'), RCView::td(array('class' => 'labelrc ' . ($this_field != '' ? 'dragHandle' : ''), 'style' => 'width:120px;'), RCView::div(array('style' => 'line-height:20px;'), RCView::span(array('style' => ... //#注:代码行过长, 已省略后续字符...
     }
     ## ADDITIONAL FIELDS (OUTPUT DAG NAMES, OUTPUT SURVEY FIELDS, OUTPUT EVENT SCHEDULED DATES)
     print RCView::tr(array(), RCView::td(array('class' => 'labelrc create_rprt_hdr', 'colspan' => 4, 'valign' => 'bottom', 'style' => 'background:#fff;border-left:0;border-right:0;height:5px;'), ''));
     print RCView::tr(array(), RCView::td(array('class' => 'labelrc create_rprt_hdr', 'colspan' => 4, 'valign' => 'bottom'), RCView::div(array('style' => 'float:left;'), RCView::img(array('src' => 'tag_orange.png', 'class' => 'imgfix')) . $lang['r ... //#注:代码行过长, 已省略后续字符...
     if (!empty($dag_dropdown_options)) {
         $exportDagOption = "";
         $outputDagChecked = $report['output_dags'] ? 'checked' : '';
         $exportDagOption = (print RCView::tr(array(), RCView::td(array('class' => 'labelrc', 'colspan' => 4, 'valign' => 'top', 'style' => ''), RCView::span(array('style' => 'margin:0 10px 0 20px;vertical-align:top;position:relative;top:4px;float ... //#注:代码行过长, 已省略后续字符...
     }
     print RCView::tr(array(), RCView::td(array('class' => 'labelrc', 'colspan' => 4, 'valign' => 'top', 'style' => ''), RCView::div(array('style' => (!$Proj->longitudinal ? 'display:none;' : '') . 'float:left;margin-bottom:5px;'), RCView::span(ar ... //#注:代码行过长, 已省略后续字符...
     if ($surveys_enabled) {
         // TODO Copy output_survey_fields to output_survey_queue_url ?
         /*                        $outputSurveyFieldsChecked = ($report['output_survey_fields']) ? 'checked' : '';
                                 $exportSurveyFieldsOptions = RCView::checkbox(array('name'=>'output_survey_fields', $outputSurveyFieldsChecked=>$outputSurveyFieldsChecked
                                         , 'disabled' => 'disabled')) . $lang['data_export_tool_179'];
                                 print   RCView::tr(array(),
                                                 RCView::td(array('class'=>'labelrc', 'colspan'=>4, 'valign'=>'top', 'style'=>'font-weight:normal;padding:8px;'),
                                                         $exportSurveyFieldsOptions
                                                 )
                                         );*/
         $surveyurl_dropdown_options = self::getSurveyUrlDropdownOptions();
         print RCView::tr(array(), RCView::td(array('class' => 'labelrc', 'colspan' => 4, 'valign' => 'top', 'style' => ''), RCView::div(array('style' => 'float:left;margin-bottom:5px;'), RCView::span(array('style' => 'margin:0 10px 0 20px;vertica ... //#注:代码行过长, 已省略后续字符...
     }
     /*		if (!empty($dags) || $surveys_enabled) 
     		{
     			$exportDagOption = "";
     			$exportSurveyFieldsOptions = "";
     			if (!empty($dags)) {
     				$outputDagChecked = ($report['output_dags']) ? 'checked' : '';
     				$exportDagOption = RCView::checkbox(array('name'=>'output_dags', $outputDagChecked=>$outputDagChecked)) . 
     								   $lang['data_export_tool_178'];
     			}
     			if ($surveys_enabled) {
     				$outputSurveyFieldsChecked = ($report['output_survey_fields']) ? 'checked' : '';
     				$exportSurveyFieldsOptions = RCView::checkbox(array('name'=>'output_survey_fields', $outputSurveyFieldsChecked=>$outputSurveyFieldsChecked
                                             , 'disabled' => 'disabled')) . 
     											 $lang['data_export_tool_179'];
//.........这里部分代码省略.........
开发者ID:lsgs,项目名称:redcap-longitudinal-reports,代码行数:101,代码来源:LongitudinalReports.php


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