|
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 : |
<?
include "$DOCUMENT_ROOT/conf/conf_dir.php";
$tableName = "board_free";
$order_by ="order by no desc,reg_date desc";
if($search_word) $sch_title .="\"$search_word\" ";
include "include_where.php";
if(!$pageCount) $pageCount = 5;
$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";
$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 where is_delete = 'N' $where $order_by $query_limit";
$total_page = ceil( $total_count / $show_one_page);
$viewlist = ( !$total_count ) ? "" : Get_viewpage3($page,$total_count,$show_one_page,$show_view_page,$url_tail);
$start_num = $total_count - $offset; //
$result= mysql_query($QUERY_PAGE,$db_con);
$total = mysql_affected_rows();
if(!$total)
{
$BRD_LIST = "<li style='text-align:center;'>情報がありません。</li>";
}
else
{
for($i=0; $i<$total; $i++)
{
unset($NUM_IMG,$New_icon);
$Num = ($total_count-$offset) - $i;
$row = mysql_fetch_array($result);
$regdate = substr($row[reg_date],0,10);
$regdateArr = explode("-",$regdate);
if($regdate == $today){$New_icon="<font color=orange><b>NEW</b></font>";}
if($row[is_notice] =='Y') $is_notice_chk="[お知らせ]";
else $is_notice_chk="";
$SUBJECT_SUMMARY = utf8_cutstr($row[subject],105,$tail='..');
$BRD_LIST .="<li><a href='javascript: view_paging($page,$row[no],\"$MG\");'>$SUBJECT_SUMMARY</a> $New_icon $is_notice_chk <p>$regdateArr[0]年$regdateArr[1]月$regdateArr[2]日</p></li>";
}
}
echo "<h2 class='font_BSize padding_b_22'>$sch_title</h2><ul class='rec_list'>";
echo $BRD_LIST;
echo " </ul>";
echo "<ul class='pagination'>$viewlist</ul>";
?>