// $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 } ?> <div class="col-xs-4"> <?php echo 'ชื่อและที่อยู่ผู้รับ'; echo '<br/>'; echo $person_name . '(' . $id . ')'; $addr_string = "บ้านเลขที่ " . $homeAddr['ADDRESS_NUM'];
$org_web = array("CONTACT_STRING" => ''); } $organization_mails = get_person_contact($organization_id['ORGANIZATION_ID'], 8); $org_mail = mysql_fetch_assoc($organization_mails); if ($org_mail) { $organization_mails = get_person_contact($organization_id['ORGANIZATION_ID'], 8); $org_mail = mysql_fetch_assoc($organization_mails); } else { $org_mail = array("CONTACT_STRING" => ''); } } else { $org_type = 0; $org_comment = ''; $org_name = ''; $org_role = ''; $org_addr = give_addr(); $org_phone_string = ''; $org_fax_string = ''; $org_web = array("CONTACT_STRING" => ''); $org_mail = array("CONTACT_STRING" => ''); } if ($person['PARENT_ID'] != 0) { $parent_string = get_person_name_string($person['PARENT_ID']) . " " . get_person_surname_string($person['PARENT_ID']); $parents = get_person_detial($person['PARENT_ID']); $parent = mysql_fetch_assoc($parents); $parent_status = $parent['STATUS']; } else { $parent_string = ''; $parent_status = 0; } if ($person['MOTHER_ID'] != 0) {