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
/
View File Name :
bday03052016.php
<?php //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 mysql_connect("localhost","niqsorgn_portal","@Xchange69!"); mysql_select_db("niqsorgn_pota1969"); $s=mysql_query("SELECT * FROM birthday"); $r=mysql_fetch_array($s); $subject=$r['subject']; $message=$r['message']; //$sms=$r['sms']; $sql=mysql_query("SELECT * FROM members WHERE MONTH(memberDOB)=MONTH(NOW()) AND DAY(memberDOB)=DAY(NOW()) AND memberEmail!='' AND memberPhone!='' LIMIT 100"); $count=mysql_num_rows($sql); //echo $count; if(!$sql){ echo mysql_error(); } while ($row=mysql_fetch_array($sql)){ //$sq=mysql_query("SELECT * FROM bday_msg"); //$rw=mysql_fetch_array($sq); $nseregno=$row['memberNo']; $phone=$row['memberPhone']; $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. Happy Birthday & many more years in sound health & prosperity."; //$msg=GetAny("bday_msg","1","id","message"); //$subject=GetAny("bday_msg","1","id","subject"); $subject="Happy Birthday"; $html='<html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <title>Happy Birthday</title> <style> table{ width: 100%; height: 70%; border: 3px solid #73AD21; background-image: url(http://portal.niqs.org.ng/images/rose.jpg); } </style> </head> <body> <table border="0" cellspacing="5" cellpadding="10" width="100%" height="70%" > <tr> <td><p>Dear '.$name.',</p><br><br>'.$message.' </td> </tr> <tr> <td align="center">© Nigerian Institute of Quantity Surveyors </td> </tr> </table> </body> </html>'; //send Email //@sendMail($email,$html); //send SMS //echo "<br />"; //echo $sms; //@sendSMS($phone,$sms); } //$sms = "Dear M. Abba Tor - 01118\nWe wish you all the best as you celebrate your birthday today.Happy Birthday & many more years in sound health & //prosperity"; //echo $sms; //$phone = '2348184949695'; //@sendSMS($phone,$sms); //$to = $params['to']; //$subject = $params['subject']; //$message = $params['mail_body']; //$msg22='We celebrate you as you add another year today, Wishing you a fabulous birthday!,from all of us at Nigerian Society of Engineers'; /* $headers = "From: info@nse.org.ng" . "\r\n"; $headers .= "Reply-To: " . "\r\n"; //$headers .= "CC: susan@example.com\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; */ 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 $subject = "Happy Birthday"; // 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)); $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 sendSMS($phone,$message){ $owneremail="info_niqs@yahoo.com"; $subacct="MEMBERSHIP"; $subacctpwd="@2016members"; $sender="NIQS"; $msgtype=0; $url = "http://www.smslive247.com/http/index.aspx?" . "cmd=sendquickmsg" . "&owneremail=" . UrlEncode($owneremail) . "&subacct=" . UrlEncode($subacct) . "&subacctpwd=" . UrlEncode($subacctpwd) . "&message=" . UrlEncode($message) . "&sendto=".UrlEncode($phone) . "&msgtype=".UrlEncode($msgtype); if ($f = @fopen($url, "r")) { $answer = fgets($f, 255); 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; } } ?>