setFrom("".SITE_NAME." "); //$mail->setFrom($msitename." "); $mail->setFrom(SITE_NAME." "); // Set the Return header $mail->setReturnPath("support@".SITE_NAME_MAIL); // Set the Priority - normal, high $mail->setPriority("normal"); $sub_date = date('d M y'); $photostatus = DB_name.".photo_status"; // Set BCC //$mail->setBcc("support@".SITE_NAME.""); $sname = $querybuild->build_query('dpro_name',det_profile,'dpro_profileid',$pid,'','','','','',''); $progen = $querybuild->build_query('pro_gender',profile,'pro_profileid',$pid,'','','','','',''); $photocnt = $querybuild->build_query('ph_profileid',$photostatus,'ph_profileid',$pid,'','','','','',''); //echo $photocnt.$pid; exit; //$toAdd = $querybuild->build_query('pro_email',profile,'pro_profileid',$pid,'','','','','',''); //echo "pid".$pid; exit; $selectdetprofvals = array("pro_email","pro_type"); $pProDet = $querybuild->build_query($selectdetprofvals,profile,'pro_profileid',$pid,'looparray','','','','',''); $toAdd = $pProDet["pro_email"]; $pProtype = $pProDet["pro_type"]; //$Subject = $ename." has Accepted your Interest"; $Subject = " Photo Request from Nikah.com members"; $pageFrom = 7; $uViewPath = 'https://'.$msitename.'/login?task=autologin&vpid='.$pid.'&uniqid='.$uniqid.'&pid='.$pid.'&accreg='.$pageFrom.'&redirect=1'; $uHomePath = 'https://'.$msitename.'/login?task=autologin&uniqid='.$uniqid.'&pid='.$pid.'&accreg='.$pageFrom.'&redirect=6'; $uSearchPath = 'https://'.$msitename.'/login?task=autologin&uniqid='.$uniqid.'&pid='.$pid.'&accreg='.$pageFrom.'&redirect=3'; $uInboxPath = 'https://'.$msitename.'/login?task=autologin&uniqid='.$uniqid.'&pid='.$pid.'&accreg='.$pageFrom.'&redirect=4'; $uUpgradePath = 'https://'.$msitename.'/login?task=autologin&uniqid='.$uniqid.'&pid='.$pid.'&accreg='.$pageFrom.'&redirect=5'; $uPhotoPath = 'https://'.$msitename.'/login?task=autologin&uniqid='.$uniqid.'&pid='.$pid.'&accreg='.$pageFrom.'&redirect=2'; //$uPhotoPath = 'https://'.$msitename.'/login?task=autologin&uniqid='.$uniqid.'&pid='.$pid.'&accreg='.$pageFrom.'&redirect=2'; $photorqstids = getMyPhotoRstStatus($pid); $phStatus = getMyPhotoStaDet($pid); //$msgtxt = fnsndmsgtxt(); fnCheckOffer($pProtype,$uUpgradePath,$phStatus,$uPhotoPath); $ProfileId = ''; //fnsndmsgtxt($uViewPath,$ProfileId,$pid); global $BanTop,$BanBottom,$banmsg; $html =' Nikah.com - Newsletters

You are receiving this mail as a registered member of Nikah.com
Please add ematches@'.SITE_NAME_MAIL.' to your address book to ensure delivery of e-mails, profile responses into your inbox

'.$sub_date.'

Photo Requests

Assalaamualaikum

Dear '.$sname.' ('.$pid.'),

'; if($photocnt) { $html.='

The following members have requested for your photo.

Don\'t let your special someone miss you!

so what are you waiting for?

'; } else { $html.='

The following members have requested for your photo. Adding more photos makes your chances higher to be seen.

Don\'t let your special someone miss you!

Members tend to ignore profiles that doesn\'t have photos

so what are you waiting for?

'; } $html.='
'; if($photorqstids) { foreach($photorqstids as $photoid) { $phids = $photoid['sprofileid']; $uphoto = new Photographs; $photo = $uphoto->getMatchphotos($pid,$phids,'vp','0',$progen); $photo=$photo['image']; $selectalues = array("pro_dob","pro_resid","pro_ncity","pro_occp"); $profdetmatch = $querybuild->build_query($selectalues,profile,'pro_profileid',$phids,'looparray','','','','',''); //print_r($profdetmatch); $phdob = isset($profdetmatch['pro_dob'])?$profdetmatch['pro_dob']:''; $phrsid = isset($profdetmatch['pro_resid'])?$profdetmatch['pro_resid']:''; $phcity = isset($profdetmatch['pro_ncity'])?$profdetmatch['pro_ncity']:''; $p_occupationid = isset($profdetmatch['pro_occp'])?$profdetmatch['pro_occp']:''; $p_location = $countrydet->sercity($phrsid,$phcity); $p_recountry= $countrydet->sercountry($phrsid); $dobDay = new DateTime($phdob); $curDay = new DateTime(); $ddiffInv = $dobDay->diff($curDay); $p_age = $ddiffInv->y; $amonth = $ddiffInv->m; $p_occupation = $categorylist->JobCategoryRecords($p_occupationid); $name1 = $querybuild->build_query('dpro_name',det_profile,'dpro_profileid',$phids,'','','','','',''); $ename = getfirestname($name1); $html.='

'.$ename.'

'.$p_age.'yrs, '.$p_occupation.'

'.$p_recountry.'/'.$p_location.'

'; } } $html.='
'; if($progen == '32') { $html.='

Concerned about privacy?

Don\'t worry, We have free photo lock options to protect your privacy.

  •   Show my photos to whom I want to contact or accept
  •   Show my photos to whom I wish to
'; } $html.='

Should you need any clarification or information, please feel free to contact us on support@'.SITE_NAME_MAIL.'

Jazakallahu khairan,

Thanks for Using Nikah.com -
"We make your search possible"

Nikah Team,

support@'.SITE_NAME_MAIL.' Nikah.com
'; $Message = ''; //echo $html; exit; //echo $Message; // Set the Subject $mail->setSubject($Subject); // Create the HTML email $mail->setHTML($html, ""); //Create Message Text/plain $mail->setText($Message); //$toAdd = 'varusai24@gmail.com'; // Send the email to rosemarie@example.com $result = $mail->send(array($toAdd)); } // for autologin process function fnAutoLoginProcess($profileid) { global $inputs, $dbase; $sql = "select unique_id from mem_auto_login where profileid = '$profileid'"; $exeQuery = $dbase->db_sql_query($sql); $returnArray = array(); if (count($exeQuery) > 0) { if (is_array($exeQuery[0])) { $returnArray = $exeQuery; } else { $returnArray[0] = $exeQuery; } } if (count($returnArray) && ($returnArray[0]["unique_id"]!='')) { $keycode = $returnArray[0]["unique_id"]; } else { $key = "1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ"; $snuffle = str_shuffle($key); $keycode = substr($snuffle,0,12); } $ip_ser = $_SERVER['SERVER_ADDR']; $memautologin_inc = getoddevenval('sno',DB_name.'.mem_auto_login',$ip_ser); $sql="insert into mem_auto_login (sno,profileid,unique_id,auto_status,sub_date) values ('$memautologin_inc','$profileid','$keycode','1',curdate()) ON DUPLICATE KEY UPDATE auto_status = '1'" ; $exeQuery = $dbase->db_sql_query($sql); $keycode = simple_encrypt($keycode); // encrypt mobile number $keycode = urlencode($keycode); // url encoded mobile number return $keycode; } // get my photo status function getMyPhotoStaDet($ProfileId) { global $inputs,$dbase; $sql = "select count(ph_profileid) cnt from photo_status where ph_profileid = '$ProfileId'"; $exeQuery = $dbase->db_sql_query($sql); return $exeQuery['cnt']; } //get photo request members function getMyPhotoRstStatus($pid) { global $inputs,$dbase; $sqlreq = "select sprofileid from `photoreq` where `rprofileid` = '$pid' and status = '0' and sprofileid in (select pro_profileid from profile) order by date desc limit 3"; $rs = $dbase->db_sql_query($sqlreq); //print_r($rs); exit; $rstarr = array(); if(count($rs>0)) { if(!is_array($rs[0])) {$rstarr[0]=$rs;} else{$rstarr=$rs;} } return $rstarr; } ?>