쪽지 관련 문의드립니다.
본문
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<script type="text/javascript">
<!-- // 회원ID 찾기
function popup_id(frm_name, me_recv_mb_id, top, left)
{
url = '<?=$member_skin_path?>/memo_id.php?frm_name='+frm_name+'&me_recv_mb_id='+me_recv_mb_id;
opt = 'scrollbars=yes,width=300,height=450,top='+top+',left='+left;
window.open(url, "memo_id", opt);
}
//-->
</script>
<script language="javascript">
function Displaytoggle_memo(index) {
for (i=1; i<=2; i++)
if (index == i) {
thisMenumo2 = eval(document.getElementById("toggle_memo" + i + "").style);
thisMenumo2.display = "none";
document.getElementById("toggle_memo").style.display = "none";
}
else {
otherMenumo2 = eval(document.getElementById("toggle_memo" + i + "").style);
otherMenumo2.display = "";
document.getElementById("toggle_memo").style.display = "";
}
}
</script>
<?
if ($memo_membodc_9 =="on") {
if ($me_id)
{
$pokes_memos ="me_memo";
}
else
{
$pokes_memos ="memosub";
}
}
else
{
$pokes_memos ="me_memo";
}
?>
<body onLoad="document.all.<?=$pokes_memos?>.focus();">
<table width="598" height="40" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="middle" bgcolor="#EBEBEB">
<table width="590" height="30" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="25" align="center" bgcolor="#FFFFFF" ><img src="<?=$member_skin_path?>/img/icon_01.gif" width="5" height="3"></td>
<td width="75" align="left" bgcolor="#FFFFFF" ><font color="#666666"><b><?=$g4[title]?></b></font></td>
<td width="490" bgcolor="#FFFFFF" ></td>
</tr>
</table></td>
</tr>
</table>
<table width="598" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="598" height="15" colspan="7"></td>
</tr>
<tr>
<td width="28" height="33"></td>
<td width="300" align="center" valign="middle" background="<?=$member_skin_path?>/img/line_bg.gif">
<a href="./memo.php?mkind=recv"><img src="<?=$member_skin_path?>/img/btn_recv_paper_off.gif" width="70" height="33" border="0"></a>
<a href="./memo.php?mkind=send"><img src="<?=$member_skin_path?>/img/btn_send_paper_off.gif" width="70" height="33" border="0"></a>
<? if ($memo_membodc_6 =="on"){
if ($member[mb_level] >= $memo_membodc_7){
?>
<a href="./memo.php?mkind=sendad"><img src="<?=$member_skin_path?>/img/btn_send_paperc_off.gif" width="70" height="33" border="0"></a>
<?
}
}
?>
<a href="./memo_form.php"><img src="<?=$member_skin_path?>/img/btn_write_paper_on.gif" width="70" height="33" border="0"></a></td>
<td width="100" valign="middle" background="<?=$member_skin_path?>/img/line_bg.gif"> <img src="<?=$member_skin_path?>/img/arrow_01.gif" width="7" height="5"> <font color="#ff9988"> <b><?=$g4[title]?></b></font></td>
<td width="80" valign="middle" background="<?=$member_skin_path?>/img/line_bg.gif"><? if ($memo_membodc_27 =="on") { ?><a href=javascript:popup_id('fmemoform','me_recv_mb_id',100,300);><img src="<?=$member_skin_path?>/img/btn_member_paper_on.gif" width="73" height="18" border="0" title="회원찾기"></a><? } ?></td>
<td width="25" height="33"></td>
</tr>
</table>
<table width="598" border="0" cellspacing="0" cellpadding="0">
<form name='fmemoform' method='post' enctype='multipart/form-data' action='javascript:fmemoform_submit(document.fmemoform);'>
<tr>
<td height="300" align="center" valign="top">
<table width="540" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="20"></td>
</tr>
<tr>
<td height="2" bgcolor="#808080"></td>
</tr>
<tr>
<td width="540" height="2" align="center" valign="top" bgcolor="#FFFFFF">
<table width=100% cellpadding=1 cellspacing=1 border=0>
<tr bgcolor=#E1E1E1 align=center>
<td width="30%" height="24" rowspan="2"><? if ($memo_membodc_22 =="on") { ?><a href=javascript:popup_id('fmemoform','me_recv_mb_id',100,300);><? } ?><b>받는 회원아이디</b><? if ($memo_membodc_22 =="on") { ?></a><? } ?>
<? if ($memo_membodc_27 =="on") { ?><br><a href="#" onClick="window.open('<?=$member_skin_path?>/member_list.php', '', 'left=300, top=50, width=400, height=500, scrollbars=1');"><img src="<?=$member_skin_path?>/img/btn_add_f2.gif" title="친구등록/관리" border=0></a><? } ?></td>
<td width=70% align="center"><input type=text name="me_recv_mb_id" style="width:95%; IME-MODE:inactive;" required itemname="받는 회원아이디" value="<?=$me_recv_mb_id?>"></td>
</tr>
<tr bgcolor=#E1E1E1 align=center>
<td>※ 여러 회원에게 보낼때는 컴마(,)로 구분을 하세요.</td>
</tr>
<?
$sqls3 = " select count(*) as cnt from $g4[memo_table] where memofile LIKE '%_%' and memo_datec ='0' and me_send_mb_id = '$member[mb_id]' ";
$rows3 = sql_fetch($sqls3);
$total_countsm = $rows3[cnt];
$me_send_pointm = $memo_membodc_16;
if ($memo_membodc_2 =="on") {
if ($member[mb_level] >= $memo_membodc_3 ) {
if ($is_admin || $memo_membodc_4 > $total_countsm) {
?>
<tr bgcolor=#E1E1E1 align=center>
<td width="30%" height="24" rowspan="2"><a onclick="alert('현재 설정된 파일첨부 총갯수는 <?=$memo_membodc_4?> 개 / 현재까지 첨부한 파일수는 <?=$total_countsm?> 개 입니다.')" style="cursor: pointer;" title="설명보기"><b>파일첨부</b> <b><font color="#666666"><?=$memo_membodc_4?></font> / <font color="#ff6666"><?=$total_countsm?></font></b></a></td>
<td width=70% align="center"> <input type='file' name='file1' size='45'></td>
</tr>
<tr bgcolor=#E1E1E1 align=center>
<td><a onclick="alert('현재 설정된 첨부파일의 허용 최대 용량은 (<?= number_format($memo_membodc_5)?> bytes) 이며 1 MB 는 = 1,024,768 bytes 입니다.')" style="cursor: pointer;" title="설명보기">※ 첨부파일의 허용 최대용량은 (<?= number_format($memo_membodc_5)?> bytes) 입니다.</a></td>
</tr>
<?
}
}
}
?>
</table>
</td>
<? if ($memo_membodc_9 =="on") { ?>
</tr>
<td height="30" align="center" valign="middle" bgcolor="#F6F6F6">
<b>제 목 : </b><input type=text name="memosub" style="width:86%; IME-MODE:active;" required itemname="제 목" value="<?=$contentsub?>"></td>
</tr>
<? } ?>
<tr>
<td height="180" align="center" valign="middle" bgcolor="#F6F6F6">
<textarea name="me_memo" rows="8" style="width:95%; IME-MODE:active;" required itemname='내용'><?=$content?></textarea></td>
</tr>
<?
if ($memo_membodc_10 =="on") {
if ($member[mb_level] > $memo_membodc_11) {
if ($is_admin || $member[mb_datetime] <= date("Y-m-d H:i:s", $g4[server_time] - ($memo_membodc_14 * 86400))) {
?>
<tr <? if ($member[ mb_level] == 10)?>>
<td bgcolor="#F6F6F6">
<div id="toggle_memo1" style="display:;"> <a href="javascript:Displaytoggle_memo(1)" class="button" onfocus='this.blur()'><font color=red class=small>포인트 선물보내기</font></a> · 지정된 메모 수신자에게 포인트를 선물합니다.</div>
<div id="toggle_memo2" style="display:none;"> <a href="javascript:Displaytoggle_memo(2)" class="button" onfocus='this.blur()'><font color=#5A8FDB class=small>포인트 선물보내기 창닫기</font></a>
</td>
</tr>
<tr>
<td valign="top" id="toggle_memo" height="" style="display:none;padding:1;">
<table width=100% cellpadding=1 cellspacing=1 border=0>
<tr bgcolor="#E1E1E1" align=center>
<td width="30%" height="24" rowspan="2">포인트 선물보내기 <br>수수료차감 : <?=$memo_membodc_18?>% </td>
<td width=70% align="left">
<? if ($me_send_pointm =="on") { ?>
<select name='me_send_point'>
<option value=''>포인트선물
<option value='500'>500점
<option value='1000'>1,000점
<option value='1500'>1,500점
<option value='2000'>2,000점
<option value='2500'>2,500점
<option value='3000'>3,000점
<option value='3500'>3,500점
<option value='5000'>5,000점
<option value='6000'>6,000점
<option value='7000'>7,000점
<option value='8000'>8,000점
<option value='9000'>9,000점
<option value='10000'>10,000점
<option value='15000'>15,000점
<option value='20000'>20,000점
<option value='30000'>30,000점
<option value='40000'>40,000점
<option value='50000'>50,000점
<option value='100000'>100,000점
<option value='200000'>200,000점
</select>
<? } else { ?>
<input type=text size="15" maxlength="5" name="me_send_point" itemname="포인트 보내기" value="">
<? } ?>
/ 현재 보유중인 포인트 <strong><u><?=number_format($member[mb_point])?></u> 점</strong></td>
</tr>
<tr bgcolor="#E1E1E1" align=left>
<td>※ 포인트는 발송즉시 수수료 차감후 상대방 소유가 됩니다.</td>
</tr>
</table>
</td>
</tr>
<?
}
}
}
?>
</table></td>
</tr>
<tr>
<td height="2" align="center" valign="top" bgcolor="#D5D5D5"></td>
</tr>
<tr>
<td height="2" align="center" valign="top" bgcolor="#E6E6E6"></td>
</tr>
<tr>
<td height="40" align="center" valign="bottom">
<input id=btn_submit type=image src="<?=$member_skin_path?>/img/btn_paper_send.gif" border=0>
<a href="javascript:window.close();"><img src="<?=$member_skin_path?>/img/btn_close.gif" width="48" height="20" border="0"></a></td>
</tr>
</form>
</table>
<br>
<script language="JavaScript">
with (document.fmemoform) {
if (me_recv_mb_id.value == "")
me_recv_mb_id.focus();
else
me_memo.focus();
}
function fmemoform_submit(f)
{
<?
if ($memo_membodc_10 =="on") {
if ($member[mb_level] > $memo_membodc_11) {
if ($is_admin || $member[mb_datetime] <= date("Y-m-d H:i:s", $g4[server_time] - ($memo_membodc_14 * 86400))) {
?>
if (f.me_send_point.value.length > 0) {
for (i = 0; i < f.me_send_point.value.length; i++) {
if (f.me_send_point.value.charAt(i) < '0' || f.me_send_point.value.charAt(i) > '9') {
alert(f.me_send_point.value.charAt(i) + "는 숫자가 아닙니다. 숫자만 입력하세요!");
f.me_send_point.focus();
return;
}
}
}
if (f.me_send_point.value < 0 || f.me_send_point.value > <?=$member[mb_point]?>) {
alert("포인트 값은 0보다 크고 <?=$member[mb_point]?>보다 작아야 합니다.");
f.me_send_point.value = "";
f.me_send_point.focus();
return;
}
<?
}
}
}
?>
document.getElementById("btn_submit").disabled = true;
f.action = "./memo_form_update.php";
f.submit();
}
</script>
이 코드는 쪽지 폼 코드인데요.^^(헐랭이 님 코드)
문제가 하나 있더라구요. 쪽지보내기를 하면
익스플로에서는 쪽지가 보내지는데요.
크롬이랑 다른 브라아우져 같은 경우에는 쪽지 전송이 안되더라구요...
어떻게 고쳐야 하는지 모르겠어요...
도와주세요~^^
답변 2
많은 도움이 되었습니다. 감사합니다.