<div class="col-xs-2"> <button class="btn btn-success" type="submit" style="margin-top: -10px" name="search">ค้นหา</button> </div> </div> </form> <h4 style="color: red;">*หมายเหตุ หากคนที่ต้องการค้นหามีชื่อจีนแล้วจะค้นหาไม่พบ</h4> </div> </div> <?php connect_database(); if (isset($_GET['search'])) { $data = $_GET['data']; $search_type = $_GET['option']; $check = mysql_fetch_assoc(mysql_query(search_data_chinaname($data, $search_type))); if (!$check) { $check_chinaname = mysql_fetch_assoc(mysql_query(search_data($data, $search_type))); // print_r($check_chinaname); if (!$check_chinaname) { echo "<script type='text/javascript'>"; echo "sweetAlert('ไม่พบข้อมูลที่ท่านค้นหา','', 'info');"; echo "</script>"; } else { echo "<script type='text/javascript'>"; echo "sweetAlert('ข้อมูลที่ท่านค้นหามีชื่อจีนแล้ว','', 'info');"; echo "</script>"; } } else { ?> <div class="row"> <table class="table"> <thead>
<?php include_once "includes/common.inc"; function find_module($name, $module) { global $options, $type; if ($module["find"]) { $options .= "<OPTION VALUE=\"{$name}\"" . ($name == $type ? " SELECTED" : "") . ">{$name}</OPTION>\n"; } } module_iterate("find_module"); $search .= "<FORM ACTION=\"search.php\" METHOD=\"POST\">\n"; $search .= " <INPUT SIZE=\"50\" VALUE=\"" . check_textfield($keys) . "\" NAME=\"keys\" TYPE=\"text\">\n"; $search .= " <SELECT NAME=\"type\">{$options}</SELECT>\n"; $search .= " <INPUT TYPE=\"submit\" VALUE=\"" . t("Search") . "\">\n"; $search .= "</FORM>\n"; $output = search_data(check_input($keys), check_input($type)); $theme->header(); $theme->box(t("Search"), $search); $theme->box(t("Result"), $output); $theme->footer();
<table class="table"> <thead> <tr> <th>ID</th> <th>ชื่อ-นามสกุล</th> <th>ชื่อจีน</th> <th>เบอร์โทรศัพท์</th> <th>จังหวัดที่อยู่</th> <th>หมายเหตุ</th> <th> </th> </tr> </thead> <?php // $count = 1; $urlquery_str = "data={$data}&option={$search_type}&search="; $query = search_data($data, $search_type); $table_count = mysql_num_rows(mysql_query($query)); $limit = 10; if (isset($_GET['start'])) { $start = $_GET['start']; $page = $_GET['page']; $count = $start + 1; } else { $page = 1; $start = 0; $count = 1; } $query .= "LIMIT {$start}, {$limit}"; $serachData = mysql_query($query); while ($datas = mysql_fetch_array($serachData)) { $id = $datas[0];
>Facebook</option> </select> </div> <div class="col-xs-2"> <button class="btn btn-success" type="submit" style="margin-top: -10px" name="search">ค้นหา</button> </div> </div> </form> </div> </div> <?php connect_database(); if (isset($_GET['search'])) { $data = $_GET['data']; $search_type = $_GET['option']; $check = mysql_fetch_assoc(mysql_query(search_data($data, $search_type))); if (!$check) { echo "<script type='text/javascript'>"; echo "sweetAlert('ไม่พบข้อมูลที่ท่านค้นหา','', 'info');"; // echo "alert('ไม่พบข้อมูลที่ท่านค้นหา');"; echo "</script>"; } else { ?> <div class="row"> <table class="table"> <thead> <tr> <th>ID</th> <th>ชื่อ-นามสกุล</th> <th>เบอร์โทรศัพท์</th> <th>จังหวัดที่อยู่</th>