|
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/board/ |
Upload File : |
<div class="sub_title">
<h3><img src="/images/sub/sub_title_01.jpg" width="133" height="29" /></h3>
<ul>
<li>Home</li>
<li>></li>
<li>Notice</li>
</ul>
</div>
<ul class="board_area2">
<?
if($sessionLevel != 15 && $_SERVER['REMOTE_ADDR'] != $remoteAddr){
$userhitpage ="news";
$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";
if(!$pageCount) $pageCount = 10;
$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($tab==4){
$where .= "AND general_setting = 'on'";
}
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";
$pcLang = substr($_SERVER[HTTP_ACCEPT_LANGUAGE],0,2);
if($pcLang == "ja" || $sessionLevel == 15){
$langChk .= '1,'; //japan
if($sessionIDX){
$langChk .= '3,'; //japan member
}
}
if($sessionIDX){
$langChk .= '2,'; //all member
}
$langChk .='0'; //all
$where .= " and langChk in($langChk)";
$QUERY_TOTAL = "SELECT count(*) FROM board_$tableName where (original_no=0 or original_no='') and is_delete ='N' $where $order_by";
$QUERY_PAGE = "SELECT * FROM board_$tableName where (original_no=0 or original_no='') and is_delete ='N' $where $order_by $query_limit";
//SELECT *, DATE_FORMAT(writedate, '%Y.%m.%d') AS date FROM tour_community WHERE 1=1 and idx not in (1179,1186) ORDER BY sort DESC ,depth ASC limit 0,15
if($_SERVER['REMOTE_ADDR'] == $remoteAddr){
//echo $QUERY_PAGE;
}
$total_count = get_db($QUERY_TOTAL);
$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){
//echo "<tr><td colspan='$colsNum' align=center height='50px'>등록된 정보가 없습니다.</td></tr>";
echo "<li><dl class='notice_dl' style='text-align:center;padding: 10px 10px;'>登録された情報がございません</dl></li>";
}else{
for($i=0; $i<$total; $i++) {
$Num = $start_num - $i;
$row = mysql_fetch_array($result);
$regdate = substr($row[reg_date],0,10);
?>
<li>
<dl class="notice_dl">
<dt>
<ol>
<li class="art_ti">
<?if($row[general_setting] == 'on'){echo "<img src='/images/sub/icon_jyj.gif' />";}?>
<a href="javascript:chklist('<?=$Num?>');">
<?if($sessionLevel != 90){?>
<?=$Num?>.
<?}else{ echo $row[no];}?>
<?if($sessionLevel == 15){?>
<?if($row[is_secret] == 'Y'){echo "<font color='red' size=1>[SECRET]</font>";}?>
<?}?>
<?=$row[subject]?>
<?if($row[general_setting] == 'on'){echo "<img src='/images/sub/icon_member.gif' style='padding-top:5px;'/>";}?>
<?if($regdate == $Today){echo"<img src='/images/sub/icon_new.gif' style='padding-top:5px;'/>";}?>
</li>
<li class="channel"><img id="listBtn<?=$Num?>"src="/images/sub/btn_fold_on.gif" style="padding-top:5px;"/></li>
<li class="date"><?=$regdate?></li>
</a>
</ol>
</dt>
<dd id="list<?=$Num?>" style="padding: 20px 15px">
<?
if(($sessionLevel == 3 || $sessionLevel == "") && $row[general_setting] == 'on')
echo $membersJapansName;
else
echo stripslashes($row[contents]);
?>
</dd>
</dl>
</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>
<!--span><img src="/images/sub/notice_btn.jpg" /></span></a-->
</ul>
<script>
function chklist(val){
if(document.all("list"+val).style.display == "none"){
$('#list'+val).fadeIn('slow');
//document.all("list"+val).style.display='';
//document.all("listBtn"+val).src='/images/sub/btn_fold_on.gif';
}else{
$('#list'+val).fadeOut('slow');
//document.all("list"+val).style.display='none';
//document.all("listBtn"+val).src='/images/sub/btn_fold_off.gif';
}
}
</script>