글쓰기 후 경로 이동 문제
본문
혼자 붙잡고 있는데 몇 시간 동안 해메고 있네요;
지금 모바일이랑 pc버전이 있구요 상담창이 중요한 부분이예요,
mcustomer1를 메인에 인쿠르트 했습니다. 아래는 mcustomer1 파일 내용전부입니다.
<?
$g4_path = ".."; // 그누보드가 있는 상대경로를 적어줌
?>
<script language="javascript">
var char_min = parseInt(<?=$write_min?>);
var char_max = parseInt(<?=$write_max?>);
</script>
<style type="text/css">
select {
border: 1px solid #333333;
color: #333333;
}
.style3 {color: #333333}
.quick1 { border: 1px solid #888888; padding:3px; width:80%}
.quick2 { border: 1px solid #888888; padding:3px; width:25%}
.quick3 { border: 1px solid #888888; padding:3px; width:35%}
.stx { border: 1px solid #3e4a5a;}
.tip {font-size:12px; color:#666; font-family:"돋움";}
</style>
<table cellpadding=0 cellspacing=0 border=0 width=100% aglin=center>
<tr>
<td width=100% align="center" ></td>
</tr>
<tr>
<td width="100%" height="380" >
<table width=100% border="0" align="center" cellpadding="0" cellspacing="0" >
<form name=frm method=post action="<?=$g4['path']?>/bbs/write_update4.php">
<input type=hidden name=w value="">
<input type=hidden name=bo_table value="g01">
<input type=hidden name=wr_id value="">
<input type=hidden name=sca value="">
<input type=hidden name=sfl value="">
<input type=hidden name=stx value="">
<input type=hidden name=spt value="">
<input type=hidden name=sst value="">
<input type=hidden name=sod value="">
<input type=hidden name=secret value='secret'>
<input type=hidden name=s value="s">
<input type=hidden name=wr_subject value="무료상담신청">
<input type=hidden name=wr_key value="<?=$norobot_key?>">
<input type=hidden name=page value="<?=$page?>">
<input type=hidden name="wr_4" value="accept" <? if( $u=w ||$write[wr_4] == "accept" ) echo "checked"; ?>>
<tr>
<td align="left" valign=top style="padding:3px 5px 0px 5px;"><table WIDTH="90%" cellpadding=0 cellspacing=0 border=0>
<tr>
<td height=5 colspan="2"></td>
</tr>
<tr>
<td width=40 height=25 style="padding-left:8px;"><img src="<?=$g4['path']?>/core_images/ty_txt02.jpg" ></td>
<td>
<table width=80% cellpadding=0 cellspacing=0 border=0 height=25>
<tr>
<td><input class='quick1' type="text" name="wr_name" size="80%" required itemname="성함"></td>
</tr>
</table>
</td>
</tr>
<tr height="10"></tr>
<tr>
<td width=40 height=18 style="padding-left:8px;"><img src="<?=$g4['path']?>/core_images/ty_txt08.jpg" ></td>
<td>
<table width=30 cellpadding=0 cellspacing=0 border=0>
<tr>
<td>
<select name='wr_9' itemname='상담시간' required value="<?=$wr_9?>">
<option value="">--------선택하세요-------</option>
<option value='지금바로' <? if($wr_9 =="지금바로") echo "selected"; ?> >지금바로</option>
<option value='09시~10시' <? if($wr_9 == "09시~10시") echo "selected"; ?>>09시~10시</option>
<option value='10시~11시' <? if($wr_9 == "10시~11시") echo "selected"; ?>>10시~11시</option>
<option value='11시~12시' <? if($wr_9 == "11시~12시") echo "selected"; ?>>11시~12시</option>
<option value='12시~13시' <? if($wr_9 == "12시~13시") echo "selected"; ?>>12시~13시</option>
<option value='13시~14시' <? if($wr_9 == "13시~14시") echo "selected"; ?>>13시~14시</option>
<option value='14시~15시' <? if($wr_9 == "14시~15시") echo "selected"; ?>>14시~15시</option>
<option value='15시~16시' <? if($wr_9 == "15시~16시") echo "selected"; ?>>15시~16시</option>
<option value='16시~17시' <? if($wr_9 == "16시~17시") echo "selected"; ?>>16시~17시</option>
<option value='17시~18시' <? if($wr_9 == "17시~18시") echo "selected"; ?>>17시~18시</option>
<option value='18시~19시' <? if($wr_9 == "18시~19시") echo "selected"; ?>>18시~19시</option>
<option value='19시~20시' <? if($wr_9 == "19시~20시") echo "selected"; ?>>19시~20시</option>
<option value='20시~21시' <? if($wr_9 == "20시~21시") echo "selected"; ?>>20시~21시</option>
</select>
</td>
</tr>
</table>
</td>
</tr>
<tr height="10"></tr>
<tr>
<td width=40 height=18 style="padding-left:8px;"><img src="<?=$g4['path']?>/core_images/ty_txt03.jpg" ></td>
<td> <input name='hp1' class='quick2' type='text' size='30%' maxlength='4' itemname='휴대전화' >
<span class="style3">-</span>
<input name='hp2' class='quick2' type='text' size='30%' maxlength='4' itemname='휴대전화 두번째자리' > <span class="style3">-</span>
<input name='hp3' class='quick2' type='text' size='30%' maxlength='4' itemname='휴대전화 세번째자리' >
</td>
</tr>
<tr height="10"></tr>
<tr>
<td width=40 height=18 style="padding-left:8px;"><img src="<?=$g4['path']?>/core_images/ty_txt01.jpg" ></td>
<td>
<table width=30 cellpadding=0 cellspacing=0 border=0>
<tr>
<td>
<select id="select_id" name='wr_2' itemname='채무' required value="<?=$wr_2?>" onchange="javascript_:change();">
<option value="">--------선택하세요-------</option>
<option value='1000만원미만' <? if($wr_2 =="1000만원미만") echo "selected"; ?>>1000만원미만</option>
<option value='2000만원미만' <? if($wr_2 == "2000만원미만") echo "selected"; ?>>2000만원미만</option>
<option value='3000만원미만' <? if($wr_2 == "3000만원미만") echo "selected"; ?>>3000만원미만</option>
<option value='4000만원미만' <? if($wr_2 == "4000만원미만") echo "selected"; ?>>4000만원미만</option>
<option value='5000만원이상' <? if($wr_2 == "5000만원이상") echo "selected"; ?>>5000만원이상</option>
</select>
<script>
function change() {
var select = document.getElementById("select_id");
var option_value = select.options[select.selectedIndex].value;
if (option_value == '1000만원미만') {
alert("1,000만원 미만은 개인회생 신청이 불가능합니다");
}
}
</script>
</td>
</tr>
</table>
</td>
</tr>
<tr height="10"></tr>
<tr>
<td width=40 height=18 style="padding-left:8px;"><img src="<?=$g4['path']?>/core_images/ty_txt05.jpg" ></td>
<td><textarea class='quick1' name="wr_content" rows="2" cols="41" style="width:80%" itemname="상담내용"></textarea></td>
</tr>
<tr height="10"></tr>
<tr>
<td width=40 height=25 style="padding-left:8px;"></td>
<td>
<table width=230 cellpadding=0 cellspacing=0 border=0 height=25>
<tr>
<td><input type=checkbox name=wr_11 value='개인정보취급방침' <?=$write[wr_11]?>>개인정보취급방침</td>
</tr>
</table>
</td>
</tr>
<tr height="10"></tr>
<tr align="center">
<td height="30" colspan="2" style="padding-left:24px;"><input type=image src="<?=$g4['path']?>/core_images/tyt04_bt01.jpg" alt="상담신청" > </td>
</tr>
<tr height="10"></tr>
<tr>
<td width=40 height=18 style="padding-left:8px;"><img src="<?=$g4['path']?>/img/tip1.jpg" ></td>
<td class="tip">채무금액이 1,000만원 미만일 경우 개인회생 및 파산이 되지않습니다. 이 경우 신용회복위원회(1600-5500)로 문의하시길 바랍니다.</td>
</tr>
</table> </td>
</tr>
</form>
</table> </td>
</tr>
</table>
<!--//-->
pc에도 인쿠르트 했고 모바일에도 인쿠르트 했거든요, 인쿠르트나 글쓰기나 다 잘 됩니다. 다만 제가 또
sms에 문자 오는 걸 연동 시켰거든요
write_update.skin 에 아래 소스를 넣었습니다.
include_once("$g4[path]/lib/mw.sms.lib.php"); // sms 라이브러리 포함
//전화번호
// 자신만의 코드를 넣어주세요.
//휴대전화
$wr_1 = "$hp1-$hp2-$hp3";
$sql1 = " update $write_table set wr_1 = '$wr_1' where wr_id = '$wr_id' ";
sql_query($sql1);
$sms_hp = "{$hp1}-{$hp2}-{$hp3}";
// 하이픈 치환
$sms_hp = eregi_replace("[^0-9]", "", $sms_hp);
$sms_content = "{$wr_name}님이 문의글을 올리셨습니다.";
mw_sms_send("전화번호", $sms_hp , $sms_content);
/*if($w != 'u')
{ echo "<img src='{$board_skin_path}/img/q_1.gif' border='0' align='absmiddle'>"; } */
if( $u=w ||$write[wr_4] == "accept" ) echo "checked";
여기서 모바일 버전이 문제가 생겼습니다. 전 위토즈님 빌더를 쓰고 있습니다.
http://sir.co.kr/g4_builder/12884?sfl=wr_name%2C1&stx=%EC%9C%84%ED%86%A0%EC%A6%88
위 빌더를 쓰고 있습니다.
문제는 우선 모바일엔 write_update.skin 파일이 없습니다. 이 파일을 업로드해서 하면 문자는 잘 옵니다, 글쓰기도 됩니다. 하지만 글 쓰고 나서 경로가 <?=$g4['path']?>/bbs/write_update4.php"> 이리갑니다.
메인으로 가게 하려고 수 없는 방법과 검색을 해도 나오지 않습니다
그래서 그냥 아이프레임으로 <iframe class="iframe" src="http://himangstart.com/mcustomer1.php" frameborder="0" style="width:100%;"></iframe>
이렇게 불러왔습니다, 인쿠르트 안 시키구요.
그랬더니 아이프레임 안에 홈페이지가 새로 뜹니다.
무슨 방법이 없을까요...ㅠㅠ...너무 갑갑해서 해결하면 사례라도 하고 싶을 정도입니다.
답변 1
<?=$g4['path']?>/bbs/write_update4.php?url=index.php
if(url=="index.php"){
location.replace("/index.php");
}
이런식으로 처리하면 되지않을까요???