Esempio n. 1
0
// 메일발송 사용 (수정글은 발송하지 않음)
if (!($w == 'u' || $w == 'cu') && $config['cf_email_use'] && $board['bo_use_email']) {
    // 관리자의 정보를 얻고
    $super_admin = get_admin('super');
    $group_admin = get_admin('group');
    $board_admin = get_admin('board');
    $wr_subject = get_text(stripslashes($wr_subject));
    $tmp_html = 0;
    if (strstr($html, 'html1')) {
        $tmp_html = 1;
    } else {
        if (strstr($html, 'html2')) {
            $tmp_html = 2;
        }
    }
    $wr_content = conv_content(conv_unescape_nl($wr_content), $tmp_html);
    $warr = array('' => '입력', 'u' => '수정', 'r' => '답변', 'c' => '코멘트', 'cu' => '코멘트 수정');
    $str = $warr[$w];
    $subject = '[' . $config['cf_title'] . '] ' . $board['bo_subject'] . ' 게시판에 ' . $str . '글이 올라왔습니다.';
    $link_url = G5_BBS_URL . '/board.php?bo_table=' . $bo_table . '&wr_id=' . $wr_id . '&' . $qstr;
    include_once G5_LIB_PATH . '/mailer.lib.php';
    ob_start();
    include_once './write_update_mail.php';
    $content = ob_get_contents();
    ob_end_clean();
    $array_email = array();
    // 게시판관리자에게 보내는 메일
    if ($config['cf_email_wr_board_admin']) {
        $array_email[] = $board_admin['mb_email'];
    }
    // 게시판그룹관리자에게 보내는 메일
Esempio n. 2
0
// 예약전송
if ($wr_by && $wr_bm && $wr_bd && $wr_bh && $wr_bi) {
    $wr_booking = "{$wr_by}-{$wr_bm}-{$wr_bd} {$wr_bh}:{$wr_bi}";
    $booking = $wr_by . $wr_bm . $wr_bd . $wr_bh . $wr_bi;
} else {
    $wr_booking = '';
    $booking = '';
}
if ($config['cf_sms_use'] != 'icode') {
    alert('기본환경설정에서 icode sms 사용이 비활성화 되어 있습니다.');
}
include_once G5_ADMIN_PATH . '/admin.head.php';
$SMS = new SMS5();
$SMS->SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $config['cf_icode_server_port']);
$reply = str_replace('-', '', trim($wr_reply));
$wr_message = conv_unescape_nl($wr_message);
$result = $SMS->Add($list, $reply, '', '', $wr_message, $booking, $wr_total);
if ($result) {
    $result = $SMS->Send();
    if ($result) {
        $row = sql_fetch("select max(wr_no) as wr_no from {$g5['sms5_write_table']}");
        if ($row) {
            $wr_no = $row['wr_no'] + 1;
        } else {
            $wr_no = 1;
        }
        sql_query("insert into {$g5['sms5_write_table']} set wr_no='{$wr_no}', wr_renum=0, wr_reply='{$wr_reply}', wr_message='{$wr_message}', wr_booking='{$wr_booking}', wr_total='{$wr_total}', wr_datetime='" . G5_TIME_YMDHIS . "'");
        $wr_success = 0;
        $wr_failure = 0;
        $count = 0;
        foreach ($SMS->Result as $result) {
Esempio n. 3
0
            }
        }
    }
}
// 답변 이메일전송
if ($w == 'a' && $write['qa_email_recv'] && trim($write['qa_email'])) {
    include_once G5_LIB_PATH . '/mailer.lib.php';
    $subject = $config['cf_title'] . ' ' . $qaconfig['qa_title'] . ' 답변 알림 메일';
    $content = nl2br(conv_unescape_nl($qa_content));
    mailer($config['cf_admin_email_name'], $config['cf_admin_email'], $write['qa_email'], $subject, $content, 1);
}
// 문의글등록 이메일전송
if (($w == '' || $w == 'r') && trim($qaconfig['qa_admin_email'])) {
    include_once G5_LIB_PATH . '/mailer.lib.php';
    $subject = $config['cf_title'] . ' ' . $qaconfig['qa_title'] . ' 질문 알림 메일';
    $content = nl2br(conv_unescape_nl($qa_content));
    mailer($config['cf_admin_email_name'], $qa_email, $qaconfig['qa_admin_email'], $subject, $content, 1);
}
if ($w == 'a') {
    $result_url = G5_BBS_URL . '/qaview.php?qa_id=' . $qa_id . $qstr;
} else {
    if ($w == 'u' && $write['qa_type']) {
        $result_url = G5_BBS_URL . '/qaview.php?qa_id=' . $write['qa_parent'] . $qstr;
    } else {
        $result_url = G5_BBS_URL . '/qalist.php' . preg_replace('/^&/', '?', $qstr);
    }
}
if ($file_upload_msg) {
    alert($file_upload_msg, $result_url);
} else {
    goto_url($result_url);
Esempio n. 4
0
            }
        }
    }
}
// 답변 이메일전송
if ($w == 'a' && $write['qa_email_recv'] && trim($write['qa_email'])) {
    include_once G5_LIB_PATH . '/mailer.lib.php';
    $subject = $config['cf_title'] . ' ' . $qaconfig['qa_title'] . ' 답변 알림 메일';
    $content = nl2br(conv_unescape_nl(stripslashes($qa_content)));
    mailer($config['cf_admin_email_name'], $config['cf_admin_email'], $write['qa_email'], $subject, $content, 1);
}
// 문의글등록 이메일전송
if (($w == '' || $w == 'r') && trim($qaconfig['qa_admin_email'])) {
    include_once G5_LIB_PATH . '/mailer.lib.php';
    $subject = $config['cf_title'] . ' ' . $qaconfig['qa_title'] . ' 질문 알림 메일';
    $content = nl2br(conv_unescape_nl(stripslashes($qa_content)));
    mailer($config['cf_admin_email_name'], $qa_email, $qaconfig['qa_admin_email'], $subject, $content, 1);
}
if ($w == 'a') {
    $result_url = G5_BBS_URL . '/qaview.php?qa_id=' . $qa_id . $qstr;
} else {
    if ($w == 'u' && $write['qa_type']) {
        $result_url = G5_BBS_URL . '/qaview.php?qa_id=' . $write['qa_parent'] . $qstr;
    } else {
        $result_url = G5_BBS_URL . '/qalist.php' . preg_replace('/^&/', '?', $qstr);
    }
}
if ($file_upload_msg) {
    alert($file_upload_msg, $result_url);
} else {
    goto_url($result_url);
Esempio n. 5
0
        alert("보유하신 포인트(" . number_format($member['mb_point']) . ")가 없거나 모자라서 문자전송(" . number_format($minus_point) . ")이 불가합니다.\\n\\n포인트를 적립하신 후 다시 시도 해 주십시오.");
    }
} else {
    $minus_point = 0;
}
// 예약전송
if ($mh_by && $mh_bm && $mh_bd && $mh_bh && $mh_bi) {
    $mh_booking = "{$mh_by}-{$mh_bm}-{$mh_bd} {$mh_bh}:{$mh_bi}:00";
    $booking = $mh_by . $mh_bm . $mh_bd . $mh_bh . $mh_bi;
} else {
    $mh_booking = '';
    $booking = '';
}
$SMS = new SMS5();
$SMS->SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $config['cf_icode_server_port']);
$mh_message = conv_unescape_nl($mh_message);
$result = $SMS->Add($mh_hp, $mh_reply, '', '', $mh_message, $booking, $total);
$is_success = null;
if ($result) {
    $result = $SMS->Send();
    if ($result) {
        foreach ($SMS->Result as $result) {
            list($hp, $code) = explode(":", $result);
            if (substr($code, 0, 5) == "Error") {
                $is_success = false;
                switch (substr($code, 6, 2)) {
                    case '02':
                        // "02:형식오류"
                        $mh_log = "형식이 잘못되어 전송이 실패하였습니다.";
                        break;
                    case '23':
Esempio n. 6
0
echo "</span>";
?>

<span id="cont"></span>

<?php 
include_once './admin.tail.php';
?>

<?php 
flush();
ob_flush();
$ma_id = trim($_POST['ma_id']);
$select_member_list = trim($_POST['ma_list']);
//print_r2($_POST); EXIT;
$member_list = explode("\n", conv_unescape_nl($select_member_list));
// 메일내용 가져오기
$sql = "select ma_subject, ma_content from {$g5['mail_table']} where ma_id = '{$ma_id}' ";
$ma = sql_fetch($sql);
$subject = $ma['ma_subject'];
$cnt = 0;
for ($i = 0; $i < count($member_list); $i++) {
    list($to_email, $mb_id, $name, $nick, $datetime) = explode("||", trim($member_list[$i]));
    $sw = preg_match("/[0-9a-zA-Z_]+(\\.[0-9a-zA-Z_]+)*@[0-9a-zA-Z_]+(\\.[0-9a-zA-Z_]+)*/", $to_email);
    // 올바른 메일 주소만
    if ($sw == true) {
        $cnt++;
        $mb_md5 = md5($mb_id . $to_email . $datetime);
        $content = $ma['ma_content'];
        $content = preg_replace("/{이름}/", $name, $content);
        $content = preg_replace("/{닉네임}/", $nick, $content);
Esempio n. 7
0
// 메일발송 사용 (수정글은 발송하지 않음)
if (!($w == 'u' || $w == 'cu') && $config['cf_email_use'] && $board['bo_use_email']) {
    // 관리자의 정보를 얻고
    $super_admin = get_admin('super');
    $group_admin = get_admin('group');
    $board_admin = get_admin('board');
    $wr_subject = get_text(stripslashes($wr_subject));
    $tmp_html = 0;
    if (strstr($html, 'html1')) {
        $tmp_html = 1;
    } else {
        if (strstr($html, 'html2')) {
            $tmp_html = 2;
        }
    }
    $wr_content = conv_content(conv_unescape_nl(stripslashes($wr_content)), $tmp_html);
    $warr = array('' => '입력', 'u' => '수정', 'r' => '답변', 'c' => '코멘트', 'cu' => '코멘트 수정');
    $str = $warr[$w];
    $subject = '[' . $config['cf_title'] . '] ' . $board['bo_subject'] . ' 게시판에 ' . $str . '글이 올라왔습니다.';
    $link_url = G5_BBS_URL . '/board.php?bo_table=' . $bo_table . '&amp;wr_id=' . $wr_id . '&amp;' . $qstr;
    include_once G5_LIB_PATH . '/mailer.lib.php';
    ob_start();
    include_once './write_update_mail.php';
    $content = ob_get_contents();
    ob_end_clean();
    $array_email = array();
    // 게시판관리자에게 보내는 메일
    if ($config['cf_email_wr_board_admin']) {
        $array_email[] = $board_admin['mb_email'];
    }
    // 게시판그룹관리자에게 보내는 메일