½ÃÀÛÆäÀÌÁö·Î Áñ°Üã±âÃß°¡
·Î±×ÀÎ
ȸ¿ø°¡ÀÔ l Ã⼮üũ l ¸¶ÀÌÆäÀÌÁö l CGIMALL
ÀÚ·á½Ç »çÀÌÆ®µî·Ï ·©Å·100 ÇÁ·Î±×·¥¸®ºä °ü¸®ÀÚÃßõÀÚ·á Ãʺ¸°¡À̵å
Ä¿¹Â´ÏƼ
Àüü ÆîÃ帱â
Äü¸Þ´º¸µÅ© jquery , CSS , PHP , Javascript , ¹«·áÆùÆ® , ASP
»ó¼¼°Ë»ö
Ȩ > Ä¿¹Â´ÏƼ > Áú¹®°ú´äº¯ »ó¼¼º¸±â
Ä¿¹Â´ÏƼ ±¸Àα¸Á÷
»çÀÌÆ®µî·Ï
Ŭ¶ó¿ìµåű×
javascript
PHP
ASP
CSS
mysql
html
jquery
������
image
mobile
API
slide
°Ô½ÃÆÇ
ÇöÀçÁ¢¼ÓÀÚ ¸í »õ·Î°íħ
°Ô½ÃÆÇŸÀÌƲ Áú¹®°ú´äº¯ / »ó¼¼º¸±â
Æ®À§ÅÍ·Î º¸³»±â
Ãßõ¼ö 317 | Á¶È¸¼ö 3,720 | µî·ÏÀÏ 2010-02-24 16:57:33

´Ð³×ÀÓ

bwbzz

À̸ÞÀÏ

bwbzz@hanmail.net

Á¦¸ñ

Áö¿¥Æû¸ÞÀÏ ¼öÁ¤ÀÌ¿ä~ ¤Ð,.¤Ð
³»¿ë

Áö¿¥Æû¸ÞÀÏÀ̶õ ÇÁ·Î±×·¥ »ç¿ëÇÏ·Á±¸ Çϴµ¥¿ä,

Æû¸ÞÀÏ °ßÀû¼­ ÀÛ¼ºÇϸé ÀÛ¼ºµÈ ³»¿ëÀÌ °ü¸®ÀÚ¿¡°Õ ¸ÞÀÏÀÌ ¹ß¼ÛµÇÁö¸¸,

ÀÛ¼ºÀÚ¿¡°Ô´Â ¸ÞÀÏÀÌ ¹ß¼Û µÇÁö ¾Ê´õ¶ó±¸¿ä.

ÀÛ¼ºÀÚµµ ÀÚ½ÅÀÌ ¾´ ³»¿ëÀ» È®ÀÎ ÇÒ ¼ö ÀÖµµ·Ï ¸ÞÀϹ߼ÛÀÌ µÆÀ¸¸é ÁÁ°Ú´Âµ¥...

¾î¶»°Ô ¼öÁ¤ÇÏ¸é µÉ±î¿ä?

¾Æ·¡´Â, send_ok.php  ÆÄÀÏ ¼Ò½º ³»¿ëÀÔ´Ï´Ù.

 

===============================================================================================

include_once ("./LIBsent/config.inc.php");
include_once ("./LIBsent/function.inc.php");


@referer();


if ($_SERVER['REQUEST_METHOD'] == "POST") {

 $_POST['code'] = (int)$_POST['code'];

 $row = sql_array(query('select * from '.$gm_ed_tb." where no='".$_POST['code']."'"));
 if(!$row) msg_chk('Unable to select Table');
 extract($row);

 $wdate = time();
 $set_arr = explode('|:|',$set_array);
 $chk_cnt = $set_arr[4] ? count($chk) : false;
 $chk = explode(',',$set_arr[4]);


 // º¸³»´Â »ç¶÷
 $to_name = $_POST['name'] ? adds_trim($_POST['name']) : $name;
 $to_mail = $_POST['email'] ? adds_trim($_POST['email']) : $email;
 $add_arr = ''; $add_arr = $to_name.'|:|'.$to_mail.'|:|';


 // ¿Ï·áÈÄ À̵¿ÇÒ URL
 $goUrl = $preve ? adds_trim($preve) : $_SERVER['HTTP_REFERER'];


 // ·©±ÍÁö
 $languages = $set_arr[0] ? adds_trim($set_arr[0]) : $language;


 // ¾ð¾î
 include_once ('./languages/'.$languages.'/'.$languages.'.php');
 header("Content-Type: text/html; charset=$languages");

 

 // ¼³Ä¡µÈ °æ·Î
 function gmform_path(){
  $item = explode('/',$_SERVER['PHP_SELF']);
  array_pop($item);
  $item = 'http://'.$_SERVER['HTTP_HOST'].implode('/',$item);

  return $item;
 } // end func
 $HomeUrl = gmform_path();


 // ¸ÞÀÏ Çì´õ
 $content = "<html>\n<head>\n<META http-equiv=\"content-type\" content=\"text/html; charset=".$languages."\">\n</head>\n<body>\n";

 // ¸ÞÀÏ Å¸ÀÌƲ
 $content .= "<table border=0 width=600 cellpadding=2 cellspacing=0 align=center height=29 background=".$HomeUrl."/LIBsent/img/mail_t.gif><tr align=center height=25><td><strong>".$subject."</strong></td></tr></table>\n";


 // ¸ÞÀÏ º»¹®
 $content .= "<table border=0 width=600 cellpadding=0 cellspacing=0 align=center><tr><td width=20%></td><td width=80%></td></tr>\n";


 // POST°ªÀ» ¸ðµÎ ¹è¿­·Î ÀúÀå
 foreach($_POST as $key => $val){

  // ÀÏ¹Ý ÇʼöÇ׸ñ üũ
  for($i=0; $i<$chk_cnt; $i++){
   $val = trim($val);
   $chk2[$i] = $chk[$i];
   $chk[$i] = @preg_replace("/upfile/","",@preg_replace("/\[\]/","",$chk[$i]));
   if($key == $chk[$i]){
    if(empty($val)) msg_chk($chk[$i].' '.$msg['forms_chk']);
    $chk2[$i] = '';
   }
  }

  // ³Ñ¾î¿Â POST°ªÁß x, y, code°ªÀº Á¦¿Ü
  if(($val==$_POST['code']) || ($val==$_POST['x']) || ($val==$_POST['y'])) continue;

  $content .= "<tr height='30'><td>&nbsp; <img src=".$HomeUrl."/LIBsent/img/icon.gif valign=absmiddle>&nbsp;<b>".content_nl2br($key)."</b></td><td>&nbsp; ";

  // ¹è¿­ÀÌ¸é °ø¹éÀ» ³ÖÀ½
  if(is_array($_POST[$key])) {
   for($i=0; $i<count($_POST[$key]); $i++) $content .= content_nl2br(str_tags($_POST[$key][$i])).' ';
  }
  else{
   $content .= content_nl2br(str_tags($val));
  }

  $content .= "</td></tr><tr height=1><td align=center colspan=2 background=".$HomeUrl."/LIBsent/img/line_dot.gif></td></tr>\n";
 }

 // ¹è¿­ ÇʼöÇ׸ñ üũ
 if($chk_cnt == true){
  for($i=0; $i<$chk_cnt; $i++){
   $tmp_arr[$i] = !$chk2[$i] ? true : false;
   for($j=0; $j<count($_POST); $j++){
    $arr_posted = array_keys($_POST);
    if($chk2[$i] == $arr_posted[$j]){
     for($k=0; $k<count($_POST[$arr_posted[$j]]); $k++){
      if(!empty($_POST[$arr_posted[$j]][$k])) $tmp_arr[$i] = true;
     } // end for
    } // end if
   } // end for
   
   if($tmp_arr[$i]==false){
    msg_chk($chk2[$i].' '.$msg['forms_chk']);
   } // end if
  } // end for
 } // end chk_cnt


 // µµ¹è±ÛÀ» Â÷´ÜÇϱâ À§ÇÑ Æí¹ý
 if(($wdate-$_COOKIE['cookie_wr_spam'][0]) < 30){
  msg_chk($msg['forms_spam_ok']);
 }
 else{
  SetCookie("cookie_wr_spam[0]",$wdate,0,'/');
 }


 // ÷ºÎÆÄÀÏ Á¶ÇÕ
 for($k=0; $k<count($_FILES['upfile']['name']); $k++){ $t = $k+1;
  if(is_uploaded_file($_FILES['upfile']['tmp_name'][$k]) && ($_FILES['upfile']['size'][$k] > 0)) {
   $upfile_tmp .= $_FILES['upfile']['tmp_name'][$k].':'.$_FILES['upfile']['name'][$k].':'.$_FILES['upfile']['type'][$k].'|:|';

   $content .= "<tr height=30><td>&nbsp; <img src=".$HomeUrl."/LIBsent/img/icon.gif align=absmiddle>&nbsp;<b>file #".$t."</td><td>&nbsp; ";


   // ¼­¹ö¿¡ ÆÄÀÏÀ» ÀúÀåÇÑ´Ù¸é..
   if($set_arr[2] == 1){

    $content .= "<a href=".$HomeUrl."/LIBsent/downloaded.php?code=".$_POST['code']."&file=".base64_encode($_FILES['upfile']['name'][$k].'|:|'.$wdate.'|:|'.$k).">";
   }

   $content .= $_FILES['upfile']['name'][$k]."</a></td></tr><tr height=1><td align=center colspan=2 background=".$HomeUrl."/LIBsent/img/line_dot.gif></td></tr>\n";
  } // end if
 } // end for


 $upfiles = substr($upfile_tmp,0,-3);
 $content .= "</table>\n</body>\n</html>\n";

 $subject = adds_trim($subject);


 // (1)¹Þ´Â»ç¶÷, (2)¹Þ´ÂÀ̸ÞÀÏ, (3)º¸³»´Â»ç¶÷, (4)º¸³»´ÂÀ̸ÞÀÏ, (5)Á¦¸ñ, (6)³»¿ë, (7)¾ð¾î, (8)ÆÄÀÏ
 $send_ok = auto_email($name,$email,$to_name,$to_mail,$subject,$content,$languages,$upfiles);


 if($send_ok) {

  if($set_arr[2] == 1){
   for($k=0; $k<count($_FILES['upfile']['name']); $k++){
    if(is_uploaded_file($_FILES['upfile']['tmp_name'][$k]) && ($_FILES['upfile']['size'][$k] > 0)) {

     $tmp_file_arr[$k] = base64_encode($_FILES['upfile']['name'][$k].'|:|'.$wdate.'|:|'.$k);
     $attach[$k] = $uploaded_dir.'/'.$_POST['code'].'/'.$tmp_file_arr[$k];
     @move_uploaded_file($_FILES['upfile']['tmp_name'][$k],$attach[$k]);
     @chmod($attach[$k],0606);

     $add_arr .= $tmp_file_arr[$k].',';

    } // end if
   } // end for
  } // end if

  // ¸ÞÀÏ ³»¿ë µðºñ¿¡ ÀúÀå
  query("insert into $gm_sv_tb values('','".$_POST['code']."','".$add_arr."','".$subject."','".adds_trim($content)."','".$_SERVER['REMOTE_ADDR']."','".$wdate."')");

  metaHidden($goUrl,($set_arr[1]?adds_trim($set_arr[1]):$msg['forms_email_ok']));
 }
 else {
  msg_chk($msg['forms_email_er']);
 }
}

?>

 

=============================================================================================

Ãßõ½ºÅ©·¦¼Ò½ºº¸±â ¸ñ·Ï
°Ë¹«Ç÷½Å 2010-02-24 17:03:14
´ä±Û

auto_email($name,$email,$to_name,$to_mail,$subject,$content,$languages,$upfiles);
ÀÌÁÙÀ» º¹»çÇϼż­ ¹Þ´ÂÀÌ¿Í º¸³»´ÂÀ̸¦ µÚ¹Ù²Ù¸é µÉ°Å °°³×¿ä.

°Ë¹«Ç÷½Å 2010-02-24 17:04:15
´ä±Û

auto_email($to_name,$to_email,$name,$mail,$subject,$content,$languages,$upfiles);
¿øº» ¼Ò½º ¾Æ·¡ÂÊ¿¡ À§ ¼Ò½º¸¦ ³Ö¾î¼­ Å×½ºÆ®¸¦ Çغ¸½Ã´Â°Ô ÁÁ°Ú½À´Ï´Ù.

bwbzz 2010-02-24 17:29:53
´ä±Û

´äº¯°¨»çÇÕ´Ï´Ù. ±×·±µ¥ ¾ÈµÇ³×¿ä.. ¤Ð,.¤Ð ´Ù¸¥ ¹æ¹ýÀº ¾øÀ»±î¿ä??

°Ë¹«Ç÷½Å 2010-03-04 10:24:46
´ä±Û

±×·¸°Ô Çؼ­ ¾ÈµÈ´Ù¸é auto_email ÇÔ¼ö¸¦ ºÐ¼®Çغ¼¼ö ¹Û¿¡ ¾øÀ»°Å °°½À´Ï´Ù.
auto_email ÇÔ¼ö°¡ ¸ÞÀÏÀ» ¹ß¼ÛÇØÁÖ´Â ÇÔ¼öÀεí Çѵ¥, Ȥ½Ã ½ºÆÔ¸ÞÀÏÇÔ¿¡ ¾ø´ÂÁöµµ È®ÀÎÀÌ ÇÊ¿äÇÒµí Çϱ¸¿ä.

ÀÌÀü°Ô½Ã±Û Áú¹®!! ÀÌ »çÀÌƮó·³ 2010-02-23 01:28:03
´ÙÀ½°Ô½Ã±Û Áö¿¥Æû¸ÞÀÏ ¼öÁ¤ÀÌ¿ä~ ¤Ð,.¤Ð 2010-02-24 16:58:51