Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > PHP > PHP Forum > สอบถามเรื่อง code แบ่งหน้าครับ ทำไมเวลากด search แล้วคลิกหน้าถัดดไปมันไม่เข้าเงื่อนไข search



 

สอบถามเรื่อง code แบ่งหน้าครับ ทำไมเวลากด search แล้วคลิกหน้าถัดดไปมันไม่เข้าเงื่อนไข search

 



Topic : 136265



โพสกระทู้ ( 209 )
บทความ ( 1 )



สถานะออฟไลน์




Code (PHP)
<?php 
include('connect.php');

//include('assets/js/resolution-check.php');
  // Set session
  session_start();
  $crime_id=$_SESSION["Oper_id"] ;
/*$perpage = 5;
  
if (isset($_GET['page'])) {
 $page = $_GET['page'];
 } else {
 $page = 1;
 }
 
 $start = ($page - 1) * $perpage;*/
 
 if (isset($_POST['txtKeyword']) && $_POST['txtKeyword'] !== '') {
    $strKeyword=$_POST['txtKeyword'];

 }else{

   echo '';
 }
 if (isset($_POST['group']) && $_POST['group'] !== '') {
    $strgroup=implode("','", $_POST['group']);
 }else{

    echo '';
 }
 if (isset($_POST['type_arrest']) && $_POST['type_arrest'] !== '') {
    $type_search=implode("','", $_POST['type_arrest']);
 }else{

   echo '';
 }
 if (isset($_POST['start_date_search']) && $_POST['start_date_search'] !== '') {
    $start_date_search=$_POST['start_date_search'];
 }else{

    echo '';
 }
 if (isset($_POST['end_date_search']) && $_POST['end_date_search'] !== '') {
    $end_date_search=$_POST['end_date_search'];
 }else{

    echo '';
 }

 //chart js
 if (isset($_POST['start_date_chart']) && $_POST['start_date_chart'] !== '') {
    $start_date_chart=$_POST['start_date_chart'];
 }else{

    echo '';
 }
 if (isset($_POST['end_date_chart']) && $_POST['end_date_chart'] !== '') {
    $end_date_chart=$_POST['end_date_chart'];
 }else{

    echo '';
 }
 if (isset($_POST['operation']) && $_POST['operation'] !== '') {
  $str_operation=$_POST['operation'];
  
}else{

  echo '';
}
 // checkbox remember
 if ($_POST) {
   
    if (isset($_POST['group'])) { $_SESSION['check']=1; }else { $_SESSION['check']=2; }
    
    }

 /*
 if (isset($_POST['group2']) && $_POST['group2'] !== '') {
    $strgroup2=$_POST['group2'];
 }else{

    echo '';
 }
 if (isset($_POST['group3']) && $_POST['group3'] !== '') {
    $strgroup2=$_POST['group3'];
 }else{

    echo '';
 }
 if (isset($_POST['group4']) && $_POST['group4'] !== '') {
    $strgroup2=$_POST['group4'];
 }else{

    echo '';
 }
 
 if (isset($_POST['group5']) && $_POST['group5'] !== '') {
    $strgroup2=$_POST['group5'];
 }else{

    echo '';
 }
 */

                                          
//$strKeyword = ($_GET['txtKeyword'] != '') ? $_GET['txtKeyword'] : NULL;
//$checklist1 =  ($_GET['group1'] != '') ? $_GET['group1'] : NULL;

//$checklist2 =  ($_GET['checklist2'] != '') ? $_GET['checklist2'] : NULL
     ////////////test sql
     
  //$sql = "select * from tb_criminal1 WHERE concat(criminal_fname,',',criminal_lname,',',group_arrest,',',id_card,age) LIKE '%$strKeyword%' AND LIKE '%$strgroup%' limit {$start} , {$perpage} ";
  
     
?>



 

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Electronic Data Systerm(EDS)</title>
    
    <link rel="preconnect" href="https://fonts.gstatic.com">
    <link href="https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;600;700;800&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
    <link rel="stylesheet" href="assets/vendors/iconly/bold.css">
    <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/morris.js/0.5.1/morris.css">
    <link rel="stylesheet" href="assets/vendors/perfect-scrollbar/perfect-scrollbar.css">
    <link rel="stylesheet" href="assets/vendors/bootstrap-icons/bootstrap-icons.css">
    <link rel="stylesheet" href="assets/vendors/bootstrap-icons/bootstrap-icons.css">
    <link rel="stylesheet" href="assets/css/app.css">
    <link rel="shortcut icon" href="assets/images/favicon.svg" type="image/x-icon">
    <link rel="stylesheet" href="/assets/css/style.css">
    <link rel="stylesheet" href="assets/js/jquery.datetimepicker.css">
    <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
	<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
    <script src="assets/js/jquery.datetimepicker.full.js"></script>
    <script src="assets/js/datepicker.js"></script>
<style>
    .rcorners4 {
    border-radius: 15px;
    background: #435ebe;
    padding: 20px; 
    width: auto;
    height: 40px;  
}
</style>
	
</head>
<?php require 'menu.php'; ?>

<body>
<?php require 'navigation.php'; ?>
<div class="page-heading">
                
            </div>
            <div class="page-content">
                <section class="row">
                    <div class="col-12 ">
                        


                        
						
                              <br/><br/>
                                 
                                        <div>
 
                            </div>
						<form name="frmSearch" method="post" action="<?php echo $_SERVER['SCRIPT_NAME'];?>">
	  						<div class="row">
                            <div class="col-2">
                                <div class="card">
                                    <div class="card-header">
                                        <h4>เลือกชนิดการจับกุม</h4>
                                    </div>
                                    
                                    <div class="card-body">
                                        <div class="row">  
                                             
                        <table>
						<th>
							<tr>
								<td><input type="checkbox" name="type_arrest[]" id="type_arrest" class="form-check-input" value="1"> </input></td>
								<td>จับกุมซึ่งหน้า</td>
								
							</tr>
							<tr>
								<td><input type="checkbox" name="type_arrest[]" id="type_arrest" class="form-check-input" value="2"> </input></td>
								<td>จับกุมตามหมายจับ</td>
								
							</tr>
            
								
						
						</th>
						</table>
</form>     
                    </div> 
                                    </div>
                                </div>
</div>  


                            <div class="col-10">
                                <div class="card">
                                    <div class="card-header" align="center">
                                        <h4>เลือกกลุ่มฐานความผิด</h4>
                                    </div>
                                    
                                    <div class="card-body">
                                        <div class="row">  
                        <table>
						<th>
							<tr> 
								<td><input type="checkbox" name="group[]" id="group1" class="form-check-input" value="g1"></input></td>
								<td>กลุ่ม1 ฐานความผิดเกี่ยวกับชีวิต ร่างกาย ฯ </td>
								<td>&nbsp;&nbsp;</td>
								<td><input type="checkbox" name="group[]" id="group4" class="form-check-input" value="g4" > </input></td>
								<td>กลุ่ม4 ฐานความผิดที่รัฐเป็นผู้เสียหาย</td>
								<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
								<td>วันที่: </td>
                                            <td><div class="input-group">
            <input  type="text" name="start_date_search" id="testdate1" class="form-control" style="width:125px">
            <span class="input-group-text" id="basic-addon1">
                <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-calendar3" viewBox="0 0 16 16">
  <path d="M14 0H2a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2zM1 3.857C1 3.384 1.448 3 2 3h12c.552 0 1 .384 1 .857v10.286c0 .473-.448.857-1 .857H2c-.552 0-1-.384-1-.857V3.857z"/>
  <path d="M6.5 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm-9 3a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm-9 3a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2z"/>
</svg>
              </span>
                                                                    
</div></td>
                                            <td> ถึง: </td>
                                            <td><div class="input-group">
            <input  type="text" name="end_date_search" id="testdate2" class="form-control" style="width:125px">
            <span class="input-group-text" id="basic-addon1">
                <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-calendar3" viewBox="0 0 16 16">
  <path d="M14 0H2a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2zM1 3.857C1 3.384 1.448 3 2 3h12c.552 0 1 .384 1 .857v10.286c0 .473-.448.857-1 .857H2c-.552 0-1-.384-1-.857V3.857z"/>
  <path d="M6.5 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm-9 3a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm-9 3a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2z"/>
</svg>
              </span>
                                                                    
</div></td>
<tr>
</tr>
								
							</tr>
							<tr>
								<td><input type="checkbox" name="group[]" id="group2" class="form-check-input" value="g2" > </input></td>
								<td>กลุ่ม2 ฐานความผิดเกี่ยวกับทรัพย์</td>
								<td>&nbsp;&nbsp;</td>
								<td><input type="checkbox" name="group[]" id="group5" class="form-check-input" value="g5" > </input></td>
								<td>กลุ่ม5 ฐานความผิดอื่นๆ</td>
							</tr>
							<tr>
								<td><input type="checkbox" name="group[]" id="group3" class="form-check-input" value="g3" > </input></td>
								<td>กลุ่ม3 ฐานความผิดพิเศษ</td>		
								<td>&nbsp;&nbsp;</td>
                <td>ชป.</td>
                <td><select class="form-select" id="operation" name="operation" style="width:auto">
                                        <option value="">ทั้งหมด</option>                        
                                         <option value="11">11</option>
                                         <option value="12">12</option>
                                         <option value="13">13</option>
                                         <option value="14">14</option>
                                         <option value="15">15</option>
                                         <option value="16">16</option>
                                         <option value="17">17</option>
                                         <option value="18">18</option>
                                         <option value="19">19</option>
                                          </select></td>
								</td>	

                <tr>
								
							</tr>
							<tr align="center">
								<td colspan="11">
								</br> <div class="input-group" style="width: 750px" align="center">
								<input type="text" name="txtKeyword"  class="form-control form-control-lg" value="<?php echo $strKeyword;?>" placeholder="ใส่คำที่ต้องการค้นหา" >
								  <button class="btn-lg btn-primary" type="submit"> ค้นหา
								  </button>
									</div>
								</td>
							</tr>
						
						</th>
						</table>
</form>
                                        </div> 
                                    </div>
                                </div>
</div>  
</div>

<!--Sql ค้นหาและแสดงผลแบ่งหน้า-->
<?php 
  /*
  $sql = "select * from tb_criminal1 WHERE 1=1";
  $sql .= ! empty($strKeyword) ?  " AND CONCAT(criminal_fname,',',criminal_lname,',',group_arrest,',',age) LIKE '%$strKeyword%' " : "";
  $sql .= ! empty($strgroup1) ?  " AND group_arrest LIKE '$strgroup1' " : " ";
  $sql .= ! empty($strgroup2) ?  " AND group_arrest LIKE '$strgroup2' " : " ";
  $sql .= ! empty($strgroup3) ?  " AND group_arrest LIKE '%$strgroup3%' " : " ";
  $sql .= ! empty($strgroup4) ?  " AND group_arrest LIKE '%$strgroup4%' " : " ";
  $sql .= ! empty($strgroup5) ?  " AND group_arrest LIKE '%$strgroup5%' " : " ";
  */
  //$sql .= ! empty($strgroup1) ? " AND group_arrest LIKE '%$strgroup1%' " : "";

if(empty($strKeyword) && empty($strgroup) && empty($type_search) && empty($start_date_search) && empty($end_date_search) && empty($str_operation)){
    $sql="select * from tb_criminal1 where 1";
}else{
    $sql="select * from tb_criminal1";
}  

if(!empty($strKeyword)) {  //ถ้าตัวแปร productname ไม่ว่าง คือมีการกรอกช่องค้นหาชื่อสินค้ามาด้วย
 $sql.=" where concat(criminal_fname,',',criminal_lname,',',group_arrest,',',age,',',operation_catch) like '%$strKeyword%'";  //การต่อประโยคเงื่อนไข ใช้เครื่องหมาย .= จะเพิ่มคำเข้าไปในตัวแปรได้ 
 
}
// กรณีระบุค่า price เพื่อหาสินค้าและราคามาทั้งสองอย่าง เพิ่มคำสั่งด้านล่าง 
if(!empty($strgroup)) {  //  ถ้าค้นหาค่า price มาด้วย  
       $pos = strpos($sql, "where");  //ใช้คำสั่ง strpos หาคำว่า where ในตัวแปร sql
                if ($pos == true) {  // ถ้าเจอคำว่า where ในตัวแประ $sql
                    $sql.=" OR group_arrest IN('$strgroup')";  //ถ้ามีคำว่า where แล้วในตัวแปร sql ให้ใส่ and ต่อ
                    
                } else {  
                    $sql.=" where group_arrest IN('$strgroup')";  //ถ้าไม่มีคำว่า where ให้ใช้ query นี้ต่อ
                
                }   
}

if(!empty($type_search)) {  //  ถ้าค้นหาค่า price มาด้วย  
    $pos = strpos($sql, "where");  //ใช้คำสั่ง strpos หาคำว่า where ในตัวแปร sql
             if ($pos == true) {  // ถ้าเจอคำว่า where ในตัวแประ $sql
                 $sql.=" AND type_arrest IN('$type_search')";  //ถ้ามีคำว่า where แล้วในตัวแปร sql ให้ใส่ and ต่อ
                 
             } else {  
                 $sql.=" where type_arrest IN('$type_search')";  //ถ้าไม่มีคำว่า where ให้ใช้ query นี้ต่อ
               
             }  
}
if(!empty($str_operation)) {  //  ถ้าค้นหาค่า price มาด้วย  
  $pos = strpos($sql, "where");  //ใช้คำสั่ง strpos หาคำว่า where ในตัวแปร sql
           if ($pos == true) {  // ถ้าเจอคำว่า where ในตัวแประ $sql
               $sql.=" AND operation_catch=$str_operation";  //ถ้ามีคำว่า where แล้วในตัวแปร sql ให้ใส่ and ต่อ
               
           } else {  
               $sql.=" where operation_catch=$str_operation";  //ถ้าไม่มีคำว่า where ให้ใช้ query นี้ต่อ
             
           }  
}
if(!empty($start_date_search)) {  //  ถ้าค้นหาค่า price มาด้วย  
    $pos = strpos($sql, "where");  //ใช้คำสั่ง strpos หาคำว่า where ในตัวแปร sql
             if ($pos == true) {  // ถ้าเจอคำว่า where ในตัวแประ $sql
                 $sql.=" AND str_to_date(catch_date,'%d-%m-%Y') between str_to_date('$start_date_search','%d-%m-%Y') and str_to_date('$end_date_search','%d-%m-%Y') ";  //ถ้ามีคำว่า where แล้วในตัวแปร sql ให้ใส่ and ต่อ
                 
             } else {  
                 $sql.=" where  str_to_date(catch_date,'%d-%m-%Y') between str_to_date('$start_date_search','%d-%m-%Y') and str_to_date('$end_date_search','%d-%m-%Y') ";  //ถ้าไม่มีคำว่า where ให้ใช้ query นี้ต่อ
               
             }  
}





// ทดสอบผลให้แสดง sql ให้เราดูหน่อยว่าเป็นยังไง
//$sql_limit="$sql limit {$start} , {$perpage}";
//echo $sql_limit;
$query = mysqli_query($con, $sql);
$num_rows = mysqli_num_rows($query);

 /*$total_pages_sql = "SELECT COUNT(criminal_id) FROM tb_criminal1";
 $result_page = mysqli_query($con,$sql);
 $total_rows = mysqli_fetch_array($result_page)[0];
 $total_pages = ceil($num_rows / $perpage);
 $result;
 echo $num_rows;*/
$per_page = 5;   // Per Page
$page = 1;	
	
	if(isset($_GET["Page"]))
	{
		$page = $_GET["Page"];
		
		
	}

	$prev_page = $page-1;
	$next_page = $page+1;

	echo $row_start = (($per_page*$page)-$per_page);


	if($num_rows<=$per_page)
	{
		$num_pages =1;
	}
	else if(($num_rows % $per_page)==0)
	{
		$num_pages =($num_rows/$per_page) ;
	}
	else
	{
		$num_pages =($num_rows/$per_page)+1;
		$num_pages = (int)$num_pages;
	}
	echo $row_end = $per_page * $page;
	if($row_end > $num_rows)
	{
		$row_end = $num_rows;
	}

	$sql .= " ORDER BY catch_date DESC LIMIT $row_start ,$per_page ";
	$query = mysqli_query($con,$sql);
 

?>	
                            <div class="col-12">
                            <div class="card">
                                <div class="card-content">
                                    <div class="card-body">
                                        
                                        <!-- Table with outer spacing -->
                                        <div style="font-size:auto">
                                        <div class="table-responsive">
                                        <h4 class="card-title" >ข้อมูลผู้ต้องหา</h4>
                                            <table class="table " style="width=auto;font-size:auto">
    <thead>
    <tr>
	  <th width="auto" style="background-color:#435ebe;color:white;border-radius: 8px 0 0 8px"> <div align="left">ลำดับ</div></th>
    <th width="auto" style="background-color:#435ebe;color:white"> <div align="center">วันที่จับกุม</div></th>												
    <th width="auto" style="background-color:#435ebe;color:white"> <div align="center">ชื่อ-นามสกุล (ผตห.)</div></th>
    <th width="50px" style="background-color:#435ebe;color:white"> <div align="center">อายุ </div></th>
    <th width="auto" style="background-color:#435ebe;color:white"> <div align="center">เพศ </div></th>
    
    <th width="auto" style="background-color:#435ebe;color:white"> <div align="center">รหัสบัตรประชาชน </div></th>
    <th width="100px" style="background-color:#435ebe;color:white"> <div align="center">ที่อยู่ </div></th>	
	  <th width="auto" style="background-color:#435ebe;color:white"> <div align="center">ฐานความผิด </div></th>
    <th width="auto" style="background-color:#435ebe;color:white"> <div align="center"> ประเภทจับกุม</div></th>
    <?php if($crime_id=='99'){echo '<th width="auto" style="background-color:#435ebe;color:white"> <div align="left">ภาพถ่าย </div></th>';}?>
    <?php if($crime_id=='99'){echo '<th width="auto" style="background-color:#435ebe;color:white"> <div align="left">วิดีโอ </div></th>';}?>
    <th width="auto" style="background-color:#435ebe;color:white"> <div align="left">เอกสาร </div></th>										
    <th width="auto" style="background-color:#435ebe;color:white;border-radius: 0 8px 8px 0"> <div align="left">เรียกดู </div></th>											
    
		</thead>											
		</tr>
						<?php
						$i=1;
                        if($page > 1){
                        $i = ($per_page * ($page-1)) + 1;
                        }
						while($result=mysqli_fetch_array($query))
						{
							if($result["type_arrest"]=="1"){
								$type_arrest_result="จับกุมซึ่งหน้า";
							}else{
								$type_arrest_result="จับกุมตามหมายจับ";
							}
							
						?>
  <tbody>         
  <tr>
    <td><div align="center"><?php echo $i;?></div></td>
    <td width="120px"><div align="left"><?php echo $result["catch_date"];?></div></td>   
    <td><div align="left"><?php echo $result["name_title"].$result["criminal_fname"]."&nbsp;".$result["criminal_lname"];?></div></td>
    <td width="auto"><div align="center"><?php echo $result["age"];?> ปี</div></td>
    <td><div align="left"><?php echo $result["gender"];?></div></td>
    
    <td><div align="left"><?php echo $result["id_card"];?></div></td>
    <td width="auto" align="left" ><?php echo 'เลขที่'."&nbsp;".$result["address_num"]."&nbsp;".'หมู่'."&nbsp;".$result["vilage"]."&nbsp;".'ซ.'."&nbsp;".$result["soi_num"]."&nbsp;".'ถ.'."&nbsp;".$result["road"]."&nbsp;".'ต.'."&nbsp;".$result["tumbol"]."&nbsp;".'อ.'."&nbsp;".$result["aumphur"]."&nbsp;".'จ.'."&nbsp;".$result["province"];?>
	  </td>
    <td align="left"><?php echo $result["base_arrest"];?></td>
    <td align="left"><?php echo $type_arrest_result;?></td>
  <?php if($crime_id=='99'){
    echo '<td align="left"><a  class="btn btn-outline-primary" data-toggle="modal" data-target="#myModal'?><?=$result["criminal_id"]?><?php echo  '">
        <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-image" viewBox="0 0 16 16">
  		<path d="M6.002 5.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z"></path>
  		<path d="M2.002 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2h-12zm12 1a1 1 0 0 1 1 1v6.5l-3.777-1.947a.5.5 0 0 0-.577.093l-3.71 3.71-2.66-1.772a.5.5 0 0 0-.63.062L1.002 12V3a1 1 0 0 1 1-1h12z"></path>
		</svg></a></td>';
  }?>
  <?php if($crime_id=='99'){
	echo '<td align="left"><button type="button" class="btn btn-outline-primary" data-toggle="modal" data-target="#myModalvideo'?><?=$result["criminal_id"]?><?php echo'">
        <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-film" viewBox="0 0 16 16">
		  <path d="M0 1a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V1zm4 0v6h8V1H4zm8 8H4v6h8V9zM1 1v2h2V1H1zm2 3H1v2h2V4zM1 7v2h2V7H1zm2 3H1v2h2v-2zm-2 3v2h2v-2H1zM15 1h-2v2h2V1zm-2 3v2h2V4h-2zm2 3h-2v2h2V7zm-2 3v2h2v-2h-2zm2 3h-2v2h2v-2z"></path>
		</svg></button></td>';}?>
	  <td align="left"><button type="button" class="btn btn-outline-primary">
      <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-file-earmark-word-fill" viewBox="0 0 16 16">
      <path d="M9.293 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V4.707A1 1 0 0 0 13.707 4L10 .293A1 1 0 0 0 9.293 0zM9.5 3.5v-2l3 3h-2a1 1 0 0 1-1-1zM5.485 6.879l1.036 4.144.997-3.655a.5.5 0 0 1 .964 0l.997 3.655 1.036-4.144a.5.5 0 0 1 .97.242l-1.5 6a.5.5 0 0 1-.967.01L8 9.402l-1.018 3.73a.5.5 0 0 1-.967-.01l-1.5-6a.5.5 0 1 1 .97-.242z"></path>
      </svg></button></td> 
    <td align="left"><a type="button" class="btn btn-outline-primary" data-toggle="modal" data-target="#myModaldetail<?php echo $result['criminal_id'] ;?>">
		<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-table" viewBox="0 0 16 16">
  <path d="M0 2a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2zm15 2h-4v3h4V4zm0 4h-4v3h4V8zm0 4h-4v3h3a1 1 0 0 0 1-1v-2zm-5 3v-3H6v3h4zm-5 0v-3H1v2a1 1 0 0 0 1 1h3zm-4-4h4V8H1v3zm0-4h4V4H1v3zm5-3v3h4V4H6zm4 4H6v3h4V8z"></path>
</svg></a></td>


  </tr>
  </tbody>
   
  <?php $_SESSION['criminal_detail']=$result['criminal_id'];?>
 <!--Popup ภาพผู้หา-->
<!-- Modal -->
<div class="modal fade " id="myModal<?php echo $result['criminal_id'] ;?>"  role="dialog">
  <div class="modal-dialog modal-lg">

   <!-- Modal content-->
   <div class="modal-content " >
      <div class="modal-header justify-content-center">
        
        <h4>ภาพถ่ายผู้ต้องหา</h4>
      </div>
      <div class="modal-body " style="background-color: #435ebe;">
      <div class="container">
  <div class="row ">

    <div class="col-sm" style="text-align:center">
    <a href="assets/arrestfile/<?php echo $result['criminal_id']?>/Criminal_pic/001.jpg" ><img src="assets/arrestfile/<?php echo $result['criminal_id']?>/Criminal_pic/<?php echo $result['pic_f']?>" width="250" height="280"></a>  
    </div> 

    <div class="col-sm" style="text-align:center">
    <a href="assets/arrestfile/<?php echo $result['criminal_id']?>/Criminal_pic/002.jpg" ><img src="assets/arrestfile/<?php echo $result['criminal_id']?>/Criminal_pic/<?php echo $result['pic_l']?>" width="250" height="280"></a>
    </div>
    </div>
    <br/>
     <div class="row">
    <div class="col-sm" style="text-align:center">
        <h5 style="color:#FFFF"> ภาพหน้าตรง </h5>             
      </div> 
      <div class="col-sm" style="text-align:center">
          <h5 style="color:#FFFF">ภาพด้านซ้าย</h5>             
      </div> 
    </div>
    <hr style="color:#FFFF">
    <div class="row">
    <div class="col-sm" style="text-align:center">  <br/>
    <a href="assets/arrestfile/<?php echo $result['criminal_id']?>/Criminal_pic/003.jpg" ><img src="assets/arrestfile/<?php echo $result['criminal_id']?>/Criminal_pic/<?php echo $result['pic_r']?>" width="250" height="280"></a>
    </div>

    <div class="col-sm" style="text-align:center"> <br/>
    <a href="assets/arrestfile/<?php echo $result['criminal_id']?>/Criminal_pic/004.jpg" ><img src="assets/arrestfile/<?php echo $result['criminal_id']?>/Criminal_pic/<?php echo $result['pic_a']?>" width="250" height="280"></a>
    </div>
  </div>
  <br />
  <div class="row">
      <div class="col-sm" style="text-align:center">
            <h5 style="color:#FFFF">ภาพด้านขวา </h5>         
      </div> 
      <div class="col-sm" style="text-align:center">
             <h5 style="color:#FFFF">ภาพการจับกุม</h5>          
      </div> 
  </div>     
</div>
     
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-primary btn-lg" data-dismiss="modal" >ปิด</button>
      </div>
    </div>

  </div>
</div>
<!--End ภาพผู้ต้องหา-->

<!--Popup วิดีโอ ผู้ต้องหา-->
<!-- Modal -->


<div class="modal fade " id="myModalvideo<?php echo $result['criminal_id'] ;?>"  role="dialog">
  <div class="modal-dialog modal-lg">

    <!-- Modal content-->
    <div class="modal-content " >
      <div class="modal-header justify-content-center">
      
        <h4>ภาพถ่ายผู้ต้องหา</h4>
      </div>
      <div class="modal-body  " style="background-color: #435ebe; ">
      <div class="container " align="left">
      <div class="row">
        <div class="col-sm">
        <h4 style="color:#FFFF" align="center">   รายการวิดีโอ</h4>
        </div>
        <div class="col-sm">
        <h4 style="color:#FFFF" align="center">ชื่อเรื่อง</h4>
</div>
</div>
                        
                        <hr style="height:2px;border-width:0;color:#ffff;background-color:#FFFF">

<?php
$sql_video="select * from tb_crime_video where criminal_id='".$result["criminal_id"]."'";
$query_video = mysqli_query($con,$sql_video);

while($result_video = mysqli_fetch_array($query_video)){

?>     <div class="row">
        <div class="col-sm">
        <video  width="320" height="240" controls style="background-color:black"> 
        <source src="assets/arrestfile/<?php echo $result['criminal_id']?>/Video/<?php echo $result_video['video_name'];?>" type='video/mp4' />
        </video>
        </div>
        
        <div class="col-sm ">
        <h5 style="color:#FFFF" align="left"><?php echo $result_video['video_title'];?></h5>
        
</div>
</div>
        

<?php



}
?>  
  
     
</div>
</div>
      <div class="modal-header justify-content-end">
        <button type="button" class="btn btn-primary btn-lg" data-dismiss="modal" >ปิด</button>
      </div>
    </div>

  </div>
</div>
<!--End วิดีโอ ผู้ต้องหา-->

<!--Popup ดูข้อมูลผู้ต้องหา-->
<!-- Modal -->
<div class="modal fade " id="myModaldetail<?php echo $result['criminal_id'] ;?>"  role="dialog">
  <div class="modal-dialog modal-fullscreen">

    <!-- Modal content-->
    <div class="modal-content " >
      <div class="modal-header justify-content-start">
      <img src=assets/images/logo/logo.png width="5%"> 
        <h4>ข้อมูลการจับกุม</h4>
      </div>
      <div class="modal-body  " style="background-image: url('assets/images/bg/4853433.jpg');" >
      <div class="container "  align="left">
      

        <?php include ('paginator.class.php'); ?>
     
        </div>
        </div>
      <div class="modal-header justify-content-end">
        <button type="button" class="btn btn-primary btn-lg" data-dismiss="modal" >ปิด</button>
      </div>
    </div>

  </div>
</div>
<!--End วิดีโอ ผู้ต้องหา-->



<?php
$i++;
}

?>

</table>

											
<style>											
.li-hover a:hover {
    background: #435ebe; //background instead of background-image
}	
</style>
<!--แสดงผล-->									
<div class="from-control">

จำนวน <?php echo $num_rows;?> แถว : <?php echo $num_pages;?> หน้า :
<?php
if($prev_page)
{
	echo " <a href='$_SERVER[SCRIPT_NAME]?Page=$prev_page&$strKeyword'><< Back</a> ";
}

for($m=1; $m<=$num_pages; $m++){
	if($m != $page)
	{
		echo "[ <a href='$_SERVER[SCRIPT_NAME]?Page=$m&$strKeyword'>$m</a> ]";
	}
	else
	{
		echo "<b> $m </b>";
	}
}
if($page!=$num_pages)
{
	echo " <a href ='$_SERVER[SCRIPT_NAME]?Page=$next_page&txtKeyword=$strKeyword'>Next>></a> ";
}

?>	

เวลากดหน้าที่ 2 มันแสดงข้อมูลทั้งหมดแทนครับ



Tag : PHP, MySQL







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2021-07-15 17:01:51 By : gmgo View : 445 Reply : 1
 

 

No. 1



โพสกระทู้ ( 296 )
บทความ ( 0 )



สถานะออฟไลน์


เจอผู้ต้องสงสัยหนึ่งคน...ส่วนย่านอื่นประชากรหนาแน่น ไม่สามารถตรวจสอบได้ทั่วถึง...รอฝ่ายพิสูจน์หลักฐาน
Code
<a href='$_SERVER[SCRIPT_NAME]?Page=$m&$strKeyword'>$m</a>







แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2021-07-19 07:37:06 By : TheGreatGod_of_Death
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : สอบถามเรื่อง code แบ่งหน้าครับ ทำไมเวลากด search แล้วคลิกหน้าถัดดไปมันไม่เข้าเงื่อนไข search
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 03
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่