• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP formatDate2STD函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中formatDate2STD函数的典型用法代码示例。如果您正苦于以下问题:PHP formatDate2STD函数的具体用法?PHP formatDate2STD怎么用?PHP formatDate2STD使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: WHERE

     $and_sql .= ' AND o.dept_nr=' . $dept_nr;
 }
 $sql2 = "{$from_sql} WHERE o.encounter_nr {$sql_LIKE} '{$matchcode}%' {$and_sql}";
 $sql = $select_sql . $sql2 . "\tORDER BY {$prefx}.{$oitem} {$odir}";
 //if(!isset($all_depts)||$all_depts=='false') $sql.=' AND o.dept_nr='.$dept_nr;
 if ($ergebnis = $db->SelectLimit($sql, $pagen->MaxCount(), $pgx)) {
     if (!($rows = $ergebnis->RecordCount())) {
         // if not found find similar
         $sql2 = " {$from_sql} WHERE ( ";
         # Try if numeric
         if (is_numeric($matchcode)) {
             $sql2 .= " o.nr {$sql_LIKE} '" . trim($matchcode) . "%'\n\t\t\t\t\t\t\t\t\t\t\tOR o.encounter_nr {$sql_LIKE} '" . trim($matchcode) . "%'\n\t\t\t\t\t\t\t\t\t\t\tOR ";
         }
         $sql2 .= "p.name_last {$sql_LIKE} '" . trim($matchcode) . "%'\n\t\t\t\t\t\t\t\t\t\t\tOR p.name_first {$sql_LIKE} '" . trim($matchcode) . "%'";
         # Try DOB
         $DOB = formatDate2STD($matchcode, $date_format);
         if (!empty($DOB)) {
             $sql2 .= " OR p.date_birth = '{$DOB}'";
         }
         $sql2 .= ") {$and_sql}";
         //if(!isset($all_depts)||$all_depts=='false') $sql.=' AND o.dept_nr='.$dept_nr;
         //echo $all_depts;
         $sql2 .= "\tORDER BY {$prefx}.{$oitem} {$odir}";
         $sql = $select_sql . $sql2;
         //echo $sql;
         if ($ergebnis = $db->SelectLimit($sql, $pagen->MaxCount(), $pgx)) {
             $rows = $ergebnis->RecordCount();
         }
     }
 } else {
     echo "{$LDDbNoRead}<p> {$sql} <p>";
开发者ID:patmark,项目名称:care2x-tz,代码行数:31,代码来源:op-doku-search.php


示例2: display


//.........这里部分代码省略.........
                }
                if (trim($date_birth) == '') {
                    $errordatebirth = 1;
                    $error++;
                }
                if (mktime(0, 0, 0, substr($date_birth, 3, 2), substr($date_birth, 0, 2), substr($date_birth, 6, 4)) > time()) {
                    $errordatebirth = 1;
                    $error++;
                }
                //if (is_array($tribe_array) && !$no_tribe) {$errormaiden=1; $error++;}
                //if (is_array($town_array)) {$errortown=1; $error++;}
                //if (!$citizenship) { $errortown=1; $error++;}
                if ($sex == '') {
                    $errorsex = 1;
                    $error++;
                }
            }
            # If the validation produced no error, save the data
            if (!$error) {
                # Save the old filename for testing
                $old_fn = $photo_filename;
                # Create image object
                include_once $root_path . 'include/care_api_classes/class_image.php';
                $img_obj =& new Image();
                # Check the uploaded image file if exists and valid
                if ($img_obj->isValidUploadedImage($_FILES['photo_filename'])) {
                    $valid_image = TRUE;
                    # Get the file extension
                    $picext = $img_obj->UploadedImageMimeType();
                }
                //addr_citytown_nr='$addr_citytown_nr',
                if ($update) {
                    //echo formatDate2STD($geburtsdatum,$date_format);
                    $sql = "UPDATE {$dbtable} SET\n\t\t\t\t\t\t\t title='{$title}',\n\t\t\t\t\t\t\t selian_pid='{$selian_pid}',\n\t\t\t\t\t\t\t name_last='{$name_last}',\n\t\t\t\t\t\t\t name_first='{$name_first}',\n\t\t\t\t\t\t\t name_2='{$name_2}',\n\t\t\t\t\t\t\t name_3='{$name_3}',\n\t\t\t\t\t\t\t name_middle='{$name_middle}',\n\t\t\t\t\t\t\t name_maiden='{$name_maiden}',\n\t\t\t\t\t\t\t name_others='{$name_others}',\n\t\t\t\t\t\t\t date_birth='" . formatDate2STD($date_birth, $date_format) . "',\n\t\t\t\t\t\t\t blood_group='" . trim($blood_group) . "',\n\t\t\t\t\t\t\t rh='" . trim($rh) . "',\n\t\t\t\t\t\t\t sex='{$sex}',\n\t\t\t\t\t\t\t addr_str='{$addr_str}',\n\t\t\t\t\t\t\t addr_str_nr='{$addr_str_nr}',\n\t\t\t\t\t\t\t addr_zip='{$addr_zip}',\n\t\t\t\t\t\t\t addr_citytown_nr='{$addr_citytown_nr}',\n\t\t\t\t\t\t\t addr_citytown_name='{$addr_citytown_name}',\n\t\t\t\t\t\t\t phone_1_nr='{$phone_1_nr}',\n\t\t\t\t\t\t\t phone_2_nr='{$phone_2_nr}',\n\t\t\t\t\t\t\t cellphone_1_nr='{$cellphone_1_nr}',\n\t\t\t\t\t\t\t cellphone_2_nr='{$cellphone_2_nr}',\n\t\t\t\t\t\t\t fax='{$fax}',\n\t\t\t\t\t\t\t email='',\n\t\t\t\t\t\t\t citizenship ='{$citizenship}',\n\t\t\t\t\t\t\t civil_status='{$civil_status}',\n\t\t\t\t\t\t\t sss_nr='',\n\t\t\t\t\t\t\t nat_id_nr='',\n\t\t\t\t\t\t\t religion='{$religion}', insurance_ID='{$insurance_ID}',\n\t\t\t\t\t\t\t ethnic_orig='{$ethnic_orig}',\n\t\t\t\t\t\t\t date_update='" . date('Y-m-d H:i:s') . "',";
                    if ($region != "-1" && $district != "-1" && $ward != "-1") {
                        $sql .= "region='{$region}',\n\t\t\t\t\t\t\t   district='{$district}',\n\t\t\t\t\t\t\t   ward='{$ward}',";
                    }
                    //if ($old_fn!=$photo_filename){
                    if ($valid_image) {
                        # Compose the new filename
                        $photo_filename = $pid . '.' . $picext;
                        # Save the file
                        $img_obj->saveUploadedImage($_FILES['photo_filename'], $root_path . $photo_path . '/', $photo_filename);
                        # add to the sql query
                        $sql .= " photo_filename='{$photo_filename}',";
                    }
                    # complete the sql query
                    $sql .= " history=" . $person_obj->ConcatHistory("Update " . date('Y-m-d H:i:s') . " " . $_SESSION['sess_user_name'] . " \n") . ", modify_id='" . $_SESSION['sess_user_name'] . "' WHERE pid={$pid}";
                    //$db->debug=true;
                    $db->BeginTrans();
                    $ok = $db->Execute($sql);
                    if ($ok) {
                        $db->CommitTrans();
                        # Update the insurance data
                        # Lets detect if the data is already existing
                        if ($insurance_show) {
                            if ($insurance_item_nr) {
                                if (!empty($insurance_nr) && !empty($insurance_firm_name) && $insurance_firm_id) {
                                    $insure_data = array('insurance_nr' => $insurance_nr, 'firm_id' => $insurance_firm_id, 'class_nr' => $insurance_class_nr, 'history' => "Update " . date('Y-m-d H:i:s') . " " . $_SESSION['sess_user_name'] . " \n", 'modify_id' => $_SESSION['sess_user_name'], 'modify_time' => date('YmdHis'));
                                    $pinsure_obj->updateDataFromArray($insure_data, $insurance_item_nr);
                                }
                            } elseif ($insurance_nr && $insurance_firm_name && $insurance_class_nr) {
                                $insure_data = array('insurance_nr' => $insurance_nr, 'firm_id' => $insurance_firm_id, 'pid' => $pid, 'class_nr' => $insurance_class_nr, 'history' => "Update " . date('Y-m-d H:i:s') . " " . $_SESSION['sess_user_name'] . " \n", 'create_id' => $_SESSION['sess_user_name'], 'create_time' => date('YmdHis'));
                                $pinsure_obj->insertDataFromArray($insure_data);
                            }
                        }
开发者ID:patmark,项目名称:care2x-tz,代码行数:67,代码来源:class_gui_input_person_old.php


示例3: Department

require_once $root_path . 'include/inc_date_format_functions.php';
$breakfile = $root_path . 'modules/system_admin/edv-system-admi-welcome.php' . URL_APPEND;
if (!isset($mode)) {
    $mode = '';
}
# Create department object
$dept_obj =& new Department();
# Create the OR object
$OR_obj =& new OPRoom();
# Create the ward object
$ward_obj =& new Ward();
//$db->debug=1;
# Validate 3 most important inputs
if (isset($mode) && !empty($mode) && $mode != 'select') {
    # format date to standard
    $datebuffer = formatDate2STD($_POST['date_create'], $date_format);
    if (empty($_POST['room_nr']) || empty($datebuffer) || $mode == 'update' && empty($_POST['nr'])) {
        $inputerror = TRUE;
        # Set error flag
        $error_msg = $LDInputError;
    }
}
if (!empty($mode) && !$inputerror) {
    # Compose the data for storing into history field
    $udata = 'name=' . $_POST['info'] . ': bed=' . $_POST['nr_of_beds'] . ': ward=' . $_POST['ward_nr'] . ': dept=' . $_POST['dept_nr'] . ': closed=' . $_POST['is_temp_closed'];
    switch ($mode) {
        case 'create':
            if ($OR_obj->ORNrExists($_POST['room_nr'])) {
                $error_msg = $LDORNrExists;
                $inputerror = TRUE;
            } else {
开发者ID:patmark,项目名称:care2x-tz,代码行数:31,代码来源:or_new.php


示例4: date

 } else {
     $newdata = 1;
     if (!$personell_obj->InitPersonellNrExists($GLOBAL_CONFIG['personell_nr_init'])) {
         $_POST['nr'] = $GLOBAL_CONFIG['personell_nr_init'];
     }
     if ($_POST['date_join']) {
         $_POST['date_join'] = @formatDate2STD($_POST['date_join'], $date_format);
     }
     if ($_POST['date_exit']) {
         $_POST['date_exit'] = @formatDate2STD($_POST['date_exit'], $date_format);
     }
     if ($_POST['contract_start']) {
         $_POST['contract_start'] = @formatDate2STD($_POST['contract_start'], $date_format);
     }
     if ($_POST['contract_end']) {
         $_POST['contract_end'] = @formatDate2STD($_POST['contract_end'], $date_format);
     }
     $_POST['create_id'] = $encoder;
     $_POST['create_time'] = date('YmdHis');
     $_POST['history'] = "Create: " . date('Y-m-d H:i:s') . " = " . $encoder . "\n";
     $personell_obj->setDataArray($_POST);
     if ($personell_obj->insertDataFromInternalArray()) {
         # Get the PID
         $oid = $db->Insert_ID();
         $personell_nr = $personell_obj->LastInsertPK('nr', $oid);
         header("location: personell_register_show.php" . URL_REDIRECT_APPEND . "&personell_nr={$personell_nr}&origin=admit&target=personell_reg&newdata={$newdata}");
         exit;
     } else {
         $error = TRUE;
     }
 }
开发者ID:patmark,项目名称:care2x-tz,代码行数:31,代码来源:personell_register.php


示例5: date

//echo '$prescrServ = '.$_GET['prescrServ'];
if (!$prescription_date) {
    $prescription_date = date("Y-m-d");
}
define('NO_2LEVEL_CHK', 1);
$thisfile = basename($_SERVER['PHP_SELF']);
if (!isset($mode)) {
    $mode = 'show';
} elseif ($mode == 'create' || $mode == 'update' || $mode == 'delete') {
    include_once $root_path . 'include/care_api_classes/class_prescription.php';
    if (!isset($obj)) {
        $obj = new Prescription();
    }
    include_once $root_path . 'include/inc_date_format_functions.php';
    if ($_POST['prescribe_date']) {
        $_POST['prescribe_date'] = @formatDate2STD($_POST['prescribe_date'], $date_format);
    } else {
        $_POST['prescribe_date'] = date('Y-m-d');
    }
    $_POST['create_id'] = $_SESSION['sess_user_name'];
    //$db->debug=true;
    // Insert the prescription without other checks into the database. This should be dony be the doctor and
    // there was the requirement that there should be no restrictions given...
    //include('./include/save_admission_data.inc.php');
    include './include/save_prescription_data.inc.php';
}
/* For external call, there is no encounter number given. This can be determined if we have the encounter no in the $pn variable */
if (isset($pn)) {
    require_once $root_path . 'include/care_api_classes/class_encounter.php';
    $encounter_obj = new Encounter($pn);
    $pid = $encounter_obj->EncounterExists($pn);
开发者ID:patmark,项目名称:care2x-tz,代码行数:31,代码来源:show_prescription.php


示例6: is_dir

 }
 /* Check whether config path exists, else use default path */
 $photo_path = is_dir($root_path . $GLOBAL_CONFIG['person_foto_path']) ? $GLOBAL_CONFIG['person_foto_path'] : $default_photo_path;
 if ($pid) {
     if (isset($transFromOutp)) {
         //echo 'transFrom Outpatient';
         if ($encoder == '') {
             $encoder = $_SESSION['sess_user_name'];
         }
         # Load date formatter
         require_once $root_path . 'include/care_api_classes/class_encounter.php';
         $enc_obj = new Encounter();
         $pn = $_GET['pn'];
         if ($encounter_obj->loadEncounterData($pn)) {
             //$db->debug=1;
             $date = empty($x_date) ? date('Y-m-d') : formatDate2STD($x_date, $date_format);
             $time = empty($x_time) ? date('H:i:s') : convertTimeToStandard($x_time);
             # Check the discharge type
             if ($enc_obj->DischargeFromDeptForAdmission($pn, 8, $date, $time)) {
                 //echo 'discharge has been successfull';
             } else {
                 echo 'couldn\'t discharge outpatient';
             }
         } else {
             echo 'could not load encounter data';
         }
     } else {
         /* Check whether the person is currently admitted. If yes jump to display admission data */
         if (!$update && ($encounter_nr = $encounter_obj->isPIDCurrentlyAdmitted($pid))) {
             header('Location:aufnahme_daten_zeigen.php' . URL_REDIRECT_APPEND . '&encounter_nr=' . $encounter_nr . '&origin=admit&sem=isadmitted&target=entry');
             exit;
开发者ID:patmark,项目名称:care2x-tz,代码行数:31,代码来源:aufnahme_start+-+Copy.php


示例7: formatDate2STD

         case 1:
             $op_end .= ':00';
             break;
         case '':
             $op_end .= ':00:00';
     }
     if ($update) {
         $sql = "UPDATE {$dbtable} SET\n\t\t\t\t\t\t\t\t\top_date='" . formatDate2STD($op_date, $date_format) . "',\n\t\t\t\t\t\t\t\t\toperator='{$operator}',\n\t\t\t\t\t\t\t\t\tdiagnosis='{$diagnosis}',\n\t\t\t\t\t\t\t\t\tlocalize='{$localize}',\n\t\t\t\t\t\t\t\t\ttherapy='{$therapy}',\n\t\t\t\t\t\t\t\t\tspecial='" . $_POST['notes'] . "',\n\t\t\t\t\t\t\t\t\tclass_s='{$class_s}',\n\t\t\t\t\t\t\t\t\tclass_m='{$class_m}',\n\t\t\t\t\t\t\t\t\tclass_l='{$class_l}',\n\t\t\t\t\t\t\t\t\top_start='{$op_start}',\n\t\t\t\t\t\t\t\t\top_end='{$op_end}',\n\t\t\t\t\t\t\t\t\tscrub_nurse='{$scrub_nurse}',\n                                                                        assistant='{$assistant}',\n\t\t\t\t\t\t\t\t\top_room='{$op_room}',\n\t\t\t\t\t\t\t\t\thistory=" . $enc_obj->ConcatHistory("Update: " . date('Y-m-d H:i:s') . " = " . $_SESSION['sess_user_name'] . "\n") . ",\n\t\t\t\t\t\t\t\t\tmodify_id='" . $_SESSION['sess_user_name'] . "',\n\t\t\t\t\t\t\t\t\tmodify_time='" . date('YmdHis') . "'\n\t\t\t\t\t\t\t\t\tWHERE nr='{$nr}'";
         if ($ergebnis = $enc_obj->Transact($sql)) {
             header("location:op-doku-start.php?sid={$sid}&lang={$lang}&target={$target}&mode=saveok&pn={$pn}&nr={$nr}&dept_nr={$dept_nr}");
             exit;
         } else {
             echo "{$sql}<br>{$LDDbNoUpdate}";
         }
     } else {
         $sql = "INSERT INTO {$dbtable}\n\t\t\t\t\t\t\t\t(\tdept_nr,\n\t\t\t\t\t\t\t\t\top_date,\n\t\t\t\t\t\t\t\t\toperator,\n\t\t\t\t\t\t\t\t\tencounter_nr,\n\t\t\t\t\t\t\t\t\tdiagnosis,\n\t\t\t\t\t\t\t\t\tlocalize,\n\t\t\t\t\t\t\t\t\ttherapy,\n\t\t\t\t\t\t\t\t\tspecial,\n\t\t\t\t\t\t\t\t\tclass_s,\n\t\t\t\t\t\t\t\t\tclass_m,\n\t\t\t\t\t\t\t\t\tclass_l,\n\t\t\t\t\t\t\t\t\top_start,\n\t\t\t\t\t\t\t\t\top_end,\n\t\t\t\t\t\t\t\t\tscrub_nurse,\n                                                                        assistant,  \n\t\t\t\t\t\t\t\t\top_room,\n\t\t\t\t\t\t\t\t\thistory,\n\t\t\t\t\t\t\t\t\tcreate_id,\n\t\t\t\t\t\t\t\t\tcreate_time\n\t\t\t\t\t\t\t\t\t ) \n\t\t\t\t\t\t\t\tVALUES (\n\t\t\t\t\t\t\t\t\t'{$dept_nr}',\n\t\t\t\t\t\t\t\t\t'" . formatDate2STD($op_date, $date_format) . "',\n\t\t\t\t\t\t\t\t\t'{$operator}', \n\t\t\t\t\t\t\t\t\t'{$pn}',\n\t\t\t\t\t\t\t\t\t'" . htmlspecialchars($diagnosis) . "', \n\t\t\t\t\t\t\t\t\t'" . htmlspecialchars($localize) . "', \n\t\t\t\t\t\t\t\t\t'" . htmlspecialchars($therapy) . "', \n\t\t\t\t\t\t\t\t\t'" . htmlspecialchars($_POST['notes']) . "', \n\t\t\t\t\t\t\t\t\t'{$class_s}', \n\t\t\t\t\t\t\t\t\t'{$class_m}', \n\t\t\t\t\t\t\t\t\t'{$class_l}', \n\t\t\t\t\t\t\t\t\t'{$op_start}',\n\t\t\t\t\t\t\t\t\t'{$op_end}',\n\t\t\t\t\t\t\t\t\t'{$scrub_nurse}',\n                                                                         '{$assistant}', \n\t\t\t\t\t\t\t\t\t'{$op_room}',\n\t\t\t\t\t\t\t\t\t'Create: " . date('Y-m-d H:i:s') . " = " . $_SESSION['sess_user_name'] . "\n',\n\t\t\t\t\t\t\t\t\t'" . $_SESSION['sess_user_name'] . "',\n\t\t\t\t\t\t\t\t\t'" . date('YmdHis') . "'\n\t\t\t\t\t\t\t\t)";
         //echo $sql;
         if ($ergebnis = $enc_obj->Transact($sql)) {
             $oid = $db->Insert_ID();
             $enc_obj->coretable = $dbtable;
             $nr = $enc_obj->LastInsertPK('nr', $oid);
             header("location:op-doku-start.php?sid={$sid}&lang={$lang}&target={$target}&mode=saveok&pn={$pn}&nr={$nr}&dept_nr={$dept_nr}");
             exit;
         } else {
             echo "{$sql}<br>{$LDDbNoSave}";
         }
     }
     // end of if(update) else
     //$sdate=date(YmdHis); // time stamp
     break;
 case 'saveok':
开发者ID:patmark,项目名称:care2x-tz,代码行数:31,代码来源:op-doku-start.php


示例8: switch

/* Here begins the real work */
/* Load date formatter */
include_once $root_path . 'include/inc_date_format_functions.php';
/* Load editor functions */
//include_once('../include/inc_editor_fx.php');
if (!isset($mode)) {
    $mode = '';
}
switch ($mode) {
    case 'update':
        $sql = "UPDATE care_test_request_blood SET \n                                   status = 'received', blood_pb = '" . htmlspecialchars($blood_pb) . "', blood_rb = '" . htmlspecialchars($blood_rb) . "', blood_llrb = '" . htmlspecialchars($blood_llrb) . "', \n\t\t\t\t\t\t\t\t   blood_wrb = '" . htmlspecialchars($blood_wrb) . "',blood_prp = '" . htmlspecialchars($blood_prp) . "', blood_tc = '" . htmlspecialchars($blood_tc) . "', \n\t\t\t\t\t\t\t\t   blood_ffp = '" . htmlspecialchars($blood_ffp) . "', b_group_count = '" . $b_group_count . "', \n\t\t\t\t\t\t\t\t   b_group_price = '" . $b_group_price . "', a_subgroup_count = '" . $a_subgroup_count . "', a_subgroup_price = '" . $a_subgroup_price . "', \n\t\t\t\t\t\t\t\t   extra_factors_count = '" . $extra_factors_count . "', extra_factors_price = '" . $extra_factors_price . "', coombs_count = '" . $coombs_count . "', \n\t\t\t\t\t\t\t\t   coombs_price = '" . $coombs_price . "', ab_test_count = '" . $ab_test_count . "', ab_test_price = '" . $ab_test_price . "', \n\t\t\t\t\t\t\t\t   crosstest_count = '" . $crosstest_count . "', crosstest_price = '" . $crosstest_price . "', ab_diff_count = '" . $ab_diff_count . "', \n\t\t\t\t\t\t\t\t   ab_diff_price = '" . $ab_diff_price . "', x_test_1_code = '" . $x_test_1_code . "', x_test_1_name = '" . htmlspecialchars($x_test_1_name) . "', \n\t\t\t\t\t\t\t\t   x_test_1_count = '" . $x_test_1_count . "', x_test_1_price = '" . $x_test_1_price . "', x_test_2_code = '" . $x_test_2_code . "', \n\t\t\t\t\t\t\t\t   x_test_2_name = '" . htmlspecialchars($x_test_2_name) . "', x_test_2_count = '" . $x_test_2_count . "', x_test_2_price = '" . $x_test_2_price . "', \n\t\t\t\t\t\t\t\t   x_test_3_code = '" . $x_test_3_code . "', x_test_3_name = '" . htmlspecialchars($x_test_3_name) . "', x_test_3_count = '" . $x_test_3_count . "', \n\t\t\t\t\t\t\t\t   x_test_3_price = '" . $x_test_3_price . "', lab_stamp = '" . $lab_stamp . "', release_via = '" . htmlspecialchars($release_via) . "', \n\t\t\t\t\t\t\t\t   receipt_ack = '" . htmlspecialchars($receipt_ack) . "', mainlog_nr = '" . htmlspecialchars($mainlog_nr) . "', lab_nr = '" . htmlspecialchars($lab_nr) . "'";
        $lab_date = formatDate2STD($lab_date, $date_format);
        if (!empty($lab_date)) {
            $sql .= ", lab_date = '" . $lab_date . "'";
        }
        $mainlog_date = formatDate2STD($mainlog_date, $date_format);
        if (!empty($mainlog_date)) {
            $sql .= ", mainlog_date = '" . $mainlog_date . "'";
        }
        $sql .= ",  mainlog_sign = '" . htmlspecialchars($mainlog_sign) . "', lab_sign = '" . htmlspecialchars($lab_sign) . "',\n\t\t\t\t\t\t\t\t   history = " . $enc_obj->ConcatHistory("Ack: " . date('Y-m-d H:i:s') . " = " . $_SESSION['sess_user_name'] . "\n") . ",\n\t\t\t\t\t\t\t\t   modify_id = '" . $_SESSION['sess_user_name'] . "',\n\t\t\t\t\t\t\t\t\tmodify_time='" . date('YmdHis') . "'\n\t\t\t\t\t\t\t\t  WHERE batch_nr = '" . $batch_nr . "'";
        if ($ergebnis = $enc_obj->Transact($sql)) {
            //echo $sql;
            signalNewDiagnosticsReportEvent('', 'labor_test_request_printpop.php');
            header("location:" . $thisfile . "?sid={$sid}&lang={$lang}&edit={$edit}&saved=update&pn={$pn}&station={$station}&user_origin={$user_origin}&status={$status}&target={$target}&subtarget={$subtarget}&batch_nr={$batch_nr}&noresize={$noresize}");
            exit;
        } else {
            echo "<p>{$sql}<p>{$LDDbNoSave}";
            $mode = "";
        }
        break;
        // end of case 'save'
开发者ID:patmark,项目名称:care2x-tz,代码行数:31,代码来源:labor_test_request_admin_blood.php


示例9: elseif

            if (!($single_obj =& $enc_obj->getSicknessConfirm($get_nr))) {
                $get_nr = 0;
            }
        } else {
            $get_nr = 0;
        }
    } else {
        $mode = '';
    }
} elseif ($mode == 'create' || $mode == 'update') {
    //$db->debug=true;
    include_once $root_path . 'include/inc_date_format_functions.php';
    # Convert date to standard format
    $_POST['date_end'] = formatDate2STD($_POST['date_end'], $date_format);
    $_POST['date_start'] = formatDate2STD($_POST['date_start'], $date_format);
    $_POST['date_confirm'] = formatDate2STD($_POST['date_confirm'], $date_format);
    $_POST['encounter_nr'] = $_SESSION['sess_en'];
    $_POST['history'] = "Create " . date('Y-m-d H:i:s') . " " . $_SESSION['sess_user_name'] . "\n";
    $_POST['modify_id'] = $_SESSION['sess_user_name'];
    $_POST['create_id'] = $_SESSION['sess_user_name'];
    $_POST['create_time'] = date('YmdHis');
    if ($enc_obj->saveSicknessConfirm($_POST)) {
        $get_nr = $db->Insert_ID();
        header("location:" . $thisfile . URL_REDIRECT_APPEND . "&get_nr={$get_nr}&dept_nr={$dept_nr}&target={$target}&type_nr={$type_nr}&pid=" . $_SESSION['sess_pid']);
        exit;
    } else {
        echo "{$obj->sql}<br>{$LDDbNoSave}";
    }
}
if ($mode == 'new') {
    # Load the department class
开发者ID:patmark,项目名称:care2x-tz,代码行数:31,代码来源:show_sick_confirm.php


示例10: display

    /**
     * Displays the GUI input form
     */
    function display()
    {
        global $db, $sid, $lang, $root_path, $pid, $insurance_show, $user_id, $mode, $dbtype, $breakfile, $cfg, $update, $photo_filename, $HTTP_POST_VARS, $HTTP_POST_FILES, $HTTP_SESSION_VARS;
        extract($HTTP_POST_VARS);
        # Load the language tables
        $lang_tables = $this->langfiles;
        include $root_path . 'include/inc_load_lang_tables.php';
        # Load the other hospitals array
        include_once $root_path . 'global_conf/other_hospitals.php';
        include_once $root_path . 'include/inc_date_format_functions.php';
        include_once $root_path . 'include/care_api_classes/class_insurance.php';
        include_once $root_path . 'include/care_api_classes/class_person.php';
        //$db->debug=true;
        # Create the new person object
        $person_obj =& new Person($pid);
        # Create a new person insurance object
        $pinsure_obj =& new PersonInsurance($pid);
        if (!isset($insurance_show)) {
            $insurance_show = TRUE;
        }
        $newdata = 1;
        $error = 0;
        $dbtable = 'care_person';
        if (!isset($photo_filename) || empty($photo_filename)) {
            $photo_filename = 'nopic';
        }
        # Assume first that image is not uploaded
        $valid_image = FALSE;
        //* Get the global config for person's registration form*/
        include_once $root_path . 'include/care_api_classes/class_globalconfig.php';
        $glob_obj = new GlobalConfig($GLOBAL_CONFIG);
        $glob_obj->getConfig('person_%');
        //extract($GLOBAL_CONFIG);
        # Check whether config foto path exists, else use default path
        $photo_path = is_dir($root_path . $GLOBAL_CONFIG['person_foto_path']) ? $GLOBAL_CONFIG['person_foto_path'] : $this->default_photo_path;
        if ($mode == 'save' || $mode == 'forcesave') {
            # If saving is not forced, validate important elements
            if ($mode != 'forcesave') {
                # clean and check input data variables
                if (trim($encoder) == '') {
                    $encoder = $aufnahme_user;
                }
                if (trim($name_last) == '') {
                    $errornamelast = 1;
                    $error++;
                }
                if (trim($name_first) == '') {
                    $errornamefirst = 1;
                    $error++;
                }
                if (trim($date_birth) == '') {
                    $errordatebirth = 1;
                    $error++;
                }
                if (trim($addr_str) == '') {
                    $errorstreet = 1;
                    $error++;
                }
                if (trim($addr_str_nr) == '') {
                    $errorstreetnr = 1;
                    $error++;
                }
                if ($addr_citytown_nr && trim($addr_citytown_name) == '') {
                    $errortown = 1;
                    $error++;
                }
                if ($sex == '') {
                    $errorsex = 1;
                    $error++;
                }
                if ($insurance_show) {
                    if (trim($insurance_nr) && trim($insurance_firm_name) == '') {
                        $errorinsurancecoid = 1;
                        $error++;
                    }
                }
            }
            # If the validation produced no error, save the data
            if (!$error) {
                # Save the old filename for testing
                $old_fn = $photo_filename;
                # Create image object
                include_once $root_path . 'include/care_api_classes/class_image.php';
                $img_obj =& new Image();
                # Check the uploaded image file if exists and valid
                if ($img_obj->isValidUploadedImage($HTTP_POST_FILES['photo_filename'])) {
                    $valid_image = TRUE;
                    # Get the file extension
                    $picext = $img_obj->UploadedImageMimeType();
                }
                if ($update) {
                    //echo formatDate2STD($geburtsdatum,$date_format);
                    $sql .= "UPDATE {$dbtable} SET\r\r\n\t\t\t\t\t\t\t title='{$title}',\r\r\n\t\t\t\t\t\t\t name_last='{$name_last}',\r\r\n\t\t\t\t\t\t\t name_first='{$name_first}',\r\r\n\t\t\t\t\t\t\t name_2='{$name_2}',\r\r\n\t\t\t\t\t\t\t name_3='{$name_3}',\r\r\n\t\t\t\t\t\t\t name_middle='{$name_middle}',\r\r\n\t\t\t\t\t\t\t name_maiden='{$name_maiden}',\r\r\n\t\t\t\t\t\t\t name_others='{$name_others}',\r\r\n\t\t\t\t\t\t\t date_birth='" . formatDate2STD($date_birth, $date_format) . "',\r\r\n\t\t\t\t\t\t\t blood_group='" . trim($blood_group) . "',\r\r\n\t\t\t\t\t\t\t sex='{$sex}',\r\r\n\t\t\t\t\t\t\t addr_str='{$addr_str}',\r\r\n\t\t\t\t\t\t\t addr_str_nr='{$addr_str_nr}',\r\r\n\t\t\t\t\t\t\t addr_zip='{$addr_zip}',\r\r\n\t\t\t\t\t\t\t addr_citytown_nr='{$addr_citytown_nr}',\r\r\n\t\t\t\t\t\t\t phone_1_nr='{$phone_1_nr}',\r\r\n\t\t\t\t\t\t\t phone_2_nr='{$phone_2_nr}',\r\r\n\t\t\t\t\t\t\t cellphone_1_nr='{$cellphone_1_nr}',\r\r\n\t\t\t\t\t\t\t cellphone_2_nr='{$cellphone_2_nr}',\r\r\n\t\t\t\t\t\t\t fax='{$fax}',\r\r\n\t\t\t\t\t\t\t email='{$email}',\r\r\n\t\t\t\t\t\t\t citizenship='{$citizenship}',\r\r\n\t\t\t\t\t\t\t civil_status='{$civil_status}',\r\r\n\t\t\t\t\t\t\t sss_nr='{$sss_nr}',\r\r\n\t\t\t\t\t\t\t nat_id_nr='{$nat_id_nr}',\r\r\n\t\t\t\t\t\t\t religion='{$religion}',\r\r\n\t\t\t\t\t\t\t ethnic_orig='{$ethnic_orig}',\r\r\n\t\t\t\t\t\t\t date_update='" . date('Y-m-d H:i:s') . "',";
                    //if ($old_fn!=$photo_filename){
                    if ($valid_image) {
                        # Compose the new filename
                        $photo_filename = $pid . '.' . $picext;
//.........这里部分代码省略.........
开发者ID:tejdeeps,项目名称:tejcs.com,代码行数:101,代码来源:class_gui_input_person.php


示例11: prepDataforDB

 function prepDataforDB($array)
 {
     global $date_format;
     $debug = false;
     foreach ($this->defaultData as $x => $v) {
         if (!empty($array[$x])) {
             if (is_array($array[$x])) {
                 foreach ($array[$x] as $x2 => $v2) {
                     $temp = explode('|', $v2, 3);
                     if ($temp[1] != "") {
                         $data[$x][$temp[0]] = "'" . $temp[1] . "'";
                     } else {
                         $data[$x][$temp[0]] = 'null';
                     }
                 }
             } else {
                 if (strpos($array[$x], "|")) {
                     $temp = explode('|', $array[$x], 3);
                     if ($x == "functional_status" or $x == "tb_status" or $x == "status_txt" or $x == "adher_code" or $x == "status") {
                         $data[$x] = $temp[0];
                     } else {
                         if ($temp[1] != "") {
                             $data[$x]['id'] = $temp[0];
                             $data[$x]['other'] = "'" . $temp[1] . "'";
                         } else {
                             $data[$x]['id'] = $temp[0];
                             $data[$x]['other'] = 'null';
                         }
                         //                        if($temp[0]==''||$temp[0]=='n'){
                         //                            $data[$x]['id'] = 'null';
                         //                        }
                     }
                 } else {
                     if ($x == "visit_date" or $x == "date_of_delivery" or $x == "next_visit_date") {
                         $data[$x] = "'" . formatDate2STD($array[$x], $date_format) . "'";
                     } else {
                         $data[$x] = "'" . $array[$x] . "'";
                     }
                 }
             }
         } else {
             $data[$x] = 'null';
         }
     }
     if ($debug) {
         echo "<pre>";
         echo "*******InsertArray**************</br>";
         print_r($data);
         echo "</pre>";
     }
     return $data;
 }
开发者ID:patmark,项目名称:care2x-tz,代码行数:52,代码来源:class_tz_arv_visit.php


示例12: list

                    //header("location:$thisfile?sid=$sid&saved=1&dept=$dept&pmonth=$pmonth&pyear=$pyear");
                } else {
                    echo "{$sql} <p>";
                    exit;
                }
                //end of else
            } else {
                if (${$dt} && (${$an} || ${$rn}) && ${$op} && ${$dg}) {
                    list($id, $im, $iy) = explode(".", ${$dt});
                    if (strlen($id) < 2) {
                        $id = "0" . $id;
                    }
                    if (strlen($im) < 2) {
                        $im = "0" . $im;
                    }
                    $sql = "INSERT INTO {$dbtable} \n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\tdept,\n\t\t\t\t\t\t\t\t\t\tdate,\n\t\t\t\t\t\t\t\t\t\tstandby_name,\n\t\t\t\t\t\t\t\t\t\tstandby_start,\n\t\t\t\t\t\t\t\t\t\tstandby_end,\n\t\t\t\t\t\t\t\t\t\toncall_name,\n\t\t\t\t\t\t\t\t\t\toncall_start,\n\t\t\t\t\t\t\t\t\t\toncall_end,\n\t\t\t\t\t\t\t\t\t\top_room,\n\t\t\t\t\t\t\t\t\t\tdiagnosis_therapy,\n\t\t\t\t\t\t\t\t\t\tencoding,\n\t\t\t\t\t\t\t\t\t\tstatus,\n\t\t\t\t\t\t\t\t\t\thistory,\n\t\t\t\t\t\t\t\t\t\tmodify_id,\n\t\t\t\t\t\t\t\t\t\tcreate_id,\n\t\t\t\t\t\t\t\t\t\tcreate_time\n\t\t\t\t\t\t\t\t\t) \n\t\t\t\t\t\t\t\t\tVALUES \n\t\t\t\t\t\t\t\t\t( \n\t\t\t\t\t\t\t\t\t\t'" . $dept . "',\n\t\t\t\t\t\t\t\t\t\t'" . formatDate2STD(${$dt}, $date_format) . "',\n\t\t\t\t\t\t\t\t\t\t'" . ${$an} . "',\n\t\t\t\t\t\t\t\t\t\t'" . convertTimeToStandard(${$av}) . "',\n\t\t\t\t\t\t\t\t\t\t'" . convertTimeToStandard(${$ab}) . "',\n\t\t\t\t\t\t\t\t\t\t'" . ${$rn} . "',\n\t\t\t\t\t\t\t\t\t\t'" . convertTimeToStandard(${$rv}) . "',\n\t\t\t\t\t\t\t\t\t\t'" . convertTimeToStandard(${$rb}) . "',\n\t\t\t\t\t\t\t\t\t\t'" . ${$op} . "',\n\t\t\t\t\t\t\t\t\t\t'" . htmlspecialchars(${$dg}) . "',\n\t\t\t\t\t\t\t\t\t\t'e={$encoder}&a={$a_enc}&r={$r_enc}&d=" . date('Y-m-d') . "&t=" . date('H:i:s') . "',\n\t\t\t\t\t\t\t\t\t\t'pending',\n\t\t\t\t\t\t\t\t\t\t'Created: " . $history_txt . "',\n\t\t\t\t\t\t\t\t\t\t'" . $_COOKIE[$local_user . $sid] . "',\n\t\t\t\t\t\t\t\t\t\t'" . $_COOKIE[$local_user . $sid] . "',\n\t\t\t\t\t\t\t\t\t\tNULL\n\t\t\t\t\t\t\t\t\t)";
                    if (!($ergebnis = $db->Execute($sql))) {
                        echo "<p>" . $sql . "<p>{$LDDbNoSave}";
                    }
                }
                // end of if
            }
            // end of else
        }
        // end of if $$tg
    }
    // end of for
    header("location:{$thisfile}?sid={$sid}&lang={$lang}&saved=1&dept={$dept}&pmonth={$pmonth}&pyear={$pyear}&pday={$pday}&retpath={$retpath}");
} else {
    $sql = "SELECT * FROM {$dbtable} WHERE  date='{$pyear}-{$pmonth}-{$pday}'";
    if (date('Hi') < 830) {
开发者ID:patmark,项目名称:care2x-tz,代码行数:31,代码来源:spediens-bdienst-zeit-erfassung.php


示例13:

    $mode = '';
}
if (!isset($ofset)) {
    $ofset = '';
}
# Load the date formatter
require_once $root_path . 'include/inc_date_format_functions.php';
if (isset($mode) && $mode == 'search') {
    if (isset($dept) && empty($dept) && isset($tech) && empty($tech) && isset($sdate) && empty($sdate) && isset($edate) && empty($edate)) {
        $mode = '';
    }
    if (isset($edate) && $edate) {
        $edate = @formatDate2STD($edate, $date_format);
    }
    if (isset($sdate) && $sdate) {
        $sdate = @formatDate2STD($sdate, $date_format);
    }
    if (!isset($ofset) || !$ofset) {
        $ofset = 0;
    }
    if (!isset($nrows) || !$nrows) {
        $nrows = 20;
    }
}
# init db parameters
$linecount = 0;
$dbtable = 'care_tech_repair_done';
if ($mode == 'search') {
    $sql = 'SELECT * FROM ' . $dbtable . ' WHERE ';
    if ($tech) {
        $sql .= " reporter LIKE '{$tech}%' ";
开发者ID:patmark,项目名称:care2x-tz,代码行数:31,代码来源:technik-report-arch.php


示例14: die

if (preg_match('/save_immunization.inc.php/i', $_SERVER['PHP_SELF'])) {
    die('<meta http-equiv="refresh" content="0; url=../">');
}
require_once $root_path . 'include/care_api_classes/class_immunization.php';
if (!isset($imm_obj)) {
    $imm_obj = new Immunization();
}
require_once $root_path . 'include/inc_date_format_functions.php';
# Check date, default is today
if ($_POST['date']) {
    $_POST['date'] = @formatDate2STD($_POST['date'], $date_format);
} else {
    $_POST['date'] = date('Y-m-d');
}
if ($_POST['refresh_date']) {
    $_POST['refresh_date'] = @formatDate2STD($_POST['refresh_date'], $date_format);
}
$imm_obj->setDataArray($_POST);
if ($type && $medicine && $dosage && $application_type_nr && $application_by) {
    switch ($mode) {
        case 'create':
            //if($_POST['date') $_POST['date']=@formatDate2STD($_POST['date'],$date_format);
            //if($_POST['refresh_date') $_POST['date']=@formatDate2STD($_POST['refresh_date'],$date_format);
            if ($imm_obj->insertDataFromInternalArray()) {
                header("location:" . $thisfile . URL_REDIRECT_APPEND . "&mode=show&target={$target}&pid=" . $_SESSION['sess_pid']);
                exit;
            } else {
                echo "<br>{$LDDbNoSave}";
            }
            break;
        case 'update':
开发者ID:patmark,项目名称:care2x-tz,代码行数:31,代码来源:save_immunization.inc.php


示例15: insertComment

 function insertComment($data, $group_id)
 {
     global $db, $date_format;
     $debug = false;
     $debug ? $db->debug = TRUE : ($db->debug = FALSE);
     $date_comment = formatDate2STD($data['comment_date'], $date_format);
     $this->sql = "INSERT INTO care_tz_arv_education SET \n                        care_tz_arv_registration_id=" . $this->registrationID . ",\n                    \tcare_tz_arv_education_topic_id=" . $data['comment_id'] . ",\n                    \tcomment_date='{$date_comment}',\n\t\t\t\t\t\tcare_tz_arv_education_group_id={$group_id},\n\t\t\t\t\t\tcomment='" . $data['comment'] . "',\n\t\t\t\t\t\tcreate_id='" . $data['signature'] . "',\n\t\t\t\t\t\tmodify_id=null,\n\t\t\t\t\t\tmodify_time=" . time() . ",\n\t\t\t\t        history='Created " . date('Y-m-d H:i:s') . " " . $data['signature'] . ";\n'";
     if (!$this->Transact($this->sql)) {
         $this->errors++;
         $this->error_message['db'] = "Insert failed";
         return false;
     }
 }
开发者ID:patmark,项目名称:care2x-tz,代码行数:13,代码来源:class_tz_arv_patient.php


示例16: setEventSignalColor

             } else {
                 echo "<p>" . $lab_obj->getLastQuery() . "{$LDDbNoSave}";
             }
         }
     }
     # If save successful, jump to display values
     if ($saved) {
         include_once $root_path . 'include/inc_visual_signalling_fx.php';
         # Set the visual signal
         setEventSignalColor($encounter_nr, SIGNAL_COLOR_DIAGNOSTICS_REPORT);
         //header("location:$thisfile?sid=$sid&lang=$lang&saved=1&batch_nr=$batch_nr&encounter_nr=$encounter_nr&job_id=$job_id&parameterselect=$parameterselect&allow_update=1&user_origin=$user_origin&tickerror=$tickerror");
         header("location:labor_test_request_admin_chemlabor.php?sid={$sid}");
         exit;
     }
 } else {
     $dbuf['test_date'] = formatDate2STD($_POST['test_date'], $date_format);
     $dbuf['test_time'] = date('H:i:s');
     $dbuf['history'] = "Create " . date('Y-m-d H:i:s') . " " . $_SESSION['sess_user_name'] . "\n";
     $dbuf['create_id'] = $_SESSION['sess_user_name'];
     $dbuf['create_time'] = date('YmdHis');
     # Insert new job record
     $lab_obj->setDataArray($dbuf);
     if ($lab_obj->insertDataFromInternalArray()) {
         $pk_nr = $db->Insert_ID();
         $batch_nr = $lab_obj->LastInsertPK('batch_nr', $pk_nr);
         foreach ($nbuf as $key => $value) {
             if (isset($value) && !empty($value)) {
                 $parsedParamList['batch_nr'] = $batch_nr;
                 $parsedParamList['encounter_nr'] = $encounter_nr;
                 $parsedParamList['job_id'] = $job_id;
                 $parsedParamList['paramater_name'] = $key;
开发者ID:patmark,项目名称:care2x-tz,代码行数:31,代码来源:labor_datainput.php


示例17: array

* See the file "copy_notice.txt" for the licence notice
*/
$lang_tables = array('departments.php');
define('LANG_FILE', 'or.php');
define('NO_2LEVEL_CHK', 1);
require_once $root_path . 'include/inc_front_chain_lang.php';
if (!$internok && !$_COOKIE['ck_op_pflegelogbuch_user' . $sid]) {
    header("location:" . $root_path . "language/" . $lang . "/lang_" . $lang . "_invalid-access-warning.php");
    exit;
}
//$db->debug=1;
/* Load the date formatter */
require_once $root_path . 'include/inc_date_format_functions.php';
# Check the calendar date
if (isset($sdate) && !empty($sdate)) {
    $thisday = formatDate2STD($sdate, $date_format);
} elseif (!isset($thisday) || empty($thisday)) {
    # Set default date to today
    $thisday = date('Y-m-d');
}
# Load date shifter class
require_once $root_path . 'classes/datetimemanager/class.dateTimeManager.php';
# Create new dateTimeManager object */
$t 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP formatDateTime函数代码示例发布时间:2022-05-15
下一篇:
PHP formatDate2Local函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap