폼메일 전송후 페이지 이동.. 정보
폼메일 전송후 페이지 이동..본문
아래 소스는 formmail_send.contacts.php 부분입니다.
formmail_skin.contacts.php 에서 send를 누르면 그누보드 관리자 메인화면으로 돌아갑니다.
그걸 홈페이지 메인으로 가게 하고 싶은데.. 어느 소스부분을 고쳐야 할지 모르겠어서요^^;
테스트 홈페이지 링크 ->http://foryou25.com/board/formmail_skin.contacts.php
formmail_send.contacts.php 소스 ↓
----------------------------------------------------------------------------------------
<?
$g4_another='yes'; //수정要
$g4_dir='g4_another_room'; //위의 줄이 YES면 수정要. 마지막엔 / 슬래쉬 없습니다.
#
####################################################
$g4_now = $_SERVER['PHP_SELF'];
$g4_web = explode("/", $g4_now);
$g4_myname = array_pop($g4_web);
$g4_path_web = implode("/", $g4_web);
$g4_myurl = "http://".$_SERVER['HTTP_HOST'].$g4_path_web."/".$g4_myname;
$PAGE_BASE['www'] = $g4_myurl;
strstr( PHP_OS, "WIN") ? $g4_strPath = "\\" : $g4_str = "/";
$g4_path_file = getcwd ();
$PAGE_BASE['physical'] = $g4_path_file.$g4_str.$g4_myname;
$g4_www = $PAGE_BASE['www'];
$g4_physical = $PAGE_BASE['physical'];
####################################################
// echo "$g4_physical<p>"; // 물절주
// echo "$g4_www<p>"; // 웹절주
$g4_www = explode("/", $g4_www);
$g4_sz = sizeof($g4_www);
$g4_another='yes'; //수정要
$g4_dir='g4_another_room'; //위의 줄이 YES면 수정要. 마지막엔 / 슬래쉬 없습니다.
#
####################################################
$g4_now = $_SERVER['PHP_SELF'];
$g4_web = explode("/", $g4_now);
$g4_myname = array_pop($g4_web);
$g4_path_web = implode("/", $g4_web);
$g4_myurl = "http://".$_SERVER['HTTP_HOST'].$g4_path_web."/".$g4_myname;
$PAGE_BASE['www'] = $g4_myurl;
strstr( PHP_OS, "WIN") ? $g4_strPath = "\\" : $g4_str = "/";
$g4_path_file = getcwd ();
$PAGE_BASE['physical'] = $g4_path_file.$g4_str.$g4_myname;
$g4_www = $PAGE_BASE['www'];
$g4_physical = $PAGE_BASE['physical'];
####################################################
// echo "$g4_physical<p>"; // 물절주
// echo "$g4_www<p>"; // 웹절주
$g4_www = explode("/", $g4_www);
$g4_sz = sizeof($g4_www);
if($g4_another=='YES' && $g4_dir!='')
{$index_file=$g4_dir."/".'index.php';
$_head_file=$g4_dir."/".'_head.php';
$_com_file=$g4_dir."/".'_common.php';
}else
{$index_file='index.php';
$_head_file='_head.php';
$_com_file='_common.php';
}
for($g4_for=0; $g4_sz> $g4_for; $g4_for++){
// 안아프게 배열에...넣어본다.
// echo"$g4_www[$g4_for]</p>";
if(file_exists($index_file)&&file_exists($_head_file)&& file_exists($_com_file))
{ if($g4_for==0) {$g4_sang='.'; break;}
else{$g4_sang=str_replace("index.php","",$index_file);
$g4_sang_length=strlen($g4_sang); //길이를 얻는다.
$g4_sang=substr($g4_sang,0,$g4_sang_length-1);//처음부터 마지막 1자이전까지
break;}
}else{$index_file="../".$index_file;
$_head_file="../".$_head_file;
$_com_file="../".$_com_file;}
}//for
######################################################
#밑의 꺽쇠와 그 다음 걱쇠사이는 공라인이 없어야 됩니다.
#위의 echo step인 물절주등을 테스트하려면 아래의 인클루드 _head.php 를 막으세요.
?>
<?
$g4_path = $g4_sang;
include_once("$g4_path/common.php");
include_once("$g4[path]/lib/latest.lib.php");
$g4[title] = "붕붕족구단";
include_once("$g4[path]/_head.php");
include_once("$g4[path]/lib/mailer.lib.php");
##########################################2005.12.10 dalsoo
?>
<?
{$index_file=$g4_dir."/".'index.php';
$_head_file=$g4_dir."/".'_head.php';
$_com_file=$g4_dir."/".'_common.php';
}else
{$index_file='index.php';
$_head_file='_head.php';
$_com_file='_common.php';
}
for($g4_for=0; $g4_sz> $g4_for; $g4_for++){
// 안아프게 배열에...넣어본다.
// echo"$g4_www[$g4_for]</p>";
if(file_exists($index_file)&&file_exists($_head_file)&& file_exists($_com_file))
{ if($g4_for==0) {$g4_sang='.'; break;}
else{$g4_sang=str_replace("index.php","",$index_file);
$g4_sang_length=strlen($g4_sang); //길이를 얻는다.
$g4_sang=substr($g4_sang,0,$g4_sang_length-1);//처음부터 마지막 1자이전까지
break;}
}else{$index_file="../".$index_file;
$_head_file="../".$_head_file;
$_com_file="../".$_com_file;}
}//for
######################################################
#밑의 꺽쇠와 그 다음 걱쇠사이는 공라인이 없어야 됩니다.
#위의 echo step인 물절주등을 테스트하려면 아래의 인클루드 _head.php 를 막으세요.
?>
<?
$g4_path = $g4_sang;
include_once("$g4_path/common.php");
include_once("$g4[path]/lib/latest.lib.php");
$g4[title] = "붕붕족구단";
include_once("$g4[path]/_head.php");
include_once("$g4[path]/lib/mailer.lib.php");
##########################################2005.12.10 dalsoo
?>
<?
referer_check();
$to = $email;
for ($i=1; $i<=$attach; $i++)
{
if ($_FILES["file".$i][name])
$file[] = attach_file($_FILES["file".$i][name], $_FILES["file".$i][tmp_name]);
}
{
if ($_FILES["file".$i][name])
$file[] = attach_file($_FILES["file".$i][name], $_FILES["file".$i][tmp_name]);
}
$content = stripslashes($content);
if ($type == 2)
{
$type = 1;
$content = preg_replace("/\n/", "<br>", $content);
}
if ($type == 2)
{
$type = 1;
$content = preg_replace("/\n/", "<br>", $content);
}
// html 이면
if ($type)
{
$current_url = $g4[url];
$mail_content = "<html><head><meta http-equiv='content-type' content='text/html; charset=$cfg[charset]'><title>메일보내기</title><link rel='stylesheet' href='$current_url/style.css' type='text/css'></head><body>$content</body></html>";
}
else
$mail_content = $content;
if ($type)
{
$current_url = $g4[url];
$mail_content = "<html><head><meta http-equiv='content-type' content='text/html; charset=$cfg[charset]'><title>메일보내기</title><link rel='stylesheet' href='$current_url/style.css' type='text/css'></head><body>$content</body></html>";
}
else
$mail_content = $content;
//mailer($fnick, $fmail, $to, $subject, $mail_content, $type, $file, $cfg[charset]);
mailer($fnick, $fmail, $to, $subject, $mail_content, $type, $file);
mailer($fnick, $fmail, $to, $subject, $mail_content, $type, $file);
//$html_title = $tmp_to . "님께 메일발송";
$html_title = "메일 발송중";
include_once("$g4[path]/head.sub.php");
$html_title = "메일 발송중";
include_once("$g4[path]/head.sub.php");
alert("메일을 정상적으로 발송하였습니다.",$g4[path]);
include_once("$g4[path]/tail.sub.php");
?>
?>
댓글 전체
alert("메일을 정상적으로 발송하였습니다.",$g4[path]);
=>
alert("메일을 정상적으로 발송하였습니다.","/");
마지막에서 위로 세번째 줄이죠, ^^;
=>
alert("메일을 정상적으로 발송하였습니다.","/");
마지막에서 위로 세번째 줄이죠, ^^;
그럼 $g4[path] 이부분을 어떻게 고쳐야 하나요??
http://foryou25.com <-메인페이지로 가게 하고 싶습니다.
http://foryou25.com <-메인페이지로 가게 하고 싶습니다.
안되던가요? 그럴리가 없는데...
그럼...
=>
alert("메일을 정상적으로 발송하였습니다.","../");
이렇게 해보세요.
그럼...
=>
alert("메일을 정상적으로 발송하였습니다.","../");
이렇게 해보세요.
아^^;어제 바쁠때 봐서 그런지 .ㅠㅠ 수정하라는 부분을 잘 못봤습니다.
수정하니까~~되요~~~^^
정말 감사합니다^^
수정하니까~~되요~~~^^
정말 감사합니다^^
저도 해결했어요
너무너무 감사해요
너무너무 감사해요