%PDF-1.5 % ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY
| Server IP : 122.155.177.87 / Your IP : 122.155.177.87 Web Server : Apache/2 System : Linux cat177-87.static.lnwhostname.com 3.10.0-1160.62.1.el7.x86_64 #1 SMP Tue Apr 5 16:57:59 UTC 2022 x86_64 User : apache ( 994) PHP Version : 5.3.29 Disable Function : dl,eval,exec,mail,passthru,popen,posix_getpwuid,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_uname,proc_close,proc_open,putenv,shell_exec,show_source,system MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/moungngam/domains/moungngam.go.th/public_html/albums/ |
Upload File : |
<?
Header("Content-Type: text/html; charset=UTF-8");;
include("../include/config.php");
include("../include/function.php");
include("../include/config_db.php");
//$sql = "select * From `activity_album` where (`alb_default`=1) and (`sst_id`=1) ";
$sql = "select * from `activity_album` where 1 order by `order_item` Desc ,`date_publish` Desc limit 1 ";
$result = mysql_query($sql) or die("Can't send query !A");
$c_alb_id = 0;
$num_rows = mysql_num_rows($result);
if($num_rows>0){
$c_alb_id = mysql_result($result, 0,"id");
$c_alb_title = mysql_result($result, 0,"alb_title");
$c_alb_counter = mysql_result($result, 0,"alb_counter");
$c_alb_counter = $c_alb_counter + 1;
$sql = "update `activity_album` set `alb_counter`='$c_alb_counter' where (`id`='$c_alb_id')";
$dbquery = mysql_query($sql) or die("ไม่สามารถบันทึกข้อมูลได้ !B");
unset($dbquery);
}
mysql_free_result($result);
unset($result);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> อัลบั้มภาพกิจกรรม <?=$c_alb_title;?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="KeyWords" content="<?=$c_alb_title;?>, องค์การบริหารส่วนตำบลเกาะสาหร่าย, ตำบลเกาะสาหร่าย, อัลบั้มภาพกิจกรรม" />
<meta name="Description" content="อัลบั้มภาพกิจกรรม <?=$c_alb_title;?> องค์การบริหารส่วนตำบลเกาะสาหร่าย ตำบลเกาะสาหร่าย อำเภอเมือง จังหวัดสตูล 91000 : www.kohsarai.go.th" />
<meta name="ROBOTS" content="index, follow" />
<meta http-equiv="CACHE-CONTROL" content="NO-CACHE">
<meta http-equiv="EXPIRES" content="Sun, 1 Jan 2000 12:00:00 GMT">
<meta http-equiv="PRAGMA" content="NO-CACHE">
<link href="svstyles.css?v=<?php echo filemtime('svstyles.css');?>" rel="stylesheet" type="text/css" />
<script type="text/javascript">
//If using image buttons as controls, Set image buttons' image preload here true
//(use false for no preloading and for when using no image buttons as controls):
var preload_ctrl_images=true;
//And configure the image buttons' images here:
var previmg='left.gif';
var stopimg='stop.gif';
var playimg='play.gif';
var nextimg='right.gif';
var slides2=[]; //SECOND SLIDESHOW
//optional properties for these images:
//slides2.no_nameriptions=1; //use for no descriptions displayed
//slides2.desc_prefix='<b>Description:<\/b> '; //string prefix for image descriptions display
slides2.controls_top=1; //use for top controls
slides2.counter=1; //use to show image count
//slides2.specs='width=900, height=600'; //global specifications for this show's new window(s)
slides2.width=900; //use to set width of widest image if dimensions vary
slides2.height=600; //use to set height of tallest image if dimensions vary
//slides2.no_auto=1; //use to make show completely user operated (no play button, starts in stopped mode)
//slides2.use_alt=1; //use for descriptions as images alt attributes
//slides2.use_title=1; //use for descriptions as images title attributes
//slides2.nofade=1; //use for no fade-in, fade-out effect for this show
slides2.border=2; //set border width for images
slides2.border_color='lightblue'; //set border color for images
slides2.image_controls=1; //use images for controls
slides2.button_highlight='#cccccc'; //onmouseover background-color for image buttons (requires image_controls=1)
//slides2.random=1; //set a random slide sequence on each page load
slides2.manual_start=0; //start show in manual mode (stopped)
slides2.delay=5000; //will set miliseconds delay between slides for a given show, may also be set in the call as the last parameter
slides2.fadecolor='#e6e5c6'; //will set fading images background color, defaults to white
slides2.pause=1; //use for pause onmouseover
//Notes:
//slides#.target will set a target for a slide group, will be overridden by slides#[#][3], if present
//slides#.no_controls will set a slide show with no controls
//slides#.jumpto=1 will display added controls to jump to a particular image by its number
//slides#.no_added_linebreaks=1; use for no added line breaks in formatting of texts and controls
</script>
<script src="slideshow.js" type="text/javascript"></script>
<style type="text/css">
<!--
body {
width: 100%;
height:auto;
background-image:url(../images/images/bg3.jpg);
background-repeat: no-repeat; background-position:top;
background-size: 100%;
font-family: thai_sans_literegular, thai_sans_literegular, Helvetica, sans-serif;
background-color:#7f9e12;
}
.style2 {color: #CC6633}
-->
</style>
</head>
<style>
body{
margin:0;
padding:0;
background:#eef3f8;
font-family:tahoma, 'TH Sarabun New';
}
/* =========================
TOP MENU
========================= */
.top-menu{
width:100%;
max-width:980px;
margin:auto;
margin-top:15px;
}
.menu-grid{
display:grid;
grid-template-columns:repeat(6,1fr);
gap:10px;
}
.menu-box{
background:linear-gradient(135deg,#0f4c81,#1787d7);
border-radius:14px;
overflow:hidden;
transition:.3s;
box-shadow:0 4px 15px rgba(0,0,0,0.10);
}
.menu-box:hover{
transform:translateY(-5px);
box-shadow:0 10px 25px rgba(0,0,0,0.18);
}
.menu-box a{
display:block;
color:#fff;
text-decoration:none;
text-align:center;
padding:18px 5px;
font-size:16px;
font-weight:bold;
}
.menu-icon{
font-size:32px;
margin-bottom:8px;
}
/* =========================
TITLE
========================= */
.page-title{
width:980px;
margin:auto;
margin-top:25px;
margin-bottom:20px;
background:#fff;
border-radius:18px;
box-shadow:0 4px 18px rgba(0,0,0,0.08);
overflow:hidden;
}
.page-title img{
width:100%;
max-width:600px;
display:block;
margin:auto;
padding:15px;
}
/* =========================
CONTACT BOX
========================= */
.contact-header{
text-align:center;
margin-bottom:25px;
}
.contact-header h2{
margin:0;
color:#005baa;
font-size:34px;
}
.contact-header p{
margin-top:10px;
color:#444;
font-size:22px;
}
/* =========================
FORM BOX
========================= */
.form-wrapper{
width:950px;
margin:auto;
background:#fff;
border-radius:22px;
padding:35px;
box-shadow:0 8px 30px rgba(0,0,0,0.08);
border:1px solid #dfe8f1;
}
.form-table{
width:100%;
}
.form-table td{
padding:8px;
font-size:18px;
}
.form-label{
width:180px;
text-align:right;
color:#003d73;
font-weight:bold;
vertical-align:top;
}
.input-box{
width:100%;
padding:12px 15px;
border:1px solid #ccd8e5;
border-radius:12px;
font-size:16px;
transition:.3s;
box-sizing:border-box;
}
.input-box:focus{
outline:none;
border:1px solid #1787d7;
box-shadow:0 0 8px rgba(23,135,215,.2);
}
.textarea-box{
width:100%;
height:180px;
resize:none;
}
/* =========================
CAPTCHA
========================= */
.captcha-box{
display:flex;
align-items:center;
gap:10px;
}
.reload-btn{
cursor:pointer;
transition:.3s;
}
.reload-btn:hover{
transform:rotate(180deg);
}
/* =========================
BUTTON
========================= */
.btn-area{
text-align:center;
padding-top:20px;
}
.btn-submit{
background:linear-gradient(135deg,#009688,#00bfa5);
color:#fff;
border:none;
padding:14px 40px;
border-radius:50px;
font-size:18px;
cursor:pointer;
margin-right:10px;
transition:.3s;
font-weight:bold;
}
.btn-submit:hover{
transform:translateY(-3px);
box-shadow:0 8px 20px rgba(0,150,136,.3);
}
.btn-reset{
background:#e5e5e5;
color:#333;
border:none;
padding:14px 40px;
border-radius:50px;
font-size:18px;
cursor:pointer;
transition:.3s;
font-weight:bold;
}
.btn-reset:hover{
background:#ccc;
}
/* =========================
SUCCESS
========================= */
.success-box{
background:#f0fff4;
border:2px solid #4caf50;
border-radius:18px;
padding:40px;
text-align:center;
color:#2e7d32;
font-size:28px;
line-height:50px;
font-weight:bold;
}
/* =========================
MOBILE
========================= */
@media screen and (max-width: 980px){
.top-menu,
.page-title,
.form-wrapper{
width:95%;
}
.menu-grid{
grid-template-columns:repeat(2,1fr);
}
.form-label{
width:100%;
text-align:left;
display:block;
}
.form-table tr{
display:block;
margin-bottom:10px;
}
.form-table td{
display:block;
width:100%;
}
}
</style>
<body >
<div class="top-menu">
<div class="menu-grid">
<div class="menu-box">
<a href="/index.php">
<div class="menu-icon">
<i class="fa-solid fa-house"></i>
</div>
หน้าหลัก
</a>
</div>
<div class="menu-box">
<a href="/news.php?cat_id=1">
<div class="menu-icon">
<i class="fa-solid fa-newspaper"></i>
</div>
ข่าวประชาสัมพันธ์
</a>
</div>
<div class="menu-box">
<a href="/news.php?cat_id=2">
<div class="menu-icon">
<i class="fa-solid fa-bullhorn"></i>
</div>
ประกาศจัดซื้อจัดจ้าง
</a>
</div>
<div class="menu-box">
<a href="/albums/index.php" target="_blank">
<div class="menu-icon">
<i class="fa-solid fa-image"></i>
</div>
ภาพกิจกรรม
</a>
</div>
<div class="menu-box">
<a href="/contacts/?scon_id=2" target="_blank">
<div class="menu-icon">
<i class="fa-solid fa-envelope"></i>
</div>
ติดต่อเรา
</a>
</div>
<div class="menu-box">
<a href="/office.php">
<div class="menu-icon">
<i class="fa-solid fa-building"></i>
</div>
ข้อมูลหน่วยงาน
</a>
</div>
</div>
</div>
<style>
*{
margin:0;
padding:0;
box-sizing:border-box;
}
/* =========================
MAIN SECTION
========================= */
.activity-section{
width:100%;
padding:40px 0 80px;
background:#d9f3fb;
font-family:tahoma,'Sarabun',sans-serif;
}
/* =========================
TOP BAR
========================= */
.activity-top{
width:100%;
max-width:1400px;
margin:auto;
display:flex;
justify-content:space-between;
align-items:center;
gap:20px;
flex-wrap:wrap;
padding:0 15px 25px;
}
.activity-count{
font-size:34px;
font-weight:bold;
color:#111;
}
.activity-count span{
color:#0057b8;
}
/* =========================
SEARCH
========================= */
.activity-search{
display:flex;
gap:10px;
flex-wrap:wrap;
}
.activity-search select,
.activity-search input{
height:52px;
border:none;
border-radius:10px;
padding:0 18px;
font-size:18px;
background:#fff;
box-shadow:0 3px 10px rgba(0,0,0,.08);
}
.activity-search select{
width:290px;
}
.activity-search input{
width:240px;
}
.activity-search button{
height:52px;
padding:0 28px;
border:none;
border-radius:10px;
background:#fff;
cursor:pointer;
font-size:18px;
font-weight:bold;
transition:.3s;
box-shadow:0 3px 10px rgba(0,0,0,.08);
}
.activity-search button:hover{
background:#0f6bcf;
color:#fff;
}
/* =========================
GRID
========================= */
.album-wrap{
width:100%;
max-width:1400px;
margin:auto;
display:grid;
grid-template-columns:repeat(auto-fit,minmax(290px,1fr));
gap:26px;
padding:0 15px;
}
/* =========================
CARD
========================= */
.album-card{
background:#efefef;
overflow:hidden;
transition:.35s;
box-shadow:0 6px 20px rgba(0,0,0,.08);
border:1px solid #d7d7d7;
}
.album-card:hover{
transform:translateY(-8px);
box-shadow:0 14px 35px rgba(0,0,0,.16);
}
/* =========================
IMAGE
========================= */
.album-image{
width:100%;
height:240px;
overflow:hidden;
background:#ddd;
}
.album-image img{
width:100%;
height:100%;
object-fit:cover;
image-rendering:auto;
transition:.5s;
}
.album-card:hover .album-image img{
transform:scale(1.08);
}
/* =========================
BODY
========================= */
.album-body{
padding:22px;
background:#efefef;
}
.album-title{
font-size:20px;
line-height:1.7;
color:#111;
min-height:115px;
overflow:hidden;
}
.album-title a{
color:#111;
text-decoration:none;
}
.album-title a:hover{
color:#0057b8;
}
/* =========================
META
========================= */
.album-meta{
margin-top:10px;
display:flex;
justify-content:space-between;
align-items:center;
gap:10px;
flex-wrap:wrap;
}
.album-view{
font-size:17px;
color:#333;
}
.album-new{
display:inline-block;
background:red;
color:#fff;
padding:2px 7px;
font-size:12px;
border-radius:4px;
margin-left:6px;
position:relative;
top:-2px;
}
.album-btn{
display:inline-block;
background:#0057b8;
color:#fff !important;
text-decoration:none;
padding:10px 20px;
border-radius:50px;
font-size:15px;
transition:.3s;
}
.album-btn:hover{
background:#003f85;
}
/* =========================
PAGINATION
========================= */
.pagination{
width:100%;
text-align:center;
margin-top:50px;
}
.pagination a,
.pagination span{
display:inline-block;
min-width:44px;
height:44px;
line-height:44px;
margin:4px;
border-radius:50px;
text-decoration:none;
font-size:17px;
background:#fff;
color:#333;
box-shadow:0 3px 10px rgba(0,0,0,.08);
}
.pagination a:hover{
background:#0f6bcf;
color:#fff;
}
.pagination .active{
background:#0f6bcf;
color:#fff;
}
/* =========================
RESPONSIVE
========================= */
@media(max-width:768px){
.activity-top{
flex-direction:column;
align-items:flex-start;
}
.activity-count{
font-size:24px;
}
.activity-search{
width:100%;
}
.activity-search select,
.activity-search input,
.activity-search button{
width:100%;
}
.album-title{
font-size:18px;
min-height:auto;
}
}
</style>
<section class="activity-section">
<!-- TOP -->
<div class="activity-top">
<div class="activity-count">
จำนวนภาพกิจกรรมทั้งหมด
<span>
<?
echo number_format($Num_Rows);
?>
</span>
รายการ
</div>
<form method="get"
action="activities.php"
class="activity-search">
<select name="cat_id">
<option value="">
-- กรุณาเลือกหมวด --
</option>
<?
$sql_cat = "select * from activity_category
order by order_item asc";
$result_cat = mysql_query($sql_cat);
while($row_cat = mysql_fetch_assoc($result_cat))
{
?>
<option value="<?=$row_cat["id"];?>">
<?=$row_cat["cat_name"];?>
</option>
<?
}
?>
</select>
<input type="text"
name="keyword"
placeholder="คำค้นหา">
<button type="submit">
ค้นหา
</button>
</form>
</div>
<!-- GRID -->
<div class="album-wrap">
<?
$sql = "select * From `activity_album`
where 1 ";
/* SEARCH */
if(trim($_GET["keyword"]) != "")
{
$keyword = trim($_GET["keyword"]);
$sql .= "and (
`alb_title` like '%$keyword%'
) ";
}
$sql .= "Order by
`order_item` Desc,
`date_publish` Desc,
`id` Desc ";
/* PAGINATION */
$item = 0;
$Per_Page = 12;
if(!$_GET['Page'])
{
$Page = 1;
}
else
{
$Page = $_GET['Page'];
}
$Prev_Page = $Page-1;
$Next_Page = $Page+1;
$Page_start =
($Per_Page*$Page)-$Per_Page;
/* COUNT */
$sql_2 = "SELECT COUNT(*) AS num_rows_2
FROM `activity_album`
where 1 ";
$dbquery = mysql_query($sql_2);
$Num_Rows = mysql_num_rows($dbquery);
if($Num_Rows>0)
{
$Num_Rows =
mysql_result($dbquery,0,"num_rows_2");
}
mysql_free_result($dbquery);
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;
/* LIMIT */
$sql .= " LIMIT $Page_start,$Per_Page ";
$result = mysql_query($sql);
while($row = mysql_fetch_assoc($result))
{
$c_id = $row["id"];
$c_alb_title =
trim($row["alb_title"]);
if(strlen($c_alb_title) > 90)
{
$c_alb_title =
trim(
utf8_substr(
$c_alb_title,
0,
90
)
)."...";
}
$c_alb_thumb =
trim($row["alb_thumb"]);
$c_date_publish =
$row["date_publish"];
$c_date =
dateThai_MM($c_date_publish);
$c_alb_counter =
$row["alb_counter"];
/* IMAGE */
if($c_alb_thumb != "")
{
$images =
"../photoThumbnail/albums/thumb/".$c_alb_thumb;
}
else
{
$images = "images/noimage.gif";
}
/* COUNT PIC */
$sqlp =
"select `alb_id`
From `activity_album_detail`
where (`alb_id`='$c_id')";
$resultp = mysql_query($sqlp);
$num_pic = mysql_num_rows($resultp);
?>
<!-- CARD -->
<div class="album-card">
<!-- IMAGE -->
<div class="album-image">
<a href="activities.php?salb_id=<?=$c_id;?>">
<img src="<?=$images;?>"
alt="<?=$c_alb_title;?>">
</a>
</div>
<!-- BODY -->
<div class="album-body">
<div class="album-title">
<a href="activities.php?salb_id=<?=$c_id;?>">
<?=$c_alb_title;?>
</a>
</div>
<!-- META -->
<div class="album-meta">
<div class="album-view">
[ดู : <?=$num_pic;?>]
<span class="album-new">
NEW
</span>
</div>
</div>
</div>
</div>
<?
mysql_free_result($resultp);
}
mysql_free_result($result);
?>
</div>
<!-- PAGINATION -->
<div class="pagination">
<?
$PHP_SELF = $_SERVER['PHP_SELF'];
if($Prev_Page)
{
echo "
<a href='$PHP_SELF?Page=$Prev_Page'>
‹
</a>";
}
for($i=1;$i<=$Num_Pages;$i++)
{
if($i != $Page)
{
echo "
<a href='$PHP_SELF?Page=$i'>
$i
</a>";
}
else
{
echo "
<span class='active'>
$i
</span>";
}
}
if($Page != $Num_Pages)
{
echo "
<a href='$PHP_SELF?Page=$Next_Page'>
›
</a>";
}
?>
</div>
</section></body>
</html>