<!--#include virtual="/common/lib/dbcon.asp"-->
<!--#include virtual="/common/lib/func.asp"-->
<%
s_num     = inputValue(Request("s_num"))
v_page    = inputValue(Request("p_page"))
v_search  = inputValue(Request("p_search"))
v_keyword = inputValue(Request("p_keyword"))
page_info = "p_page="&v_page&"&p_block="&v_block&"&p_search="&v_search&"&p_keyword="&v_keyword

e_idx    = inputValue(request("e_idx")) '--Pk

If e_idx <> "" Then '--수정상태일때..

	sql    = "select * from emt where e_idx = "&e_idx
	set rs = Dbcon.Execute(sql)

		e_idx		= rs("e_idx")
		s_num		= rs("s_num")
		e_subject	= rs("e_subject")
		e_contents	= rs("e_contents")
		e_wdate		= rs("e_wdate")

	rs.close
	set rs = nothing

else '새글등록




End If
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>이모티콘 추가</title>
	<link rel="stylesheet" type="text/css" href="/common/css/sub_layout.css" />
	<link rel="stylesheet" type="text/css" href="/common/css/all.css" />
<style type="text/css">
<!--
body {margin-left: 0px; margin-top: 0px;}
.style1 {font-family: "돋움"; font-size: 11px;color: #FFFFFF;}
.style4 {	font-family: "돋움"; font-size: 11px; color: #FFFFFF}
.style5 {font-family: "돋움"; font-size: 11px; color: #ffe50c;font-weight: bold;}
.style7 {font-family: "돋움"; font-size: 11px; color: #2865ae;font-weight: bold;}
.style9 {font-family: "돋움"; font-size: 11px; color: #666666; }
.style11 {font-family: "돋움"; font-size: 11px; color: #4888a0; font-weight: bold;}
.style12 {font-family: "돋움"; font-size: 11px; color: #333333; font-weight: bold;}
.style13 {font-family: "돋움"; font-size: 12px; color: #FFFFFF;}
-->
</style>

<script type="text/javascript" src="/common/js/common_dev.js"></script>
<script type="text/javascript">
//<![CDATA[
function formcheck(){
		
	if (CheckSpaces(frm.e_contents, '내용')) { return; }
	else if (CheckSpaces(frm.e_subject, '제목')) { return; }
	else {
		frm.submit();
	}
}
//]]>
</script>
<body topmargin="0" leftmargin="0" scroll="no">
<form name="frm" method="post" action="m_write_ok.asp?<%=page_info%>">
<input type="hidden" name="e_idx" value="<%=e_idx%>">


<table width="150" cellspacing="0" cellpadding="0" align="center" >
<tr>
	<td align="center">
		<table cellpadding="0" cellspacing="0">
		<tr>
			<td class="pb6" style="padding-top:5px;">

			<select name="s_num" style=" width:140px;border:solid 1px #B4EAFF;background:#B4EAFF; font-family:돋움;font-size:9pt;">
			<%
			if session("ss_g_num") = "1" then
				sql = "select * from emt_category where s_chk='Y'"
			else
				sql = "select * from emt_category where s_chk='Y' and s_num = 9"
			end if
			set rs_cate = dbcon.execute(sql)
					
			Do while not rs_cate.eof
			%>
				<option value='<%=rs_cate("s_num")%>' <%if trim(rs_cate("s_num")) = trim(s_num) then response.write "selected"%>><%=rs_cate("s_menuname")%></option>
			<%
			rs_cate.movenext 
			loop

			set rs_cate = nothing
			%>
			</select>
			</td>
		</tr>
		</table>
	</td>
</tr>
<tr>
	<td align="center">
		<table width="132" cellpadding="0" cellspacing="0">
		<tr >
			<td width="122" style="width:136px;height:160px; text-align:center; background:url(/sms_img/sub/emoti_bg.gif) no-repeat left top; padding-right:2px;">
			
				<textarea style='font-size: 9pt; overflow: hidden; color:#000000; position: relative; top:13px; width: 100px; height: 80px;' name="e_contents" rows="5" cols="16" ><%=e_contents%></textarea>
				<br/>
				<div style="padding-top:20px;"><input type="text" name="e_subject"  value="<%=e_subject%>" style="width:100px;border:1px solid #cdcdcd;font-size:12px;"></div>

			</td>
		</tr>
		</table>
	</td>
	
</tr>
</table>
</td>
</tr>
</table>

<table width="100" cellspacing="0" cellpadding="0" align="center">
<tr>
	<td align="center" class="pt4">

		<link rel="Stylesheet" type="text/css" href="/content/board/nninc_simple/css/common.css" />

		<div class="board_bt01"><a href="#send" onclick="formcheck();" onkeypress="formcheck();"><span>등록</span></a></div>
		<div class="board_bt01"><a href="#close" onclick="window.close();" onkeypress="window.close();"><span>닫기</span></a></div>

	</td>
</tr>
</table>
</form>

</body>
</html>