최초등록
This commit is contained in:
@@ -0,0 +1,275 @@
|
||||
<?
|
||||
|
||||
//파라미터정보 *************************************************************************************
|
||||
$b_num = InputValue($b_num);
|
||||
$b_type = InputValue($b_type);
|
||||
//**************************************************************************************************
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//조회수 추가
|
||||
$sql = "update ".$a_tablename." set b_count = b_count + 1 Where b_num = ".$b_num;
|
||||
$mysql->ParseExec($sql);
|
||||
|
||||
//레코드필드
|
||||
$R_Fields = "b_num, b_type, b_id, b_name, b_pwd, b_subject, b_email, b_jumin, b_phone1, b_phone2, b_phone3, b_cate, b_catename, b_noticechk, b_content, b_ip, b_count, b_look, b_open, b_ref, b_step, b_level, b_regdate, b_chuchun, b_sbjclr, b_sdate, b_edate, b_temp1, b_temp2, b_temp3, b_temp4, b_file1, b_file2, b_file3, b_file4, b_file5,b_keyword,b_c_count, b_sbjclr";
|
||||
|
||||
$R_tablename_str = $a_tablename;
|
||||
$R_WHERE_str = " WHERE b_num=".$b_num;
|
||||
|
||||
SelectQuery ($R_Fields, $R_tablename_str, $R_WHERE_str);
|
||||
|
||||
|
||||
If ($is_ad_cms != "Y") { //관리자가아닐때 체크
|
||||
|
||||
//공개/비공개 체크*************************************************************************************
|
||||
if ($a_type == "Y") { //공개여부 사용일때
|
||||
|
||||
|
||||
|
||||
if($b_open == "N"){ //비공개일때
|
||||
|
||||
If ($_SESSION["pwd_chk_".$a_num."_".$b_num] != "ok") {
|
||||
|
||||
locationhref("pwd.php?prepage=vie&a_num=".$a_num."&b_num=".$b_num."&".$page_info);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
//**************************************************************************************************
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
if($a_edit == "N"){ //에디터 사용하지 않을때...
|
||||
$b_content = getTextmode($b_content);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//이전글 ------------------------------------------------------------------------------------------------
|
||||
$sql_p_opt1 = " WHERE b_look = 'Y' AND b_num <> ".$b_num." AND b_ref <= ".$b_ref." AND b_step >=".$b_step;
|
||||
$sql_p_orderby = " ORDER BY b_ref DESC, b_step ASC";
|
||||
|
||||
//답변글 사용하지 않을때..적용
|
||||
If ($a_reply == "N") { $sql_p_opt2 = " AND b_type='N'"; }
|
||||
|
||||
$sql_p = "SELECT b_num, b_subject FROM ".$a_tablename;
|
||||
$sql_p = $sql_p . $sql_p_opt1 . $sql_p_opt2 . $sql_p_orderby." limit 0,1";;
|
||||
|
||||
$mysql->ParseExec($sql_p);
|
||||
|
||||
|
||||
If ($mysql->RowCount() == 0) { //없으면
|
||||
$prev_b_num = "";
|
||||
} else {
|
||||
$mysql->FetchInto(&$rs_prev);
|
||||
|
||||
$prev_b_num = $rs_prev[b_num];
|
||||
$prev_b_subject = $rs_prev[b_subject];
|
||||
|
||||
}
|
||||
//이전글끝 ------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//다음글 ------------------------------------------------------------------------------------------------
|
||||
$sql_p_opt1 = " WHERE b_look = 'Y' AND b_num <> ".$b_num." AND b_ref >= ".$b_ref." AND b_step <=".$b_step;
|
||||
$sql_p_orderby = " ORDER BY b_ref ASC, b_step DESC";
|
||||
|
||||
//답변글 사용하지 않을때..적용
|
||||
If ($a_reply == "N") { $sql_p_opt2 = " AND b_type='N'"; }
|
||||
|
||||
$sql_p = "SELECT b_num, b_subject FROM ".$a_tablename;
|
||||
$sql_p = $sql_p . $sql_p_opt1 . $sql_p_opt2 . $sql_p_orderby ." limit 0,1";
|
||||
|
||||
$mysql->ParseExec($sql_p);
|
||||
|
||||
//Set rs_next = dbcon.execute(sql_p)
|
||||
|
||||
|
||||
|
||||
If ($mysql->RowCount() == 0) { //없으면
|
||||
$next_b_num = "";
|
||||
} else {
|
||||
$mysql->FetchInto(&$rs_next);
|
||||
|
||||
$next_b_num = $rs_next[b_num];
|
||||
$next_b_subject = $rs_next[b_subject];
|
||||
|
||||
}
|
||||
|
||||
//다음글끝 ------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<?include("top.php"); //상단파일?>
|
||||
|
||||
<!-- 보기 -->
|
||||
<div id="board" style="width:<?=$a_width?>;">
|
||||
|
||||
<!-- 보기 테이블 -->
|
||||
<div class="table_bview">
|
||||
|
||||
<table cellspacing="0" >
|
||||
<caption><?=str_replace( " | ", "",$tit_name);?></caption>
|
||||
<colgroup>
|
||||
<col width="6" />
|
||||
<col width="" />
|
||||
<col width="6" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"></th>
|
||||
<th scope="col" class="th_none"><?echo "<span class='category_color'>".$b_cate_str[$b_cate]."</span>";?> <?=$b_subject?></th>
|
||||
<th scope="col"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
<dl class="info">
|
||||
<dt>일시</dt>
|
||||
<dd class="c4895D7"><strong><?=$b_sdate?> ~ <?=$b_edate?></strong></dd>
|
||||
<!-- <dt>작성자</dt>
|
||||
<dd><?=$b_name?></dd> -->
|
||||
|
||||
</dl>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
<?
|
||||
//사용자필드
|
||||
for ($z=1; $z<=4; $z++) {
|
||||
|
||||
|
||||
eval("\$a_ftemp_str = \$a_ftemp".$z."_str;");
|
||||
|
||||
eval("\$b_temp = \$b_temp".$z.";");
|
||||
|
||||
|
||||
eval("\$a_ftemp = \$a_ftemp".$z.";");
|
||||
|
||||
If ($a_ftemp == "Y") {
|
||||
?>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
<dl class="info">
|
||||
<dt><?=$a_ftemp_str?></dt>
|
||||
<dd><?=$b_temp?></dd>
|
||||
</dl>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
<?
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?If ($a_upload == "Y" and ($b_file1 != "" or $b_file2 != "" or $b_file3 != "" or $b_file4 != "" or $b_file5 != "" )) { //첨부파일 사용일때{?>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
<dl class="info">
|
||||
<dt>첨부파일</dt>
|
||||
<dd>
|
||||
|
||||
<?
|
||||
For ($z=1; $z <=5; $z++) {
|
||||
|
||||
eval("\$b_file_name = \$b_file".$z.";");
|
||||
|
||||
If ($b_file_name != "") {//파일이 있으면..
|
||||
|
||||
|
||||
$strDir = $_SERVER[DOCUMENT_ROOT]."/data/board/".$a_tablename."/";
|
||||
|
||||
$b_file_name_encode = mb_convert_encoding($b_file_name, "EUC-KR", "UTF-8");
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<img src="/content/board/default_calendar/img/file/<?=get_FileName1($b_file_name)?>" alt="<?=$b_file_name?>" /><a href="down.php?a_tablename=<?=$a_tablename?>&filename=<?=$b_file_name?>"><?=$b_file_name?></a> <span class="size">(<?=byteConvert(filesize($strDir.$b_file_name_encode))?> byte)</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<?
|
||||
}
|
||||
}
|
||||
?>
|
||||
</dd>
|
||||
</dl>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?}?>
|
||||
|
||||
<tr>
|
||||
<td colspan="3" class="content">
|
||||
<?=$b_content?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<!-- //보기 테이블 -->
|
||||
|
||||
<!-- 버튼 -->
|
||||
|
||||
|
||||
<div class="board_button">
|
||||
|
||||
<div class="fr pt10">
|
||||
<?If ($is_write == "Y") { //쓰기/수정권한?>
|
||||
<span><a href="write.php?a_num=<?=$a_num?>" ><img src="/content/board/default_calendar/img/write_bt.gif" width="62" height="23" alt="쓰기" /></a></span>
|
||||
|
||||
<span><a href="write.php?a_num=<?=$a_num?>&b_num=<?=$b_num?>&<?=$page_info?>" ><img src="/content/board/default_calendar/img/modify_bt.gif" width="62" height="23" alt="수정" /></a></span>
|
||||
<?}?>
|
||||
|
||||
<?If ($is_delete == "Y") {
|
||||
$msg = "정말 삭제하시겠습니까?";
|
||||
$querystring = "msg=".htmlentities(urlencode($msg));
|
||||
$querystring .= "&ok=".htmlentities(urlencode("/content/board/delete_ok.php?a_num=".$a_num."&b_num=".$b_num."&".$page_info));
|
||||
$querystring .= "&no=".htmlentities(urlencode($NOWPAGE));
|
||||
$gourl = "/content/board/message.php?".$querystring;
|
||||
?>
|
||||
<span><a href="<?=$gourl?>" ><img src="/content/board/default_calendar/img/delete_bt.gif" width="62" height="23" alt="삭제" /></a></span>
|
||||
<?}?>
|
||||
|
||||
<span><a href="list.php?a_num=<?=$a_num?>&<?=$page_info?>" ><img src="/content/board/default_calendar/img/list_bt.gif" width="62" height="23" alt="목록" /></a></span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- //버튼 -->
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- 댓글 -->
|
||||
<?If ($a_command == "Y") {include("command.php");}?>
|
||||
<!-- //댓글 -->
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<!-- //보기 -->
|
||||
|
||||
<?include("bottom.php"); //하단파일?>
|
||||
Reference in New Issue
Block a user