";
echo "Mailer Error: " . $mail->ErrorInfo;
}else{
# echo ":::Message Sent::: ".$to2;
}
}
function forgotpass($from2, $to2, $subject2, $message2) {
#echo 'mailcheck';
$mail = new PHPMailer(true);
$mail->IsSMTP();
$mail->SMTPKeepAlive =false;
$mail->CharSet = 'UTF-8';
$mail->Priority = 1;
$mail->SMTPDebug = 0;
$mail->Timeout = 10;
$mail->Port = 587;
// set mailer to use SMTP
$mail->Host = "smtp.elasticemail.com"; // specify main and backup server
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = "info@budu.com"; // SMTP username
$mail->Password = "3E3447465A825369DDE10D4CDDFAD8E6CAAB"; // SMTP password
$mail->From = "info@budu.com";
$mail->FromName = "budu.com";
$mail->AddAddress($to2, "budu.com");
// $mail->AddAddress("ellen@example.com"); // name is optional
$mail->AddReplyTo("info@budu.com", "budu.com");
//$mail->WordWrap = 50; // set word wrap to 50 characters
//$mail->AddAttachment("/var/tmp/file.tar.gz"); // add attachments
//$mail->AddAttachment("/tmp/image.jpg", "new.jpg"); // optional name
$mail->IsHTML(true); // set email format to HTML
$mail->Subject = $subject2;
$message2 = $message2 . '
====================================================
Telegram: https://www.t.me/budubiz
https://budu.com
disable, unsubscribe or set notification emails:
https://budu.com/settings.php?emailis='.$to2.'
Forgot Password:
https://budu.com/forgot_pass.php
budu.com uses https://getcode.com mobile payment app
';
$mail->Body = $message2;
//$mail->AltBody = $message2;
if(!$mail->Send())
{
echo "Message could not be sent.
";
echo "Mailer Error: " . $mail->ErrorInfo;
}else{
# echo ":::Message Sent::: ".$to2;
}
}
function sendmail($from2, $to2, $subject2, $message2) {
#echo 'mailcheck';
$mail = new PHPMailer(true);
$mail->IsSMTP();
$mail->SMTPKeepAlive =false;
$mail->CharSet = 'UTF-8';
$mail->Priority = 1;
$mail->SMTPDebug = 0;
$mail->Timeout = 10;
$mail->Port = 587;
// set mailer to use SMTP
$mail->Host = "smtp.elasticemail.com"; // specify main and backup server
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = "info@budu.com"; // SMTP username
$mail->Password = "3E3447465A825369DDE10D4CDDFAD8E6CAAB"; // SMTP password
$mail->From = "info@budu.com";
$mail->FromName = "budu.com";
$mail->AddAddress($to2, "budu.com");
// $mail->AddAddress("ellen@example.com"); // name is optional
$mail->AddReplyTo("info@budu.com", "budu.com");
//$mail->WordWrap = 50; // set word wrap to 50 characters
//$mail->AddAttachment("/var/tmp/file.tar.gz"); // add attachments
//$mail->AddAttachment("/tmp/image.jpg", "new.jpg"); // optional name
$mail->IsHTML(true); // set email format to HTML
$mail->Subject = $subject2;
$message2 = $message2 . '
====================================================
Telegram: https://www.t.me/budubiz
https://budu.com
disable, unsubscribe or set notification emails:
https://budu.com/settings.php?emailis='.$to2.'
Forgot Password:
https://budu.com/forgot_pass.php
budu.com uses https://getcode.com mobile payment app
';
$mail->Body = $message2;
//$mail->AltBody = $message2;
if(!$mail->Send())
{
echo "Message could not be sent.
"; echo "Mailer Error: " . $mail->ErrorInfo; }else{ # echo ":::Message Sent::: ".$to2; } } $cats=array("people"=>"People","nature"=>"Nature","architecture"=>"Architecture","objects"=>"Objects","funny"=>"Funny","others"=>"Others"); $a_rstatus=array("0"=>"Not Disclosed","1"=>"Single (Looking)","2"=>"Married","3"=>"Open Relationship","4"=>"Single (Not Looking)","5"=>"In Loving Relationship","6"=>"Dating Someone"); $a_liketypes=array("0"=>"Love","1"=>"Adore","2"=>"Sexy","3"=>"Gorgeous","4"=>"Beautiful","5"=>"Sweet","6"=>"Stylish","7"=>"Cute","8"=>"Funny","9"=>"Cool","10"=>"Hot"); $c_codes=array("AF"=>"Afghanistan","NL"=>"Netherlands","AN"=>"Netherlands Antilles","AL"=>"Albania","DZ"=>"Algeria","AS"=>"American Samoa","AD"=>"Andorra","AO"=>"Angola","AI"=>"Anguilla","AG"=>"Antigua and Barbuda","AE"=>"United Arab Emirates","AR"=>"Argentina","AM"=>"Armenia","AW"=>"Aruba","AU"=>"Australia","AZ"=>"Azerbaijan","BS"=>"Bahamas","BH"=>"Bahrain","BD"=>"Bangladesh","BB"=>"Barbados","BE"=>"Belgium","BZ"=>"Belize","BJ"=>"Benin","BM"=>"Bermuda","BT"=>"Bhutan","BO"=>"Bolivia","BA"=>"Bosnia and Herzegovina","BW"=>"Botswana","BR"=>"Brazil","VG"=>"Virgin Islands, British","BN"=>"Brunei","BG"=>"Bulgaria","BF"=>"Burkina Faso","BI"=>"Burundi","KY"=>"Cayman Islands","CL"=>"Chile","CK"=>"Cook Islands","CR"=>"Costa Rica","DJ"=>"Djibouti","DM"=>"Dominica","DO"=>"Dominican Republic","EC"=>"Ecuador","EG"=>"Egypt","SV"=>"El Salvador","ER"=>"Eritrea","ES"=>"Spain","ZA"=>"South Africa","ET"=>"Ethiopia","FK"=>"Falkland Islands","FJ"=>"Fiji Islands","PH"=>"Philippines","FO"=>"Faroe Islands","GA"=>"Gabon","GM"=>"Gambia","GE"=>"Georgia","GH"=>"Ghana","GI"=>"Gibraltar","GD"=>"Grenada","GL"=>"Greenland","GP"=>"Guadeloupe","GU"=>"Guam","GT"=>"Guatemala","GN"=>"Guinea","GW"=>"Guinea-Bissau","GY"=>"Guyana","HT"=>"Haiti","HN"=>"Honduras","HK"=>"Hong Kong","SJ"=>"Svalbard and Jan Mayen","ID"=>"Indonesia","IN"=>"India","IQ"=>"Iraq","IR"=>"Iran","IE"=>"Ireland","IS"=>"Iceland","IL"=>"Israel","IT"=>"Italy","TP"=>"East Timor","AT"=>"Austria","JM"=>"Jamaica","JP"=>"Japan","YE"=>"Yemen","JO"=>"Jordan","CX"=>"Christmas Island","YU"=>"Yugoslavia","KH"=>"Cambodia","CM"=>"Cameroon","CA"=>"Canada","CV"=>"Cape Verde","KZ"=>"Kazakhstan","KE"=>"Kenya","CF"=>"Central African Republic","CN"=>"China","KG"=>"Kyrgyzstan","KI"=>"Kiribati","CO"=>"Colombia","KM"=>"Comoros","CG"=>"Congo","CD"=>"Congo, The Democratic Republic of the","CC"=>"Cocos (Keeling) Islands","KP"=>"North Korea","KR"=>"South Korea","GR"=>"Greece","HR"=>"Croatia","CU"=>"Cuba","KW"=>"Kuwait","CY"=>"Cyprus","LA"=>"Laos","LV"=>"Latvia","LS"=>"Lesotho","LB"=>"Lebanon","LR"=>"Liberia","LY"=>"Libya","LI"=>"Liechtenstein","LT"=>"Lithuania","LU"=>"Luxembourg","EH"=>"Western Sahara","MO"=>"Macao","MG"=>"Madagascar","MK"=>"Macedonia","MW"=>"Malawi","MV"=>"Maldives","MY"=>"Malaysia","ML"=>"Mali","MT"=>"Malta","MA"=>"Morocco","MH"=>"Marshall Islands","MQ"=>"Martinique","MR"=>"Mauritania","MU"=>"Mauritius","YT"=>"Mayotte","MX"=>"Mexico","FM"=>"Micronesia, Federated States of","MD"=>"Moldova","MC"=>"Monaco","MN"=>"Mongolia","MS"=>"Montserrat","MZ"=>"Mozambique","MM"=>"Myanmar","NA"=>"Namibia","NR"=>"Nauru","NP"=>"Nepal","NI"=>"Nicaragua","NE"=>"Niger","NG"=>"Nigeria","NU"=>"Niue","NF"=>"Norfolk Island","NO"=>"Norway","CI"=>"Côte dIvoire","OM"=>"Oman","PK"=>"Pakistan","PW"=>"Palau","PA"=>"Panama","PG"=>"Papua New Guinea","PY"=>"Paraguay","PE"=>"Peru","PN"=>"Pitcairn","MP"=>"Northern Mariana Islands","PT"=>"Portugal","PR"=>"Puerto Rico","PL"=>"Poland","GQ"=>"Equatorial Guinea","QA"=>"Qatar","FR"=>"France","GF"=>"French Guiana","PF"=>"French Polynesia","RE"=>"Réunion","RO"=>"Romania","RW"=>"Rwanda","SE"=>"Sweden","SH"=>"Saint Helena","KN"=>"Saint Kitts and Nevis","LC"=>"St. Lucia","VC"=>"St. Vincent and the Grenadines","PM"=>"Saint Pierre and Miquelon","DE"=>"Germany","RS"=>"Serbia","ME"=>"Montenegro","SB"=>"Solomon Islands","ZM"=>"Zambia","WS"=>"Samoa","SM"=>"San Marino","ST"=>"Sao Tome and Principe","SA"=>"Saudi Arabia","SN"=>"Senegal","SC"=>"Seychelles","SL"=>"Sierra Leone","SG"=>"Singapore","SK"=>"Slovakia","SI"=>"Slovenia","SO"=>"Somalia","LK"=>"Sri Lanka","SD"=>"Sudan","FI"=>"Finland","SR"=>"Suriname","SZ"=>"Swaziland","CH"=>"Switzerland","SY"=>"Syria","TJ"=>"Tajikistan","TW"=>"Taiwan","TZ"=>"Tanzania","DK"=>"Denmark","TH"=>"Thailand","TG"=>"Togo","TK"=>"Tokelau","TO"=>"Tonga","TT"=>"Trinidad and Tobago","TD"=>"Chad","CZ"=>"Czech Republic","TN"=>"Tunisia","TR"=>"Turkey","TM"=>"Turkmenistan","TC"=>"Turks and Caicos Islands","TV"=>"Tuvalu","UG"=>"Uganda","UA"=>"Ukraine","HU"=>"Hungary","UY"=>"Uruguay","NC"=>"New Caledonia","NZ"=>"New Zealand","UZ"=>"Uzbekistan","BY"=>"Belarus","WF"=>"Wallis and Futuna","VU"=>"Vanuatu","VA"=>"Vatican City State","VE"=>"Venezuela","RU"=>"Russia","VN"=>"Vietnam","EE"=>"Estonia","US"=>"United States","VI"=>"Virgin Islands, U.S.","ZW"=>"Zimbabwe","PS"=>"Palestine","AQ"=>"Antarctica","BV"=>"Bouvet Island","IO"=>"British Indian Ocean Territory","GS"=>"South Georgia and the South Sandwich Islands","HM"=>"Heard Island and McDonald Islands","TF"=>"French Southern territories","UK"=>"UK","UM"=>"US (Minor Outlying Islands)"); function getage($bMonth,$bDay,$bYear) { list($cYear, $cMonth, $cDay) = explode("-", date("Y-m-d")); return ( ($cMonth >= $bMonth && $cDay >= $bDay) || ($cMonth > $bMonth) ) ? $cYear - $bYear : $cYear - $bYear - 1; } function zodiac ($day,$month, $year) { if ( ( $month == 3 && $day > 20 ) || ( $month == 4 && $day < 20 ) ) { $zodiac = "Aries"; } elseif ( ( $month == 4 && $day > 19 ) || ( $month == 5 && $day < 21 ) ) { $zodiac = "Taurus"; } elseif ( ( $month == 5 && $day > 20 ) || ( $month == 6 && $day < 21 ) ) { $zodiac = "Gemini"; } elseif ( ( $month == 6 && $day > 20 ) || ( $month == 7 && $day < 23 ) ) { $zodiac = "Cancer"; } elseif ( ( $month == 7 && $day > 22 ) || ( $month == 8 && $day < 23 ) ) { $zodiac = "Leo"; } elseif ( ( $month == 8 && $day > 22 ) || ( $month == 9 && $day < 23 ) ) { $zodiac = "Virgo"; } elseif ( ( $month == 9 && $day > 22 ) || ( $month == 10 && $day < 23 ) ) { $zodiac = "Libra"; } elseif ( ( $month == 10 && $day > 22 ) || ( $month == 11 && $day < 22 ) ) { $zodiac = "Scorpio"; } elseif ( ( $month == 11 && $day > 21 ) || ( $month == 12 && $day < 22 ) ) { $zodiac = "Sagittarius"; } elseif ( ( $month == 12 && $day > 21 ) || ( $month == 1 && $day < 20 ) ) { $zodiac = "Capricorn"; } elseif ( ( $month == 1 && $day > 19 ) || ( $month == 2 && $day < 19 ) ) { $zodiac = "Aquarius"; } elseif ( ( $month == 2 && $day > 18 ) || ( $month == 3 && $day < 21 ) ) { $zodiac = "Pisces"; } return $zodiac; } function makeClickableLinks($text) { $text = preg_replace('/\*\*(.*?)\*\*/', '$1', $text); $text = preg_replace_callback('/\B#(\w*[a-z0-9_-]+\w*)/i', 'hashtag_to_link', $text); return preg_replace_callback('/((((f|ht)tp(s)?:\/\/)|www)[-a-zA-Z?-??-?()0-9@:%_+.~#$?&;\/\/=]+)/i', function($matches) { if (substr($matches[0], 0 , 4) == 'www.') { // The match starts with www., add a protocol (http:// being the most common). $matches[0] = 'http://' . $matches[0]; } return '' . $matches[0] . ''; }, $text); foreach($matches as $var){ #if(strstr($var,"jpg") || strstr($var,"jpeg") || strstr($var,"gif") || strstr($var,"png")){ # $text .= ''; #} if(strstr($var[0],"youtube")){ $queryString = parse_url($var[0], PHP_URL_QUERY); parse_str($queryString, $params); if (isset($params['v'])) { $text .= ' '; } } } return $text; } function hashtag_to_link($matches) { return '' . $matches[0] . ''; } function formatlinks($text){ preg_match_all('#\bhttps?://[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|/))#', $text, $matches); foreach($matches as $var){ if(strstr($var[0],"youtube")){ $queryString = parse_url($var[0], PHP_URL_QUERY); parse_str($queryString, $params); if (isset($params['v'])) { $text .= ' '; } } } return $text; } function embedyoutube($link,$options=""){ $yid = get_youtube_video_ID($link); $video = '
'; return $video; } function get_youtube_video_ID($youtube_video_url) { /** * Pattern matches * http://youtu.be/ID * http://www.youtube.com/embed/ID * http://www.youtube.com/watch?v=ID * http://www.youtube.com/?v=ID * http://www.youtube.com/v/ID * http://www.youtube.com/e/ID * http://www.youtube.com/user/username#p/u/11/ID * http://www.youtube.com/leogopal#p/c/playlistID/0/ID * http://www.youtube.com/watch?feature=player_embedded&v=ID * http://www.youtube.com/?feature=player_embedded&v=ID */ $pattern = '%(?:youtube(?:-nocookie)?\.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=)|youtu\.be/)([^"&?/ ]{11})%i'; // Checks if it matches a pattern and returns the value if (preg_match("/^(?:http(?:s)?:\/\/)?(?:www\.)?(?:m\.)?(?:youtu\.be\/|youtube\.com\/(?:(?:watch)?\?(?:.*&)?v(?:i)?=|(?:embed|v|vi|user)\/))([^\?&\"'>]+)/", $youtube_video_url, $matches)) { return $matches; } // if no match return false. return false; } function get_time_ago($time_stamp) { $time_difference = strtotime('now') - $time_stamp; $units = [ 'year' => 60 * 60 * 24 * 365.242199, 'month' => 60 * 60 * 24 * 30.4368499, 'week' => 60 * 60 * 24 * 7, 'day' => 60 * 60 * 24, 'hour' => 60 * 60, 'minute' => 60 ]; foreach ($units as $unit_name => $unit) { if ($time_difference >= $unit) { $num = floor($time_difference / $unit); return $num . ' ' . ($num > 1 ? $unit_name . 's' : $unit_name) . ' ago'; } } return 'just now'; } function get_time_ago_string($time_stamp, $divisor, $time_unit) { $time_difference = strtotime("now") - $time_stamp; $time_units = floor($time_difference / $divisor); settype($time_units, 'string'); if ($time_units === '0') { return '1 minute '; } elseif ($time_units === '1') { return '1 ' . $time_unit . 's '; } else { /* * More than "1" $time_unit. This is the "plural" message. */ // TODO: This pluralizes the time unit, which is done by adding "s" at the end; this will not work for i18n! return $time_units . ' ' . $time_unit . ''; } } function insert_notify($toid,$notifymsg,$notifyurl){ global $pdodb; if($_SESSION["uid"] > 0){ $fromid = $_SESSION["uid"]; }else{ $fromid = 1; } $stmt2 = $pdodb->prepare("INSERT INTO notifications(notifymsg,notifyurl,fromid,toid,whenpost) VALUES(:notifymsg ,:notifyurl,:fromid,:toid,now()) "); $stmt2->bindParam(':fromid',$fromid,PDO::PARAM_INT); $stmt2->bindParam(':toid',$toid); $stmt2->bindParam(':notifyurl',$notifyurl); $stmt2->bindParam(':notifymsg',$notifymsg); $stmt2->execute(); $stmt = $pdodb->prepare("UPDATE LOW_PRIORITY girls SET nnotify=nnotify+1 WHERE ID=:toid LIMIT 1"); $stmt->bindParam(':toid',$toid); $stmt->execute(); } function alert($text){ } function analyzetext($text){ return $text; } function is_ani($filename) { if(!($fh = @fopen($filename, 'rb'))) return false; $count = 0; //an animated gif contains multiple "frames", with each frame having a //header made up of: // * a static 4-byte sequence (\x00\x21\xF9\x04) // * 4 variable bytes // * a static 2-byte sequence (\x00\x2C) // We read through the file til we reach the end of the file, or we've found // at least 2 frame headers while(!feof($fh) && $count < 2) { $chunk = fread($fh, 1024 * 100); //read 100kb at a time $count += preg_match_all('#\x00\x21\xF9\x04.{4}\x00\x2C#s', $chunk, $matches); } fclose($fh); return $count > 1; } function getuserdata($userid){ global $pdodb; $getuserinfo = $pdodb->prepare("SELECT emailis,username FROM girls WHERE ID=:userid LIMIT 1"); $getuserinfo->bindParam(':userid',$userid); $getuserinfo->execute(); while($i3=$getuserinfo->fetch()) { $data["email"] = $i3["emailis"]; $data["username"] = $i3["username"]; } return $data; } function getUrlName($utf8Name) { $urlName = $utf8Name; $zeichen = Array("/ä/","/ö/","/ü/","/Ä/","/Ö/","/Ü/","/ß/","/ /","/\./"); $replace = Array("ae","oe","ue","Ae","Oe","Ue","ss","-","-"); $urlName = preg_replace($zeichen, $replace, $urlName); $urlName = preg_replace("/[^a-zA-Z0-9_-]/" , "" , $urlName); $zeichen = Array("/---/","/--/"); $replace = Array("-","-"); $urlName = preg_replace($zeichen, $replace, $urlName); $urlName = substr(strtolower($urlName), 0, 100); $urlName = trim($urlName, "-"); return $urlName; } function updatefollowercount($whoid){ global $pdodb; $stmt = $pdodb->prepare("SELECT ID FROM followers WHERE toid=:toid"); $stmt->bindParam(':toid',$whoid,PDO::PARAM_INT); $stmt->execute(); $nfollowers = $stmt->rowCount(); $stmt = $pdodb->prepare("SELECT ID FROM followers WHERE fromid=:fromid"); $stmt->bindParam(':fromid',$whoid,PDO::PARAM_INT); $stmt->execute(); $nfollowing = $stmt->rowCount(); $stmt = $pdodb->prepare("UPDATE LOW_PRIORITY girls SET tfollowers=:nfollowers, tfollowing=:nfollowing WHERE ID=:updateid"); $stmt->bindParam(':updateid',$whoid,PDO::PARAM_INT); $stmt->bindParam(':nfollowers',$nfollowers,PDO::PARAM_INT); $stmt->bindParam(':nfollowing',$nfollowing,PDO::PARAM_INT); $stmt->execute(); } function save_rseo_nofollow($content) { $content2 = preg_replace_callback('~<(a\s[^>]+)>~isU', "cb2", $content); return $content2; } function cb2($match) { list($original, $tag) = $match; // regex match groups if (stripos($tag, "nofollow")) { return $original; }else { return "<$tag rel='nofollow'>"; } } function neat_trim($str, $n, $delim='…') { $len = strlen($str); if ($len > $n) { preg_match('/(.{' . $n . '}.*?)\b/', $str, $matches); return rtrim($matches[1]) . $delim; } else { return $str; } } function getGeoCode($address) { global $googleapikey; global $geocode; // Eingabe: Adresse, z.B. 1600 Amphitheatre Parkway Mountain View, CA // Ausgabe: Lat und Lon global $language; $language = "en"; $address = urlencode($address); # $url = "https://maps.googleapis.com/maps/api/geocode/json?address=$address&language=$language&sensor=true&key=$googleapikey"; $url = "https://us1.locationiq.com/v1/search.php?key=".$geocode."&q=".$address."&format=json"; #echo $url; $results = file_get_contents_curl($url); #print_r($results); $results = json_decode($results,1); /* $n_address_items = sizeOf($results["results"][0]["address_components"]); for($i=0;$i<$n_address_items;$i++) { $tmp = $results["results"][0]["address_components"][$i]["types"][0]; if($tmp=="locality"){ $city = $results["results"][0]["address_components"][$i]["long_name"]; } } */ #$geoCode["city"] = $city; # $geoCode["lat"] = $results["results"][0]["geometry"]["location"]["lat"]; # $geoCode["lon"] = $results["results"][0]["geometry"]["location"]["lng"]; #$geoCode["city"] = $city; $geoCode["lat"] = $results[0]["lat"]; $geoCode["lon"] = $results[0]["lon"]; return $geoCode; } function file_get_contents_curl($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //Set curl to return the data instead of printing it to the browser. curl_setopt($ch, CURLOPT_URL, $url); $data = curl_exec($ch); curl_close($ch); return $data; } function cleanstring($string) { $c = mb_detect_encoding($string, mb_detect_order(), true); $string = iconv($c, 'ASCII//TRANSLIT',$string); $string = str_replace(' ', '-', $string); // Replaces all spaces with hyphens. $string = str_replace('/', '-', $string); // Replaces all spaces with hyphens. $string = preg_replace('/[^A-Za-z0-9\-üÜöÖäÄ]/', '', $string); // Removes special chars. return preg_replace('/-+/', '-', $string); // Replaces multiple hyphens with single one. } function unaccent($string) { if (strpos($string = htmlentities($string, ENT_QUOTES, 'UTF-8'), '&') !== false) { $string = html_entity_decode(preg_replace('~&([a-z]{1,2})(?:acute|cedil|circ|grave|lig|orn|ring|slash|tilde|uml);~i', '$1', $string), ENT_QUOTES, 'UTF-8'); } return $string; } function unsubscribe($cid){ global $pdodb; $stmt = $pdodb->prepare("DELETE FROM subscribeto WHERE cid=:cid AND mid=:mid LIMIT 1"); $stmt->bindParam(':cid',$cid); $stmt->bindParam(':mid',$_SESSION["uid"],PDO::PARAM_INT); $stmt->execute(); $stmt3 = $pdodb->prepare("SELECT ID FROM subscribeto WHERE cid=:cid"); $stmt3->bindParam(':cid',$cid); $stmt3->execute(); $nmembers = $stmt3->rowCount(); $stmt2 = $pdodb->prepare("UPDATE LOW_PRIORITY forums SET nmembers=:nmembers WHERE ID=:cid"); $stmt2->bindParam(':cid',$cid); $stmt2->bindParam(':nmembers',$nmembers); $stmt2->execute(); echo 'unsubscribed'; } function subscribeto($cid){ global $pdodb; $stmt = $pdodb->prepare("SELECT ID FROM subscribeto WHERE cid=:cid AND mid=:mid LIMIT 1"); $stmt->bindParam(':cid',$cid); $stmt->bindParam(':mid',$_SESSION["uid"],PDO::PARAM_INT); $stmt->execute(); if($stmt->rowCount() == 0){ $stmt2 = $pdodb->prepare("INSERT INTO subscribeto(cid,mid) VALUES(:cid ,:mid) "); $stmt2->bindParam(':cid',$cid); $stmt2->bindParam(':mid',$_SESSION["uid"],PDO::PARAM_INT); $stmt2->execute(); echo 'now subscribed'; $stmt2 = $pdodb->prepare("UPDATE LOW_PRIORITY girls SET subscriptions=subscriptions+1 WHERE ID=:cid"); $stmt2->bindParam(':cid',$_SESSION["uid"]); $stmt2->execute(); $stmt3 = $pdodb->prepare("SELECT ID FROM subscribeto WHERE cid=:cid"); $stmt3->bindParam(':cid',$cid); $stmt3->execute(); $nmembers = $stmt3->rowCount(); $stmt2 = $pdodb->prepare("UPDATE LOW_PRIORITY forums SET nmembers=:nmembers WHERE ID=:cid"); $stmt2->bindParam(':cid',$cid); $stmt2->bindParam(':nmembers',$nmembers); $stmt2->execute(); }else{ echo 'already joined'; } $stmt3 = $pdodb->prepare("SELECT ID FROM subscribeto WHERE cid=:cid"); $stmt3->bindParam(':cid',$cid); $stmt3->execute(); $nmembers = $stmt3->rowCount(); $stmt2 = $pdodb->prepare("UPDATE LOW_PRIORITY forums SET nmembers=:nmembers WHERE ID=:cid"); $stmt2->bindParam(':cid',$cid); $stmt2->bindParam(':nmembers',$nmembers); $stmt2->execute(); } function linkfound($str){ if(strstr($str,".com") || strstr($str,".de") || strstr($str,"http://") || strstr($str,"https://")){ return true; }else{ return false; } } function mailq($emailis,$title,$desc,$pid){ global $pdodb; $stmt = $pdodb->prepare("INSERT IGNORE INTO mailq (emailis, titleis,mid,msgis,pid) VALUES(:emailis, :titleis,:mid,:descis,:pid)"); $stmt->bindParam(':titleis',$title); $stmt->bindParam(':emailis',$emailis); $stmt->bindParam(':descis',$desc); $stmt->bindParam(':mid',$_SESSION["uid"],PDO::PARAM_INT); $stmt->bindParam(':pid',$pid,PDO::PARAM_INT); $stmt->execute(); } function unique_multidim_array($array, $key) { $temp_array = array(); $i = 0; $key_array = array(); foreach($array as $val) { if (!in_array($val[$key], $key_array)) { $key_array[$i] = $val[$key]; $temp_array[$i] = $val; } $i++; } return $temp_array; } function socketlabs($to2, $subject2, $message2) { #echo 'using socketlabs'; $mail = new PHPMailer(); $mail->IsSMTP(); $mail->SMTPKeepAlive = true; $mail->Priority = 1; $mail->SMTPDebug = 0; $mail->Timeout = 45; // set mailer to use SMTP $mail->Host = "smtp.sendgrid.net"; // specify main and backup server $mail->SMTPAuth = true; // turn on SMTP authentication $mail->Port = 587; $mail->Username = "apikey"; // SMTP username $mail->Password = "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"; // SMTP password $mail->From = "info@budu.com"; $mail->FromName = "budu.com"; $mail->AddAddress($to2, "budu.com"); // $mail->AddAddress("ellen@example.com"); // name is optional $mail->AddReplyTo("info@budu.com", "budu.com"); $mail->SetFrom("info@budu.com","budu.com", 0); //$mail->WordWrap = 50; // set word wrap to 50 characters //$mail->AddAttachment("/var/tmp/file.tar.gz"); // add attachments //$mail->AddAttachment("/tmp/image.jpg", "new.jpg"); // optional name //$mail->IsHTML(true); // set email format to HTML $message2 .= " =============================================== Telegram Channel: https://www.t.me/buducom "; $mail->Subject = $subject2; $mail->Body = $message2; //$mail->AltBody = $message2; //echo $to2; if(!$mail->Send()) { echo "Message could not be sent.";
echo "Mailer Error: " . $mail->ErrorInfo;
}else{
#echo 'message sent '.$to2;
}
}
function unsubscribetopage($cid){
global $pdodb;
$stmt = $pdodb->prepare("DELETE FROM pagesubscriptions WHERE cid=:cid AND mid=:mid LIMIT 1");
$stmt->bindParam(':cid',$cid);
$stmt->bindParam(':mid',$_SESSION["uid"],PDO::PARAM_INT);
$stmt->execute();
$stmt3 = $pdodb->prepare("SELECT ID FROM pagesubscriptions WHERE cid=:cid");
$stmt3->bindParam(':cid',$cid);
$stmt3->execute();
$nmembers = $stmt3->rowCount();
$stmt2 = $pdodb->prepare("UPDATE LOW_PRIORITY forums SET nmembers=:nmembers WHERE ID=:cid");
$stmt2->bindParam(':cid',$cid);
$stmt2->bindParam(':nmembers',$nmembers);
$stmt2->execute();
echo 'unsubscribed';
}
function subscribetopage($cid){
global $pdodb;
$stmt = $pdodb->prepare("SELECT ID FROM pagesubscriptions WHERE pageid=:cid AND mid=:mid LIMIT 1");
$stmt->bindParam(':cid',$cid);
$stmt->bindParam(':mid',$_SESSION["uid"],PDO::PARAM_INT);
$stmt->execute();
if($stmt->rowCount() == 0){
$stmt2 = $pdodb->prepare("INSERT INTO pagesubscriptions(pageid,mid) VALUES(:cid ,:mid) ");
$stmt2->bindParam(':cid',$cid);
$stmt2->bindParam(':mid',$_SESSION["uid"],PDO::PARAM_INT);
$stmt2->execute();
echo 'now subscribed';
$stmt3 = $pdodb->prepare("SELECT ID FROM pagesubscriptions WHERE pageid=:cid");
$stmt3->bindParam(':cid',$cid);
$stmt3->execute();
$nmembers = $stmt3->rowCount();
$stmt2 = $pdodb->prepare("UPDATE LOW_PRIORITY pages SET subscribers=:nmembers WHERE ID=:cid");
$stmt2->bindParam(':cid',$cid);
$stmt2->bindParam(':nmembers',$nmembers);
$stmt2->execute();
}else{
echo 'already joined';
}
$stmt3 = $pdodb->prepare("SELECT ID FROM pagesubscriptions WHERE pageid=:cid");
$stmt3->bindParam(':cid',$cid);
$stmt3->execute();
$nmembers = $stmt3->rowCount();
$stmt2 = $pdodb->prepare("UPDATE LOW_PRIORITY pages SET subscribers=:nmembers WHERE ID=:cid");
$stmt2->bindParam(':cid',$cid);
$stmt2->bindParam(':nmembers',$nmembers);
$stmt2->execute();
}
function addtip($toid,$amount){
global $pdodb;
#echo 'addtip';
$stmt2 = $pdodb->prepare("INSERT INTO tipsreceived(fromid,toid,howmuch,whentip) VALUES(:fromid,:toid,:howmuch,now())");
$stmt2->bindParam(':fromid',$_SESSION["uid"]);
$stmt2->bindParam(':toid',$toid);
$stmt2->bindParam(':howmuch',$amount);
$stmt2->execute();
}
function unjoingroup($cid){
global $pdodb;
$stmt = $pdodb->prepare("DELETE FROM groupsubs WHERE groupid=:cid AND mid=:mid LIMIT 1");
$stmt->bindParam(':cid',$cid);
$stmt->bindParam(':mid',$_SESSION["uid"],PDO::PARAM_INT);
$stmt->execute();
$stmt3 = $pdodb->prepare("SELECT ID FROM groupsubs WHERE groupid=:cid");
$stmt3->bindParam(':cid',$cid);
$stmt3->execute();
$nmembers = $stmt3->rowCount();
$stmt2 = $pdodb->prepare("UPDATE LOW_PRIORITY groups SET nsubs=:nmembers WHERE ID=:cid");
$stmt2->bindParam(':cid',$cid);
$stmt2->bindParam(':nmembers',$nmembers);
$stmt2->execute();
echo 'subscribed';
}
function joingroup($cid){
global $pdodb;
$stmt = $pdodb->prepare("SELECT ID FROM groupsubs WHERE groupid=:cid AND mid=:mid LIMIT 1");
$stmt->bindParam(':cid',$cid);
$stmt->bindParam(':mid',$_SESSION["uid"],PDO::PARAM_INT);
$stmt->execute();
if($stmt->rowCount() == 0){
$stmt2 = $pdodb->prepare("INSERT INTO groupsubs(groupid,mid) VALUES(:cid ,:mid) ");
$stmt2->bindParam(':cid',$cid);
$stmt2->bindParam(':mid',$_SESSION["uid"],PDO::PARAM_INT);
$stmt2->execute();
echo 'now subscribed';
#$stmt2 = $pdodb->prepare("UPDATE LOW_PRIORITY girls SET subscriptions=subscriptions+1 WHERE ID=:cid");
#$stmt2->bindParam(':cid',$_SESSION["uid"]);
#$stmt2->execute();
$stmt3 = $pdodb->prepare("SELECT ID FROM groupsubs WHERE groupid=:cid");
$stmt3->bindParam(':cid',$cid);
$stmt3->execute();
$nmembers = $stmt3->rowCount();
$stmt2 = $pdodb->prepare("UPDATE LOW_PRIORITY groups SET nsubs=:nmembers WHERE ID=:cid");
$stmt2->bindParam(':cid',$cid);
$stmt2->bindParam(':nmembers',$nmembers);
$stmt2->execute();
}else{
echo 'already joined';
}
$stmt3 = $pdodb->prepare("SELECT ID FROM subscribeto WHERE cid=:cid");
$stmt3->bindParam(':cid',$cid);
$stmt3->execute();
$nmembers = $stmt3->rowCount();
$stmt2 = $pdodb->prepare("UPDATE LOW_PRIORITY forums SET nmembers=:nmembers WHERE ID=:cid");
$stmt2->bindParam(':cid',$cid);
$stmt2->bindParam(':nmembers',$nmembers);
$stmt2->execute();
}
function influencepoint($mid,$points=1){
global $pdodb;
$stmt2 = $pdodb->prepare("INSERT IGNORE INTO influencers(mid, daypoints,weekpoints) VALUES(:mid,:daypoints,:weekpoints) ON DUPLICATE KEY UPDATE daypoints=daypoints+:daypoints,weekpoints=weekpoints+:daypoints");
$stmt2->bindParam(':mid',$mid);
$stmt2->bindParam(':daypoints',$points);
$stmt2->bindParam(':weekpoints',$points);
$stmt2->execute();
}
function todo(){
global $d_verified;
$i[] = 'Share your profile in the Miss ranky contest';
$i[] = 'Write in your own Blog';
$i[] = 'Write in your own group';
$i[] = 'Post a Status';
$i[] = 'Post a Classified';
if($d_verified <> 1){
$i[] = 'Get Verified';
}
$randkey = array_rand($i,1);
return $i[$randkey];
}
function cmtofeet($cm) {
$inches = ceil($cm/2.54);
$feet = floor(($inches/12));
$measurement = $feet."' ".($inches%12).'"';
return $measurement;
}
function mask_email($email, $char_shown_front = 1, $char_shown_back = 1)
{
$mail_parts = explode('@', $email);
$username = $mail_parts[0];
$len = strlen($username);
if ($len < $char_shown_front or $len < $char_shown_back) {
return implode('@', $mail_parts);
}
//Logic: show asterisk in middle, but also show the last character before @
$mail_parts[0] = substr($username, 0, $char_shown_front)
. str_repeat('*', $len - $char_shown_front - $char_shown_back)
. substr($username, $len - $char_shown_back, $char_shown_back);
return implode('@', $mail_parts);
}
function firstwords($str,$words=2,$del="-"){
$str = preg_replace('/[^A-Za-z0-9\- ]/', '', $str);
$str = htmlspecialchars($str);
$split = explode(" ",trim($str));
for($i=0;$i<$words;$i++){
$sentence .= $split[$i].$del;
}
$sentence = rtrim($sentence, $del);
return $sentence;
}
function lastword($str){
$str2 = explode(' ', $str);
$str2 = array_pop($str2);
return $str2;
}
function hashclick($text){
#$text = eregi_replace('@([_0-9a-z-]+)',' @\\1', $text);
return $text;
}
function langtime($time){
global $la;
$newstr = $time;
if($la == "de"){
$newstr = str_replace("hodiny","Stunde her",$newstr);
$newstr = str_replace("hodiny","Stunden her",$newstr);
$newstr = str_replace("Měsíce","Monat her",$newstr);
$newstr = str_replace("Měsíce","Monate her",$newstr);
$newstr = str_replace("minuty","Minute her",$newstr);
$newstr = str_replace("minuty","Minuten her",$newstr);
return $newstr;
}elseif($la == "es"){
$newstr = str_replace("hodiny","hora",$newstr);
$newstr = str_replace("hodiny","horas",$newstr);
$newstr = str_replace("Měsíce","mes",$newstr);
$newstr = str_replace("Měsíce","meses",$newstr);
$newstr = str_replace("minuty","minuto",$newstr);
$newstr = str_replace("minuty","minutos",$newstr);
return $newstr;
}else{
return $time;
}
}
function getHashtags($string) {
$hashtags= FALSE;
preg_match_all("/(#\w+)/u", $string, $matches);
if ($matches) {
$hashtagsArray = array_count_values($matches[0]);
$hashtags = array_keys($hashtagsArray);
}
return $hashtags;
}
function randomuser() {
$alphabet = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890';
$pass = array(); //remember to declare $pass as an array
$alphaLength = strlen($alphabet) - 1; //put the length -1 in cache
for ($i = 0; $i < 8; $i++) {
$n = rand(0, $alphaLength);
$pass[] = $alphabet[$n];
}
return implode($pass); //turn the array into a string
}
function randomPassword() {
$alphabet = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890';
$pass = array(); //remember to declare $pass as an array
$alphaLength = strlen($alphabet) - 1; //put the length -1 in cache
for ($i = 0; $i < 8; $i++) {
$n = rand(0, $alphaLength);
$pass[] = $alphabet[$n];
}
return implode($pass); //turn the array into a string
}
function milestokm($miles){
$ratio = 1.609344;
$kms = $miles * $ratio;
return round($kms);
}
function replaceAnchorTags($text) {
// This pattern matches tags with any attributes and captures the text between and
$anchorPattern = '/]*>(.*?)<\/a>/i';
$replacement = 'you have to login to see the url';
return preg_replace($anchorPattern, $replacement, $text);
}
function estimateReadingTime($text, $wpm = 200) {
// Count the number of words in the text
$wordCount = str_word_count($text);
// Calculate the reading time
$readingTime = ceil($wordCount / $wpm);
return $readingTime;
}
function generateYouTubeEmbedCode($url) {
// Extract video ID from various YouTube URL formats
preg_match('/(?:youtube\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|.*[?&]v=)|youtu\.be\/)([^"&?\/\s]{11})/i', $url, $matches);
$videoId = $matches[1];
return '