'wss://relay.damus.io',1 => 'wss://ch1.guapas.org', 2 => 'wss://nos.lol'); date_default_timezone_set('America/New_York'); $docroot="/var/www/vhosts/guapas.org/httpdocs/"; $droot = $_SERVER["DOCUMENT_ROOT"]; $rstatusarray = array(0 => 'no revelado', 1 => 'Soltero/a (buscando pareja)', 2 => 'Soltero/a (no buscando pareja)', 3 => 'Casado/a (buscando pareja)', 4 => 'Casado/a (no buscando pareja)', 5 => 'Relación abierta', 6 => 'Saliendo con alguien (buscando pareja)', 7 => 'Saliendo con alguien (no buscando pareja)', 8 => 'En una relación (buscando pareja)', 9 => 'En una relación (no buscando pareja)'); $childrenPreferences = [ 'Sin preferencia', 'Quiero hijos', 'No quiero hijos', 'Abierto/a a ello', 'Tiene hijos', 'Tiene hijos, no viviendo juntos', 'Tiene hijos, quiere más' ]; $sorientation = [ 'Heterosexual', 'Gay', 'Bisexual' ]; $language_codes = array( 'en' => 'English' , 'aa' => 'Afar' , 'ab' => 'Abkhazian' , 'af' => 'Afrikaans' , 'am' => 'Amharic' , 'ar' => 'Arabic' , 'as' => 'Assamese' , 'ay' => 'Aymara' , 'az' => 'Azerbaijani' , 'ba' => 'Bashkir' , 'be' => 'Byelorussian' , 'bg' => 'Bulgarian' , 'bh' => 'Bihari' , 'bi' => 'Bislama' , 'bn' => 'Bengali/Bangla' , 'bo' => 'Tibetan' , 'br' => 'Breton' , 'ca' => 'Catalan' , 'co' => 'Corsican' , 'cs' => 'čeština' , 'cy' => 'Welsh' , 'da' => 'Danish' , 'de' => 'German' , 'dz' => 'Bhutani' , 'el' => 'Greek' , 'eo' => 'Esperanto' , 'es' => 'Español' , 'et' => 'Estonian' , 'eu' => 'Basque' , 'fa' => 'Persian' , 'fi' => 'Finnish' , 'fj' => 'Fiji' , 'fo' => 'Faeroese' , 'fr' => 'French' , 'fy' => 'Frisian' , 'ga' => 'Irish' , 'gd' => 'Scots/Gaelic' , 'gl' => 'Galician' , 'gn' => 'Guarani' , 'gu' => 'Gujarati' , 'ha' => 'Hausa' , 'hi' => 'Hindi' , 'hr' => 'Croatian' , 'hu' => 'Hungarian' , 'hy' => 'Armenian' , 'ia' => 'Interlingua' , 'ie' => 'Interlingue' , 'ik' => 'Inupiak' , 'in' => 'Indonesian' , 'is' => 'Icelandic' , 'it' => 'Italian' , 'iw' => 'Hebrew' , 'ja' => 'Japanese' , 'ji' => 'Yiddish' , 'jw' => 'Javanese' , 'ka' => 'Georgian' , 'kk' => 'Kazakh' , 'kl' => 'Greenlandic' , 'km' => 'Cambodian' , 'kn' => 'Kannada' , 'ko' => 'Korean' , 'ks' => 'Kashmiri' , 'ku' => 'Kurdish' , 'ky' => 'Kirghiz' , 'la' => 'Latin' , 'ln' => 'Lingala' , 'lo' => 'Laothian' , 'lt' => 'Lithuanian' , 'lv' => 'Latvian/Lettish' , 'mg' => 'Malagasy' , 'mi' => 'Maori' , 'mk' => 'Macedonian' , 'ml' => 'Malayalam' , 'mn' => 'Mongolian' , 'mo' => 'Moldavian' , 'mr' => 'Marathi' , 'ms' => 'Malay' , 'mt' => 'Maltese' , 'my' => 'Burmese' , 'na' => 'Nauru' , 'ne' => 'Nepali' , 'nl' => 'Dutch' , 'no' => 'Norwegian' , 'oc' => 'Occitan' , 'om' => '(Afan)/Oromoor/Oriya' , 'pa' => 'Punjabi' , 'pl' => 'Polish' , 'ps' => 'Pashto/Pushto' , 'pt' => 'Portuguese' , 'qu' => 'Quechua' , 'rm' => 'Rhaeto-Romance' , 'rn' => 'Kirundi' , 'ro' => 'Romanian' , 'ru' => 'Russian' , 'rw' => 'Kinyarwanda' , 'sa' => 'Sanskrit' , 'sd' => 'Sindhi' , 'sg' => 'Sangro' , 'sh' => 'Serbo-Croatian' , 'si' => 'Singhalese' , 'sk' => 'Slovak' , 'sl' => 'Slovenian' , 'sm' => 'Samoan' , 'sn' => 'Shona' , 'so' => 'Somali' , 'sq' => 'Albanian' , 'sr' => 'Serbian' , 'ss' => 'Siswati' , 'st' => 'Sesotho' , 'su' => 'Sundanese' , 'sv' => 'Swedish' , 'sw' => 'Swahili' , 'ta' => 'Tamil' , 'te' => 'Tegulu' , 'tg' => 'Tajik' , 'th' => 'Thai' , 'ti' => 'Tigrinya' , 'tk' => 'Turkmen' , 'tl' => 'Tagalog' , 'tn' => 'Setswana' , 'to' => 'Tonga' , 'tr' => 'Turkish' , 'ts' => 'Tsonga' , 'tt' => 'Tatar' , 'tw' => 'Twi' , 'uk' => 'Ukrainian' , 'ur' => 'Urdu' , 'uz' => 'Uzbek' , 'vi' => 'Vietnamese' , 'vo' => 'Volapuk' , 'wo' => 'Wolof' , 'xh' => 'Xhosa' , 'yo' => 'Yoruba' , 'zh' => 'Chinese' , 'zu' => 'Zulu' , ); asort($language_codes); $language_numbers = array( 'en' => 0, 'aa' => 1, 'ab' => 2, 'af' => 3, 'am' => 4, 'ar' => 5, 'as' => 6, 'ay' => 7, 'az' => 8, 'ba' => 9, 'be' => 10, 'bg' => 11, 'bh' => 12, 'bi' => 13, 'bn' => 14, 'bo' => 15, 'br' => 16, 'ca' => 17, 'co' => 18, 'cs' => 19, 'cy' => 20, 'da' => 21, 'de' => 22, 'dz' => 23, 'el' => 24, 'eo' => 25, 'es' => 26, 'et' => 27, 'eu' => 28, 'fa' => 29, 'fi' => 30, 'fj' => 31, 'fo' => 32, 'fr' => 33, 'fy' => 34, 'ga' => 35, 'gd' => 36, 'gl' => 37, 'gn' => 38, 'gu' => 39, 'ha' => 40, 'hi' => 41, 'hr' => 42, 'hu' => 43, 'hy' => 44, 'ia' => 45, 'ie' => 46, 'ik' => 47, 'in' => 48, 'is' => 49, 'it' => 50, 'iw' => 51, 'ja' => 52, 'ji' => 53, 'jw' => 54, 'ka' => 55, 'kk' => 56, 'kl' => 57, 'km' => 58, 'kn' => 59, 'ko' => 60, 'ks' => 61, 'ku' => 62, 'ky' => 63, 'la' => 64, 'ln' => 65, 'lo' => 66, 'lt' => 67, 'lv' => 68, 'mg' => 69, 'mi' => 70, 'mk' => 71, 'ml' => 72, 'mn' => 73, 'mo' => 74, 'mr' => 75, 'ms' => 76, 'mt' => 77, 'my' => 78, 'na' => 79, 'ne' => 80, 'nl' => 81, 'no' => 82, 'oc' => 83, 'om' => 84, 'pa' => 85, 'pl' => 86, 'ps' => 87, 'pt' => 88, 'qu' => 89, 'rm' => 90, 'rn' => 91, 'ro' => 92, 'ru' => 93, 'rw' => 94, 'sa' => 95, 'sd' => 96, 'sg' => 97, 'sh' => 98, 'si' => 99, 'sk' => 100, 'sl' => 101, 'sm' => 102, 'sn' => 103, 'so' => 104, 'sq' => 105, 'sr' => 106, 'ss' => 107, 'st' => 108, 'su' => 109, 'sv' => 110, 'sw' => 111, 'ta' => 112, 'te' => 113, 'tg' => 114, 'th' => 115, 'ti' => 116, 'tk' => 117, 'tl' => 118, 'tn' => 119, 'to' => 120, 'tr' => 121, 'ts' => 122, 'tt' => 123, 'tw' => 124, 'uk' => 125, 'ur' => 126, 'uz' => 127, 'vi' => 128, 'vo' => 129, 'wo' => 130, 'xh' => 131, 'yo' => 132, 'zh' => 133, 'zu' => 134 ); $langan = array(0=>"english",1=>"Espanol"); $httphost = $_SERVER['HTTP_HOST']; $subd=array_shift(explode(".",$httphost)); $browser_language = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); $la = $browser_language; if($la == ""){ $la= "en"; } #nigeria scammer $ipaddress = get_ip(); function get_ip() { $ipaddress = ''; if ($_SERVER['HTTP_CLIENT_IP']) $ipaddress = $_SERVER['HTTP_CLIENT_IP']; else if($_SERVER['HTTP_X_FORWARDED_FOR']) $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR']; else if($_SERVER['HTTP_X_FORWARDED']) $ipaddress = $_SERVER['HTTP_X_FORWARDED']; else if($_SERVER['HTTP_FORWARDED_FOR']) $ipaddress = $_SERVER['HTTP_FORWARDED_FOR']; else if($_SERVER['HTTP_FORWARDED']) $ipaddress = $_SERVER['HTTP_FORWARDED']; else if($_SERVER['REMOTE_ADDR']) $ipaddress = $_SERVER['REMOTE_ADDR']; else $ipaddress = 'UNKNOWN'; return $ipaddress; } $ip = '46.114.39'; if (substr($ipaddress, 0, strlen($ip)) == $ip) { header("location: https://www.youtube.com/watch?v=eQm3wvqic2s"); $scammer = 1; die(); } $ip = '77.64.255'; if (substr($ipaddress, 0, strlen($ip)) == $ip) { header("location: https://www.youtube.com/watch?v=eQm3wvqic2s"); $scammer = 1; die(); } $ip = '105.112'; if (substr($ipaddress, 0, strlen($ip)) == $ip) { header("location: https://youtu.be/bBaNtHuzSu0"); $scammer = 1; die(); } $ip = '197.210'; if (substr($ipaddress, 0, strlen($ip)) == $ip) { header("location: https://youtu.be/bBaNtHuzSu0"); $scammer = 1; die(); } $ip = '105.112.57'; if (substr($ipaddress, 0, strlen($ip)) == $ip) { header("location: https://youtu.be/bBaNtHuzSu0"); $scammer = 1; die(); } $ip = '154.118.28'; if (substr($ipaddress, 0, strlen($ip)) == $ip) { header("location: https://youtu.be/bBaNtHuzSu0"); $scammer = 1; die(); } $ip = '129.205.113'; if (substr($ipaddress, 0, strlen($ip)) == $ip) { header("location: https://youtu.be/bBaNtHuzSu0"); $scammer = 1; die(); } $ip = '105.112.97'; if (substr($ipaddress, 0, strlen($ip)) == $ip) { header("location: https://youtu.be/bBaNtHuzSu0"); $scammer = 1; die(); } $ip = '105.112.28.226'; if (substr($ipaddress, 0, strlen($ip)) == $ip) { header("location: https://youtu.be/bBaNtHuzSu0"); $scammer = 1; die(); } $ip = '197.211.61'; if (substr($ipaddress, 0, strlen($ip)) == $ip) { header("location: https://youtu.be/bBaNtHuzSu0"); $scammer = 1; die(); } $ip = '129.205.112.249'; if (substr($ipaddress, 0, strlen($ip)) == $ip) { header("location: https://youtu.be/bBaNtHuzSu0"); $scammer = 1; die(); } $ip = '105.112.180.34'; if (substr($ipaddress, 0, strlen($ip)) == $ip) { header("location: https://youtu.be/bBaNtHuzSu0"); $scammer = 1; die(); } $ip = '105.112.33.241'; if (substr($ipaddress, 0, strlen($ip)) == $ip) { header("location: https://youtu.be/bBaNtHuzSu0"); $scammer = 1; die(); } $ip = '163.47.158.198'; if (substr($ipaddress, 0, strlen($ip)) == $ip) { header("location: https://youtu.be/bBaNtHuzSu0"); $scammer = 1; die(); } $ip = '103.112.55.198'; if (substr($ipaddress, 0, strlen($ip)) == $ip) { header("location: https://youtu.be/bBaNtHuzSu0"); $scammer = 1; die(); } $ip = '202.181.18.162'; if (substr($ipaddress, 0, strlen($ip)) == $ip) { header("location: https://youtu.be/bBaNtHuzSu0"); $scammer = 1; die(); } $ip = '182.65.118.64'; if (substr($ipaddress, 0, strlen($ip)) == $ip) { header("location: https://youtu.be/bBaNtHuzSu0"); $scammer = 1; die(); } $ip = '183.82.97.181'; if (substr($ipaddress, 0, strlen($ip)) == $ip) { header("location: https://youtu.be/bBaNtHuzSu0"); $scammer = 1; die(); } $ip = '27.255.20.8'; if (substr($ipaddress, 0, strlen($ip)) == $ip) { header("location: https://youtu.be/bBaNtHuzSu0"); $scammer = 1; die(); } $ip = '116.104.254.237'; if (substr($ipaddress, 0, strlen($ip)) == $ip) { header("location: https://youtu.be/bBaNtHuzSu0"); $scammer = 1; die(); } $ip = '103.76.241.102'; if (substr($ipaddress, 0, strlen($ip)) == $ip) { header("location: https://youtu.be/bBaNtHuzSu0"); $scammer = 1; die(); } include('langinc.php'); db_connect(); function db_connect() { global $pdodb; try { # MySQL with PDO_MYSQL $pdodb = new PDO("mysql:host=localhost;dbname=jevemefn_guapas1", 'jevemefn_guapas1', 'Guapas123$#'); $pdodb->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } catch(PDOException $e) { echo $e->getMessage(); } } function distance($lat1, $lon1, $lat2, $lon2, $unit="K") { $theta = $lon1 - $lon2; $dist = sin(deg2rad($lat1)) * sin(deg2rad($lat2)) + cos(deg2rad($lat1)) * cos(deg2rad($lat2)) * cos(deg2rad($theta)); $dist = acos($dist); $dist = rad2deg($dist); $miles = $dist * 60 * 1.1515; $unit = strtoupper($unit); if ($unit == "K") { return ($miles * 1.609344); } else if ($unit == "N") { return ($miles * 0.8684); } else { return $miles; } } if(empty($_SESSION["uid"])){ if(!empty($_COOKIE["logincookie"])){ $stmt = $pdodb->prepare("SELECT ID FROM girls WHERE crazycookie=:logincookie LIMIT 1"); $stmt->bindParam(':logincookie',$_COOKIE["logincookie"]); $stmt->execute(); while($i2=$stmt->fetch()){ $_SESSION["uid"] = $i2["ID"]; } } } if($_SESSION["uid"] > 0){ $getuserinfo = $pdodb->prepare("SELECT ID,username,nvisitors,points,gender,views,country,nmessages,subscriptions,mainpic,fname,npmessages, pageupdates,nnotify,emailis,mailoften,lastforumpost,paying,credits,karma,nfriends,tfriends, tfollowers,payuntil,lastforum,laststatus,statusviews,city,banned,verified,dblat,dblon,kinaddress FROM girls WHERE ID=:sessid"); $getuserinfo->bindParam(':sessid',$_SESSION["uid"]); $getuserinfo->execute(); while($i3=$getuserinfo->fetch()) { $d_id = $i3["ID"]; $d_username = $i3["username"]; $d_visitors = $i3["nvisitors"]; $d_points = $i3["points"]; $d_views = $i3["views"]; $d_karma = $i3["karma"]; $d_country = $i3["country"]; $d_nmessages = $i3["nmessages"]; $d_subscriptions = $i3["subscriptions"]; $d_mainpic = $i3["mainpic"]; $d_fname = $i3["fname"]; $d_npmessages = $i3["npmessages"]; $d_pageupdates = $i3["pageupdates"]; $d_notify = $i3["nnotify"]; $d_city = $i3["city"]; $d_lat = $i3["dblat"]; $d_lon = $i3["dblon"]; $d_nfriends = $i3["nfriends"]; $d_emailis = $i3["emailis"]; $d_mailoften = $i3["mailoften"]; $d_gender = $i3["gender"]; $d_lastforumpost = $i3["lastforumpost"]; $d_paying = $i3["paying"]; $d_credits = $i3["credits"]; $d_tfriends = $i3["tfriends"]; $d_tfollowers = $i3["tfollowers"]; $d_payuntil = $i3["payuntil"]; $d_lastforum = $i3["lastforum"]; $d_laststatus = $i3["laststatus"]; $d_statusviews = $i3["statusviews"]; $d_earnings = $i3["earnings"]; $d_banned = $i3["banned"]; $d_verified = $i3["verified"]; $d_skyfeed = $i3["skyfeed"]; $d_kinaddress = $i3["kinaddress"]; } if($d_payuntil <> "0000-00-00 00:00:00"){ $d1 = new DateTime($d_payuntil); $d2 = new DateTime(date("Y-m-d H:i:s")); if($d2 < $d1){ $paid = true; }else{ $paid = false; } }else{ $paid = false; } if($getuserinfo->rowCount() == 1){ #user exists everything ok }else{ #echo 'try to reload the page. you have a session but you are not in the database. contact: daniel@guapas.org or skype:danieltravolto if you have problems'; #die(); } $nowis = intval(date("YmdHi")); $updateactivity = $pdodb->prepare("UPDATE LOW_PRIORITY girls SET lastactionint=:nowis,lastact=now() WHERE ID=:sessid"); $updateactivity->bindParam(':nowis',$nowis); $updateactivity->bindParam(':sessid',$_SESSION["uid"]); $updateactivity->execute(); } $getuserinfo2 = $pdodb->prepare("SELECT lastreset FROM contestreset WHERE ID=1"); $getuserinfo2->execute(); while($i7=$getuserinfo2->fetch()) { $countdownStartDate = date('Y-m-d H:i:s', strtotime($i7["lastreset"] . ' + 24 hours')); $currentcontestdate = (int) strtotime($i7["lastreset"] . ' + 24 hours'); } $currentTimestamp = time(); if ($currentTimestamp >= $currentcontestdate) { // Update the database with the current timestamp $newTimestamp = date('Y-m-d H:i:s', $currentTimestamp); $updateQuery = $pdodb->prepare("UPDATE contestreset SET lastreset=now() WHERE ID = 1"); $updateQuery->execute(); // Set the $countdownStartDate variable to the new timestamp $countdownStartDate = $newTimestamp; $stmt = $pdodb->prepare("SELECT ID FROM girls ORDER BY views desc LIMIT 1"); $stmt->execute(); while($i3=$stmt->fetch()) { $winnerid = $i3["ID"]; } $updatewinners = $pdodb->prepare("INSERT INTO winners (mid, whenwin) VALUES (:mid, now())"); $updatewinners->bindValue(':mid', $winnerid, PDO::PARAM_INT); // Bind the value of $winnerid to the :mid parameter $updatewinners->execute(); $updateviews = $pdodb->prepare("UPDATE girls SET views=0"); $updateviews->execute(); } else { // Set the $countdownStartDate variable to the target timestamp $countdownStartDate = $countdownStartDate; } function encrypt($string, $key) { $result = ''; for($i=0; $iIsSMTP(); $mail->SMTPKeepAlive =false; $mail->CharSet = 'UTF-8'; $mail->Priority = 1; $mail->SMTPDebug = 2; $mail->Timeout = 10; #$mail->Port = 587; // set mailer to use SMTP $mail->Host = "guapas.org"; // specify main and backup server $mail->SMTPAuth = false; // turn on SMTP authentication $mail->Username = "info@guapas.org"; // SMTP username $mail->Password = "Daniel99$#"; // SMTP password $mail->From = "info@guapas.org"; $mail->FromName = "guapas.org"; $mail->AddAddress($to2, "guapas.org"); // $mail->AddAddress("ellen@example.com"); // name is optional $mail->AddReplyTo("info@guapas.org", "guapas.org"); //$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 . " ==================================================== https://www.guapas.org Telegrama: https://t.me/james_steele_es olvidaste contrasena: https://www.guapas.org/forgot_pass.php "; $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 'sending email'.$to2; $mail = new PHPMailer(); $mail->SMTPKeepAlive = false; $mail->Priority = 1; $mail->SMTPDebug = 2; $mail->Timeout = 45; // set mailer to use SMTP $mail->Host = "mail.guapas.org"; // specify main and backup server $mail->SMTPAuth = false; // turn on SMTP authentication $mail->Username = "info@guapas.org"; // SMTP username $mail->Password = "GrabIt321#"; // SMTP password $mail->From = "info@guapas.org"; $mail->FromName = "guapas.org"; $mail->AddAddress($to2, "guapas.org"); // $mail->AddAddress("ellen@example.com"); // name is optional $mail->AddReplyTo("info@guapas.org", "guapas.org"); //$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 .= " ==================================================== https://www.guapas.org Telegram Channel: https://t.me/steelemove Reset Login: https://www.guapas.org/forgot_pass.php "; $mail->Body = $message2; //$mail->AltBody = $message2; if(!$mail->Send()) { // echo "Message could not be sent.

"; // echo "Mailer Error: " . $mail->ErrorInfo; } } $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_original=array ( 'AF' => 'Afghanistan', 'AL' => 'Albania', 'DZ' => 'Algeria', 'AS' => 'American Samoa', 'AD' => 'Andorra', 'AO' => 'Angola', 'AI' => 'Anguilla', 'AQ' => 'Antarctica', 'AG' => 'Antigua and Barbuda', 'AR' => 'Argentina', 'AM' => 'Armenia', 'AW' => 'Aruba', 'AU' => 'Australia', 'AT' => 'Austria', 'AZ' => 'Azerbaijan', 'BS' => 'Bahamas', 'BH' => 'Bahrain', 'BD' => 'Bangladesh', 'BB' => 'Barbados', 'BY' => 'Belarus', 'BE' => 'Belgium', 'BZ' => 'Belize', 'BJ' => 'Benin', 'BM' => 'Bermuda', 'BT' => 'Bhutan', 'BO' => 'Bolivia', 'BA' => 'Bosnia and Herzegovina', 'BW' => 'Botswana', 'BV' => 'Bouvet Island', 'BR' => 'Brazil', 'IO' => 'British Indian Ocean Territory', 'BN' => 'Brunei', 'BG' => 'Bulgaria', 'BF' => 'Burkina Faso', 'BI' => 'Burundi', 'KH' => 'Cambodia', 'CM' => 'Cameroon', 'CA' => 'Canada', 'CV' => 'Cape Verde', 'KY' => 'Cayman Islands', 'CF' => 'Central African Republic', 'TD' => 'Chad', 'CL' => 'Chile', 'CN' => 'China', 'CX' => 'Christmas Island', 'CC' => 'Cocos (Keeling) Islands', 'CO' => 'Colombia', 'KM' => 'Comoros', 'CG' => 'Congo', 'CD' => 'Congo, The Democratic Republic of the', 'CK' => 'Cook Islands', 'CR' => 'Costa Rica', 'HR' => 'Croatia', 'CU' => 'Cuba', 'CY' => 'Cyprus', 'CZ' => 'Czech Republic', 'CI' => 'Côte dIvoire', 'DK' => 'Denmark', 'DJ' => 'Djibouti', 'DM' => 'Dominica', 'DO' => 'Dominican Republic', 'TP' => 'East Timor', 'EC' => 'Ecuador', 'EG' => 'Egypt', 'SV' => 'El Salvador', 'GQ' => 'Equatorial Guinea', 'ER' => 'Eritrea', 'EE' => 'Estonia', 'ET' => 'Ethiopia', 'FK' => 'Falkland Islands', 'FO' => 'Faroe Islands', 'FJ' => 'Fiji Islands', 'FI' => 'Finland', 'FR' => 'France', 'GF' => 'French Guiana', 'PF' => 'French Polynesia', 'TF' => 'French Southern territories', 'GA' => 'Gabon', 'GM' => 'Gambia', 'GE' => 'Georgia', 'DE' => 'Germany', 'GH' => 'Ghana', 'GI' => 'Gibraltar', 'GR' => 'Greece', 'GL' => 'Greenland', 'GD' => 'Grenada', 'GP' => 'Guadeloupe', 'GU' => 'Guam', 'GT' => 'Guatemala', 'GN' => 'Guinea', 'GW' => 'Guinea-Bissau', 'GY' => 'Guyana', 'HT' => 'Haiti', 'HM' => 'Heard Island and McDonald Islands', 'HN' => 'Honduras', 'HK' => 'Hong Kong', 'HU' => 'Hungary', 'IS' => 'Iceland', 'IN' => 'India', 'ID' => 'Indonesia', 'IR' => 'Iran', 'IQ' => 'Iraq', 'IE' => 'Ireland', 'IL' => 'Israel', 'IT' => 'Italy', 'JM' => 'Jamaica', 'JP' => 'Japan', 'JO' => 'Jordan', 'KZ' => 'Kazakhstan', 'KE' => 'Kenya', 'KI' => 'Kiribati', 'KW' => 'Kuwait', 'KG' => 'Kyrgyzstan', 'LA' => 'Laos', 'LV' => 'Latvia', 'LB' => 'Lebanon', 'LS' => 'Lesotho', 'LR' => 'Liberia', 'LY' => 'Libya', 'LI' => 'Liechtenstein', 'LT' => 'Lithuania', 'LU' => 'Luxembourg', 'MO' => 'Macao', 'MK' => 'Macedonia', 'MG' => 'Madagascar', 'MW' => 'Malawi', 'MY' => 'Malaysia', 'MV' => 'Maldives', 'ML' => 'Mali', 'MT' => 'Malta', 'MH' => 'Marshall Islands', 'MQ' => 'Martinique', 'MR' => 'Mauritania', 'MU' => 'Mauritius', 'YT' => 'Mayotte', 'MX' => 'Mexico', 'FM' => 'Micronesia, Federated States of', 'MD' => 'Moldova', 'MC' => 'Monaco', 'MN' => 'Mongolia', 'ME' => 'Montenegro', 'MS' => 'Montserrat', 'MA' => 'Morocco', 'MZ' => 'Mozambique', 'MM' => 'Myanmar', 'NA' => 'Namibia', 'NR' => 'Nauru', 'NP' => 'Nepal', 'NL' => 'Netherlands', 'AN' => 'Netherlands Antilles', 'NC' => 'New Caledonia', 'NZ' => 'New Zealand', 'NI' => 'Nicaragua', 'NE' => 'Niger', 'NG' => 'Nigeria', 'NU' => 'Niue', 'NF' => 'Norfolk Island', 'KP' => 'North Korea', 'MP' => 'Northern Mariana Islands', 'NO' => 'Norway', 'OM' => 'Oman', 'PK' => 'Pakistan', 'PW' => 'Palau', 'PS' => 'Palestine', 'PA' => 'Panama', 'PG' => 'Papua New Guinea', 'PY' => 'Paraguay', 'PE' => 'Peru', 'PH' => 'Philippines', 'PN' => 'Pitcairn', 'PL' => 'Poland', 'PT' => 'Portugal', 'PR' => 'Puerto Rico', 'QA' => 'Qatar', 'RO' => 'Romania', 'RU' => 'Russia', 'RW' => 'Rwanda', 'RE' => 'Réunion', 'SH' => 'Saint Helena', 'KN' => 'Saint Kitts and Nevis', 'PM' => 'Saint Pierre and Miquelon', 'WS' => 'Samoa', 'SM' => 'San Marino', 'ST' => 'Sao Tome and Principe', 'SA' => 'Saudi Arabia', 'SN' => 'Senegal', 'RS' => 'Serbia', 'SC' => 'Seychelles', 'SL' => 'Sierra Leone', 'SG' => 'Singapore', 'SK' => 'Slovakia', 'SI' => 'Slovenia', 'SB' => 'Solomon Islands', 'SO' => 'Somalia', 'ZA' => 'South Africa', 'GS' => 'South Georgia and the South Sandwich Islands', 'KR' => 'South Korea', 'ES' => 'Spain', 'LK' => 'Sri Lanka', 'LC' => 'St. Lucia', 'VC' => 'St. Vincent and the Grenadines', 'SD' => 'Sudan', 'SR' => 'Suriname', 'SJ' => 'Svalbard and Jan Mayen', 'SZ' => 'Swaziland', 'SE' => 'Sweden', 'CH' => 'Switzerland', 'SY' => 'Syria', 'TW' => 'Taiwan', 'TJ' => 'Tajikistan', 'TZ' => 'Tanzania', 'TH' => 'Thailand', 'TG' => 'Togo', 'TK' => 'Tokelau', 'TO' => 'Tonga', 'TT' => 'Trinidad and Tobago', 'TN' => 'Tunisia', 'TR' => 'Turkey', 'TM' => 'Turkmenistan', 'TC' => 'Turks and Caicos Islands', 'TV' => 'Tuvalu', 'UK' => 'UK', 'UM' => 'US (Minor Outlying Islands)', 'UG' => 'Uganda', 'UA' => 'Ukraine', 'AE' => 'United Arab Emirates', 'US' => 'United States', 'UY' => 'Uruguay', 'UZ' => 'Uzbekistan', 'VU' => 'Vanuatu', 'VA' => 'Vatican City State', 'VE' => 'Venezuela', 'VN' => 'Vietnam', 'VG' => 'Virgin Islands, British', 'VI' => 'Virgin Islands, U.S.', 'WF' => 'Wallis and Futuna', 'EH' => 'Western Sahara', 'YE' => 'Yemen', 'YU' => 'Yugoslavia', 'ZM' => 'Zambia', 'ZW' => 'Zimbabwe', ); $c_codes = array( "AF" => "افغانستان", // Afghanistan "NL" => "Nederland", // Netherlands "AN" => "Nederlandse Antillen", // Netherlands Antilles "AL" => "Shqipëria", // Albania "DZ" => "الجزائر", // Algeria "AS" => "American Samoa", // American Samoa "AD" => "Andorra", // Andorra "AO" => "Angola", // Angola "AI" => "Anguilla", // Anguilla "AG" => "Antigua en Barbuda", // Antigua and Barbuda "AE" => "الإمارات العربية المتحدة", // United Arab Emirates "AR" => "Argentina", // Argentina "AM" => "Հայաստան", // Armenia "AW" => "Aruba", // Aruba "AU" => "Australia", // Australia "AZ" => "Azərbaycan", // Azerbaijan "BS" => "The Bahamas", // Bahamas "BH" => "البحرين", // Bahrain "BD" => "বাংলাদেশ", // Bangladesh "BB" => "Barbados", // Barbados "BE" => "België", // Belgium "BZ" => "Belize", // Belize "BJ" => "Bénin", // Benin "BM" => "Bermuda", // Bermuda "BT" => "འབྲུག་ཡུལ", // Bhutan "BO" => "Bolivia", // Bolivia "BA" => "Bosna i Hercegovina", // Bosnia and Herzegovina "BW" => "Botswana", // Botswana "BR" => "Brasil", // Brazil "VG" => "British Virgin Islands", // Virgin Islands, British "BN" => "Brunei", // Brunei "BG" => "България", // Bulgaria "BF" => "Burkina Faso", // Burkina Faso "BI" => "Burundi", // Burundi "KY" => "Cayman Islands", // Cayman Islands "CL" => "Chile", // Chile "CK" => "Cook Islands", // Cook Islands "CR" => "Costa Rica", // Costa Rica "DJ" => "جيبوتي", // Djibouti "DM" => "Dominica", // Dominica "DO" => "República Dominicana", // Dominican Republic "EC" => "Ecuador", // Ecuador "EG" => "مصر", // Egypt "SV" => "El Salvador", // El Salvador "ER" => "إرتريا", // Eritrea "ES" => "España", // Spain "ZA" => "South Africa", // South Africa "ET" => "ኢትዮጵያ", // Ethiopia "FK" => "Falkland Islands", // Falkland Islands "FJ" => "Fiji", // Fiji Islands "PH" => "Philippines", // Philippines "FO" => "Føroyar", // Faroe Islands "GA" => "Gabon", // Gabon "GM" => "Gambia", // Gambia "GE" => "საქართველო", // Georgia "GH" => "Ghana", // Ghana "GI" => "Gibraltar", // Gibraltar "GD" => "Grenada", // Grenada "GL" => "Kalaallit Nunaat", // Greenland "GP" => "Guadeloupe", // Guadeloupe "GU" => "Guam", // Guam "GT" => "Guatemala", // Guatemala "GN" => "Guinée", // Guinea "GW" => "Guiné-Bissau", // Guinea-Bissau "GY" => "Guyana", // Guyana "HT" => "Haïti", // Haiti "HN" => "Honduras", // Honduras "HK" => "香港", // Hong Kong "SJ" => "Svalbard og Jan Mayen", // Svalbard and Jan Mayen "ID" => "Indonesia", // Indonesia "IN" => "भारत", // India "IQ" => "العراق", // Iraq "IR" => "ایران", // Iran "IE" => "Ireland", // Ireland "IS" => "Ísland", // Iceland "IL" => "ישראל", // Israel "IT" => "Italia", // Italy "TP" => "Timor-Leste", // East Timor "AT" => "Österreich", // Austria "JM" => "Jamaica", // Jamaica "JP" => "日本", // Japan "YE" => "اليمن", // Yemen "JO" => "الأردن", // Jordan "CX" => "Christmas Island", // Christmas Island "YU" => "Jugoslavija", // Yugoslavia "KH" => "កម្ពុជា", // Cambodia "CM" => "Cameroun", // Cameroon "CA" => "Canada", // Canada "CV" => "Cabo Verde", // Cape Verde "KZ" => "Қазақстан", // Kazakhstan "KE" => "Kenya", // Kenya "CF" => "République Centrafricaine", // Central African Republic "CN" => "中国", // China "KG" => "Кыргызстан", // Kyrgyzstan "KI" => "Kiribati", // Kiribati "CO" => "Colombia", // Colombia "KM" => "Comores", // Comoros "CG" => "Congo", // Congo "CD" => "Congo, La République Démocratique du", // Congo, The Democratic Republic of the "CC" => "Cocos (Keeling) Islands", // Cocos (Keeling) Islands "KP" => "조선민주주의인민공화국", // North Korea "KR" => "대한민국", // South Korea "GR" => "Ελλάδα", // Greece "HR" => "Hrvatska", // Croatia "CU" => "Cuba", // Cuba "KW" => "الكويت", // Kuwait "CY" => "Κύπρος", // Cyprus "LA" => "ລາວ", // Laos "LV" => "Latvija", // Latvia "LS" => "Lesotho", // Lesotho "LB" => "لبنان", // Lebanon "LR" => "Liberia", // Liberia "LY" => "ليبيا", // Libya "LI" => "Liechtenstein", // Liechtenstein "LT" => "Lietuva", // Lithuania "LU" => "Lëtzebuerg", // Luxembourg "EH" => "الصحراء الغربية", // Western Sahara "MO" => "澳門", // Macao "MG" => "Madagasikara", // Madagascar "MK" => "Македонија", // Macedonia "MW" => "Malawi", // Malawi "MV" => "Maldives", // Maldives "MY" => "Malaysia", // Malaysia "ML" => "Mali", // Mali "MT" => "Malta", // Malta "MA" => "المغرب", // Morocco "MH" => "Marshall Islands", // Marshall Islands "MQ" => "Martinique", // Martinique "MR" => "موريتانيا", // Mauritania "MU" => "Maurice", // Mauritius "YT" => "Mayotte", // Mayotte "MX" => "México", // Mexico "FM" => "Micronesia, Estados Federados de", // Micronesia, Federated States of "MD" => "Moldova", // Moldova "MC" => "Monaco", // Monaco "MN" => "Монгол Улс", // Mongolia "MS" => "Montserrat", // Montserrat "MZ" => "Moçambique", // Mozambique "MM" => "မြန်မာ", // Myanmar "NA" => "Namibië", // Namibia "NR" => "Nauru", // Nauru "NP" => "नेपाल", // Nepal "NI" => "Nicaragua", // Nicaragua "NE" => "Niger", // Niger "NG" => "Nigeria", // Nigeria "NU" => "Niue", // Niue "NF" => "Norfolk Island", // Norfolk Island "NO" => "Norge", // Norway "CI" => "Côte d'Ivoire", // Côte dIvoire "OM" => "عمان", // Oman "PK" => "پاکستان", // Pakistan "PW" => "Palau", // Palau "PA" => "Panamá", // Panama "PG" => "Papua New Guinea", // Papua New Guinea "PY" => "Paraguay", // Paraguay "PE" => "Perú", // Peru "PN" => "Pitcairn", // Pitcairn "MP" => "Northern Mariana Islands", // Northern Mariana Islands "PT" => "Portugal", // Portugal "PR" => "Puerto Rico", // Puerto Rico "PL" => "Polska", // Poland "GQ" => "Guinea Ecuatorial", // Equatorial Guinea "QA" => "قطر", // Qatar "FR" => "France", // France "GF" => "Guyane française", // French Guiana "PF" => "Polynésie française", // French Polynesia "RE" => "Réunion", // Réunion "RO" => "România", // Romania "RW" => "Rwanda", // Rwanda "SE" => "Sverige", // Sweden "SH" => "Saint Helena", // Saint Helena "KN" => "Saint Kitts en Nevis", // Saint Kitts and Nevis "LC" => "Saint Lucia", // St. Lucia "VC" => "Saint Vincent en de Grenadines", // St. Vincent and the Grenadines "PM" => "Saint-Pierre en Miquelon", // Saint Pierre and Miquelon "DE" => "Deutschland", // Germany "RS" => "Србија", // Serbia "ME" => "Црна Гора", // Montenegro "SB" => "Solomon Islands", // Solomon Islands "ZM" => "Zambia", // Zambia "WS" => "Samoa", // Samoa "SM" => "San Marino", // San Marino "ST" => "São Tomé en Príncipe", // Sao Tome and Principe "SA" => "المملكة العربية السعودية", // Saudi Arabia "SN" => "Sénégal", // Senegal "SC" => "Seychelles", // Seychelles "SL" => "Sierra Leone", // Sierra Leone "SG" => "Singapore", // Singapore "SK" => "Slovensko", // Slovakia "SI" => "Slovenija", // Slovenia "SO" => "Soomaaliya", // Somalia "LK" => "ශ්‍රී ලංකාව", // Sri Lanka "SD" => "السودان", // Sudan "FI" => "Suomi", // Finland "SR" => "Suriname", // Suriname "SZ" => "eSwatini", // Swaziland "CH" => "Schweiz", // Switzerland "SY" => "سوريا", // Syria "TJ" => "Тоҷикистон", // Tajikistan "TW" => "台灣", // Taiwan "TZ" => "Tanzania", // Tanzania "DK" => "Danmark", // Denmark "TH" => "ประเทศไทย", // Thailand "TG" => "Togo", // Togo "TK" => "Tokelau", // Tokelau "TO" => "Tonga", // Tonga "TT" => "Trinidad en Tobago", // Trinidad and Tobago "TD" => "Tchad", // Chad "CZ" => "Česká republika", // Czech Republic "TN" => "تونس", // Tunisia "TR" => "Türkiye", // Turkey "TM" => "Türkmenistan", // Turkmenistan "TC" => "Turks- en Caicoseilanden", // Turks and Caicos Islands "TV" => "Tuvalu", // Tuvalu "UG" => "Uganda", // Uganda "UA" => "Україна", // Ukraine "HU" => "Magyarország", // Hungary "UY" => "Uruguay", // Uruguay "NC" => "Nouvelle-Calédonie", // New Caledonia "NZ" => "New Zealand", // New Zealand "UZ" => "O‘zbekiston", // Uzbekistan "BY" => "Беларусь", // Belarus "WF" => "Wallis en Futuna", // Wallis and Futuna "VU" => "Vanuatu", // Vanuatu "VA" => "Città del Vaticano", // Vatican City State "VE" => "Venezuela", // Venezuela "RU" => "Россия", // Russia "VN" => "Việt Nam", // Vietnam "EE" => "Eesti", // Estonia "US" => "United States", // United States "VI" => "Virgin Islands, U.S.", // Virgin Islands, U.S. "ZW" => "Zimbabwe", // Zimbabwe "PS" => "فلسطين", // Palestine "AQ" => "Antarctica", // Antarctica "BV" => "Bouvet Island", // Bouvet Island "IO" => "British Indian Ocean Territory", // British Indian Ocean Territory "GS" => "South Georgia en de South Sandwich Islands", // South Georgia and the South Sandwich Islands "HM" => "Heard Island en McDonald Islands", // Heard Island and McDonald Islands "TF" => "Franse Zuidelijke en Antarctische Gebieden", // French Southern territories "UK" => "UK", // UK "UM" => "US (Minor Outlying Islands)" // US (Minor Outlying Islands) ); $c_codes_es = [ "AR" => "Argentina", "BO" => "Bolivia", "CL" => "Chile", "CO" => "Colombia", "CR" => "Costa Rica", "CU" => "Cuba", "DO" => "República Dominicana", "EC" => "Ecuador", "SV" => "El Salvador", "GT" => "Guatemala", "HN" => "Honduras", "MX" => "México", "NI" => "Nicaragua", "PA" => "Panamá", "PY" => "Paraguay", "PE" => "Perú", "ES" => "España", "UY" => "Uruguay", "VE" => "Venezuela" ]; function getage($bMonth,$bDay,$bYear) { if($bDay > 0){ list($cYear, $cMonth, $cDay) = explode("-", date("Y-m-d")); return ( ($cMonth >= $bMonth && $cDay >= $bDay) || ($cMonth > $bMonth) ) ? $cYear - $bYear : $cYear - $bYear - 1; } } function calculateZodiacSign($day, $month) { // Initialize the zodiac sign variable $zodiacSign = "Unknown"; // Validate the month and day if ($month < 1 || $month > 12 || $day < 1 || $day > 31) { return "Invalid date"; } // Determine the zodiac sign based on month and day if (($month == 3 && $day > 20) || ($month == 4 && $day < 20)) { $zodiacSign = "Aries"; } elseif (($month == 4 && $day > 19) || ($month == 5 && $day < 21)) { $zodiacSign = "Taurus"; } elseif (($month == 5 && $day > 20) || ($month == 6 && $day < 21)) { $zodiacSign = "Gemini"; } elseif (($month == 6 && $day > 20) || ($month == 7 && $day < 23)) { $zodiacSign = "Cancer"; } elseif (($month == 7 && $day > 22) || ($month == 8 && $day < 23)) { $zodiacSign = "Leo"; } elseif (($month == 8 && $day > 22) || ($month == 9 && $day < 23)) { $zodiacSign = "Virgo"; } elseif (($month == 9 && $day > 22) || ($month == 10 && $day < 23)) { $zodiacSign = "Libra"; } elseif (($month == 10 && $day > 22) || ($month == 11 && $day < 22)) { $zodiacSign = "Scorpio"; } elseif (($month == 11 && $day > 21) || ($month == 12 && $day < 22)) { $zodiacSign = "Sagittarius"; } elseif (($month == 12 && $day > 21) || ($month == 1 && $day < 20)) { $zodiacSign = "Capricorn"; } elseif (($month == 1 && $day > 19) || ($month == 2 && $day < 19)) { $zodiacSign = "Aquarius"; } elseif (($month == 2 && $day > 18) || ($month == 3 && $day < 21)) { $zodiacSign = "Pisces"; } return $zodiacSign; } function makeClickableLinks($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 = [ 'ano' => 60 * 60 * 24 * 365.242199, 'mes' => 60 * 60 * 24 * 30.4368499, 'semana' => 60 * 60 * 24 * 7, 'dia' => 60 * 60 * 24, 'hora' => 60 * 60, 'minuto' => 60 ]; foreach ($units as $unit_name => $unit) { if ($time_difference >= $unit) { $num = floor($time_difference / $unit); return 'hace '.$num . ' ' . ($num > 1 ? $unit_name . 's' : $unit_name) . ''; } } return 'justamente ahora'; } 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 minuto '; } 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@guapas.org"; $mail->FromName = "guapas.org"; $mail->AddAddress($to2, "guapas.org"); // $mail->AddAddress("ellen@example.com"); // name is optional $mail->AddReplyTo("info@guapas.org", "guapas.org"); $mail->SetFrom("info@guapas.org","guapas.org", 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/misskicom "; $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 '

' . '
'; } function getytid($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 $videoId ; } ?>