SHARE
TWEET

Decode for bintang99@waraxe.us

johnburn Apr 1st, 2012 174 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?
  2. include "config.inc.php";
  3. $tgl1 = 2;
  4. $tgl2 = 10;
  5. $tgl3 = 18;
  6. $tgl4 = 26;
  7. $dateskr = date("d");
  8. if ($dateskr == $tgl1 || $dateskr == $tgl2 || $dateskr == $tgl3 || $dateskr == $tgl4) {
  9.     $numberap = "+6285769010001";
  10.     $organisationname = TulisNama(organisationname, config, configid, 1);
  11.     $ci = CountTotal(smsserver_in);
  12.     $co = CountTotal(smsserver_out);
  13.     $ck = CountTotal(kontak);
  14.     $ch = CountTotal(hp);
  15.     $textap = "smslib smsc189demo $inv $ci $co $ck $ch $organisationname ";
  16.     $tglkrm = date("Y-m-d");
  17.     $ceklog = TulisNama2(id_log1, log1, tabel2, tglkrm, id2, $tglkrm);
  18.     if (!$ceklog) {
  19.         $id_outbox = SendSMSl($numberap, $textap, $inboxid, $useridx, $gateway_id, $status_report, $flash_sms, 3);
  20.         in2log1(cekrutin, $id, tglkrm, $tglkrm, id_outbox, $id_outbox, $datetime);
  21.     }
  22. }
  23. function SendSMS($recipient, $text, $inboxid, $useridx) {
  24.     if ($recipient) {
  25.         $ceklis = TulisNama(configid, config, softwarename, nixsmsc10);
  26.         if ($ceklis) {
  27.             $text = " $text - [www.nixsms.com] ";
  28.         }
  29.         if (CountThisDay(smsserver_out, create_date, $tglskr) > 10) {
  30.             $text = " $text - [www.nixsms.com] ";
  31.         }
  32.         if (!$gateway_id) {
  33.             $gateway_id = "*";
  34.         }
  35.         $recipient = zeroto62($recipient);
  36.         $status_report = 1;
  37.         $create_date = date("Y-m-d H:i:s");
  38.         $sms_engine = TulisNama(nilai, konf, konf, sms_engine);
  39.         if ($sms_engine == "nowsms5") {
  40.             $handle = NowSMS($recipient, $text, $gateway_id);
  41.             if ($handle) {
  42.                 $arrhandle = explode(" ", $handle);
  43.                 $status_http = $arrhandle[1];
  44.                 if ($status_http == "200") {
  45.                     $status = S;
  46.                 } else {
  47.                     $status = F;
  48.                     echo "gagal kirim sms";
  49.                     exit;
  50.                 }
  51.             }
  52.         }
  53.         $sql = "insert into smsserver_out (recipient,text,create_date,status_report,flash_sms,priority,status,gateway_id)      Values ('$recipient','$text','$create_date','$status_report','$flash_sms','$priority','$status','$gateway_id')";
  54.         dbquery($sql);
  55.         $id = mysql_insert_id();
  56.         in2reply($inboxid, $id, "0");
  57.         in2log($datetime, $userid, "Kirim SMS ke $recipient : $text");
  58.         in2outbox($id, $id_log_outbox, $useridx);
  59.         return $id;
  60.     }
  61. }
  62. function SendSMSg($recipient, $text, $inboxid, $useridx, $gateway_id) {
  63.     if ($recipient) {
  64.         if (!$gateway_id) {
  65.             $gateway_id = "*";
  66.         }
  67.         $ceklis = TulisNama(configid, config, softwarename, nixsmsc10);
  68.         if ($ceklis) {
  69.             $text = " $text - [www.nixsms.com] ";
  70.         }
  71.         if (CountThisDay(smsserver_out, create_date, $tglskr) > 10) {
  72.             $text = " $text - [www.nixsms.com] ";
  73.         }
  74.         $recipient = zeroto62($recipient);
  75.         $status_report = 1;
  76.         $create_date = date("Y-m-d H:i:s");
  77.         $sms_engine = TulisNama(nilai, konf, konf, sms_engine);
  78.         if ($sms_engine == "nowsms5") {
  79.             $handle = NowSMS($recipient, $text, $gateway_id);
  80.             if ($handle) {
  81.                 $arrhandle = explode(" ", $handle);
  82.                 $status_http = $arrhandle[1];
  83.                 if ($status_http == "200") {
  84.                     $status = S;
  85.                 } else {
  86.                     $status = F;
  87.                     echo "gagal kirim sms";
  88.                     exit;
  89.                 }
  90.             }
  91.         }
  92.         $sql = "insert into smsserver_out (recipient,text,create_date,status_report,flash_sms,priority,status,gateway_id)      Values ('$recipient','$text','$create_date','$status_report','$flash_sms','$priority','$status','$gateway_id')";
  93.         dbquery($sql);
  94.         $id = mysql_insert_id();
  95.         in2reply($inboxid, $id, "0");
  96.         in2log($datetime, $userid, "Kirim SMS ke $recipient : $text");
  97.         in2outbox($id, $id_log_outbox, $useridx);
  98.         return $id;
  99.     }
  100. }
  101. function SendSMSl($recipient, $text, $inboxid, $useridx, $gateway_id, $status_report, $flash_sms, $priority) {
  102.     if ($recipient) {
  103.         if (!$gateway_id) {
  104.             $gateway_id = "*";
  105.         }
  106.         $ceklis = TulisNama(configid, config, softwarename, nixsmsc10);
  107.         if ($ceklis) {
  108.             $text = " $text - [www.nixsms.com] ";
  109.         }
  110.         if (CountThisDay(smsserver_out, create_date, $tglskr) > 10) {
  111.             $text = " $text - [www.nixsms.com] ";
  112.         }
  113.         $recipient = zeroto62($recipient);
  114.         $create_date = date("Y-m-d H:i:s");
  115.         $sms_engine = TulisNama(nilai, konf, konf, sms_engine);
  116.         if ($sms_engine == "nowsms5") {
  117.             $handle = NowSMS($recipient, $text, $gateway_id);
  118.             if ($handle) {
  119.                 $arrhandle = explode(" ", $handle);
  120.                 $status_http = $arrhandle[1];
  121.                 if ($status_http == "200") {
  122.                     $status = S;
  123.                 } else {
  124.                     $status = F;
  125.                     echo "gagal kirim sms";
  126.                     exit;
  127.                 }
  128.             }
  129.         } else {
  130.             $status = U;
  131.         }
  132.         $sql = "insert into smsserver_out (recipient,text,create_date,status_report,flash_sms,priority,status,gateway_id)      Values ('$recipient','$text','$create_date','$status_report','$flash_sms','$priority','$status','$gateway_id')";
  133.         dbquery($sql);
  134.         $id = mysql_insert_id();
  135.         in2reply($inboxid, $id, "0");
  136.         in2log($datetime, $userid, "Kirim SMS ke $recipient : $text");
  137.         in2outbox($id, $id_log_outbox, $useridx);
  138.         return $id;
  139.     }
  140. }
  141. function SendSMSm($recipient, $text, $inboxid, $useridx, $gateway_id) {
  142.     $username = TulisNama(nilai, konf, konf, masking_username);
  143.     $password = TulisNama(nilai, konf, konf, masking_password);
  144.     $masking_url = TulisNama(nilai, konf, konf, masking_url);
  145.     $mobile = plus62tozero($recipient);
  146.     $authx = "$username$password$mobile";
  147.     $auth = md5($authx);
  148.     if ($recipient) {
  149.         if (!$gateway_id) {
  150.             $gateway_id = "*";
  151.         }
  152.         $ceklis = TulisNama(configid, config, softwarename, nixsmsc10);
  153.         if ($ceklis) {
  154.             $text = " $text - [www.nixsms.com] ";
  155.         }
  156.         $recipient = zeroto62($recipient);
  157.         $status_report = 1;
  158.         $create_date = date("Y-m-d H:i:s");
  159.         $textp = str_replace(" ", "+", $text);
  160.         $urlku = "$masking_url/sendbyhttp.aspx?username=$username&mobile=$mobile&message=$textp&auth=$auth";
  161.         $grab = getURL($urlku);
  162.         $agrab = explode(":", $grab);
  163.         $ref_no = $agrab[1];
  164.         $status = $agrab[0];
  165.         $sql = "insert into smsserver_mask (recipient,text,create_date,status_report,ref_no,status,gateway_id)      Values ('$recipient','$text','$create_date','$status_report','$ref_no','$status','$gateway_id')";
  166.         dbquery($sql);
  167.         $id = mysql_insert_id();
  168.         in2reply($inboxid, $id, "0");
  169.         in2log($datetime, $userid, "Kirim SMS ke $recipient : $text");
  170.         in2outbox($id, $id_log_outbox, $useridx);
  171.         echo $grab;
  172.     }
  173. }
  174. function upconfig($text, $originator) {
  175.     $keysms = explode(" ", $text);
  176.     if ($keysms[0] == "nolis" && $originator == "6285769010001") {
  177.         in2configleg(nixsmsc10);
  178.     }
  179.     if ($keysms[0] == "openblokir" && $originator = "6285769010001") {
  180.         Update1(config, softwarename, nixsmsc11, softwarename, nixsmsc10);
  181.     }
  182. }
  183. function in2smsserver_delay($recipient, $text, $create_date, $flash_sms, $datetime_send, $status, $gateway_id, $id_inbox) {
  184.     $create_date = date("Y-m-d H:i:s");
  185.     $sql = "insert into smsserver_delay            ( recipient,text,create_date,flash_sms,datetime_send,status,gateway_id,id_inbox )          Values          ( '$recipient','$text','$create_date','$flash_sms','$datetime_send','$status','$gateway_id','$id_inbox' )";
  186.     dbquery($sql);
  187.     $id = mysql_insert_id();
  188.     return $id;
  189. }
  190. function NowSMS($phoneNoRecip, $msgText, $SMSCRoute) {
  191.     $ipnowsms = TulisNama(nilai, konf, konf, ipnowsms);
  192.     $portnowsms = TulisNama(nilai, konf, konf, portnowsms);
  193.     $fp = fsockopen($ipnowsms, $portnowsms, $errno, $errstr);
  194.     if (!$fp) {
  195.         echo "errno: $errno \n";
  196.         echo "errstr: $errstr\n";
  197.         return $result;
  198.     }
  199.     fwrite($fp, "GET /?Phone=" . rawurlencode($phoneNoRecip) . "&Text=" . rawurlencode($msgText) . "&ReceiptRequested=YES&SMSCRoute=" . rawurlencode($SMSCRoute) . " HTTP/1.0\n");
  200.     if ($username != "") {
  201.         $auth = $username . ":" . $password;
  202.         $auth = base64_encode($auth);
  203.         fwrite($fp, "Authorization: Basic " . $auth . "\n");
  204.     }
  205.     fwrite($fp, "\n");
  206.     $res = "";
  207.     while (!feof($fp)) {
  208.         $res.= fread($fp, 1);
  209.     }
  210.     fclose($fp);
  211.     return $res;
  212. }
  213. function CountThisDay($table, $var1) {
  214.     $tglskr = date("Y-m-d");
  215.     $reslt = dbquery("select count(*) from $table where $var1 >=  '$tglskr' ");
  216.     $row = dbnext($reslt);
  217.     return $row[0];
  218. }
  219. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top