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


PHP UserInfo::lookupUserNameByUID方法代码示例

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


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

示例1: raptor_form_get_postexam_info

 /**
  * The QA stuff
  */
 function raptor_form_get_postexam_info($form, &$form_state, $disabled, $myvalues, $supportEditMode = TRUE)
 {
     // information.
     $root = array('#type' => 'fieldset', '#title' => t('Post-Examination Notes'), '#attributes' => array('class' => array('data-entry2-area')));
     //Show all the existing notes
     $q = db_select('raptor_form_qa', 'a');
     $q->addField('a', 'rf_id');
     $q->addField('a', 'user_id');
     $q->addField('a', 'qa1_fl');
     $q->addField('a', 'qa2_fl');
     $q->addField('a', 'qa3_fl');
     $q->addField('a', 'qa4_fl');
     $q->addField('a', 'qa5_fl');
     $q->addField('a', 'qa_notes_tx');
     $q->addField('a', 'created_dt');
     $q->condition('rf_id', $myvalues['guid']);
     $rf = $q->execute();
     $myvalues = array();
     if ($rf->rowCount() > 0) {
         $sHTML = "<table id='qa-notes'>";
         $sHTML .= "<tr>";
         $sHTML .= "<th width='20%'>Datetime</th>";
         $sHTML .= "<th width='20%'>Author</th>";
         $sHTML .= "<th>QA1</th>";
         $sHTML .= "<th>QA2</th>";
         $sHTML .= "<th>QA3</th>";
         $sHTML .= "<th>QA4</th>";
         $sHTML .= "<th>QA5</th>";
         $sHTML .= "<th width='35%'>Notes</th>";
         $sHTML .= "</tr>";
         $nROW = 0;
         foreach ($rf as $row) {
             $nUID = $row->user_id;
             //$oOtherUser=UserInfo::lookupUserByUID( $nUID );
             $theName = UserInfo::lookupUserNameByUID($nUID);
             $nROW += 1;
             $sHTML .= "<tr>";
             $sHTML .= "<td width='20%'>" . $row->created_dt . "</td>";
             $sHTML .= "<td width='20%'>" . $theName . "</td>";
             //$sHTML.="<td>".$oOtherUser->name."<td>";
             $sHTML .= "<td>" . ($row->qa1_fl == 1 ? '<b>Yes</b>' : 'No') . "</td>";
             $sHTML .= "<td>" . ($row->qa2_fl == 1 ? '<b>Yes</b>' : 'No') . "</td>";
             $sHTML .= "<td>" . ($row->qa3_fl == 1 ? '<b>Yes</b>' : 'No') . "</td>";
             $sHTML .= "<td>" . ($row->qa4_fl == 1 ? '<b>Yes</b>' : 'No') . "</td>";
             $sHTML .= "<td>" . ($row->qa5_fl == 1 ? '<b>Yes</b>' : 'No') . "</td>";
             $sHTML .= "<td width='35%'>" . $row->qa_notes_tx . "</td>";
             $sHTML .= "</tr>";
         }
         $sHTML .= "</table>";
         $root['qa_notes' . $nROW] = array('#markup' => $sHTML);
     }
     $oGrp1 = $root['postexam_fieldset_col1'] = array('#type' => 'fieldset');
     $root['postexam_fieldset_col1']['postexam_qa_fieldset'] = array('#type' => 'fieldset', '#title' => t('QA Issues'));
     $root['postexam_fieldset_col1']['postexam_qa_fieldset']['postexam_qa_fl'] = array('#type' => 'checkboxes', '#options' => array('QA1' => t('QA1'), 'QA2' => t('QA2'), 'QA3' => t('QA3'), 'QA4' => t('QA4'), 'QA5' => t('QA5')));
     $oGrp2 = $root['postexam_fieldset_col2'] = array('#type' => 'fieldset');
     $root['postexam_fieldset_col2']['qa_notes_tx'] = array('#type' => 'textarea', '#title' => t('Post-Examination Notes'), '#disabled' => $disabled);
     $form['main_fieldset_bottom']['postexam_fieldset'] =& $root;
     return $form;
 }
开发者ID:rmurray1,项目名称:RAPTOR,代码行数:62,代码来源:ProtocolInfoUtility.php


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