폼메일 전송후 페이지 이동.. > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

폼메일 전송후 페이지 이동.. 정보

폼메일 전송후 페이지 이동..

본문

아래 소스는 formmail_send.contacts.php 부분입니다.
 
 
formmail_skin.contacts.php 에서 send를 누르면 그누보드 관리자 메인화면으로 돌아갑니다.
 
그걸 홈페이지 메인으로 가게 하고 싶은데.. 어느 소스부분을 고쳐야 할지 모르겠어서요^^;
 
 
 
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);
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
?>
<?
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]);
}
$content = stripslashes($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;
//mailer($fnick, $fmail, $to, $subject, $mail_content, $type, $file, $cfg[charset]);
mailer($fnick, $fmail, $to, $subject, $mail_content, $type, $file);
//$html_title = $tmp_to . "님께 메일발송";
$html_title = "메일 발송중";
include_once("$g4[path]/head.sub.php");
alert("메일을 정상적으로 발송하였습니다.",$g4[path]);
include_once("$g4[path]/tail.sub.php");
?>

댓글 전체

alert("메일을 정상적으로 발송하였습니다.",$g4[path]);
=>
alert("메일을 정상적으로 발송하였습니다.","/");

마지막에서 위로 세번째 줄이죠, ^^;
전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT