|
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/www/gallary/ |
Upload File : |
<div class="sub_title">
<h3><img src="/images/sub/sub_title_03.jpg" width="173" height="29" alt="gallery" /></h3>
<ul>
<li>Home</li>
<li>></li>
<li>Gallery</li>
</ul>
</div>
<ul class="board_area3">
<?
if($sessionLevel != 15 && $_SERVER['REMOTE_ADDR'] != $remoteAddr){
$userhitpage ="gallary";
$hitcount = Get_db("select hit from user_hit where name = '$userhitpage' and startDay = '$today'");
if(!$hitcount){
$queryhit = "INSERT INTO user_hit ( id, name, hit, startDay) VALUES ( '', '$userhitpage', '1', '$today')";
}else{
$queryhit = "update user_hit set hit = hit+1 where name='$userhitpage' and startDay = '$today'";
}
$hitresult = mysql_query($queryhit, $db_con);
}
// =============================================== Query
//$tableName = "notice";
$board_upload_src = "/files/muti/thump";
if(!$pageCount) $pageCount = 16;
$show_one_page = $pageCount;
$show_view_page = 10;
$page = ( $page ) ? $page : 1;
$offset = ($page-1)*$show_one_page;
if($key_word) {
$key_word = str_replace(" ","",$key_word);
$where = "AND $key LIKE '%$key_word%'";
}
if($sessionLevel !='15'){
$where .=" and is_secret='N' ";
}
$order_by = ' ORDER BY no DESC';
$url_tail = "&tab=$tab&tabs=$tabs&key=$key&order_by=$order_by";
$query_limit = "limit $offset,$show_one_page";
$QUERY_TOTAL = "SELECT count(*) FROM ".$gallayfirst."_".$tableName." where original_no=0 $where $order_by";
$QUERY_PAGE = "SELECT * FROM ".$gallayfirst."_".$tableName." where original_no=0 $where $order_by $query_limit";
$total_count = get_db($QUERY_TOTAL);
$Num = $total_count - $offset;
$total_page = ceil( $total_count / $show_one_page);
$start_num = $total_count - $offset; //
$viewlist = ( !$total_count ) ? "" : Get_viewpage($page,$total_count,$show_one_page,$show_view_page,$url_tail);
$result= mysql_query($QUERY_PAGE,$db_con);
if(!$result) {
error("DB_ERROR");
exit;
}
$total = mysql_affected_rows();
if ($total == 0){
echo ("<td style='padding-top:15px'>登録された情報がございません</td>");
}else{
?>
<li class="gal_thumb_area">
<ol>
<?
$kk = 0;
for($i=0; $i<$total; $i++) {
$row = mysql_fetch_array($result);
$regdate = substr($row[reg_date],0,10);
$reg_date = substr($row[reg_date],2,8);
$Num = $total_count - $kk;
$doY = $kk%4;
unset($title,$secret_name);
$fileName = get_db("select file_name from files where module_name='$tableName' and module_type='T' and module_no = '$row[no]' order by no");
if($row[is_secret] =='Y') $secret_name ="<font color=red>[시크릿]</font>";
?>
<?if($i !=0) if($Num > 0 && $doY == 0) { ?></ol></li><li class="gal_thumb_area"><ol><? } ?>
<li <?if($i !=0) if($Num > 0 && $doY == 3) { echo"class='no_padding'"; } ?>>
<dl>
<dt><a href="javascript:formChange('<?=$row[no]?>','view');"><img src="<?=$board_upload_src?>/<?=$fileName?>" width="141" height="105" alt="" /></a></dt>
<dd style="text-align:left;"><?=utf8_cutstr(stripslashes($row[subject]),31,'...')?> <?=$secret_name?><img src="/images/common/ico_heart.gif" style="margin: 4px 1px 0 0"/><span style="font-family: Verdana; font-size: 8px; font-weight: 600; color:#9A9899; "><?=$row[voted_count]?></span></dd>
</dl>
</li>
<?
$kk++;
$Num--;
}
}
?>
</ol>
</li>
</ul>
<ul class="gal_list_area">
<li class="result">(全<?=$total_count?>件)</li>
<?=$viewlist?>
</li>
<li class="search">
<dl class="search_inside">
<dd><input type="text" height="18" border="0" /></dd>
<dd><img src="/images/sub/btn_s_arrow.gif" height="18" /></dd>
<dd><img src="/images/sub/btn_search.gif" height="18" /></dd>
</dl>
</li>
</ul>