query($a); $dbt -> next_record(); if($tflag=="")$tflag="0"; $user_tel = $dbt -> f("user_tel1"); //echo strlen($user_tel)."|".$user_tel; //--------------- ÀúÀåµÈ ÀüÈ­¹øÈ£ ±æÀÌ¿¡ µû¶ó ÀÚ¸£±â.... -----------// if(strlen($user_tel) == 10){ // 000-123-1234 $tel1 = substr($user_tel,0,3); $tel2 = substr($user_tel,3,3); $tel3 = substr($user_tel,6,4); }else{ // 000-1234-1234 $tel1 = substr($user_tel,0,3); $tel2 = substr($user_tel,3,4); $tel3 = substr($user_tel,7,4); } $dbt -> free(); if($goMode == "MODIFY"){ $q = "select seq_no, user_id, user_name, title, contents, reg_date, proc_date, tflag from tbl_schedule where seq_no = ${seq_no} ORDER BY seq_no DESC"; $sh -> query($q); $sh -> next_record(); $seq_no = $sh -> f("seq_no"); $user_id = $sh -> f("user_id"); $user_name = $sh -> f("user_name"); $title = $sh -> f("title"); $contents = $sh -> f("contents"); $reg_date = $sh -> f("reg_date"); $tflag = $sh -> f("tflag"); } if($goMode == "MODIFY" || $goMode == ""){ ?> ÀÏÁ¤µî·Ï
¼Ò¼Ó¸ÅÀå
¾Æ ÀÌ µð
ÀÌ     ¸§
ÀÏÁ¤³¯Â¥         
ÀÏÁ¤Á¦¸ñ
ÀÏÁ¤³»¿ë
ÀÏÁ¤Á¦¸ñÀ» ¹®ÀÚ¸Þ½ÃÁö·Î Àü¼ÛÇϽðڽÀ´Ï±î?
ÀÏÁ¤¸ñ·Ï
ÀÏÁ¤¸ñ·Ï :
query($q); while ($us->next_record()) { $user_id = $us -> f("user_id"); $userid = $userid."'".$user_id."'".","; } $len = strlen($userid); $userid = substr($userid,0,$len-1); $q = "select seq_no, user_id, user_name, title, contents, reg_date, proc_date, tflag from tbl_schedule where agentcode = '${MID}' AND user_id in ($userid) AND reg_date = '${reg_date}' "; }else{ $q = "select seq_no, user_id, user_name, title, contents, reg_date, proc_date, tflag from tbl_schedule where agentcode = '${MID}' AND user_id = '${UID}' AND reg_date = '${reg_date}' "; } $q = $q." AND tflag='${tflag}'"; $q = $q." ORDER BY seq_no DESC "; $sh -> query($q); $total_record = $sh -> num_rows(); while ($sh->next_record()) { $seq_no = $sh -> f("seq_no"); $user_id = $sh -> f("user_id"); $user_name = $sh -> f("user_name"); $title = longCut($sh -> f("title"), 30); $contents = $sh -> f("contents"); $reg_date = $sh -> f("reg_date"); $tflag = $sh -> f("tflag"); ?> free(); if($total_record == 0){ ?>
[°³ÀÎ][Àüü]
µî·ÏµÈ ÀÏÁ¤ÀÌ ¾ø½À´Ï´Ù.
insert($tableName,$fieldName,$valueName); $dbb -> free(); if($sflag == "Y") { $q = "SELECT sms_use, sms_notuse FROM tbl_agentlist WHERE agentcode = '${MID}'"; $m1 -> query($q); $m1 -> next_record(); $sms_notuse = $m1 -> f("sms_notuse"); if($sms_notuse - 1 < 0) { ?> /* $dbTableName = "smslist"; $fieldNames = ""; $fieldValue = ""; $tel_total = $tel_1.$tel_2.$tel_3; //³ª´²Áø¹øÈ£ ÇÕÄ¡±â $fieldNames[0] = "from_num"; //º¸³»´Â¹øÈ£ $fieldNames[1] = "to_num"; //¹Þ´Â¹øÈ£ $fieldNames[2] = "msg"; //º¸³»´Â³»¿ë $fieldNames[3] = "rsv_time"; //º¸³»´Â½Ã°£ $fieldNames[4] = "agentcode"; //´ë¸®Á¡¾ÆÀ̵ð $fieldNames[5] = "proc_id"; //º¸³»´Â»ç¶÷¾ÆÀ̵ð // $rsv_time = date("YmdHis", time()); // $rsv_time = "0000"; //¿¹¾àÀü¼ÛÀº YYYYMMDDHHMISS ÇüÅ·ΠÀÔ·Â, Áï½Ã´Â 0000 $fieldValue[0] = $tel_total; $fieldValue[1] = $tel_total; $fieldValue[2] = $subject; $fieldValue[3] = $sms_date; $fieldValue[4] = $MID; $fieldValue[5] = $UID; // echo($sh -> getInsQuery($dbTableName,$fieldNames,$fieldValue)."
"); $sh -> insert($dbTableName,$fieldNames,$fieldValue); $sh -> free(); */ $q = "SELECT MAX(RIGHT(cmid, 6)) FROM uds_msg"; //¾Õ8ÀÚ¸®·Î »ý¼ºµÈ ÃÖ´ë ·ÎÆ®¹øÈ£ °¡Á®¿À±â $q = $q." WHERE LEFT(cmid, 8) = '${sms_day}'"; $s2 -> query($q); if($s2 -> next_record()) { if(substr($s2 -> f(0), 0, 1) > 0) { $new_num = $s2 -> f(0) + 1; } else { $new_num = 100000 + $s2 -> f(0) + 1; } } else { $new_num = 100001; } $cmid = $sms_day.$new_num; $q = "INSERT INTO uds_msg"; $q = $q." (msg_type, cmid, request_time, send_time, dest_phone, dest_name,"; $q = $q." send_phone, msg_body, etc1, etc2, whereis)"; $q = $q." VALUES (0, $cmid, now(), '$send_time', '$tel_total', 'TELKIT',"; $q = $q." '$tel_total', '$subject', '$MID', '$UID', 'TELKIT')"; // echo($q); $s2 -> query($q); //------------------- SMSº¸³»´Â°÷ ³¡ ---------------------------------> $q = "UPDATE tbl_agentlist SET sms_use = sms_use + 1, sms_notuse = sms_notuse - 1"; $q = $q." WHERE agentcode = '$MID'"; $m1 -> query($q); } ?> update($tableName,$fieldName,$valueName,$dbWhere); if($sflag == "Y"){ $q = "SELECT sms_use, sms_notuse FROM tbl_agentlist WHERE agentcode = '${MID}'"; $m1 -> query($q); $m1 -> next_record(); $sms_notuse = $m1 -> f("sms_notuse"); if($sms_notuse - 1 < 0) { ?> /* $dbTableName = "smslist"; $fieldNames = ""; $fieldValue = ""; $tel_total = $tel_1.$tel_2.$tel_3; //³ª´²Áø¹øÈ£ ÇÕÄ¡±â $sms_date = $sms_day.$hour.$minute."00"; $fieldNames[0] = "from_num"; //º¸³»´Â¹øÈ£ $fieldNames[1] = "to_num"; //¹Þ´Â¹øÈ£ $fieldNames[2] = "msg"; //º¸³»´Â³»¿ë $fieldNames[3] = "rsv_time"; //º¸³»´Â½Ã°£ $fieldNames[4] = "agentcode"; //´ë¸®Á¡¾ÆÀ̵ð $fieldNames[5] = "proc_id"; //º¸³»´Â»ç¶÷¾ÆÀ̵ð // $rsv_time = date("YmdHis", time()); // $rsv_time = "0000"; //¿¹¾àÀü¼ÛÀº YYYYMMDDHHMISS ÇüÅ·ΠÀÔ·Â, Áï½Ã´Â 0000 $fieldValue[0] = $tel_total; $fieldValue[1] = $tel_total; $fieldValue[2] = $subject; $fieldValue[3] = $sms_date; $fieldValue[4] = $MID; $fieldValue[5] = $UID; // echo($sh -> getInsQuery($dbTableName,$fieldNames,$fieldValue)."
"); $sh -> insert($dbTableName,$fieldNames,$fieldValue); */ $q = "INSERT INTO uds_msg"; $q = $q." (msg_type, cmid, request_time, send_time, dest_phone, dest_name,"; $q = $q." send_phone, msg_body, etc1, etc2, whereis)"; $q = $q." VALUES (0, now()+0, now(), '$send_time', '$tel_total', 'TELKIT',"; $q = $q." '$tel_total', '$subject', '$MID', '$UID', 'TELKIT')"; // echo($q); $s2 -> query($q); //------------------- SMSº¸³»´Â°÷ ³¡ ---------------------------------> $q = "UPDATE tbl_agentlist SET sms_use = sms_use + 1, sms_notuse = sms_notuse - 1"; $q = $q." WHERE agentcode = '$MID'"; $m1 -> query($q); } ?> query($q); $shh -> free(); ?> "); exit; } ?>