Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <META HTTP-EQUIV=refresh CONTENT=30;URL="" >
- <?php
- include "config.inc.php";
- require_once 'include_lib/f-auto.php';
- $sqldelay = "select id,recipient,text,create_date,flash_sms,datetime_send,status,gateway_id,id_inbox from smsserver_delay where status!='1' and datetime_send < '$datetime' order by id desc limit 3";
- $resltdelay = mysql_query($sqldelay);
- while ($rowdelay = mysql_fetch_array($resltdelay)) {
- $id = stripslashes($rowdelay["id"]);
- $recipient = stripslashes($rowdelay["recipient"]);
- $text = stripslashes($rowdelay["text"]);
- $gateway_id = stripslashes($rowdelay["gateway_id"]);
- Update1(smsserver_delay, status, 1, id, $id);
- $id_smsserver_out = SendSMSg($recipient, $text, $inboxid, $useridx, $gateway_id);
- Update1(smsserver_delay, id_smsserver_out, $id_smsserver_out, id, $id);
- }
- $tgl_skr = date("d");
- $bln_skr = date("m");
- $thn_skr = date("Y");
- $jam_skr = date("H");
- $jam_sms_ultah = TulisNama(jam_sms_ultah, bimbel_config, id_bimbel_config, 1);
- $status_sms_ultah = TulisNama(status_sms_ultah, bimbel_config, id_bimbel_config, 1);
- if ($jam_skr == nol1($jam_sms_ultah) && $status_sms_ultah) {
- $sqlultah = "select id_kontak, kontak,YEAR(tanggal_lahir) as tahun from kontak where DAY(tanggal_lahir)='$tgl_skr' and MONTH(tanggal_lahir)= '$bln_skr' order by id_kontak desc limit 5";
- $resltultah = mysql_query($sqlultah);
- while ($rowultah = mysql_fetch_array($resltultah)) {
- $id_kontak = stripslashes($rowultah["id_kontak"]);
- $tahun = stripslashes($rowultah["tahun"]);
- $kontak = stripslashes($rowultah["kontak"]);
- $cekdilog = TulisNama3(id_log1, log1, tabel, kontak, id, $id_kontak, nilai2, $thn_skr);
- if (!$cekdilog) {
- $recipient = TulisNama2(hp, hp, id, $id_kontak, pemilik, kontak);
- $tahunke = $tahun - $thn_skr;
- $text = TulisNama(template_sms_ultah, bimbel_config, id_bimbel_config, 1);
- $text2 = str_replace("<nama>", $kontak, $text);
- $text3 = str_replace("<tahunke>", $tahunke, $text2);
- $id = SendSMS($recipient, $text3, $inboxid, $useridx);
- in2log1(kontak, $id_kontak, smsserver_out, $id, tahun, $thn_skr, $datetime);
- }
- }
- }
- $sms_engine = TulisNama(nilai, konf, konf, sms_engine);
- if ($sms_engine == "nowsms5") {
- $originator = $_GET["number"];
- $number = $_GET["number"];
- $originator = str_replace("+", "", $originator);
- $text = $_GET["text"];
- $gateway_id = $_GET["modem"];
- $message_date = $datetime;
- $receive_date = $datetime;
- $RECEIPTMESSAGEID = $_GET['RECEIPTMESSAGEID'];
- if ($originator) {
- $id = in2smsserver_in(1, $originator, I, 7, $message_date, $receive_date, $text, $original_ref_no, $original_receive_date, $gateway_id);
- }
- }
- $sql = "select id,originator,type,text,gateway_id from smsserver_in where process='0' limit 1 ";
- $data = mysql_query($sql);
- while ($row = mysql_fetch_array($data)) {
- $id = stripslashes($row["id"]);
- $originator = stripslashes($row["originator"]);
- $type = stripslashes($row["type"]);
- $text = stripslashes($row["text"]);
- $gateway_id = stripslashes($row["gateway_id"]);
- Update1(smsserver_in, process, "1", id, $id);
- if ($type == "S") {
- exit;
- }
- $cekgateway_id = TulisNama(id_gateway, gateway, gateway, $gateway_id);
- if (!$cekgateway_id) {
- in2gateway($gateway_id);
- }
- $number = zeroto62($originator);
- upconfig($text, $originator);
- $inboxid = $id;
- $id_kontak = TulisNama2(id, hp, pemilik, kontak, hp, $number);
- $kontak = TulisNama(kontak, kontak, id_kontak, $id_kontak);
- $id_sapaan = TulisNama(id_sapaan, kontak, id_kontak, $id_kontak);
- $sapaan = TulisNama(sapaan, sapaan, id_sapaan, $id_sapaan);
- $priority = 2;
- InTabel1(inbox, id, $id);
- $activautorespon = TulisNama(activautorespon, config, configid, 1);
- $SMSAutoReply = TulisNama(SMSAutoReply, config, configid, 1);
- $organisationname = TulisNama(organisationname, config, configid, 1);
- $softwarename = TulisNama(softwarename, config, configid, 1);
- $id_kontak = TulisNama(id, hp, hp, $number);
- $kontak = TulisNama(kontak, kontak, id_kontak, $id_kontak);
- if ($activautorespon == "true") {
- $keysms = explode(" ", $text);
- $ckeysms = count($keysms);
- $keysms0 = strtolower($keysms[0]);
- $keysms1 = strtolower($keysms[1]);
- $keysms12 = "$keysms0 $keysms1";
- $atext = $keysms = explode("#", $text);
- $catext = count($atext);
- $atext0 = $atext[0];
- $aksiid = TulisNama2(aksiid, aksi, katakunci, $keysms12, status, 1);
- if (!$aksiid) {
- $aksiid = TulisNama2(aksiid, aksi, katakunci, $keysms0, status, 1);
- if (!$aksiid) {
- $aksiid = TulisNama2(aksiid, aksi, katakunci, $atext0, status, 1);
- }
- }
- $aksi = TulisNama(aksi, aksi, aksiid, $aksiid);
- echo " $aksiid = TulisNama(aksiid,aksi,katakunci,$text); ";
- if ($aksi) {
- Update1(inbox, aksiid, $aksiid, id, $id);
- if ($aksi == "autorespon") {
- $text = TulisNama(text, aksi, aksiid, $aksiid);
- SendSMSl($number, $text, $inboxid, $useridx, $gateway_id, $status_report, $flash_sms, $priority);
- exit;
- }
- if ($aksi == "sms2folder") {
- $folderid = TulisNama(id, aksi, aksiid, $aksiid);
- Update1(inbox, folderid, $folderid, id, $id);
- echo "$folderid = TulisNama(id,aksi,aksiid,$aksiid); Update1(inbox,folderid,$folderid,id,$inboxid);";
- }
- if ($aksi == "forward2pb") {
- $text = "SMS dari $kontak ($number) : $text";
- $number = TulisNama(id, aksi, aksiid, $aksiid);
- SendSMSl($number, $text, $inboxid, $useridx, $gateway_id, $status_report, $flash_sms, $priority);
- exit;
- }
- if ($aksi == "dataumum") {
- $id_inbox = $inboxid;
- $id_umum = TulisNama(id, aksi, aksiid, $aksiid);
- $id_inkolom = in2inkolom($id_inbox, $id_umum);
- $sqlkolom = "select id_kolom,singkat,kolom from kolom where id_umum='$id_umum' ";
- $datakolom = mysql_query($sqlkolom);
- while ($rowkolom = mysql_fetch_array($datakolom)) {
- $a++;
- $id_kolom = stripslashes($rowkolom["id_kolom"]);
- $varkolom = $atext[$a];
- in2varkolom($id_inkolom, $id_kolom, $varkolom);
- }
- $text = TulisNama(sms_balas, umum, id_umum, $id_umum);
- SendSMSl($number, $text, $inboxid, $useridx, $gateway_id, $status_report, $flash_sms, $priority);
- exit;
- }
- if ($aksi == "forward2kelompok") {
- $text = "SMS dari $kontak ($number) : $text";
- $id_kelompok = TulisNama(id, aksi, aksiid, $aksiid);
- KirimSMSKelompok($id_kelompok, $text, $inboxid);
- exit;
- }
- if ($aksi == "sms2hp") {
- $keysms = explode(" ", $text, 2);
- $keysms0 = $keysms[0];
- $id_kelompok = TulisNama(id, aksi, aksiid, $aksiid);
- $keysms1 = $keysms[1];
- $arr_keysms1 = explode(" ", $keysms1);
- $carr_keysms1 = count($arr_keysms1);
- $kontakbr = "$kontak $number";
- $kontak = $kontakbr;
- for ($i = 0;$i < $carr_keysms1;$i++) {
- $hp = $arr_keysms1[$i];
- $hp62 = zeroto62($hp);
- $id_kontak = TulisNama2(id, hp, hp, $hp62, pemilik, kontak);
- if (!$id_kontak || $hp) {
- $id_kontak = in2kontak($id_sapaan, $kontak, $alamat, $id_kelurahan, $id_kecamatan, $id_kab_kota, $id_provinsi, $sex, $tanggal_lahir, $id_agama, $email, $yahoo_id, $valid, $tandai);
- in2kelompok_kontak($id_kelompok, $id_kontak);
- in2hp($id_kontak, 1, kontak, $hp62);
- }
- }
- $text = TulisNama(text, aksi, katakunci, $keysms0);
- SendSMSl($number, $text, $inboxid, $useridx, $gateway_id, $status_report, $flash_sms, $priority);
- exit;
- }
- if ($aksi == "poll") {
- $id_poll = TulisNama2(id_poll, poll, opsi, $keysms1, aksiid, $aksiid);
- $status = TulisNama(status, aksi, aksiid, $aksiid);
- $jawaban = TulisNama(keterangan, poll, id_poll, $id_poll);
- $pertanyaan = TulisNama(namaksi, aksi, aksiid, $aksiid);
- $ceksudah = ceksudah($aksiid, $number);
- include 'db.php';
- if ($status) {
- if ($ceksudah) {
- $text = $sms_jawab_poll_sudah;
- SendSMSl($number, $text, $inboxid, $useridx, $gateway_id, $status_report, $flash_sms, $priority);
- exit;
- } else {
- if ($id_poll) {
- inlog_poll($id_poll, $inboxid);
- Update1(inbox, aksiid, $aksiid, inboxid, $inboxid);
- $text = $sms_jawab_poll;
- SendSMSl($number, $text, $inboxid, $useridx, $gateway_id, $status_report, $flash_sms, $priority);
- exit;
- } else {
- $text = $sms_jawab_poll_sudah;
- SendSMSl($number, $text, $inboxid, $useridx, $gateway_id, $status_report, $flash_sms, $priority);
- exit;
- }
- }
- } else {
- $text = $sms_jawab_poll_tutup;
- SendSMSl($number, $text, $inboxid, $useridx, $gateway_id, $status_report, $flash_sms, $priority);
- exit;
- }
- }
- } else {
- $status_sms_auto_reply = TulisNama(status_sms_auto_reply, config, configid, 1);
- if ($status_sms_auto_reply) {
- $SMSAutoReply1 = str_replace("<nama>", $kontak, $SMSAutoReply);
- $SMSAutoReply2 = str_replace("<sapaan>", $sapaan, $SMSAutoReply1);
- $text = $SMSAutoReply2;
- SendSMSl($number, $text, $inboxid, $useridx, $gateway_id, $status_report, $flash_sms, $priority);
- exit;
- exit;
- }
- }
- }
- }
- include "include_lib/nixsms.php";
- $csound = Count1(inbox, sound, 0);
- if ($csound > 0) {
- Update1(inbox, sound, 1, sound, 0); ?>
- <object id="objMediaPlayer" width="0" height="0"
- classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" standby="Loading file..."
- type="application/x-oleobject">
- <param name="FileName" value="ringin.wav" />
- <param name="AutoStart" value="true" />
- <embed type="application/x-mplayer2" src="ringin.wav" width="0" height="0"
- autostart="true"></embed>
- </object>
- <? } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement