$search_type = $_GET['search_type']; $numprint = $_GET['num_print']; include '../helper/db_connect.php'; include '../helper/helper.php'; connect_database(); // if($search_type == 1){ // $query = "SELECT ID FROM person WHERE (REGISTER_NUMBER BETWEEN $start_data AND $end_data) AND REGISTER_THRU_DATE = ''"; // }else{ // $query = "SELECT PERSONNAME_OWNER_ID FROM personname WHERE PERSONNAME_NAME BETWEEN '$start_data' AND '$end_data'"; // } $persons = mysql_query(search_between_data($start_data, $end_data, $search_type)); $count = 0; while ($person = mysql_fetch_row($persons)) { for ($i = 0; $i < $numprint; $i++) { $id = $person[0]; $person_name = get_person_name_string($id) . ' ' . get_person_surname_string($id); $homeAddrs = get_person_all_address($id, 1); $checkHome = mysql_fetch_assoc(get_person_all_address($id, 1)); if ($checkHome) { $homeAddr = mysql_fetch_assoc($homeAddrs); } else { $homeAddr = give_addr(); } if ($count % 3 == 0) { ?> <div class="row"> <?php } ?>
<form class="form-horizontal well" action="../action/edit_parent_person.php?id=<?php echo $id; ?> " method="Post" style="margin:10 10 10 10" enctype="multipart/form-data"> <div class="row"> <div class="col-xs-5 col-xs-offset-4"> <h2>แก้ไขข้อมูลมารดา</h2> </div> </div> <div class="row"> <div class="col-xs-3"> <h5>ชื่อ-นามสกุล</h5> </div> <div class="col-xs-4"> <input type="text" list="list_parent" class="parent_list form-control" name="parent" value="<?php echo get_person_name_string($person['MOTHER_ID']) . ' ' . get_person_surname_string($person['MOTHER_ID']); ?> " /> <datalist id="list_parent" class="list_parent"> </datalist> </div> <div class="col-xs-1 col-xs-offset-1"> <h5>สถานะ</h5> </div> <div class="col-xs-3" style="margin-top: 5px;"> <input type="radio" name="parent_status" value="1" <?php if (get_status($person['MOTHER_ID']) == 1) { echo "checked"; } ?>
if (!empty($person["PARENT_ID"])) { $parent = get_person_name_string($person["PARENT_ID"]) . " " . get_person_surname_string($person["PARENT_ID"]); $objPHPExcel->getActiveSheet()->setCellValue('AR' . $i, $parent); } //----พี่น้อง---------------// if (!empty($person["BROTHER_LIST"])) { $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']);
<!--<a style="color: white;" class="mdi-action-find-in-page"onClick="javascript:window.location.assign('view/view_gen.php?gen_id=////<?php // echo $gen_id; ?> ')">view</a>--> </td> </tr> <?php } else { ?> <tr> <td><h3><?php echo $person['ID']; ?> </h3></td> <td><h3><?php echo get_person_title_string($person['TITLE_ID']) . ' ' . get_person_name_string($person['ID']) . ' ' . get_person_surname_string($person['ID']); ?> </h3></td> <td><h3><?php echo get_person_china_full_name($person['ID'], 0); ?> </h3></td> <td align='right'><h3><a style="color: white;" class="mdi-action-pageview" onClick="javascript:window.location.assign('manage_person_detial.php?id=<?php echo $person['ID']; ?> &type=gen')">ดูรายละเอียด</a></h3></td> <td> <!--<a style="color: white;" class="mdi-action-find-in-page"onClick="javascript:window.location.assign('view/view_gen.php?gen_id=////<?php // echo $gen_id; ?> ')">view</a>-->
$id = $datas[0]; $persons = get_person_detial($id); $person = mysql_fetch_assoc($persons); ?> <tbody> <tr> <td><?php echo $id; ?> </td> <td> <?php if ($person['TITLE_ID'] != 0) { echo get_person_title_string($person['TITLE_ID']) . ' ' . get_person_name_string($id) . " " . get_person_surname_string($id); } else { echo get_person_name_string($id) . " " . get_person_surname_string($id); } ?> </td> <td><?php print_person_phone_string($id); ?> </td> <td><?php echo get_person_province_string($id, 1); ?> </td> <td> <?php if ($person['CHINANAME_ID'] == 0) { ?>
<?php // echo $chinahouse_village_string; // echo " "; // echo $chinahouse_district_string; // echo " "; // echo $chinahouse_amphur_string; // echo " "; // echo $chinahouse_province_string; if ($person['PARENT_ID'] != 0 || $person['BROTHER_LIST'] != '') { $brothers = get_person_brother($person['PARENT_ID'], $person['BROTHER_LIST'], $person['ID']); while ($brother = mysql_fetch_assoc($brothers)) { ?> <div class="row"> <div class="col-xs-4"> <?php echo get_person_name_string($brother['ID']) . " " . get_person_surname_string($brother['ID']); ?> </div> <div class="col-xs-4"> <?php if ($brother['CHINANAME_ID'] == 0) { $bro_chinaname = ''; } else { $bro_chinaname = get_person_china_full_name($brother['ID'], 0); } echo $bro_chinaname; ?> </div> <div class="col-xs-4"> <?php if ($brother['STATUS'] == 1) {
<form class="form-horizontal well" action="../action/edit_parent_person.php?id=<?php echo $id; ?> " method="Post" style="margin:10 10 10 10" enctype="multipart/form-data"> <div class="row"> <div class="col-xs-4 col-xs-offset-4"> <h2>แก้ไขข้อมูลบิดา</h2> </div> </div> <div class="row"> <div class="col-xs-3"> <h5>ชื่อ-นามสกุล</h5> </div> <div class="col-xs-4"> <input type="text" list="list_parent" class="parent_list form-control" name="parent" value="<?php echo get_person_name_string($person['PARENT_ID']) . ' ' . get_person_surname_string($person['PARENT_ID']); ?> " /> <datalist id="list_parent" class="list_parent"> </datalist> </div> <div class="col-xs-1 col-xs-offset-1"> <h5>สถานะ</h5> </div> <div class="col-xs-3" style="margin-top: 5px;"> <input type="radio" name="parent_status" value="1" <?php if (get_status($person['PARENT_ID']) == 1) { echo "checked"; } ?>
window.print(); // do other things // return false; // window.close(); }); </script> </head> <body> <?php // echo "sdfa"; $id = $_GET['id']; include '../helper/db_connect.php'; include '../helper/helper.php'; connect_database(); $persons = get_person_detial($id); $person = mysql_fetch_assoc($persons); $personname = get_person_title_string($person['TITLE_ID']) . ' ' . get_person_name_string($id) . ' ' . get_person_surname_string($id); $chinahouses = get_chinahouse_data($person['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); // echo ?> </body> </html>
<?php include '../helper/db_connect.php'; connect_database(); $time = date('Y-m-d H:i:s', time()); //print_r($_POST); $id = $_GET["id"]; $persons = get_person_detial($id); $person = mysql_fetch_assoc($persons); //print_r($person); //----------------------------------new name----------------------------// $new_name = $_POST["name"]; $new_surname = $_POST["surname"]; $old_name = get_person_name_string($id); $old_surname = get_person_surname_string($id); $gen_id = $person['GENERATION_ID']; $parent_id = $person['PARENT_ID']; $chinahouse_link = $_POST['CHINAHOUSE_LINK']; if ($new_name != $old_name || $new_surname != $old_surname) { edit_personname($id, $new_name, $new_surname); } //-----------------------------------china name-------------------------// if (!empty($_POST["chinaname"]) || !empty($_POST["chinaname_pinyin"]) || !empty($_POST["chinaname_thai"])) { echo "8;pppp"; $gen_id = $_POST["generation"]; // print_r($_POST); $chinaname = $_POST["chinaname"]; $chinaname_pinyin = $_POST['chinaname_pinyin']; $chinaname_th = $_POST['chinaname_thai']; add_chinaname($id, $gen_id, $chinaname, $chinaname_pinyin, $chinaname_th); }
<?php $childs = mysql_query($query); $count = 1; while ($child = mysql_fetch_assoc($childs)) { // print_r($child); ?> <div class="row"> <div class="col-xs-2"> <h5><?php echo $count; ?> .ชื่อนามสกุล</h5> </div> <div class="col-xs-3" style="margin-top: 7px;"> <?php echo get_person_name_string($child['ID']) . " " . get_person_surname_string($child['ID']); ?> </div> <div class="col-xs-2 col-xs-offset-0"> <h5>วันเกิด(ค.ศ.)</h5> </div> <div class="col-xs-1" style="margin-top: 10px;"> <?php $date = date_create($child['BIRTHDAY']); echo date_format($date, "m/d/Y"); ?> </div> <div class="col-xs-1 col-xs-offset-1"> <h5>สถานะ</h5> </div> <div class="col-xs-2" style="margin-top: 7px;">