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/ |
Upload File : |
<?php include 'igallery/dbconnect.php';?> <!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> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <style type="text/css"> #PicActivity { width:700px; background-color:#FFFFFF; } #mainpic { margin-top:5px; width:350px; display:inline-block; float:left; background-color:#FFFFFF; } .title-album{ background-color: #6633ff; height:auto; margin-top:-5px; padding:5px 5px 5px 5px; color: #FFF; float:left; z-index:100;} .title-album a{ text-decoration:none; color:#FFF; } .title-album a:hover{ text-decoration:underline; } #showpic { width:350px; display:inline-block; float:right; background-color:#FFF; } ul.showInColumn{ display:block;float:right; list-style:none; padding:0;margin:0; width:350px; /* background-color:#FFCCCC;*/ border:0px solid #FFF; /* เทียบใกล้เคียงกับการกำหนด ของ table */ padding:2px 0 2px 2px; } ul.showInColumn li{ list-style:none; display:block;float:left; background-color:#FFF; margin:2px; /* เทียบใกล้เคียงกับการกำหนด cellspacing" ของ table */ margin-left:3px; padding:5px; /* เทียบใกล้เคียงกับการกำหนด cellpadding ของ table */ border:0px solid #FFF; /* เทียบใกล้เคียงกับการกำหนด border ใน td ของ table */ width:160px; /* กำหนดความกว้างของแต่ละคอลัมน์ */ height:160px; } </style> </head> <body> <div id="PicActivity"> <div id="mainpic"> <?php $sql = "SELECT * from gallery"; $sql .= " WHERE album_id=2"; $sql .= " ORDER BY gallery_date DESC"; $query = mysqli_query($conn,$sql); if($result=mysqli_fetch_array($query,MYSQLI_ASSOC)) { $message_group=iconv_substr($result["gallery_name"], 0,350, "UTF-8"); $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 = "igallery/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 = "igallery/image_gallery/" . $result["gallery_id"] . "/" . $result2["image_file"]; } else { $cover_image = ""; } } ?> <a href="<? echo "igallery/image_view.php?id=" . $result["gallery_id"];?>"><img src="<? echo $cover_image;?>" width="350" border="0" ></a> <p class="title-album"> <a href="<? echo "igallery/image_view.php?id=" . $result["gallery_id"];?>"><? echo $message_group;?> » อ่านต่อ</a></p> <?php } ?> </div> <div id="showpic"> <ul class="showInColumn"> <?php $sql = "SELECT * from gallery"; $sql .= " WHERE album_id=2"; $sql .= " ORDER BY gallery_date DESC LIMIT 1,4"; $query = mysqli_query($conn,$sql); while($result=mysqli_fetch_array($query,MYSQLI_ASSOC)) { $message_group=iconv_substr($result["gallery_name"], 0,50, "UTF-8"); $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 = "igallery/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 = "igallery/image_gallery/" . $result["gallery_id"] . "/" . $result2["image_file"]; } else { $cover_image = ""; } } ?> <li><a href="<? echo "igallery/image_view.php?id=" . $result["gallery_id"];?>"><img src="<? echo $cover_image;?>" width="150" height="100" border="0"></a> <a href="<? echo "igallery/image_view.php?id=" . $result["gallery_id"];?>"><? echo $message_group;?> » อ่านต่อ</a></li> <?php } ?> </ul> </div> </div> </body> </html>