Esempio n. 1
0
$result = $db->query($sql, $rows, $num_rows);
if ($result) {
    // print "<pre>" . print_r($rows, 1) . "</pre>";
    foreach ($rows as $k => $v) {
        $gender = "หญิง";
        if ($v['gender'] == "M") {
            $gender = "ชาย";
        }
        $province = $pv->get_province($v['province']);
        $provine_name = $province[0]['PROVINCE_NAME'];
        $amphur = $pv->get_amphur($v['amphur']);
        $amphur_name = $amphur[0]['AMPHUR_NAME'];
        $district = $pv->get_district($v['district']);
        $district_name = $district[0]['DISTRICT_NAME'];
        /* วันเกิด */
        $birthday = $pf->convert_birthday($v['birthday'], $arr_month);
        print "\n        <tr>\n            <td>" . $v['title'] . $v['firstname'] . " " . $v['lastname'] . "</td>\n            <td>" . $gender . "</td>\n            <td>" . $birthday . "</td>\n            <td>" . $v['age'] . "</td>\n            <td>" . $v['address'] . " <BR>อำเภอ" . $amphur_name . " <BR>ตำบล" . $district_name . " <BR>จังหวัด" . $provine_name . $v['zipcode'] . "\n            </td>\n            <td>" . str_replace(",", "<BR>", $v['tel']) . "</td>\n            <td><a href='view-profile.php?id=" . urlencode($v['profile_id']) . "'><i class='fa fa-list'></i></a></td>\n            <td><a href='delete-profile.php?id=" . urlencode($v['profile_id']) . "' onclick='return confirm(\"ยืนยันการลบข้อมูล ?\");'><i class='fa fa-trash-o'></i></a></td>\n        </tr>\n        ";
    }
}
$result = null;
$rows = null;
$num_rows = null;
?>
                                    </table>
                                </div>
                                <div class="panel-footer text-right">
                                    <a href="list-profile.php">สมาชิกทั้งหมด</a>
                                </div>
                            </div>
                        </div>
                    </div>
Esempio n. 2
0
            <article class="container" style="">
                <section>
                    <div class="row">
                        <div class="col-md-12">
                            <div class="panel panel-default">
                                <div class="panel-heading">
                                    <h1 class=""><?php 
echo $data['title'] . "" . $data['firstname'] . " " . $data['lastname'] . " <small>( " . $data['age'] . " ปี )</small>";
?>
</h1>
                                </div>
                                <div class="panel-body">
                                    <p class="lead">
                                        <strong>เกิดเมื่อวันที่</strong>
                                        <?php 
echo $pf->convert_birthday($data['birthday'], $arr_month);
?>
                                    </p>
                                    <p class="lead">
                                        <strong>ที่อยู่</strong>
                                        <?php 
echo $data['address'] . " ตำบล" . $district['DISTRICT_NAME'] . " อำเภอ" . $amphur['AMPHUR_NAME'] . " จังหวัด" . $province['PROVINCE_NAME'] . " " . $data['zipcode'];
?>
                                    </p>
                                    <p class="lead">
                                        <strong>เบอร์โทรศัพท์ </strong>
                                        <?php 
echo $data['tel'];
?>
                                    </p>
                                    <p class="lead">