|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /home/queenjbs/junsu/ |
Upload File : |
<?
require $_SERVER['DOCUMENT_ROOT']."/conf/conf_dir.php";
$tableName="photo_gallery";
include "include_where.php";
if(!$pageCount) $pageCount =9;
$show_one_page = $pageCount;
$show_view_page = 5;
$page = ( $page ) ? $page : 1;
$offset = ($page-1)*$show_one_page;
$query_limit = "limit $offset,$show_one_page";
$QUERY_TOTAL = "SELECT count(*) FROM $tableName WHERE is_delete='N' $where";
$QUERY = "SELECT * FROM $tableName WHERE is_delete='N' $where ORDER BY order_by asc,no desc $query_limit";
$total_count = get_db($QUERY_TOTAL);
$result= mysql_query($QUERY,$db_con);
$total = mysql_affected_rows();
$total_page = ceil( $total_count / $show_one_page);
$start_num = $total_count - $offset;
$more_next_page = $page+1;
$viewMore = ($pageCount >=$total_count) ? "" : "<a href='javascript:fnMore(\"$tableName\");' class='btn_cla' id='$more_next_page' data-total='$total_page'><div class='pagination03'><img src='../images/sub/sub_pagbar_more.png'></div></div></a>";
for($i=0;$i< $total;$i++){
if($total_count==0){
//$imgNames="<img src='../../images/academy/sample_img04.jpg'/>";
//$subject ="모델 사진 준비중";
}else{
$row = mysql_fetch_array($result);
$regDate = substr($row[reg_date],0,10);
unset($imgNames,$New_icon,$New_secret);
$Num = $row[no];
// if($row[files_count]){
//echo "SELECT file_name FROM files where module_no = '$row[no]' and module_name='$tableName' and module_type='T' order by order_by";
$imgfileName = get_db("SELECT file_name FROM files where module_no = '$row[no]' and module_name='gallery' and module_type='C' order by order_by");
//$imgNames = "<img src='/files/muti/thump/$imgfileName' width='312px'/>";
//}else{
// $imgNames = "<img src='/files/muti/thump/$imgfileName' width='312px'/>";
//}
$subject = $row[subject];
}
if($row[start_date] == $today){$New_icon="<font color=orange><b>NEW</b></font>";}
if($row[is_secret] == 'Y'){$New_secret="<font color='red'>[SECRET]</font>";}
if($sessionIDX){
$tmp_a = "<a href=\"javascript:openshow($row[no],'$page')\" class='gallery_layer_a'>";
}else{
$tmp_a = "<a href=\"javascript:alert('ログインしてください.'); location.href='./login.php'\" class='gallery_layer_a'>";
}
$photoList .=
"
<div id='post".$Num."' class='gallery_ls_box' style='background-image:url(\"/files/muti/gallery/$imgfileName\" ); background-size: cover; background-repeat:no-repeat;background-position:".$row[general_setting]."'>
$tmp_a
<div class='gallery_layer_bg'></div>
<div class='gallery_layer' >
<dl>
<dt>$subject $New_icon $New_secret</dt>
<dd>
<ul>
<li class='li_gubun'><img src='../images/sub/icon_main_gallery_01.png' /> $row[voted_count]名</li>
<li class='li_like'><img src='../images/sub/icon_main_gallery_03.png' /> $row[reply_count]</li>
</ul>
</dd>
<dd class='icon'><img src='../images/sub/icon_main_gallery_02.png' /></dd>
</dl>
</div>
</a>
</div>
";
}
echo $photoList;
if($page == 1) echo "<input type='hidden' name='total-page' id='total-page' value='$total_page'>";
?>