184 lines
5.6 KiB
Plaintext
184 lines
5.6 KiB
Plaintext
<div class="board_comment">
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
//삭제
|
|
function cd_chk(num){
|
|
|
|
if (confirm('정말 삭제하시겠습니까?')) {
|
|
|
|
document.getElementById('frm_cmdel').c_num.value = num;
|
|
document.getElementById('frm_cmdel').cm_mode.value = "D"; //삭제모드
|
|
document.getElementById('frm_cmdel').submit();
|
|
|
|
}else{
|
|
|
|
return ;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//저장
|
|
function cw_chk(){
|
|
|
|
if (CheckSpaces(document.getElementById('frm_cm').c_name, '이름')) { return false; }
|
|
|
|
else if (CheckSpaces(document.getElementById('frm_cm').c_pwd, '비밀번호')) { return false; }
|
|
else if (CheckSpaces(document.getElementById('frm_cm').c_content, '내용')) { return false; }
|
|
|
|
//loading_st(1);
|
|
|
|
|
|
}
|
|
|
|
function cm_pwd_st(val,c_num){
|
|
//document.getElementById('cm_pwd_'+c_num).style.top = event.clientY+document.documentElement.scrollTop+3;
|
|
//document.getElementById('cm_pwd_'+c_num).style.left = event.clientX+document.documentElement.scrollLeft+3;
|
|
|
|
if(val==1){ //보여라
|
|
document.getElementById('cm_pwd_'+c_num).style.visibility='visible';
|
|
|
|
}else if(val==2){
|
|
document.getElementById('cm_pwd_'+c_num).style.visibility='hidden';
|
|
}
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<form id= "frm_cm" action="command_ok.asp?a_num=<%=a_num%>&b_num=<%=b_num%>&<%=page_info%>" method='post' onsubmit="return cw_chk();">
|
|
<div>
|
|
<input type="hidden" name="cm_mode" value="W" /><!-- 저장모드 -->
|
|
</div>
|
|
|
|
<fieldset>
|
|
<legend>게시물 댓글</legend>
|
|
<table cellspacing="0">
|
|
<caption>게시물 댓글</caption>
|
|
<colgroup>
|
|
<col width="5" />
|
|
<col width="" />
|
|
<col width="5" />
|
|
</colgroup>
|
|
<tbody>
|
|
<tr>
|
|
<td class="dr01"></td>
|
|
<td class="dr02"></td>
|
|
<td class="dr03"></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="dr04"></td>
|
|
<td class="text">
|
|
<dl class="info">
|
|
<dt>이름 :</dt>
|
|
<dd><input type="text" size="10" title="댓글 이름을 입력하세요" id="c_name" name="c_name" class="board_input" onfocus="focus_on1(this);" onblur="focus_off1(this);" value="<%=SESSION("ss_m_name")%>" /></dd>
|
|
<dt>비밀번호 :</dt>
|
|
<dd><input type="password" size="10" title="댓글 비밀번호를 입력하세요" id="c_pwd" name="c_pwd" class="board_input" onfocus="focus_on1(this);" onblur="focus_off1(this);" /></dd>
|
|
</dl>
|
|
</td>
|
|
<td class="dr06"></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="dr04"></td>
|
|
<td class="dr05">
|
|
<textarea cols="50" rows="3" id="c_content" name="c_content" title="댓글 내용 입력" onfocus="focus_on1(this);" onblur="focus_off1(this);"></textarea>
|
|
<input type="image" src="/content/board/nninc_simple/img/dr_bt.gif" title="댓글 쓰기" />
|
|
</td>
|
|
<td class="dr06"></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="dr07"></td>
|
|
<td class="dr08"></td>
|
|
<td class="dr09"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</fieldset>
|
|
</form>
|
|
|
|
|
|
<form id= "frm_cmlist" action="">
|
|
<%
|
|
R_Fields_cmd = "c_num, a_num, c_bnum, c_id, c_pwd, c_name, c_content, c_regdate"
|
|
SQL = "Select " & R_Fields_cmd & " FROM board_command WHERE a_num='" & a_num & "' AND c_bnum=" & b_num & " ORDER BY c_regdate ASC"
|
|
Set rs_cmd = dbcon.execute( sql )
|
|
|
|
If Not( rs_cmd.bof Or rs_cmd.eof ) then
|
|
|
|
zz = 1
|
|
Do Until rs_cmd.eof
|
|
|
|
c_num = rs_cmd("c_num")
|
|
a_num = rs_cmd("a_num")
|
|
c_bnum = rs_cmd("c_bnum")
|
|
c_id = rs_cmd("c_id")
|
|
c_pwd = rs_cmd("c_pwd")
|
|
c_name = rs_cmd("c_name")
|
|
c_content = rs_cmd("c_content")
|
|
c_regdate = rs_cmd("c_regdate")
|
|
|
|
%>
|
|
<ul class="cmt_list">
|
|
<li>
|
|
<div class="h"> <strong><%=c_name%></strong> [<%=c_regdate%>] <a href="javascript:;" onclick="cm_pwd_st(1,<%=c_num%>);"><img src="/content/board/nninc_simple/img/dr_del_bt.gif" alt="댓글삭제" /></a>
|
|
|
|
|
|
<div id="cm_pwd_<%=c_num%>" style="position:absolute;visibility:hidden;" class="command_pwd">
|
|
<ul>
|
|
<li class="text">비밀번호 :</li>
|
|
<li><input type="password" size="10" title="댓글 비밀번호를 입력하세요" id="c_pwd<%=zz%>" name="c_pwd<%=zz%>" class="board_input" onfocus="focus_on1(this);" onblur="focus_off1(this);" /></li>
|
|
<li><a href="javascript:frm_cmdel<%=zz%>(<%=c_num%>);"><img src="/content/board/nninc_simple/img/command_ok.gif" width="34" height="20" alt="확인" /></a></li>
|
|
<li><a href="javascript:;" onclick="cm_pwd_st(2,<%=c_num%>);"><img src="/content/board/nninc_simple/img/command_cancel.gif" width="34" height="20" alt="취소" /></a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
</div>
|
|
<p><%=getTextmode(c_content)%></p>
|
|
|
|
<script type="text/javascript">
|
|
|
|
function frm_cmdel<%=zz%>(c_num){
|
|
|
|
if (CheckSpaces(document.getElementById('frm_cmlist').c_pwd<%=zz%>, '비밀번호')) { return ;}
|
|
|
|
else {
|
|
|
|
document.getElementById('frm_cmdel').c_pwd.value = document.getElementById('frm_cmlist').c_pwd<%=zz%>.value;
|
|
document.getElementById('frm_cmdel').c_num.value = c_num;
|
|
document.getElementById('frm_cmdel').cm_mode.value = "D"; //삭제모드
|
|
document.getElementById('frm_cmdel').submit();
|
|
|
|
}
|
|
|
|
}
|
|
</script>
|
|
|
|
|
|
</li>
|
|
<li class="line" />
|
|
</ul>
|
|
|
|
<%
|
|
zz = zz + 1
|
|
rs_cmd.movenext
|
|
loop
|
|
End if
|
|
%>
|
|
</form>
|
|
|
|
|
|
|
|
<form id= "frm_cmdel" method='post' action="command_ok.asp?a_num=<%=a_num%>&b_num=<%=b_num%>&<%=page_info%>">
|
|
<div>
|
|
<input type="hidden" name="c_pwd" />
|
|
<input type="hidden" name="c_num" />
|
|
<input type="hidden" name="cm_mode" />
|
|
</div>
|
|
</form>
|
|
|
|
|
|
</div>
|