2026, 새로운 도약을 시작합니다.

메일, 아이코드문자 발송

· 5년 전 · 5500 · 6

DB를 받는 페이지(proc.php나 write.update.skin.php등등)에서

아래 코드를 커스트마이징(상단, wr_subject, 테이블명, 주석된 부분)하면 됩니다.

[code]

<?php
include_once('./_common.php');
include_once(G5_LIB_PATH.'/icode.sms.lib.php'); 

if($_POST) {

$bo_table = "counsel"; //table 명
$write_table = "g5_write_counsel"; "counsel"; //table 명

$wr_num = get_next_num($write_table);
$wr_reply = '';

$wr_subject = $wr_name."님의 문의입니다.";

$sql = " insert into $write_table
                set wr_num = '$wr_num',
                     wr_reply = '$wr_reply',
                     wr_comment = 0,
                     ca_name = '$ca_name',
                     wr_option = '$html,secret,$mail',
                     wr_subject = '$wr_subject',
                     wr_content = '$wr_content',
                     wr_link1 = '$wr_link1',
                     wr_link2 = '$wr_link2',
                     wr_link1_hit = 0,
                     wr_link2_hit = 0,
                     wr_hit = 0,
                     wr_good = 0,
                     wr_nogood = 0,
                     mb_id = '{$member['mb_id']}',
                     wr_password = '$wr_password',
                     wr_name = '$wr_name',
                     wr_email = '$wr_email',
                     wr_homepage = '$wr_homepage',
                     wr_datetime = '".G5_TIME_YMDHIS."',
                     wr_last = '".G5_TIME_YMDHIS."',
                     wr_ip = '{$_SERVER['REMOTE_ADDR']}',
                     wr_1 = '$wr_1',
                     wr_2 = '$wr_2',
                     wr_3 = '$wr_3',
                     wr_4 = '$wr_4',
                     wr_5 = '$wr_5',
                     wr_6 = '$wr_6',
                     wr_7 = '$wr_7',
                     wr_8 = '$wr_8',
                     wr_9 = '$wr_9',
                     wr_10 = '$wr_10' ";
sql_query($sql);

$wr_id = sql_insert_id();

// 부모 아이디에 UPDATE
sql_query(" update $write_table set wr_parent = '$wr_id' where wr_id = '$wr_id' ");

// 새글 INSERT
sql_query(" insert into {$g5['board_new_table']} ( bo_table, wr_id, wr_parent, bn_datetime, mb_id ) values ( '{$bo_table}', '{$wr_id}', '{$wr_id}', '".G5_TIME_YMDHIS."', '{$member['mb_id']}' ) ");

// 게시글 1 증가
sql_query("update {$g5['board_table']} set bo_count_write = bo_count_write + 1 where bo_table = '{$bo_table}'");
//*************메일 시스템******************//
/** 필요 시 주석삭제
$content .= "<div>이름 : ".$wr_name."</div>";
$content .= "<div>전화번호 : ".$wr_1."</div>";
$content .= "<div>문의내용 : ".$wr_content."</div>";
mailer("그누보드홈페이지", "sir@naver.com", "sir@naver.com", "[상담신청]".$wr_name."님이 상담을 신청했습니다.", $content, 1);
**/
//*************문자 시스템******************//
/** 필요 시 주석삭제
$send_num = array('010-0000-0000');//$send_num = array('받는번호1','받는번호2','받는번호3');
for($i = 0; $i < count($send_num) ; $i++){

      $send_hp_mb[$i] = '보내는번호1,보내는번호2'; // 보내는 전화번호 
      $recv_hp_mb[$i] = $send_num[$i]; //  받는 전화번호
      $send_hp[$i] = str_replace("-","",$send_hp_mb[$i]); // - 제거 
      $recv_hp[$i] = str_replace("-","",$recv_hp_mb[$i]); // - 제거 

      $send_number[$i] =  "$send_hp[$i]"; 
      $recv_number[$i] =  "$recv_hp[$i]"; 

            
      $sms_content[$i] = "문의:". "\n"  .$wr_name. "\n" .$wr_1;  // 문자 내용 

      $SMS = new SMS; // SMS 연결 
       $SMS->SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $config['cf_icode_server_port']); 
      $SMS->Add($recv_number[$i],$send_number[$i], $config['cf_icode_id'], iconv("utf-8", "euc-kr", stripslashes($sms_content[$i])), ""); 
      $SMS->Send();
}
**/
?>

<?php
alert("완료되었습니다");
}
?>

[/code]

|

댓글 6개

수고 하셨습니다.
메일이나 문자발송이 가능하다는 거죠?;;
1. 메일은 lib에 메일러가 있어야하며
2. 문자발송은 아이코드기준으로 회원가입 후 관리자에서 설정을 해두시면 됩니다
찾았다 감사합니다! 꾸벅
메일러 감사합니다

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

그누보드5 팁자료실

번호 제목 글쓴이 날짜 조회
공지 3년 전 조회 4,597
2741 3일 전 조회 99
2740 4일 전 조회 96
2739 1주 전 조회 206
2738 1주 전 조회 209
2737 1주 전 조회 174
2736 1주 전 조회 276
2735 3주 전 조회 278
2734 3주 전 조회 259
2733 1개월 전 조회 262
2732 1개월 전 조회 300
2731 1개월 전 조회 264
2730 1개월 전 조회 222
2729 1개월 전 조회 350
2728 1개월 전 조회 244
2727 1개월 전 조회 419
2726 1개월 전 조회 253
2725 1개월 전 조회 326
2724 1개월 전 조회 357
2723 1개월 전 조회 265
2722 1개월 전 조회 298
2721 1개월 전 조회 211
2720 2개월 전 조회 304
2719 2개월 전 조회 307
2718 2개월 전 조회 200
2717 2개월 전 조회 335
2716 2개월 전 조회 202
2715 2개월 전 조회 311
2714 2개월 전 조회 271
2713 2개월 전 조회 374
2712 2개월 전 조회 289
🐛 버그신고