게시글이 있을 때에 문자가 날라오도록 하는 게시판 스킨을 사용하였습니다.
그런데 제목이 날라오지 않고 게시글을 올린 사람의 아이디만 날라옵니다.
검색등 다양한 방법으로 시도해 보았으나 되지 않아서 질문드립니다.
소스 코드는 아래와 같습니다.
$mh_message = $member['mb_id']."님 께서 게시판에 글을 남기셧습니다.\n 확인해 주세요";
$mh_reply = "01000000000";
$mh_hp = "01000000000";
*게시자 아이디는 잘 날라오고 있기 때문에 제목 또는 "님 께서 ..." 부분등이 날라오면 좋겠습니다.
어떻게 수정하면 될까요?
부탁드립니다.
행복한 밤 되십시요...
사용 게시판 스킨은 링크합니다.:http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=117794&sca=&sfl=wr_subject%7C%7Cwr_content&stx=sms&sop=and
그런데 제목이 날라오지 않고 게시글을 올린 사람의 아이디만 날라옵니다.
검색등 다양한 방법으로 시도해 보았으나 되지 않아서 질문드립니다.
소스 코드는 아래와 같습니다.
$mh_message = $member['mb_id']."님 께서 게시판에 글을 남기셧습니다.\n 확인해 주세요";
$mh_reply = "01000000000";
$mh_hp = "01000000000";
*게시자 아이디는 잘 날라오고 있기 때문에 제목 또는 "님 께서 ..." 부분등이 날라오면 좋겠습니다.
어떻게 수정하면 될까요?
부탁드립니다.
행복한 밤 되십시요...
사용 게시판 스킨은 링크합니다.:http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=117794&sca=&sfl=wr_subject%7C%7Cwr_content&stx=sms&sop=and
댓글 3개
맞을꺼야님 감사합니다.
여러 방법으로 시도해 봤는데 안 되더군요.
혹 write_update.skin.php 소스와 연관된 것 같아서 올려봅니다.
한번 봐주십시요.
행복한 하루 되십시요.
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 관리자가 아니고, 글수정이 아닌 첫 글작성시에만 문자를 발송하기 위함
if( $w=="" && !$is_admin ) {
}
$mh_message = $_POST['wr_subject']."글이 작성되었습니다."; //문자 내용.
$mh_message = $member['mb_id']."님 께서 게시판에 글을 남기셧습니다.\n 확인해 주세요";
$mh_reply = "01000000000";
$mh_hp = "01000000000";
$g4[title] = "서류발급신청있습니다";
// SMS 설정값 배열변수
$sms4 = sql_fetch("select * from $g4[sms4_config_table]");
if (!$sms4[cf_member])
die("문자전송이 허용되지 않았습니다. 사이트 관리자에게 문의하여 주십시오.");
if (!$is_member)
die("로그인 해주세요.");
if ($member[mb_level] < $sms4[cf_level])
alert("회원 $sms4[cf_level]레벨 이상만 문자전송이 가능합니다.");
if (!trim($mh_reply))
alert('보내는 번호를 입력해주세요.');
if (!trim($mh_message))
alert('메세지를 입력해주세요.');
if (!trim($mh_hp))
alert('받는 번호를 입력해주세요.');
if ($is_admin != 'super')
{
$mh_reply = get_hp($mh_reply, 0);
if (!$mh_reply)
alert("보내는 번호가 올바르지 않습니다.");
}
else
{
$mh_reply = str_replace("-", "", $mh_reply);;
if (!check_string($mh_reply, _G4_NUMERIC_))
alert("보내는 번호가 올바르지 않습니다.");
}
$mh_hp = explode(',', $mh_hp);
// 핸드폰 번호만 걸러낸다.
$tmp = array();
for ($i=0; $i<count($mh_hp); $i++)
{
$hp = trim($mh_hp[$i]);
$hp = get_hp($hp);
if ($hp)
$tmp[][bk_hp] = get_hp($hp, 0);
}
$mh_hp = $tmp;
$total = count($mh_hp);
// 건수 제한
if ($sms4[cf_day_count] > 0 and $is_admin != 'super') {
$row = sql_fetch(" select count(*) as cnt from $g4[sms4_member_history_table] where mb_id='$member[mb_id]' and date_format(mh_datetime, '%Y-%m-%d') = '$g4[time_ymd]' ");
if ($row[cnt] + $total >= $sms4[cf_day_count]) {
alert("하루에 보낼수 있는 문자갯수(".number_format($sms4[cf_day_count]).")를 초과하였습니다.");
}
}
// 포인트 검사
// 예약전송
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 SMS4;
$SMS->SMS_con($sms4[cf_ip], $sms4[cf_id], $sms4[cf_pw], $sms4[cf_port]);
$result = $SMS->Add($mh_hp, $mh_reply, '', '', iconv("UTF-8","EUC-KR", trim($mh_message)), $booking, $total);
$is_success = null;
if ($result)
{
$result = $SMS->Send();
if ($result) //SMS 서버에 접속했습니다.
{
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': // "23:인증실패,데이터오류,전송날짜오류"
$mh_log = "데이터를 다시 확인해 주시기바랍니다.";
break;
case '97': // "97:잔여코인부족"
$mh_log = "잔여코인이 부족합니다.";
break;
case '98': // "98:사용기간만료"
$mh_log = "사용기간이 만료되었습니다.";
break;
case '99': // "99:인증실패"
$mh_log = "인증 받지 못하였습니다. 계정을 다시 확인해 주세요.";
break;
default: // "미 확인 오류"
$mh_log = "알 수 없는 오류로 전송이 실패하었습니다.";
break;
}
}
else
{
$is_success = true;
$mh_log = "문자전송:".get_hp($hp, 1);
}
$hp = get_hp($hp, 1);
$log = array_shift($SMS->Log);
sql_query("insert into $g4[sms4_member_history_table] set mb_id='$member[mb_id]', mh_reply='$mh_reply', mh_hp='$hp', mh_datetime='$g4[time_ymdhis]', mh_booking='$mh_booking', mh_log='$mh_log', mh_ip='$REMOTE_ADDR'");
if ($is_admin == 'super')
$sms4[cf_point] = 0;
}
$SMS->Init(); // 보관하고 있던 결과값을 지웁니다.
}
else alert("에러: SMS 서버와 통신이 불안정합니다.");
}
else alert("에러: SMS 데이터 입력도중 에러가 발생하였습니다.");
?>
여러 방법으로 시도해 봤는데 안 되더군요.
혹 write_update.skin.php 소스와 연관된 것 같아서 올려봅니다.
한번 봐주십시요.
행복한 하루 되십시요.
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 관리자가 아니고, 글수정이 아닌 첫 글작성시에만 문자를 발송하기 위함
if( $w=="" && !$is_admin ) {
}
$mh_message = $_POST['wr_subject']."글이 작성되었습니다."; //문자 내용.
$mh_message = $member['mb_id']."님 께서 게시판에 글을 남기셧습니다.\n 확인해 주세요";
$mh_reply = "01000000000";
$mh_hp = "01000000000";
$g4[title] = "서류발급신청있습니다";
// SMS 설정값 배열변수
$sms4 = sql_fetch("select * from $g4[sms4_config_table]");
if (!$sms4[cf_member])
die("문자전송이 허용되지 않았습니다. 사이트 관리자에게 문의하여 주십시오.");
if (!$is_member)
die("로그인 해주세요.");
if ($member[mb_level] < $sms4[cf_level])
alert("회원 $sms4[cf_level]레벨 이상만 문자전송이 가능합니다.");
if (!trim($mh_reply))
alert('보내는 번호를 입력해주세요.');
if (!trim($mh_message))
alert('메세지를 입력해주세요.');
if (!trim($mh_hp))
alert('받는 번호를 입력해주세요.');
if ($is_admin != 'super')
{
$mh_reply = get_hp($mh_reply, 0);
if (!$mh_reply)
alert("보내는 번호가 올바르지 않습니다.");
}
else
{
$mh_reply = str_replace("-", "", $mh_reply);;
if (!check_string($mh_reply, _G4_NUMERIC_))
alert("보내는 번호가 올바르지 않습니다.");
}
$mh_hp = explode(',', $mh_hp);
// 핸드폰 번호만 걸러낸다.
$tmp = array();
for ($i=0; $i<count($mh_hp); $i++)
{
$hp = trim($mh_hp[$i]);
$hp = get_hp($hp);
if ($hp)
$tmp[][bk_hp] = get_hp($hp, 0);
}
$mh_hp = $tmp;
$total = count($mh_hp);
// 건수 제한
if ($sms4[cf_day_count] > 0 and $is_admin != 'super') {
$row = sql_fetch(" select count(*) as cnt from $g4[sms4_member_history_table] where mb_id='$member[mb_id]' and date_format(mh_datetime, '%Y-%m-%d') = '$g4[time_ymd]' ");
if ($row[cnt] + $total >= $sms4[cf_day_count]) {
alert("하루에 보낼수 있는 문자갯수(".number_format($sms4[cf_day_count]).")를 초과하였습니다.");
}
}
// 포인트 검사
// 예약전송
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 SMS4;
$SMS->SMS_con($sms4[cf_ip], $sms4[cf_id], $sms4[cf_pw], $sms4[cf_port]);
$result = $SMS->Add($mh_hp, $mh_reply, '', '', iconv("UTF-8","EUC-KR", trim($mh_message)), $booking, $total);
$is_success = null;
if ($result)
{
$result = $SMS->Send();
if ($result) //SMS 서버에 접속했습니다.
{
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': // "23:인증실패,데이터오류,전송날짜오류"
$mh_log = "데이터를 다시 확인해 주시기바랍니다.";
break;
case '97': // "97:잔여코인부족"
$mh_log = "잔여코인이 부족합니다.";
break;
case '98': // "98:사용기간만료"
$mh_log = "사용기간이 만료되었습니다.";
break;
case '99': // "99:인증실패"
$mh_log = "인증 받지 못하였습니다. 계정을 다시 확인해 주세요.";
break;
default: // "미 확인 오류"
$mh_log = "알 수 없는 오류로 전송이 실패하었습니다.";
break;
}
}
else
{
$is_success = true;
$mh_log = "문자전송:".get_hp($hp, 1);
}
$hp = get_hp($hp, 1);
$log = array_shift($SMS->Log);
sql_query("insert into $g4[sms4_member_history_table] set mb_id='$member[mb_id]', mh_reply='$mh_reply', mh_hp='$hp', mh_datetime='$g4[time_ymdhis]', mh_booking='$mh_booking', mh_log='$mh_log', mh_ip='$REMOTE_ADDR'");
if ($is_admin == 'super')
$sms4[cf_point] = 0;
}
$SMS->Init(); // 보관하고 있던 결과값을 지웁니다.
}
else alert("에러: SMS 서버와 통신이 불안정합니다.");
}
else alert("에러: SMS 데이터 입력도중 에러가 발생하였습니다.");
?>
게시글 목록
| 번호 | 제목 |
|---|---|
| 284508 | |
| 284499 | |
| 284492 | |
| 284490 | |
| 284484 | |
| 284481 | |
| 284478 | |
| 284476 | |
| 284474 | |
| 284472 | |
| 284470 | |
| 284458 | |
| 284457 | |
| 284454 | |
| 284453 | |
| 284447 | |
| 284446 | |
| 284444 | |
| 284441 | |
| 284440 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기