Example #1
0
function get_person_china_full_name($id, $type)
{
    $chinaGenDatas = get_person_china_generation_name($id);
    $chinaGenData = mysql_fetch_assoc($chinaGenDatas);
    $chinaNameDatas = get_person_china_name($id);
    $chinaNameData = mysql_fetch_assoc($chinaNameDatas);
    $gender = get_gender($id);
    if ($type == 0 && $gender == 2) {
        return "林(" . $chinaGenData['GENERATION_NAME'] . ")" . $chinaNameData['CHINANAME_NAME'];
    } else {
        if ($type == 1 && $gender == 2) {
            return "lin (" . $chinaGenData['GENERATION_PINYIN'] . ") " . $chinaNameData['CHINANAME_PINYIN'];
        } else {
            if ($type == 2 && $gender == 2) {
                return "ลื้ม (" . $chinaGenData['GENERATION_TH'] . ") " . $chinaNameData['CHINANAME_TH'];
            } else {
                if ($type == 0) {
                    return "林" . $chinaGenData['GENERATION_NAME'] . $chinaNameData['CHINANAME_NAME'];
                } else {
                    if ($type == 1) {
                        return "lin " . $chinaGenData['GENERATION_PINYIN'] . " " . $chinaNameData['CHINANAME_PINYIN'];
                    } else {
                        if ($type == 2) {
                            return "ลื้ม " . $chinaGenData['GENERATION_TH'] . " " . $chinaNameData['CHINANAME_TH'];
                        }
                    }
                }
            }
        }
    }
}
Example #2
0
?>
">
                            </div>
                            <div class="col-xs-1">
                                <h5>นามสกุล</h5>
                            </div>
                            <div class="col-xs-3">
                                <input type="text" class="form-control" autofocus name="surname" readOnly="true" required value="<?php 
echo get_person_surname_string($id);
?>
">
                            </div>
                        </div>

                        <?php 
$chinanames = get_person_china_name($id);
$chinaname = mysql_fetch_assoc($chinanames);
//
?>
                        <div class="row">
                            <div class="col-xs-3">
                                <h5>ชื่อจีน </h5>
                            </div>
                            <div class="col-xs-1">
                                <h5>林 </h5>
                            </div>
                            <div class="col-xs-1">
                                <h5>- รุ่น</h5>
                            </div>
                            <div class="col-xs-3" style="margin: 5 0px">
                                <select class="form-control" autofocus name="generation" id="list_gen" disabled="">
Example #3
0
function get_person_chinaname_string($id)
{
    //    $query = "SELECT PERSONNAME_SURNAME FROM personname WHERE PERSONNAME_OWNER_ID = $id";
    //    echo $query;
    $province_strings = get_person_china_name($id);
    $province_string = mysql_fetch_assoc($province_strings);
    if ($province_string) {
        return $province_string['CHINANAME_NAME'];
    } else {
        return '';
    }
}