Exemplo n.º 1
0
            if ($brother_list['STATUS'] == 1) {
                $brother_status = "ยังมีชีวิตอยู่";
            } elseif ($brother_list['STATUS'] == 0) {
                $brother_status = "เสียชีวิตแล้ว";
            }
            $brother .= get_person_name_string($brother_list["ID"]) . " " . get_person_surname_string($brother_list["ID"]) . "/" . $brother_status . ",";
        }
        $brother = substr($brother, 0, strlen($brother) - 1);
        $objPHPExcel->getActiveSheet()->setCellValue('AS' . $i, $brother);
    }
    //----บรรพบุรุษ-----------//
    $china_houses = mysql_fetch_assoc(get_chinahouse_data($person["CHINAHOUSE_ID"]));
    $china_vallage = mysql_fetch_assoc(get_china($china_houses['CHINAHOUSE_VILLAGE_ID']));
    $china_district = mysql_fetch_assoc(get_china($china_houses['CHINAHOUSE_DISTRICT_ID']));
    $china_amphur = mysql_fetch_assoc(get_china($china_houses['CHINAHOUSE_AMPHUR_ID']));
    $china_provice = mysql_fetch_assoc(get_china($china_houses['CHINAHOUSE_PROVINCE_ID']));
    $objPHPExcel->getActiveSheet()->setCellValue('AT' . $i, $china_houses['CHINAHOUSE_NAME']);
    $objPHPExcel->getActiveSheet()->setCellValue('AU' . $i, $china_houses['CHINAHOUSE_TEL']);
    $objPHPExcel->getActiveSheet()->setCellValue('AV' . $i, $china_vallage['CHINA_STR']);
    $objPHPExcel->getActiveSheet()->setCellValue('AW' . $i, $china_district['CHINA_STR']);
    $objPHPExcel->getActiveSheet()->setCellValue('AX' . $i, $china_amphur['CHINA_STR']);
    $objPHPExcel->getActiveSheet()->setCellValue('AY' . $i, $china_provice['CHINA_STR']);
    $objPHPExcel->getActiveSheet()->setCellValue('AZ' . $i, $china_vallage['CHINA_TH']);
    $objPHPExcel->getActiveSheet()->setCellValue('BA' . $i, $china_district['CHINA_TH']);
    $objPHPExcel->getActiveSheet()->setCellValue('BB' . $i, $china_amphur['CHINA_TH']);
    $objPHPExcel->getActiveSheet()->setCellValue('BC' . $i, $china_provice['CHINA_TH']);
    //----อัพเดทล่าสุด--------//
    $objPHPExcel->getActiveSheet()->setCellValue('BD' . $i, $person['LASTUPDATE']);
    $i++;
}
//---------------------------------------//
Exemplo n.º 2
0
function get_full_chinahouse_string($chinahouse_id, $type)
{
    $chinahouses = get_chinahouse_data($chinahouse_id);
    $chinahouse = mysql_fetch_assoc($chinahouses);
    $chinahouse_villages = get_china($chinahouse['CHINAHOUSE_VILLAGE_ID']);
    $chinahouse_village = mysql_fetch_assoc($chinahouse_villages);
    $chinahouse_districts = get_china($chinahouse['CHINAHOUSE_DISTRICT_ID']);
    $chinahouse_district = mysql_fetch_assoc($chinahouse_districts);
    $chinahouse_amphurs = get_china($chinahouse['CHINAHOUSE_AMPHUR_ID']);
    $chinahouse_amphur = mysql_fetch_assoc($chinahouse_amphurs);
    $chinahouse_provinces = get_china($chinahouse['CHINAHOUSE_PROVINCE_ID']);
    $chinahouse_province = mysql_fetch_assoc($chinahouse_provinces);
    $result_string = '';
    if ($type == 'china') {
        if ($chinahouse_village['CHINA_STR'] == '') {
            $result_string .= '-';
        } else {
            $result_string .= $chinahouse_village['CHINA_STR'];
        }
        $result_string .= '村, ';
        if ($chinahouse_district['CHINA_STR'] == '') {
            $result_string .= '-';
        } else {
            $result_string .= $chinahouse_district['CHINA_STR'];
        }
        $result_string .= '區, ';
        if ($chinahouse_amphur['CHINA_STR'] == '') {
            $result_string .= '-';
        } else {
            $result_string .= $chinahouse_amphur['CHINA_STR'];
        }
        $result_string .= '镇, ';
        if ($chinahouse_province['CHINA_STR'] == '') {
            $result_string .= '-';
        } else {
            $result_string .= $chinahouse_province['CHINA_STR'];
        }
        $result_string .= '省';
    } else {
        $result_string .= 'หมู่บ้าน ';
        if ($chinahouse_village['CHINA_TH'] == '') {
            $result_string .= '-';
        } else {
            $result_string .= $chinahouse_village['CHINA_TH'];
        }
        $result_string .= ' ตำบล ';
        if ($chinahouse_district['CHINA_TH'] == '') {
            $result_string .= '-';
        } else {
            $result_string .= $chinahouse_district['CHINA_TH'];
        }
        $result_string .= ' อำเภอ  ';
        if ($chinahouse_amphur['CHINA_TH'] == '') {
            $result_string .= '-';
        } else {
            $result_string .= $chinahouse_amphur['CHINA_TH'];
        }
        $result_string .= ' มลฑล/จังหวัด  ';
        if ($chinahouse_province['CHINA_TH'] == '') {
            $result_string .= '-';
        } else {
            $result_string .= $chinahouse_province['CHINA_TH'];
        }
    }
    return $result_string;
}
Exemplo n.º 3
0
 if ($chinahouse['CHINAHOUSE_DISTRICT_ID'] == 0) {
     $chinahouse_district = give_china_data();
 } else {
     $chinahouse_districts = get_china($chinahouse['CHINAHOUSE_DISTRICT_ID']);
     $chinahouse_district = mysql_fetch_assoc($chinahouse_districts);
 }
 if ($chinahouse['CHINAHOUSE_AMPHUR_ID'] == 0) {
     $chinahouse_amphur = give_china_data();
 } else {
     $chinahouse_amphurs = get_china($chinahouse['CHINAHOUSE_AMPHUR_ID']);
     $chinahouse_amphur = mysql_fetch_assoc($chinahouse_amphurs);
 }
 if ($chinahouse['CHINAHOUSE_PROVINCE_ID'] == 0) {
     $chinahouse_province = give_china_data();
 } else {
     $chinahouse_provinces = get_china($chinahouse['CHINAHOUSE_PROVINCE_ID']);
     $chinahouse_province = mysql_fetch_assoc($chinahouse_provinces);
 }
 //                        $chinahouse_village;
 //                        print_r($chinahouse_amphur);
 ?>
                         <div class="row">
                             <fieldset class="scheduler-border">
                                 <legend class="scheduler-border"><h5>ที่อยู่เดิม</h5></legend>
                                 <div class="row">
                                     <div class="col-xs-2">
                                         <h5>ชื่อนามสกุลผู้ติดต่อ</h5>
                                     </div>
                                     <div class="col-xs-2" style="margin-top: 7px;">
                                         <?php 
 if ($chinahouse['CHINAHOUSE_NAME'] == '') {
Exemplo n.º 4
0
function get_china_srting($china_id, $type)
{
    $chinas = get_china($china_id);
    $china = mysql_fetch_assoc($chinas);
    if ($type == 'china') {
        return $china['CHINA_STR'];
    } else {
        if ($type == 'thai') {
            return $china['CHINA_TH'];
        }
    }
}