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
/
Edit File:
bday.php
<?php //die(); //Select all members with birthdays ini_set("max_execution_time", "120"); //include("config.php"); /*$db['default']['username'] = 'niqsorgn_portal'; $db['default']['password'] = '@Xchange69!'; $db['default']['database'] = 'niqsorgn_pota1969';*/ //mysql_connect("localhost","root","@ajagbe@"); //mysql_select_db("niqs"); //require_once "Mail.php"; // PEAR Mail package //require_once ('membership/Mail/mime.php'); // PEAR Mail_Mime packge $con = mysqli_connect("localhost","niqsorgn_portal","@Xchange69!"); $db = mysqli_select_db($con, "niqsorgn_pota1969"); /* $s=mysqli_query($con, "SELECT * FROM birthday"); $r=mysqli_fetch_array($s); $subject=$r['subject']; $message=$r['message']; //$sms=$r['sms']; */ $sql=mysqli_query($con, "SELECT * FROM members WHERE MONTH(memberDOB)=MONTH(NOW()) AND DAY(memberDOB)=DAY(NOW()) AND memberGrade!=6 AND memberGrade!=8"); //$sql=mysqli_query($con, "SELECT * FROM members WHERE MONTH(memberDOB)=MONTH(NOW()) AND DAY(memberDOB)=DAY(NOW()) AND memberEmail!='' AND memberPhone!=''"); //$sql=mysqli_query($con, "SELECT * FROM members WHERE memberNo='00912'"); $count=mysqli_num_rows($sql); if(!$sql){ echo mysqli_error($con); } $sms=""; while ($row=mysqli_fetch_array($sql)){ //$sq=mysql_query("SELECT * FROM bday_msg"); //$rw=mysql_fetch_array($sq); $nseregno=$row['memberNo']; $hashedid = sha1($row['memberID']); $phone= $row['memberPhone']; $phone2= $row['memberPhone2']; $name=$row['memberTitle']." ".$row['memberSurname']." ".$row['memberOthernames']; $email=$row['memberEmail']; //echo $email."<br>"; $l = $row['memberSurname']; list($f, $o, $m) = explode(" ",$row['memberOthernames']); $f = substr($f,0,1); $o = substr($o,0,1); $m = substr($m,0,1); $sms = "Dear ".$l." ". $f .". ". $o .". ".$m ." - ".$nseregno .",\nWe wish you all the best as you celebrate your birthday today.\n\nHappy Birthday & many more years in sound health & prosperity. \nEnjoy your day.\n\nQS. Rotimi Bola Ojelade, FNIQS \nSecretary General"; $msg = "Dear ".$l." ". $f .". ". $o .". ".$m ." - ".$nseregno .", <br><br>We wish you all the best as you celebrate your birthday today.<br><br>Happy Birthday & many more years in sound health & prosperity. <br><br>Enjoy your day.<br><br><br><br>QS. Rotimi Bola Ojelade, FNIQS<br>Secretary General"; if($phone != ""){ @sendSMS($phone,$sms); } if($phone2 != ""){ @sendSMS($phone2,$sms); } $html=' <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!doctype html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Happy Birthday</title> </head> <body leftmargin="5" topmargin="0" marginwidth="0" marginheight="0" style="font-family: Georgia, Times, serif"> <table align="center" width="95%" border="1" bordercolor="gold" cellpadding="4" cellspacing="0"> <tr><td> <!-- img src="http://portal.niqs.org.ng/interswitch/logo.png"/--> <img src="https://niqs.org.ng/niqs_logo2020.png" width="409" height="128"> </td> </tr> <tr><td> <table width="90%" align="center" border="0" cellpadding="0" cellspacing="0"> <tr><td> <br> <p align="justify">'.$msg.'</p> </td></tr> </table> </td></tr> <tr><td> <center> <a href="http://www.niqs.org.ng" style="text-decoration:none">www.niqs.org.ng</a> | <a href="http://twitter.com/niqslive" style="text-decoration:none">Twitter</a> | <a href="http://facebook.com/TheNigerianInstituteOfQuantitySurveyors" style="text-decoration:none">Facebook</a> This email was sent to '.$email.' by Nigerian Institute of Quantity Surveyors (NIQS). <br />You are receiving this email because you signed up for NIQS email. If you wish to unsubscribe from all future emails, please click <a target="_blank" href="https://niqs.org.ng/mailoption/optout.php?i='.$hashedid.'">here</a>. <br><br> Our Postal Address is<br> <br>No. 24, NIQS Crescent, Off Michael Ama Nnachi Crescent, <br> Cadastral Zone B6, Mabushi District, P. O. Box 10689 Garki, <br> Abuja, Nigeria. <br><br> </center> </td></tr> </table> </body> </html>'; //send mail to member $to = $email; $subject = "Happy Birthday"; $headers = "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n"; // More headers $headers .= 'From: membership@niqs.org.ng' . "\r\n"; if(mail($to,$subject,$html,$headers)) { echo "Happy Birthday Message sent to ".$email; } } function sendSMS($phone,$sms){ $owneremail="info@niqs.org.ng"; $username="niqs"; $pwd="qsoffice1969"; $sender="NIQS"; //$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($sms); if ($f = @fopen($url, "r")) { $answer = fgets($f, 255); echo "yes"; echo $phone; if (substr($answer, 0, 1) == "+") { return 1; } else { return 2; //echo "an error has occurred: [$answer]."; } } else { return 0; //echo "Error: URL could not be opened."; } } 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; } } ?>
Simpan