コード例 #1
0
     $brother = "";
     $bro_list = get_person_brother($person["PARENT_ID"], $person["BROTHER_LIST"], $id);
     while ($brother_list = mysql_fetch_assoc($bro_list)) {
         //                print_r($brother_list);
         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']);
 //----อัพเดทล่าสุด--------//
コード例 #2
0
                        <div class="row">
                            <div class="col-xs-6 col-xs-offset-2">
                                <h4 class="text-danger">ไม่พบข้อมูล กรุณาเพิ่มข้อมูลบรรพบุรุษที่จีน</h4>
                            </div>
                            <div class="col-xs-4 ">
                                <a class="btn btn-material-orange" role="button" style="margin-top: 0px" onClick="javascript:window.open('add_chinahouse_form.php?id=<?php 
    echo $id;
    ?>
', '', 'nenuber=no,toorlbar=no,location=no,scrollbars=no, status=no,resizable=no,width=800,height=350,top=150,left=150 ')">เพิ่มข้อมูลที่อยู่บรรพบุรุษที่จีน</a>
                            </div>
                        </div>
                        <?php 
} else {
    //                        echo "check chinahouse : " . $check_chinahouse;
    //                            add_chinahouse($id, $check_chinahouse);
    $chinahouses = get_chinahouse_data($check_chinahouse);
    $chinahouse = mysql_fetch_assoc($chinahouses);
    ?>
                        <div class="row">
                            <div class="col-xs-3">
                                <h5>ผู้ที่ติดต่อได้ : </h5>
                            </div>
                            <div class="col-xs-3">
                                <h5>
                                    <?php 
    if ($chinahouse['CHINAHOUSE_NAME'] == '') {
        echo '-';
    } else {
        echo $chinahouse['CHINAHOUSE_NAME'];
    }
    ?>
コード例 #3
0
ファイル: edit_form.php プロジェクト: batman1292/linhainan
                                </div>
                                <div class="col-xs-3" style="margin-top: 5px;">
                                    <input type="radio" name="parent_status" value="1" >ยังมีชีวิตอยู่
                                    <input type="radio" name="parent_status" value="2" >เสียชีวิต
                                </div>
                                <?php 
}
?>
                        </div>
                    </fieldset>
                    <fieldset class="scheduler-border">
                        <legend class="scheduler-border"><h4>ที่อยู่บรรพบุรุษประเทศจีนเดิม</h4></legend>

                        <?php 
if ($person['CHINAHOUSE_ID'] != 0) {
    $chinahouses = get_chinahouse_data($person['CHINAHOUSE_ID']);
    $chinahouse = mysql_fetch_assoc($chinahouses);
    //                        print_r($chinahouse);
    if ($chinahouse['CHINAHOUSE_VILLAGE_ID'] == 0) {
        $chinahouse_village = give_china_data();
    } else {
        $chinahouse_villages = get_china($chinahouse['CHINAHOUSE_VILLAGE_ID']);
        $chinahouse_village = mysql_fetch_assoc($chinahouse_villages);
    }
    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) {
コード例 #4
0
ファイル: helper.php プロジェクト: batman1292/linhainan
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;
}