http://211.115.204.150/sms/con.html
=> sms_0916 에 입력하는 스크립트
http://211.115.204.150/sms/input.html
=> sms_0916 의 자료를 em_tran 에 실제로 발송 입력하는 스크립트
## input.php ##
<?
include \"lib.php\";
// 로컬 DB 연결
if(!$connect) $connect=dbconn_local();
// sms 발송 명단 데이타
// status (발송기록) 이 0 인 사람들만 발송 테이블에 입력하기 위함
$result = mysql_query(\"select name, phone from send_0916 where status = \'0\'\", $connect);
// 해당 년/월의 데이타 개수
$total_data = mysql_num_rows($result);
echo \"전체 데이타 : $total_data 건 \";
$dat = 1;
// 페이지에 데이터 출력 루프문
while ($data=mysql_fetch_array($result)) {
$name = $data[name];
$phone = $data[phone];
// 발송 데이타 입력
mysql_query(\"insert into em_tran (tran_pr, tran_phone, tran_callback, tran_status, tran_date, tran_msg, tran_type ) values (null, \'$phone\', \'02-2166-2504\', \'1\', now(),\'http://211.115.204.147/winc/jf.html 틈날때 즐기는 모바일 장기게임\', \'5\')\");
// 명단 데이타 수정
mysql_query(\"update send_0916 set status=\'1\' where phone = \'$data[phone]\'\");
echo \"$dat. $name / $phone 발송 완료 \";
$dat++;
}
mysql_close($connect);
$t_dat = $dat - 1;
echo\"<script>alert(\"$t_dat 건의 자료가 정상적으로 입력되었습니다\");</script>\";