h(  ) ($6;EbBLkfu�_l� ''8;DUFKV3Dd#,?ANk&5G$/(5M\^�ms����Sb�,;R''6c2I�!\����kx�Ve�[i��Me�IYO7:nOL~�Kr�qrv�I:�BM�y��s}r��K����x)1�6@r*2�89ma��&��'ti������{~#������t)1�2<�0:^5�W.uFzQ/u}�v��vv�u��U37yDJeEJo(/�5Ds'1�:Jlu�iy�iy�hw�1;:S`^BMLOQQn,4�7C�8C�>Lfe�]k�[i�Zg��IW�LZ�EP;,.��Tc�q(0) G,/]/1����w�r��l&-t*3�<<�u��#����j&.u��J68\8?"#$%&'()*+,-./0 ! 
Notice: Undefined index: dl in /var/www/html/web/simple.mini.php on line 1
403WebShell
403Webshell
Server IP : 10.254.12.21  /  Your IP : 10.254.12.21
Web Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.6.40
System : Linux arit.skru.ac.th 3.10.0-1160.76.1.el7.x86_64 #1 SMP Wed Aug 10 16:21:17 UTC 2022 x86_64
User : apache ( 48)
PHP Version : 5.6.40
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/lib/selectbook2021/pages/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/lib/selectbook2021/pages/index_old.php
<?php include 'dbconnect.php';?>
<?php include 'header.php';?>

<?php
	$pagetitle_text = "รายการซ่อม";
?>		  
                        <h1 class="page-header"><?php echo $pagetitle_text;?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="index.php"><button type="button" class="btn btn-warning">ดูทั้งหมด</button></a>&nbsp;&nbsp;&nbsp;<a href="repair_add.php"><button type="button" class="btn btn-primary">แจ้งซ่อม</button></a></h1>		
<?php
	$strKeyword = null;

	if(isset($_POST["txtKeyword"]))
	{
		$strKeyword = $_POST["txtKeyword"];
	}
	if(isset($_GET["txtKeyword"]))
	{
		$strKeyword = $_GET["txtKeyword"];
	}
?>
<form name="frmSearch" method="post" action="<?php echo $_SERVER['SCRIPT_NAME'];?>">
  <table width="599" border="0">
    <tr>
      <th>คำค้น
      <input name="txtKeyword" type="text" id="txtKeyword" value="<?php echo $strKeyword;?>">
      <input type="submit" value="Search"></th>
    </tr>
  </table>
</form>
<BR>
<?php	
	/* $sql = "SELECT donate_detail.donate_detail_id, donate_detail.donate_number, donate_detail.send_date, donate_detail.send_name, donate_detail.organization, dbook.dbook_id, dbook.title, dbook.author, dbook.amount, dbook.file_amount, dbook_type.dbook_type_name, dbook_status.dbook_status_name,dbook.dbook_status_id";
	$sql .= " FROM ((dbook INNER JOIN dbook_status ON dbook.dbook_status_id = dbook_status.dbook_status_id) INNER JOIN dbook_type ON dbook.dbook_type_id = dbook_type.dbook_type_id) INNER JOIN donate_detail ON dbook.donate_detail_id = donate_detail.donate_detail_id";
	$sql .= " WHERE ( (dbook.title LIKE '%" . $strKeyword . "%')";
	$sql .= " OR (dbook.author LIKE '%" . $strKeyword . "%')";
	$sql .= " OR (donate_detail.donate_number LIKE '%" . $strKeyword . "%')";
	$sql .= " OR (donate_detail.send_name LIKE '%" . $strKeyword . "%')";
	$sql .= " OR (donate_detail.organization LIKE '%" . $strKeyword . "%') )";
	$sql .= " ORDER BY dbook.dbook_id DESC"; */
	
	$sql = "SELECT * FROM repair_detail";
	if ($strKeyword <> "")
	{
		$sql .= " WHERE ( (informer LIKE '%" . $strKeyword . "%')";
		$sql .= " OR (hardware_name LIKE '%" . $strKeyword . "%')";
		$sql .= " OR (hardware_number LIKE '%" . $strKeyword . "%')";
		$sql .= " OR (detail LIKE '%" . $strKeyword . "%') )";	
	}
	$sql .= " ORDER BY repair_id DESC";

	$query = mysqli_query($conn,$sql);

	$num_rows = mysqli_num_rows($query);

	$per_page = 20;   // Per Page
	$page  = 1;
	
	if(isset($_GET["Page"]))
	{
		$page = $_GET["Page"];
	}

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

	$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;
	}

	$row_end = $per_page;
	//$row_end = $per_page * $page;
	//if($row_end > $num_rows)
	//{
	//	$row_end = $num_rows;
	//}


	$sql .= " LIMIT $row_start ,$row_end";
	$query = mysqli_query($conn,$sql);

	//$objQuery = mysql_query($strSQL);
	//$objResult = mysql_fetch_array($objQuery);
	//if(!$objResult)
	//{
	//		echo "ไม่มีข้อมูล";
	//}
	//else
	//{
?>
                                <table class="table table-striped table-bordered table-hover">
                                    <thead>
                                        <tr>
										<th><div align="center">ID แจ้งซ่อม</div></th>
                                        <th><div align="center">วันที่แจ้งซ่อม</div></th>
										<th><div align="center">ผู้แจ้งซ่อม</div></th>
                                        <th><div align="center">รายการที่ซ่อม</div></th>
										<th><div align="center">ผู้รับผิดชอบการซ่อม</div></th>
										<th><div align="center">วิธีซ่อม</div></th>
										<th><div align="center">สถานะการซ่อม</div></th>
                                        </tr>
                                    </thead>
                                <tbody>
<?php
while($result=mysqli_fetch_array($query,MYSQLI_ASSOC))
{
?>
                                    <tr>
										<td><a href="repair_detail.php?repair_id=<?php echo $result["repair_id"];?>"><?php echo $result["repair_id"];?></a></td>	
										<td><?php echo $result["inform_date"];?></td>
										<td><?php echo $result["informer"];?></td>
										<td><a href="repair_detail.php?repair_id=<?php echo $result["repair_id"];?>"><?php echo $result["hardware_name"];?></a></td>
										<td>
										<?php //echo $result["response_id"];?>
<?php
		$sql2 = "SELECT * from user";
		$sql2 .= " WHERE response_id =" . $result["response_id"];
		$query2 = mysqli_query($conn,$sql2);
		if($result2=mysqli_fetch_array($query2,MYSQLI_ASSOC))
		{
			echo $result2["firstname"] . " " . $result2["lastname"];
		}
		else
		{
			echo "<font color=red>ไม่มีผู้รับแจ้งซ่อม</font>";
		}
?>																			
										</td>
										<td>
										<?php //echo $result["method_id"];?>
<?php
		$sql2 = "SELECT * from repair_method";
		$sql2 .= " WHERE method_id =" . $result["method_id"];
		$query2 = mysqli_query($conn,$sql2);
		if($result2=mysqli_fetch_array($query2,MYSQLI_ASSOC))
		{
			echo $result2["method_name"];
		}
		else
		{
			echo "<font color=red>ไม่มีผู้รับแจ้งซ่อม</font>";
		}
?>
										</td>	
										<td>
										<?php //echo $result["status_id"];?>
<?php
		$sql2 = "SELECT * from repair_step";
		$sql2 .= " WHERE repair_id =" . $result["repair_id"];
		$sql2 .= " ORDER BY step_id DESC";
		$query2 = mysqli_query($conn,$sql2);
		if($result2=mysqli_fetch_array($query2,MYSQLI_ASSOC))
		{
			//echo $result2["status_id"];
			$sql3 = "SELECT * FROM repair_status";
			$sql3 .= " WHERE status_id=" . $result2["status_id"];
			$query3 = mysqli_query($conn,$sql3);
			if($result3=mysqli_fetch_array($query3,MYSQLI_ASSOC))
			{
				if($result3["status_color"]<>"")
				{
					echo "<font color=" . $result3["status_color"] . ">" . $result3["status_name"] . "</font>";		
				}
				else
				{
					echo $result3["status_name"];				
				}
			}
			else
			{
				echo $result2["status_id"];
			}
		}
		else
		{
			echo "<font color=red>ยังไม่ได้ดำเนินการ</font>";
		}
?>										
										</td>
                                    </tr>
<?php
}
?>									
                                </tbody>
                            </table>
                            <!-- /.table-responsive -->

<br>
Total <?php echo $num_rows;?> Record : <?php echo $num_pages;?> Page :
<?php
if($prev_page)
{
	echo " <a href='$_SERVER[SCRIPT_NAME]?Page=$prev_page&txtKeyword=$strKeyword'><< Back</a> ";
}

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

<?php include 'footer.php';?>

Youez - 2016 - github.com/yon3zu
LinuXploit