|
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 = "board_free";
$order_by ="order by no desc,reg_date desc";
$where = " and user_no='$sessionIDX'";
if(!$pageCount) $pageCount = 5;
$show_one_page = $pageCount;
$page = ( $page ) ? $page : 1;
$offset = ($page-1)*$show_one_page;
//$order_by ="order by sortNum,no desc,reg_date desc";
$total_count = get_db("SELECT count(*) FROM $tableName where is_delete = 'N' $where");
$query_limit = "limit $offset,$show_one_page";
$QUERY_PAGE = "SELECT * FROM $tableName as a where is_delete = 'N' $where $order_by $query_limit";
$total_page = ceil( $total_count / $show_one_page);
$more_next_page = $page+1;
$viewMore = ($pageCount > $total_count) ? "" : "$pageCount $total_count<a href='javascript:fnMore(\"$tableName\");' class='btn_cla' id='$more_next_page' data-total='$total_page'><div class='btn_myp_ls'><img src='../images/sub/sub_pagbar_more_02.png'></div></div></a>";
$start_num = $total_count - $offset; //
$result= mysql_query($QUERY_PAGE,$db_con);
if(!$result) {
error("DB_ERROR");
exit;
}
$total = mysql_affected_rows();
if(!$total)
{
$BRD_LIST = "<article class='post' style='text-align:center;'>情報がありません。</article>";
}
else
{
for($i=0; $i<$total; $i++)
{
unset($New_icon);
//$Num = ($total_count-$offset) - $i;
//$list_number = ($total_count-$offset) - $i;
$row = mysql_fetch_array($result);
$Num = $row[no];
$regdate = substr($row[reg_date],0,10);
$regdateArr = explode("-",$regdate);
if($regdate == $today){$New_icon="<font color=orange><b>NEW</b></font>";}
$BRD_LIST .="
<!-- LS1 -->
<div class='post_board'>
<div class='mv_date_tit'>
<div class='mvdate_tit_le nobody01' style='background-color:".$_SESSION[S_COLOR].";overflow: hidden; position: relative; '>$_SESSION[S_IMG]</div>
<div class='mvdate_tit_ri '>
$row[user_name]<span class='mvis_date'>$regdateArr[0].$regdateArr[1].$regdateArr[2]</span>
<p class='font_bold'>$row[subject]</p>
<p class='margin_t10'>
<a href='./board_ls.php?tmp_no=$Num'><img src='../images/sub/btn_link.jpg'/></a>
<a href='#'><img src='../images/sub/btn_del.jpg' /></a>
</p>
</div>
</div>
</div>
<!-- LS1 -->
";
}
}
echo $BRD_LIST;
?>