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


PHP Helper::convertMySQL2NHS方法代码示例

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


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

示例1: array

    ?>
 column">
			<label for="<?php 
    echo CHtml::modelName($element) . '_' . $field . '_0';
    ?>
">
				<?php 
    echo CHtml::encode($element->getAttributeLabel($field));
    ?>
:
			</label>
		</div>
		<div class="large-<?php 
    echo $layoutColumns['field'];
    ?>
 column end">
<?php 
}
?>

	<?php 
$this->widget('zii.widgets.jui.CJuiDatePicker', array('name' => $name, 'id' => CHtml::modelName($element) . '_' . $field . '_0', 'options' => array_merge($options, array('showAnim' => 'fold', 'dateFormat' => Helper::NHS_DATE_FORMAT_JS)), 'value' => preg_match('/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/', $value) ? Helper::convertMySQL2NHS($value) : $value, 'htmlOptions' => $htmlOptions));
?>

<?php 
if (!@$htmlOptions['nowrapper']) {
    ?>
		</div>
	</div>
<?php 
}
开发者ID:openeyes,项目名称:openeyes,代码行数:31,代码来源:DatePicker.php

示例2: foreach

?>
</div></div>
			<div class="large-10 column end"><div class="data-value"><?php 
echo Yii::app()->format->Ntext($element->message_text);
?>
</div></div>
		</div>
        <?php 
echo $element->comments ? '<hr />' : '';
?>
        <?php 
foreach ($element->comments as $comment) {
    ?>
            <div class="row data-row comment">
                <div class="large-2 column"><div class="data-label">@<?php 
    echo Helper::convertMySQL2NHS($comment->created_date);
    ?>
</div></div>
                <div class="large-10 column end"><div class="data-value"><?php 
    echo Yii::app()->format->Ntext($comment->comment_text);
    ?>
</div></div>
            </div>
        <?php 
}
?>
        <?php 
if ($this->canComment()) {
    ?>
            <div class="<?php 
    echo $this->show_comment_form ? '' : 'hidden';
开发者ID:openeyes,项目名称:openeyes,代码行数:31,代码来源:view_Element_OphCoMessaging_Message.php

示例3: date

</a></li>
							<?php 
            }
            ?>
						</ul>
					</div>
				</div>
			</div>
		<?php 
        }
        ?>
		<div class="metadata">
			<span class="info">
				Application sent by <span class="user"><?php 
        echo $email->user->fullname;
        ?>
</span> on <?php 
        echo Helper::convertMySQL2NHS($email->created_date);
        ?>
 at <?php 
        echo date('H:i', strtotime($email->created_date));
        ?>
			</span>
		</div>
	<?php 
    }
} else {
    ?>
	<div class="data-value">N/A</div>
<?php 
}
开发者ID:openeyes,项目名称:openeyes,代码行数:31,代码来源:emails_side.php

示例4: appendInjectionValues

 protected function appendInjectionValues(&$record, $patient_id, $left_treatment_id = null, $right_treatment_id = null)
 {
     $last_columns = array('last_injection_site', 'last_injection_date', 'last_injection_number');
     if (@$_GET['last_injection']) {
         foreach (array('left', 'right') as $side) {
             #initialise columns
             foreach ($last_columns as $col) {
                 $record[$side . '_' . $col] = 'N/A';
             }
             if ($treatment_id = ${$side . '_treatment_id'}) {
                 $treatment = $this->getTreatment($treatment_id);
                 if (!$treatment || !$treatment->drug_id) {
                     continue;
                 }
                 $command = Yii::app()->db->createCommand()->select('treat.' . $side . '_number as last_injection_number, treat.created_date as last_injection_date, site.name as last_injection_site')->from('et_ophtrintravitinjection_treatment treat')->join('et_ophtrintravitinjection_site insite', 'insite.event_id = treat.event_id')->join('site', 'insite.site_id = site.id')->join('event e', 'e.id = treat.event_id')->join('episode ep', 'e.episode_id = ep.id')->where('e.deleted = 0 and ep.deleted = 0 and ep.patient_id = :patient_id and treat.' . $side . '_drug_id = :drug_id', array(':patient_id' => $patient_id, ':drug_id' => $treatment->drug_id))->order('treat.created_date desc')->limit(1);
                 $res = $command->queryRow();
                 if ($res) {
                     foreach ($last_columns as $col) {
                         $record[$side . '_' . $col] = Helper::convertMySQL2NHS($res[$col], $res[$col]);
                     }
                 }
             }
         }
     }
     if (@$_GET['last_injection']) {
         foreach (array('left', 'right') as $side) {
             $record[$side . '_first_injection_date'] = 'N/A';
             if ($treatment_id = ${$side . '_treatment_id'}) {
                 $treatment = $this->getTreatment($treatment_id);
                 if (!$treatment || !$treatment->drug_id) {
                     continue;
                 }
                 $command = Yii::app()->db->createCommand()->select('treat.created_date as first_injection_date')->from('et_ophtrintravitinjection_treatment treat')->join('event e', 'e.id = treat.event_id')->join('episode ep', 'e.episode_id = ep.id')->where('e.deleted = 0 and ep.deleted = 0 and ep.patient_id = :patient_id and treat.' . $side . '_drug_id = :drug_id', array(':patient_id' => $patient_id, ':drug_id' => $treatment->drug_id))->order('treat.created_date asc')->limit(1);
                 $res = $command->queryRow();
                 if ($res) {
                     $record[$side . '_first_injection_date'] = Helper::convertMySQL2NHS($res['first_injection_date']);
                 }
             }
         }
     }
 }
开发者ID:openeyes,项目名称:openeyes,代码行数:41,代码来源:ReportController.php

示例5: NHSDate

 /**
  * Returns a date field in NHS format
  *
  * @param string $attribute
  * @param string $empty_string - what to return if not able to convert
  * @return string
  */
 public function NHSDate($attribute, $empty_string = '-')
 {
     if ($value = $this->getAttribute($attribute)) {
         return Helper::convertMySQL2NHS($value, $empty_string);
     }
 }
开发者ID:code-4-england,项目名称:OpenEyes,代码行数:13,代码来源:BaseActiveRecord.php

示例6:

		</div>
	</div>

	<div class="row data-row">
		<div class="large-6 column">
			<div class="data-label">
				<?php 
echo $pastintervention->getAttributeLabel('end_date');
?>
:
			</div>
		</div>
		<div class="large-6 column">
			<div class="data-value">
				<?php 
echo Helper::convertMySQL2NHS($pastintervention->end_date);
?>
			</div>
		</div>
	</div>

	<div class="row data-row">
		<div class="large-6 column">
			<div class="data-label">
				<?php 
echo $pastintervention->getAttributeLabel('treatment_id');
?>
:
			</div>
		</div>
		<div class="large-6 column">
开发者ID:openeyes,项目名称:openeyes,代码行数:31,代码来源:view_OphCoTherapyapplication_ExceptionalCircumstances_PastIntervention.php

示例7: actionGetSessionTimestamps

 /**
  * Ajax action to retrieve the modification data for a given session.
  */
 public function actionGetSessionTimestamps()
 {
     if (isset($_POST['session_id'])) {
         if ($session = Session::model()->findByPk($_POST['session_id'])) {
             $ex = explode(' ', $session->last_modified_date);
             $last_modified_date = $ex[0];
             $last_modified_time = $ex[1];
             $user = User::model()->findByPk($session->last_modified_user_id);
             echo 'Modified on ' . Helper::convertMySQL2NHS($last_modified_date) . ' at ' . $last_modified_time . ' by ' . $user->first_name . ' ' . $user->last_name;
         }
     }
 }
开发者ID:openeyes,项目名称:openeyes,代码行数:15,代码来源:TheatreDiaryController.php

示例8: array

    if ($consultant = $manager->getClinicalConsultant($data)) {
        return $consultant->getFullNameAndTitle();
    } else {
        return '-';
    }
}), array('id' => 'issue_status', 'header' => $dp->getSort()->link('issue_status', 'Status', array('class' => 'sort-link')), 'value' => function ($data) {
    if ($data->event->info) {
        return $data->event->info;
    } else {
        // TODO: possibly don't need this, or this method should handle the above conditional
        return $data->getIssueStatusForDisplay();
    }
}), array('id' => 'issue_date', 'header' => $dp->getSort()->link('issue_date', 'Issue Date', array('class' => 'sort-link')), 'value' => function ($data) {
    $date = $data->getIssueDateForDisplay();
    if ($date) {
        return Helper::convertMySQL2NHS($date);
    }
    return '-';
}), array('id' => 'actions', 'header' => 'Actions', 'class' => 'CButtonColumn', 'htmlOptions' => array('class' => 'left'), 'template' => '<span style="white-space: nowrap;">{view} {edit}</span>', 'viewButtonImageUrl' => false, 'buttons' => array('view' => array('options' => array('title' => 'View CVI', 'class' => ''), 'url' => 'Yii::app()->createURL("/OphCoCvi/Default/view/", array(
                        "id" => $data->event_id))', 'label' => '<button class="secondary small">View</button>'), 'edit' => array('options' => array('title' => 'Add a comment'), 'url' => 'Yii::app()->createURL("/OphCoCvi/Default/update/", array(
                                        "id" => $data->event_id))', 'label' => '<button class="secondary small">Edit</button>', 'visible' => function ($row, $data) {
    return $data->is_draft;
}))));
?>
<h1 class="badge">CVI List</h1>
<div class="box content">
    <?php 
$this->renderPartial('list_filter', array('list_filter' => $list_filter));
?>

    <div class="row">
开发者ID:openeyes,项目名称:openeyes,代码行数:31,代码来源:list.php

示例9: substr

                        <form>
                            <h4>Session Comments</h4>
                            <textarea rows="2" name="comments_<?php 
echo $session->id;
?>
"
                                      class="comments hidden diaryEditMode"
                                      data-id="<?php 
echo $session->id;
?>
"><?php 
echo CHtml::encode($session['comments']);
?>
</textarea>
                            <?php 
$title = 'Modified on ' . Helper::convertMySQL2NHS($session->last_modified_date) . ' at ' . substr($session->last_modified_date, 13, 5) . ' by ' . $session->session_usermodified->fullName;
?>
                            <p
                                class="comments diaryViewMode"
                                data-id="<?php 
echo $session->id;
?>
"
                                title="<?php 
echo $title;
?>
">
                                <?php 
echo CHtml::encode($session->comments);
?>
                            </p>
开发者ID:openeyes,项目名称:openeyes,代码行数:31,代码来源:_session.php

示例10: foreach

							<div class="field-info">
                                Current CVI are as follows:
                                <?php 
if ($current_cvis) {
    $manager = $this->getManager();
    ?>
									<ul>
									<?php 
    foreach ($current_cvis as $cvi_event) {
        ?>
										<li><a href='<?php 
        echo $manager->getEventViewUri($cvi_event);
        ?>
'>
												<?php 
        echo Helper::convertMySQL2NHS($cvi_event->event_date) . ': ' . $manager->getDisplayStatusForEvent($cvi_event);
        ?>
</a>
										</li>
									<?php 
    }
    ?>
									</ul>
								<?php 
}
?>
							</div>
						</div>
                        <div class="field-row">
							<div class="field-info">
                                <a href="<?php 
开发者ID:openeyes,项目名称:openeyes,代码行数:31,代码来源:select_event.php

示例11: getStructuredDataForPrint

 /**
  * Returns an associative array of the data values for printing
  */
 public function getStructuredDataForPrint()
 {
     $result = array();
     $result['patientOrRepresentative'] = array(array($this->is_patient ? 'X' : '', ''), array($this->is_patient ? '' : 'X', ''));
     $result['signatureDate'] = \Helper::convertMySQL2NHS($this->signature_date);
     $result['representativeName'] = $this->is_patient ? '' : $this->representative_name;
     return $result;
 }
开发者ID:openeyes,项目名称:openeyes,代码行数:11,代码来源:Element_OphCoCvi_ConsentSignature.php

示例12: array

 column">
	<table class="blank">

	<thead>
	<tr>
		<th>Date</th>
		<th>Time (HH:MM)</th>
	</tr>
	</thead>
	<tbody class="readings-right">
	<tr>
		<td>
			<?php 
    $value = @$this->form_data[$this->form_name]['appointment_date'];
    $this->widget('zii.widgets.jui.CJuiDatePicker', array('name' => $this->form_name . '[appointment_date]', 'id' => $this->form_name . '_appointment_date', 'options' => array('showAnim' => 'fold', 'dateFormat' => Helper::NHS_DATE_FORMAT_JS, 'minDate' => 'new Date()'), 'value' => preg_match('/^[0
				-9]{4}-[0-9]{2}-[0-9]{2}$/', $value) ? Helper::convertMySQL2NHS($value) : $value, 'htmlOptions' => null));
    ?>
		</td>
		<td>
			<?php 
    echo CHtml::textField($this->form_name . '[appointment_time]', @$this->form_data[$this->form_name]['appointment_time']);
    ?>
		</td>

	</tr>
	</tbody>
</table>
		</div>

</fieldset>
<?php 
开发者ID:openeyes,项目名称:openeyes,代码行数:31,代码来源:TicketAssignAppointment.php


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