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


PHP Time::getLocalTime方法代码示例

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


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

示例1: logEmergency

 public function logEmergency()
 {
     $data['pid'] = $this->pid;
     $data['eid'] = $this->eid;
     $data['uid'] = $_SESSION['user']['id'];
     $data['date_created'] = Time::getLocalTime();
     $this->db->setSQL($this->db->sqlBind($data, 'emergencies', 'I'));
     $this->db->execLog();
     $this->emergencyId = $this->db->lastInsertId;
 }
开发者ID:igez,项目名称:gaiaehr,代码行数:10,代码来源:Emergency.php

示例2: execLog

 /**
  * @brief       Execute Log.
  * @details     This method is used to INSERT, UPDATE, DELETE, and ALTER the
  * database.
  *              with a event log injection.
  *
  * @author      Gino Rivera (Certun) <grivera@certun.com>
  * @version     Vega 1.0
  *
  * @note        The Log Injection is automatic It tries to detect an insert,
  * delete, alter and log the event
  *
  * @see         User::addUser() for Add example.
  *
  * @return      array Connection error info if any
  */
 function execLog()
 {
     /**
      * Execute the sql statement
      */
     self::$__conn->query($this->sql_statement);
     if (stristr($this->sql_statement, 'INSERT') || stristr($this->sql_statement, 'DELETE') || stristr($this->sql_statement, 'UPDATE') || stristr($this->sql_statement, 'LOAD') || stristr($this->sql_statement, 'ALTER')) {
         $this->lastInsertId = self::$__conn->lastInsertId();
         $eventLog = "UNDEFINED";
         if (stristr($this->sql_statement, 'INSERT')) {
             $eventLog = 'INSERT';
         }
         if (stristr($this->sql_statement, 'DELETE')) {
             $eventLog = 'DELETE';
         }
         if (stristr($this->sql_statement, 'UPDATE')) {
             $eventLog = 'UPDATE';
         }
         if (stristr($this->sql_statement, 'ALTER')) {
             $eventLog = 'ALTER';
         }
         if (stristr($this->sql_statement, 'LOAD')) {
             $eventLog = 'LOAD';
         }
         /**
          * Using the same, internal functions.
          */
         $data['date'] = Time::getLocalTime('Y-m-d H:i:s');
         $data['uid'] = isset($_SESSION['user']) && isset($_SESSION['user']['id']) ? $_SESSION['user']['id'] : '0';
         $data['fid'] = $_SESSION['user']['facility'];
         $data['event'] = $eventLog;
         $data['sql_string'] = $this->sql_statement;
         $data['checksum'] = crc32($this->sql_statement);
         $data['ip'] = $_SERVER['REMOTE_ADDR'];
         $sqlStatement = $this->sqlBind($data, 'audit_transaction_log', 'I');
         $this->setSQL($sqlStatement);
         $this->execOnly(false);
     }
     return self::$__conn->errorInfo();
 }
开发者ID:igez,项目名称:gaiaehr,代码行数:56,代码来源:MatchaHelper.php

示例3: replyMessage

 public function replyMessage(stdClass $params)
 {
     if ($this->Messages == null) {
         $this->Messages = MatchaModel::setSenchaModel('App.model.messages.Messages');
     }
     $row = new stdClass();
     $t = Time::getLocalTime('l jS \\of F Y h:i:s A');
     $row->body = 'On ' . $t . ' - <span style="font-weight:bold">' . $_SESSION['user']['name'] . '</span> - Wrote:<br><br>' . $params->body . '<br><br>';
     $row->from_id = $_SESSION['user']['id'];
     $row->to_id = $params->to_id;
     $row->message_status = $params->message_status;
     $row->subject = $params->subject;
     $row->note_type = $params->note_type;
     $row->to_deleted = 0;
     $row->from_deleted = 0;
     $row->id = $params->id;
     $this->Messages->save($row);
 }
开发者ID:songhongji,项目名称:gaiaehr,代码行数:18,代码来源:Messages.php

示例4: execEvent

 /**
  * @brief       Execute Event
  * @details     This method is used to Inject directly to the event log
  *
  * @author      Gino Rivera (Certun) <grivera@certun.com>
  * @version     Vega 1.0
  *
  * @param       string $eventLog event data to log
  * @return      array Connection error info if any
  */
 function execEvent($eventLog)
 {
     $data['date'] = Time::getLocalTime('Y-m-d H:i:s');
     $data['event'] = $eventLog;
     $data['comments'] = $this->sql_statement;
     $data['user'] = $_SESSION['user']['name'];
     $data['patient_id'] = $_SESSION['patient']['id'];
     $sqlStatement = $this->sqlBind($data, 'log', 'I');
     $this->setSQL($sqlStatement);
     $this->fetchRecords();
     return self::$__conn->errorInfo();
 }
开发者ID:nagyist,项目名称:tutus,代码行数:22,代码来源:MatchaHelper.php

示例5: replyMessage

 /**
  * @param stdClass $params
  * @return array|stdClass
  */
 public function replyMessage(stdClass $params)
 {
     $t = Time::getLocalTime('l jS \\of F Y h:i:s A');
     $row['body'] = 'On ' . $t . ' - <spam style="font-weight:bold">' . $_SESSION['user']['name'] . '</spam> - Wrote:<br><br>' . $params->body . '<br><br>';
     $row['from_id'] = $_SESSION['user']['id'];
     $row['to_id'] = $params->to_id;
     $row['message_status'] = $params->message_status;
     $row['subject'] = $params->subject;
     $row['note_type'] = $params->note_type;
     $row['to_deleted'] = 0;
     $row['from_deleted'] = 0;
     $sql = $this->sqlBind($row, 'messages', 'U', array('id' => $params->id));
     $this->setSQL($sql);
     $ret = $this->execLog();
     if ($ret[2]) {
         return array('success' => false);
     } else {
         return array('success' => true);
     }
 }
开发者ID:nhom5UET,项目名称:tichhophethong,代码行数:24,代码来源:Messages.php

示例6: updateTrackerTable

 private function updateTrackerTable($name, $codeType, $revision, $version, $date, $file_checksum = '')
 {
     $data = array();
     $data['code_type'] = $codeType;
     $data['imported_date'] = Time::getLocalTime();
     $data['revision_name'] = $name;
     $data['revision_date'] = $date;
     $data['revision_number'] = $revision;
     $data['revision_version'] = $version;
     $data['file_checksum'] = $file_checksum;
     //        print_r($data);
     $this->db->setSQL($this->db->sqlBind($data, 'standardized_tables_track', 'I'));
     $this->db->execLog();
     return true;
 }
开发者ID:nhom5UET,项目名称:tichhophethong,代码行数:15,代码来源:ExternalDataUpdate.php

示例7: unSetPatientZoneByPatientZoneId

 public function unSetPatientZoneByPatientZoneId($PatientZoneId)
 {
     $data['time_out'] = Time::getLocalTime();
     $this->db->setSQL($this->db->sqlBind($data, 'patient_zone', 'U', array('id' => $PatientZoneId)));
     $this->db->execLog();
 }
开发者ID:nhom5UET,项目名称:tichhophethong,代码行数:6,代码来源:FloorPlans.php

示例8: getPatientFutureEventsByPid

 public function getPatientFutureEventsByPid($pid)
 {
     $date = Time::getLocalTime();
     $tomorrow = date('Y-m-d 0000:00:00', strtotime($date . ' + 1 days'));
     $this->db->setSQL("SELECT * FROM calendar_events WHERE patient_id = '{$pid}' AND start >= '{$tomorrow}'");
     return $this->db->fetchRecords(PDO::FETCH_ASSOC);
 }
开发者ID:nhom5UET,项目名称:tichhophethong,代码行数:7,代码来源:Calendar.php

示例9: session_name

    session_name('Untusoft');
    session_start();
    session_cache_limiter('private');
    define('_UntuEXEC', 1);
}
include_once '../registry.php';
include_once '../sites/default/conf.php';
include_once ROOT . '/classes/MatchaHelper.php';
$db = new MatchaHelper();
//echo MatchaUtils::Carbon()->now();
//$firephp = FirePHP::getInstance(true);
//$var = array('i'=>10, 'j'=>20);
//$firephp->log($var, 'Iterators');
// Enable the audit feature in Matcha::connect
MatchaAudit::audit(array(array('name' => 'eid', 'type' => 'int'), array('name' => 'date', 'type' => 'date'), array('name' => 'user', 'type' => 'string'), array('name' => 'user_id', 'type' => 'int'), array('name' => 'event', 'type' => 'string'), array('name' => 'patient_id', 'type' => 'int'), array('name' => 'facility_id', 'type' => 'int')), NULL, 'id', 'encounter_history');
MatchaAudit::$eventLogData = array('date' => Time::getLocalTime('Y-m-d H:i:s'), 'eid' => 1, 'user' => 'Mr. Gino Rivera', 'facility_id' => 2, 'patient_id' => 0, 'event' => 'Immunisation View');
MatchaAudit::auditSaveLog();
//$data = (object)array(
//    'name' => 'Test',
//    'active' => true,
//    'phone' => '787-360-3150',
//    'fax' => '787-360-3150',
//    'street' => 'Meaow'
//);
//$Facilities->save($data);
//$array = array(
//    'model' => "App.model.patient.Patient",
//    'field' => array(
//        'name' => 'test',
//        'type' => 'string'
//    )
开发者ID:nagyist,项目名称:tutus,代码行数:31,代码来源:dbHelper_test.php

示例10: checkInPatient

 private function checkInPatient($params)
 {
     $data['pid'] = $params->pid;
     $data['uid'] = $_SESSION['user']['id'];
     $data['time_in'] = Time::getLocalTime();
     $data['area_id'] = 1;
     $this->db->setSQL($this->db->sqlBind($data, 'patient_pools', 'I'));
     $this->db->execLog();
     $data = array();
     $data['parent_id'] = $this->db->lastInsertId;
     $this->db->setSQL($this->db->sqlBind($data, 'patient_pools', 'U', array('id' => $this->db->lastInsertId)));
     $this->db->execLog();
 }
开发者ID:nhom5UET,项目名称:tichhophethong,代码行数:13,代码来源:PoolArea.php

示例11: patientChartInByUserId

 public function patientChartInByUserId($uid)
 {
     $chart_in_time = Time::getLocalTime();
     $this->db->setSQL("UPDATE patient_out_chart SET chart_in_time = '{$chart_in_time}' WHERE uid = {$uid} AND chart_in_time IS NULL");
     $this->db->execLog();
 }
开发者ID:nhom5UET,项目名称:tichhophethong,代码行数:6,代码来源:Patient.php

示例12: createEncounter

 /**
  * @param stdClass $params
  * @return array
  *  Naming: "createPatientEncounters"
  */
 public function createEncounter(stdClass $params)
 {
     $params->pid = isset($params->pid) && is_numeric($params->pid) ? $params->pid : $_SESSION['patient']['pid'];
     $params->open_uid = $_SESSION['user']['id'];
     $data = get_object_vars($params);
     foreach ($data as $key => $val) {
         if ($val == '') {
             unset($data[$key]);
         }
     }
     $data['service_date'] = $this->parseDate($data['service_date']);
     $sql = $this->db->sqlBind($data, 'encounters', 'I');
     $this->db->setSQL($sql);
     $this->db->execLog();
     $eid = $this->db->lastInsertId;
     $default = array('pid' => $params->pid, 'eid' => $eid, 'uid' => $params->open_uid, 'date' => Time::getLocalTime());
     $this->db->setSQL($this->db->sqlBind($default, 'encounter_review_of_systems', 'I'));
     $this->db->execOnly();
     $this->db->setSQL($this->db->sqlBind($default, 'encounter_review_of_systems_check', 'I'));
     $this->db->execOnly();
     $this->db->setSQL($this->db->sqlBind($default, 'encounter_soap', 'I'));
     $this->db->execOnly();
     $this->db->setSQL($this->db->sqlBind($default, 'encounter_dictation', 'I'));
     $this->db->execOnly();
     $this->db->setSQL($this->db->sqlBind($default, 'encounter_hcfa_1500_options', 'I'));
     $this->db->execOnly();
     $params->eid = intval($eid);
     $this->poolArea->updateCurrentPatientPoolAreaByPid(array('eid' => $params->eid, 'priority' => $params->priority), $params->pid);
     $this->setEid($params->eid);
     $this->addEncounterHistoryEvent('New Encounter Created');
     return array('success' => true, 'encounter' => $params);
 }
开发者ID:nhom5UET,项目名称:tichhophethong,代码行数:37,代码来源:Encounter.php


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