|
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 : |
<h2><?=$titlePathName?></h2>
<script language="JavaScript">
function openDiv(val,tot) {
for(var i=0;i<tot;i++){
if(val == i){
if(document.getElementById(["div_tab"+val]).style.display == "none"){
document.getElementById(["div_tab"+val]).style.display = "block";
}else{
document.getElementById(["div_tab"+val]).style.display = "none";
}
}else{
document.getElementById(["div_tab"+i]).style.display = "none";
}
}
}
</script>
<?
//QnA 게시판 과 Evan's DIARY 게시판 씀.
// =============================================== Query
//$tableName = "notice";
if(!$pageCount) $pageCount = 15;
$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%'";
}
$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 board_$tableName where original_no=0 and is_delete ='N' $where $order_by";
$QUERY_PAGE = "SELECT * FROM board_$tableName where original_no=0 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
//echo $QUERY_PAGE;
$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();
//오늘 등록 한사람;
//$today = date("Y-m-d");
//$todayCnt = Get_db("SELECT count(*) FROM member WHERE cdate LIKE '$today%'");
?>
<table width="100%" cellspacing="0" cellpadding="0" border=0>
<tr>
<td>
<!--table width="100%" cellspacing="0" cellpadding="0" border=0 >
<tr>
<td height="40" align="right">
<select name="key">
<option value="id" <?if($key == "id") echo "selected"; ?>>제목</option>
<option value="name" <?if($key == "name") echo "selected"; ?>>작성자</option>
</select>
<input type="text" name='key_word' value="<?=$key_word?>" class="search_field_row">
<img src='<?=$images?>/btn_search_m.gif' onclick='searchChk()' align='absbottom' />
</td>
</tr>
</table-->
<table width="610" cellspacing="0" cellpadding="0" border="0" align='center' class="table_ro">
<colgroup>
<col width='30'><col><col width='100'>
</colgroup>
<tr>
<th scope="row" height="25px">No</th>
<!--?if($tab==1) echo"<th scope='row'>分類</th>";?-->
<th scope="row">題目</th>
<!--th scope="row">작성자</th-->
<th scope="row">登録</th>
<!--th scope="row">조회수</th-->
</tr>
<?
if(!$total){
if($tab==1) $colsNum=3;
else $colsNum=2;
echo "<tr><td colspan='3' align=center height='50px'>登録された情報がございません</td></tr>";
}else{
for($i=0; $i<$total; $i++) {
$row = mysql_fetch_array($result);
$regdate = substr($row[reg_date],0,10);
?>
<tr align="center">
<td align="center" height="30px"><?=$Num?></td>
<td align='left' style="padding-left:10px">
<?if(($sessionLevel == 3 && $tab != 12) || ($sessionLevel == "" && $tab != 12)){?>
<a href="<?=$tabLogin?>">
<?}else{?>
<a href="javascript:openDiv('<?=$i?>','<?=$total?>')">
<?}?>
<?=$row[subject]?></a>
</td>
<td><?=$regdate?></td>
</tr>
<tr id="div_tab<?=$i?>" style="display:none">
<td colspan="3" style="padding:20px 20px 20px 40px"><a href="javascript:formChange('<?=$row[no]?>','view')"><?=stripslashes($row[contents])?></a></td>
</tr>
<?
$Num--;
}
}
?>
</table>
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin:10px 0 0 0" >
<tr>
<td align="center">
<?=$viewlist?>
</td>
</tr>
<tr>
<td align="right">
<?if($sessionLevel == 15 || ($sessionLevel == 10 && ($tabs == 4||$tabs == 5||$tabs == 6||$tabs == 7)) || ($sessionLevel == 3 && ($tab == 12 ||$tabs == 6))){?>
<a href="javascript:formChange('','write')" id="btn">■ 書き込み ■</a>
<?}?>
</td>
</tr>
</table>
</td>
</tr>
</table>