0) { if (is_array($exeQuery[0])) { $proDetArray = $exeQuery; } else { $proDetArray[0] = $exeQuery; } } return $proDetArray; } // get awaiting detail based on communication function getawaitprof($ProfileId/* , $t_flg */) { global $inputs, $dbase; /* $selVal = " ini_profileid "; $cdtnVal = " i.ini_contactid = p.pro_profileid and i.ini_contactid= '$ProfileId' and ((i.ini_status = 0 and i.ini_reinistatus = 0) or(i.ini_status = 4 and i.ini_reinistatus = 1)) "; if ($t_flg == 2) { $selVal = " ini_contactid as ini_profileid "; $cdtnVal = " i.ini_profileid = p.pro_profileid and i.ini_profileid= '$ProfileId' and ((i.ini_status = 2 and i.ini_reinistatus = 1) or(i.ini_status = 3 and i.ini_reinistatus = 1)) "; } $sql = "select $selVal,date_format(ini_inidate,'%D %b %Y') as date from initiate as i,profile as p where $cdtnVal and p.pro_adminappstatus=1 limit 0,10"; */ $sql = "select i.*,date_format(ini_inidate,'%D %b %Y') as date from (select ini_profileid as userid,ini_inidate from initiate where ini_contactid = '$ProfileId' and ((ini_status = 0 and ini_reinistatus = 0) or (ini_status =4 and ini_reinistatus =1)) and ini_profileid not in('RM1000','RM2000') and pro_adminappstatus = 1 union select ini_contactid as userid,ini_inidate from initiate where ini_profileid = '$ProfileId' and ((ini_status = 3 and ini_reinistatus = 1)) and ini_contactid not in('RM1000','RM2000') and pro_adminappstatus = 1) i join profile p on i.userid = p.pro_profileid and p.pro_adminappstatus = 1 order by i.ini_inidate asc limit 0, 10"; //limit $sLimit, 2 // and userid not in (select dec_to from pendingdecision where dec_to = userid and curdate() between dec_from and dec_till) $exeQuery = cdbquery($sql, "date"); $proDetArray = array(); if (count($exeQuery) > 0) { if (is_array($exeQuery[0])) { $proDetArray = $exeQuery; } else { $proDetArray[0] = $exeQuery; } } return $proDetArray; } // get msg_msgid function getmessusid($input1, $input2) { global $inputs, $dbase; $sql = "select msg_msgid from messages where msg_frompid = '$input1' and msg_topid='$input2' and msg_msgstatus='1' order by msg_msgdate desc"; $exeQuery = cdbquery($sql, "msg_msgid"); $proDetArray = array(); if (count($exeQuery) > 0) { if (is_array($exeQuery[0])) { $proDetArray = $exeQuery; } else { $proDetArray[0] = $exeQuery; } } return $proDetArray[0]["msg_msgid"]; } // get message based on msg_msgid function getMessageValuesfromId1($MsgId, $Field) { global $inputs, $dbase; $sql = "select $Field as value from messages where msg_msgid='$MsgId' and msg_msgstatus='1'"; $exeQuery = cdbquery($sql, "value"); $proDetArray = array(); if (count($exeQuery) > 0) { if (is_array($exeQuery[0])) { $proDetArray = $exeQuery; } else { $proDetArray[0] = $exeQuery; } } return $proDetArray[0]['value']; } // get user details who has been invited by others function getUserProfileDetail($ProfileId) { global $inputs, $dbase; $sql = "select pro_age,pro_email,dpro_name,pro_age,pro_marital,pro_caste,pro_edu,pro_occp,pro_oldmem,pro_type,pro_resid, pro_state,pro_nstate,pro_nation,pro_adminappstatus,dpro_aboutme,pro_ncity,pro_gender, pro_dob, dpro_aboutmestat,dpro_language,native_city, native_state,pro_lid,pro_religion,pro_profileid from profile p join det_profile d on p.pro_profileid = d.dpro_profileid where p.pro_profileid = '$ProfileId'"; $exeQuery = cdbquery($sql, "pro_email"); $proDetArray = array(); if (count($exeQuery) > 0) { if (is_array($exeQuery[0])) { $proDetArray = $exeQuery; } else { $proDetArray[0] = $exeQuery; } } return $proDetArray; } // for calculating age depending on date of birth function fnAgeCalculation($dob) { $age_new = $dob; $len = strlen("$age_new"); if ($len > 2) { $age_imp = implode("", (array)$age_new); $age_exp = explode(" ", $age_imp); $age_exp1 = $age_exp[0]; $new_age = explode("-", $age_exp1); if (is_array($new_age)) { $ayear = $new_age[0]; $amonth = $new_age[1]; $aday = $new_age[2]; //age calculation regading the birth day $proageStamp = (time() - mktime(0, 0, 0, ($amonth), $aday, $ayear)); $pro_age = floor($proageStamp / 365.25 / 86400); // Age } } else { $pro_age = ""; } return $pro_age; } //Email function function sendAwaitingRespone($ProfileId, $uniqid) { //require_once RIBM_ROOT . "/sites/default/theme/admin/nletter/functions/email_common_function.php"; //require_once RIBM_ROOT . '/addon/MimeMail/htmlMimeMail5.php'; //require_once RIBM_ROOT . '/include/com_classes/PhotoCClassForDev1.php'; global $inputs, $dbase, $categorylist, $countrydet; $html = ''; //$uphoto = new PhotoCClassForDev1; $userDet = getUserProfileDetail($ProfileId); //$datlan = cdbquery($sq = "select pro_lid from profile where pro_profileid='$ProfileId' ", "pro_lid"); $language = "en"; if (isset($userDet[0]["pro_lid"]) && intval($userDet[0]["pro_lid"]) != 0) { $language = check_language_existc(($userDet[0]["pro_lid"])); } //$language = "ml"; if ($language == "ur" || $language == "de") $language = "en"; $lan = $language; if ($lan != "en") return; //sent ly english notification //die("err"); $uName = $userDet[0]['dpro_name']; $uGender = $userDet[0]['pro_gender']; $uProType = $userDet[0]['pro_type']; $pageFrom = 1; $sub_date = date('d M y'); //Instantiate a new HTML Mime Mail object $mail = new htmlMimeMail5(); $msiteName = SITE_NAME; // Set the From header $mail->setFrom(SITE_NAME . " "); // Set the Return header $mail->setReturnPath("ereturn@" . SITE_NAME_MAIL); // Set the Priority - normal, high $mail->setPriority("normal"); $Subject = ''; $mlati = ""; $mlog = ""; /*if ($userDet[0]['pro_resid'] != "" && $userDet[0]['pro_ncity'] != "") { $rLanVal = fnGetLongtitudeEm($userDet[0]['pro_resid'], $userDet[0]['pro_ncity']); // calculate latitude and longtitude $mlati=$rLanVal['latitute']; $mlog=$rLanVal['longtitude']; }*/ /* * start on 20917 */ //fnCheckOffer($pProtype,$uUpgradePath); //fnsndmsgtxt("",'','',$uProType); global $BanTop, $BanBottom, $banmsg; /* * end on 20917 */ $Subject = ' Members Awaiting your Response (' . $sub_date . ' )'; $html .= ' ' . SITE_NAME . ' - Newsletters

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

' . $sub_date . '

Awaiting Response

Assalamualaikum

Dear ' . $uName . ' (' . $ProfileId . '),

'; //s$ProfileId = "AS6895808"; $getMatch = getawaitprof($ProfileId); //getUserMatchDetail($ProfileId); $getVal1 = $getMatch; //explode(',', $getMatch[0]["match_proid"]); $cntGetVal = count($getMatch); $uPhotoStatusarr = cdbquery("select count(*) as cnt from photos where ph_profileid='$ProfileId' and ph_main=ph_photo", "cnt"); $uPhotoStatus = $uPhotoStatusarr[0]["cnt"]; //$uPhotoStatus = getMyPhotoDet($ProfileId); //s$uPhotoStatus = 1; $ii = 0; $jj = 0; //print_r($getVal1); foreach ($getVal1 as $key => $vv) { $val = $vv['userid']; if ($ii == 7) { break; } $jj++; $uMatchDet = getUserProfileDetail($val); if (count($uMatchDet) == 0) { $jj--; continue; } $uMatchDet = $uMatchDet[0]; $mDispArr = array(); //$mDob = $uMatchDet['pro_dob']; $mAge = $uMatchDet['pro_age']; $mAgeD = $mAge . " yrs"; array_push($mDispArr, $mAgeD); $mPhoto = ""; //$mPhoto = $uphoto->getMatchphotos($ProfileId, $val, 'main', '', $uGender); //$mPhoto = $mPhoto["image"]; $mPhoto = getphotoc($val, $uMatchDet["pro_gender"], $uProType, $uMatchDet['pro_religion']); //print_r($mPhoto); //die("tt"); //$mPhoto = $mPhoto; $mName = $uMatchDet["dpro_name"]; $mMarital = $uMatchDet["pro_marital"]; $mMaritalStaus = getcategory($uMarital, $lan); array_push($mDispArr, $mMaritalStaus); $mMarital = $uMatchDet["pro_edu"]; $mMaritalStaus = getcategory($mMarital, $lan); array_push($mDispArr, $mMaritalStaus); $mMotherLang = $uMatchDet["dpro_language"]; $mEMotherLang = explode(',', $mMotherLang); $mDMotherLang = getcategory($mEMotherLang[0], $lan); $mDMotherLang .= " Speaking"; array_push($mDispArr, $mDMotherLang); $mAboutMeStat = $uMatchDet["dpro_aboutmestat"]; $mAboutMe = ""; if ($mAboutMeStat) { $mAboutMe = 'The user has modified this section recently. This information will be available within 4 hours.'; } else if ($uMatchDet["dpro_aboutme"] != "") { $mAboutMe = substr(htmlspecialchars_decode($uMatchDet["dpro_aboutme"], ENT_NOQUOTES), 0, 140); } if (strlen($mAboutMe) > 100) { $mAboutMe = substr($mAboutMe, 0, 100) . "..."; } //res city,state,country $country_code = $uMatchDet["pro_resid"]; $country_name = getcountry($uMatchDet["pro_resid"], $lan); if (in_array($country_code, [97, 188, 189])) $cityname = getzip1( $uMatchDet["pro_ncity"] ); else $cityname = getcit1($uMatchDet["pro_ncity"]); //$state_name = getstate($uMatchDet["pro_nstate"], $lan); $Uresid = ""; if ($cityname != "") $Uresid = $cityname . "," . $country_name; array_push($mDispArr, $Uresid); //native city,state,country $native_country_code = $uMatchDet["pro_nation"]; $native_cityname = ""; $native_country_name = ""; $native_state_name = ""; if (intval($native_country_code) > 0 && intval($uMatchDet["native_city"]) > 0 && intval($uMatchDet["native_state"]) > 0) { $native_country_name = (getcountry($native_country_code, $lan)); $native_country_name = (isset($native_country_name["cat_name"]) ? $native_country_name["cat_name"] : ""); if (in_array($native_country_code, [97, 188, 189])) { $city = getzip1( $uMatchDet["native_city"] ); $native_cityname = !empty($city) ? (isset($city['City']) ? trim($city['City']) : "") : ''; } else { $city = getcit1($uMatchDet["native_city"]); $native_cityname = (isset($city[0]['full_name_nd']) ? trim($city[0]['full_name_nd']) : ""); } //$native_state_name = getstate($uMatchDet["native_state"], $lan); // $native_state_name // = (isset($native_state_name[0]["name"]) ? $native_state_name[0]["name"] : ""); } $Unative = ""; if ($native_cityname != "") $Unative = $native_cityname . "," . $native_country_name; array_push($mDispArr, $Unative); //$uMatchDet["pro_profileid"] AS3931398 $deep_link = getTagLinks("cont_init", $uMatchDet["pro_profileid"], $lan); //print_r($deep_link); //$mRCountry = $uMatchDet["pro_resid"]; // $mRCountryStatus = $countrydet->sercountry($mRCountry); // array_push($mDispArr, $mRCountryStatus); $mDispContent = implode(", ", $mDispArr); $mProType = $uMatchDet["pro_type"]; $backStyle = "border:1px solid #ddd;background:#f6f6f6;"; if ($mProType == 1) { $backStyle = "border:1px solid #559f11;background:radial-gradient(#fff,#d4f9d8);background:-webkit-radial-gradient(#fff,#d4f9d8);background:-o-radial-gradient(#fff,#d4f9d8)"; } if ($ii == 0) { //$Subject .= $mName . ' and more suitable matches waiting to be viewed by you. ('.$sub_date.' )'; //$mName1 = explode(' ', $mName); //$sub_date1 = date('d M y', strtotime("yesterday")); //$Subject .= $mName1[0] . ' and more'.$cntTxt.' New Matches added yesterday('.$sub_date1.' )'; $html .= '

   The following members have shown interest in your profile and are awaiting your response.

'; /* * start on 20917 */ //$html.=$banmsg; /* * end on 20917 */ } $html .= '

Response Received on ' . $vv['date'] . '

' . $mName . ' (' . $val . ')

' . $mDispContent . '

' . $mAboutMe . ' View Profile

'; $ii++; } $html .= '

Kindly respond your like / dislike to them without delay, so that they could decide whether to go ahead with you or continue with their search with other prospects.

We pray that may the Almighty Allah help you to find suitable life partner soon through ' . $msiteName . '.

Jazakallahu Khairan

' . $msiteName . ' Team

'; $deep_linkdash = getTagLinks(""); if ($uPhotoStatus == 1) { $html .= '

Adding photos to your profile gives you better results and responses.

Upload your pictures now

'; } else if ($uProType == 0) { $html .= '

Get noticed by more members. Upgrade and unlock the contact details.

Upgrade Now

'; } $html .= '
'; //echo "here" . $jj . " **** " . count($getVal1); //echo $html;exit; // Set the Subject $mail->setSubject($Subject); // Create the HTML email $mail->setHTML($html, ""); // Create Message Text/plain $Message = ""; $mail->setText($Message); //$toAdd = "michaelstarss@gmail.com"; //$toAdd = "varusaimhd@yahoo.com"; //echo $jj; if ($jj > 0) { //$toAdd = "varusai24@gmail.com"; //$toAdd = $userDet[0]["pro_email"]; //$toAdd = "vijay1987a@gmail.com"; $toAdd = "farukfk0699@gmail.com"; return $result = $mail->send(array($toAdd)); } else { return 1; } } // get my photo status function getMyPhotoDet($ProfileId) { global $inputs, $dbase; $sql = "select count(ph_profileid) cnt from photo_status where ph_profileid = '$ProfileId'"; $exeQuery = cdbquery($sql, "cnt"); $rval = 1; if ($exeQuery['cnt'] > 0) { $rval = 2; } return $rval; }