0){ } else { redirect(vpath."member/account.php?plan_id=".$feature["plan_id"]."&feature=".$feature["feature"]); } } } function GetCountryCode($country_name){ $sql = "select country_code from country where country_name='".fixstr($country_name)."'"; $res1 = mysql_query($sql); $rs1 = mysql_fetch_array($res1); return $rs1["country_code"]; } function GetCountryName($country_code){ $sql = "select country_name from country where country_code='".fixstr($country_code)."'"; $res1 = mysql_query($sql); $rs1 = mysql_fetch_array($res1); return $rs1["country_name"]; } function get_folder_id($photo){ $id = $photo; $id = str_replace(".jpg", "", strtolower($id)); $id = str_replace(".png", "", strtolower($id)); $id = str_replace(".gif", "", strtolower($id)); $id = str_replace(".bmp", "", strtolower($id)); $id = str_replace("s_", "", strtolower($id)); if($id<10){ $folder_id = $id; } else { $folder_id = left($id, 2); } return $folder_id; } function getpartialbody($org_str, $len){ $str = strip_tags($org_str); $org_len = strlen($str); if ($org_len>$len){ $str = substr($str, 0, $len); $last_point = strrpos($str, "."); $str = substr($str, 0, $last_point); } if ($str==""){ $str = substr($org_str, 0, $len); $last_point = strrpos($str, " "); $str = substr($str, 0, $last_point); $str .= ".."; } if($str!="") $str .= ". "; //$str = left($org_str, $len); return $str; } function fixchar($str){ $str = preg_replace("/[^a-zA-Z0-9\s]/", "", $str); return $str; //if(ereg('^[-A-Za-z0-9_]', $str)){ // return $str; //} else { // return ""; //} } function lang($str){ return $str; } function WriteSelected($str1, $str2){ if ($str1 == $str2) { return "selected"; } } function notification_set($msg=''){ $_SESSION['message']=trim($msg); } function notification_get($clss='success'){ $message=$_SESSION['message']; notification_set(); if($message==""){ return ''; }else{ return "
$message
"; } } function writearraychecked($this_arr, $each_value){ //compare 2 arrays and write "checked" $ischecked = false; if(is_array($this_arr)){ for($a=0; $a $n){ $new_str = substr($str, 0, $n); } } return $new_str; } function right($str, $n){ $new_str = $str; if($str!=""){ if(strlen($str)>$n){ $new_str = substr($str, strlen($str)-$n, strlen($str)); } } return $new_str; } function fixunixpath($str){ if(instr(site_path, "/")){ $str = str_replace("\\", "/", $str); } else { $str = str_replace("/", "\\", $str); } return $str; } //database function getnum($sql){ $result1 = mysql_query($sql); if($result1){ $row1 = mysql_fetch_array($result1); $num = $row1["num"]; return $num; } } function fixint($str){ $str = trim($str); $str = str_replace("'", "''", $str); if($str=="") $str = 0; return $str; } function fixstr($str){ if(get_magic_quotes_gpc()){ $str = stripslashes($str); } if (phpversion() >= '4.3.0'){ $str = mysql_real_escape_string($str); } else { $str = mysql_escape_string($str); } return $str; } function get_day($str) { list($date, $time) = explode(' ', $str); list($year, $month, $day) = explode('-', $date); list($hour, $minute, $second) = explode(':', $time); return $day; } function get_month($str) { list($date, $time) = explode(' ', $str); list($year, $month, $day) = explode('-', $date); list($hour, $minute, $second) = explode(':', $time); $m = $month; return $m; } function get_year($str) { list($date, $time) = explode(' ', $str); list($year, $month, $day) = explode('-', $date); list($hour, $minute, $second) = explode(':', $time); return $year; } function redirect($url){ Header("Location: " . $url); exit(); } function instr($str, $seek){ if(strlen($str)>0 && $seek!=""){ $pos = strpos($str, $seek); if($pos===false){ return false; } else { return true; } } else { return false; } } function datediff($interval,$date1,$date2) { $date1 = tounixtime($date1); $date2 = tounixtime($date2); // get the number of seconds between the two dates $timedifference = $date2 - $date1; switch ($interval) { case 'y': $retval = bc_div($timedifference,31556926); break; case 'm': $retval = bc_div($timedifference,2629744); break; case 'w': $retval = bc_div($timedifference,604800); break; case 'd': $retval = bc_div($timedifference,86400); break; case 'h': $retval = bc_div($timedifference,3600); break; case 'n': $retval = bc_div($timedifference,60); break; case 's': $retval = $timedifference; break; } return $retval; } function gettime(){ $date = tonormaltime(time()); return $date; } function dateadd($interval, $number, $date) { $date = tounixtime($date); $date_time_array = getdate($date); $hours = $date_time_array['hours']; $minutes = $date_time_array['minutes']; $seconds = $date_time_array['seconds']; $month = $date_time_array['mon']; $day = $date_time_array['mday']; $year = $date_time_array['year']; switch ($interval) { case 'yyyy': $year+=$number; break; case 'q': $year+=($number*3); break; case 'm': $month+=$number; break; case 'y': case 'd': case 'w': $day+=$number; break; case 'ww': $day+=($number*7); break; case 'h': $hours+=$number; break; case 'n': $minutes+=$number; break; case 's': $seconds+=$number; break; } //$date = mktime(0,0,0,$datetime_array[1],$datetime_array[2],$datetime_array[0]); $timestamp = mktime($hours,$minutes,$seconds,$month,$day,$year); return tonormaltime($timestamp); } function bc_div( $first, $second, $scale = 0 ){ $res = $first / $second; return round( $res, $scale ); } function GetAge($birth_year, $birth_month, $birth_day){ $birthdate = $birth_year . "-" . $birth_month . "-" . $birth_day; $age = number_format(datediff("m", $birthdate, gettime())/12); return $age; } function get_age($birthdate){ list($date, $time) = explode(' ', $birthdate); list($year, $month, $day) = explode('-', $date); list($hour, $minute, $second) = explode(':', $time); $age = date("Y") - $year; if($month > date("m")){ $age--; } elseif ($month == date("m")){ if($day > date("d")){ $age--; } } if($age>0 && $age<120) return $age; else return ""; } function showmessage($msg){ if($msg!=""){ echo '
'.$msg.'
'; } } function tounixtime($str){ if($str!=""){ list($date, $time) = explode(' ', $str); list($year, $month, $day) = explode('-', $date); list($hour, $minute, $second) = explode(':', $time); if($month!="" && $day!="" && $year!=""){ $timestamp = mktime(fixint($hour), fixint($minute), fixint($second), $month, $day, $year); return $timestamp; } else { return $str; } } } function tonormaltime($str){ if($str==""){ $str = time(); } $str = date("Y-m-j H:i:s", $str); return $str; } //Friends functions function is_alreadyFriends(){ } function myfriends(){ $searchfor='all'; if(isset($_REQUEST['txtkeyword']) && trim($_REQUEST['txtkeyword'])!=""){ $searchfor=$_REQUEST['txtkeyword']; }else{ $segParams = $this->uri->uri_to_assoc(3); $searchfor=isset($segParams['sfor'])?trim($segParams['sfor']):'all'; } $data['friends']=$this->_fetch_myfriends($searchfor); $this->load->view("friends/myfriends",$data); } function emailValidation($email, $strict = FALSE) { if ($strict === TRUE) { $qtext = '[^\\x0d\\x22\\x5c\\x80-\\xff]'; $dtext = '[^\\x0d\\x5b-\\x5d\\x80-\\xff]'; $atom = '[^\\x00-\\x20\\x22\\x28\\x29\\x2c\\x2e\\x3a-\\x3c\\x3e\\x40\\x5b-\\x5d\\x7f-\\xff]+'; $pair = '\\x5c[\\x00-\\x7f]'; $domain_literal = "\\x5b($dtext|$pair)*\\x5d"; $quoted_string = "\\x22($qtext|$pair)*\\x22"; $sub_domain = "($atom|$domain_literal)"; $word = "($atom|$quoted_string)"; $domain = "$sub_domain(\\x2e$sub_domain)*"; $local_part = "$word(\\x2e$word)*"; $expression = "/^$local_part\\x40$domain$/D"; } else { $expression = '/^[-_a-z0-9\'+*$^&%=~!?{}]++(?:\.[-_a-z0-9\'+*$^&%=~!?{}]+)*+@(?:(?![-.])[-a-z0-9.]+(? 'a', 'ô' => 'o', 'ď' => 'd', 'ḟ' => 'f', 'ë' => 'e', 'š' => 's', 'ơ' => 'o', 'ß' => 'ss', 'ă' => 'a', 'ř' => 'r', 'ț' => 't', 'ň' => 'n', 'ā' => 'a', 'ķ' => 'k', 'ŝ' => 's', 'ỳ' => 'y', 'ņ' => 'n', 'ĺ' => 'l', 'ħ' => 'h', 'ṗ' => 'p', 'ó' => 'o', 'ú' => 'u', 'ě' => 'e', 'é' => 'e', 'ç' => 'c', 'ẁ' => 'w', 'ċ' => 'c', 'õ' => 'o', 'ṡ' => 's', 'ø' => 'o', 'ģ' => 'g', 'ŧ' => 't', 'ș' => 's', 'ė' => 'e', 'ĉ' => 'c', 'ś' => 's', 'î' => 'i', 'ű' => 'u', 'ć' => 'c', 'ę' => 'e', 'ŵ' => 'w', 'ṫ' => 't', 'ū' => 'u', 'č' => 'c', 'ö' => 'o', 'è' => 'e', 'ŷ' => 'y', 'ą' => 'a', 'ł' => 'l', 'ų' => 'u', 'ů' => 'u', 'ş' => 's', 'ğ' => 'g', 'ļ' => 'l', 'ƒ' => 'f', 'ž' => 'z', 'ẃ' => 'w', 'ḃ' => 'b', 'å' => 'a', 'ì' => 'i', 'ï' => 'i', 'ḋ' => 'd', 'ť' => 't', 'ŗ' => 'r', 'ä' => 'a', 'í' => 'i', 'ŕ' => 'r', 'ê' => 'e', 'ü' => 'u', 'ò' => 'o', 'ē' => 'e', 'ñ' => 'n', 'ń' => 'n', 'ĥ' => 'h', 'ĝ' => 'g', 'đ' => 'd', 'ĵ' => 'j', 'ÿ' => 'y', 'ũ' => 'u', 'ŭ' => 'u', 'ư' => 'u', 'ţ' => 't', 'ý' => 'y', 'ő' => 'o', 'â' => 'a', 'ľ' => 'l', 'ẅ' => 'w', 'ż' => 'z', 'ī' => 'i', 'ã' => 'a', 'ġ' => 'g', 'ṁ' => 'm', 'ō' => 'o', 'ĩ' => 'i', 'ù' => 'u', 'į' => 'i', 'ź' => 'z', 'á' => 'a', 'û' => 'u', 'þ' => 'th', 'ð' => 'dh', 'æ' => 'ae', 'µ' => 'u', 'ĕ' => 'e', 'ı' => 'i', ); } $str = str_replace( array_keys($utf8_lower_accents), array_values($utf8_lower_accents), $str ); } if ($case >= 0) { if ($utf8_upper_accents === NULL) { $utf8_upper_accents = array( 'À' => 'A', 'Ô' => 'O', 'Ď' => 'D', 'Ḟ' => 'F', 'Ë' => 'E', 'Š' => 'S', 'Ơ' => 'O', 'Ă' => 'A', 'Ř' => 'R', 'Ț' => 'T', 'Ň' => 'N', 'Ā' => 'A', 'Ķ' => 'K', 'Ĕ' => 'E', 'Ŝ' => 'S', 'Ỳ' => 'Y', 'Ņ' => 'N', 'Ĺ' => 'L', 'Ħ' => 'H', 'Ṗ' => 'P', 'Ó' => 'O', 'Ú' => 'U', 'Ě' => 'E', 'É' => 'E', 'Ç' => 'C', 'Ẁ' => 'W', 'Ċ' => 'C', 'Õ' => 'O', 'Ṡ' => 'S', 'Ø' => 'O', 'Ģ' => 'G', 'Ŧ' => 'T', 'Ș' => 'S', 'Ė' => 'E', 'Ĉ' => 'C', 'Ś' => 'S', 'Î' => 'I', 'Ű' => 'U', 'Ć' => 'C', 'Ę' => 'E', 'Ŵ' => 'W', 'Ṫ' => 'T', 'Ū' => 'U', 'Č' => 'C', 'Ö' => 'O', 'È' => 'E', 'Ŷ' => 'Y', 'Ą' => 'A', 'Ł' => 'L', 'Ų' => 'U', 'Ů' => 'U', 'Ş' => 'S', 'Ğ' => 'G', 'Ļ' => 'L', 'Ƒ' => 'F', 'Ž' => 'Z', 'Ẃ' => 'W', 'Ḃ' => 'B', 'Å' => 'A', 'Ì' => 'I', 'Ï' => 'I', 'Ḋ' => 'D', 'Ť' => 'T', 'Ŗ' => 'R', 'Ä' => 'A', 'Í' => 'I', 'Ŕ' => 'R', 'Ê' => 'E', 'Ü' => 'U', 'Ò' => 'O', 'Ē' => 'E', 'Ñ' => 'N', 'Ń' => 'N', 'Ĥ' => 'H', 'Ĝ' => 'G', 'Đ' => 'D', 'Ĵ' => 'J', 'Ÿ' => 'Y', 'Ũ' => 'U', 'Ŭ' => 'U', 'Ư' => 'U', 'Ţ' => 'T', 'Ý' => 'Y', 'Ő' => 'O', 'Â' => 'A', 'Ľ' => 'L', 'Ẅ' => 'W', 'Ż' => 'Z', 'Ī' => 'I', 'Ã' => 'A', 'Ġ' => 'G', 'Ṁ' => 'M', 'Ō' => 'O', 'Ĩ' => 'I', 'Ù' => 'U', 'Į' => 'I', 'Ź' => 'Z', 'Á' => 'A', 'Û' => 'U', 'Þ' => 'Th', 'Ð' => 'Dh', 'Æ' => 'Ae', 'İ' => 'I', ); } $str = str_replace( array_keys($utf8_upper_accents), array_values($utf8_upper_accents), $str ); } return $str; } function getrs($sql){ $result = mysql_query($sql); $row = mysql_fetch_array($result); return $row; } function fixcurr($str){ if($str!=""){ $str = str_replace(" ", "", $str); $str = str_replace("'", "", $str); $str = str_replace("$", "", $str); $str = str_replace(",", "", $str); if(strpos($str, ".")){ //$str = str_replace(".", "", $str); //$str = $str/100; } } else { $str = 0; } return $str; } ?> <?=site_title?>
Username Password
Forgot password
'') order by rand() limit ".$limit; break; default: //new $sql = "select * from user where (active=1) and (enabled=1) and (photo <> '') order by user_id desc limit ".$limit; break; } $res = mysql_query($sql) or die(mysql_error()); while($rs = mysql_fetch_array($res)){ $photo = $rs["photo"]; $birth_year = $rs["birth_year"]; $birth_month = $rs["birth_month"]; $birth_day = $rs["birth_day"]; $yourself = $rs["yourself"]; $gender = $rs["gender"]; $user_id = $rs["user_id"]; $city = $rs["city"]; $state = $rs["state"]; $country = $rs["country"]; if ($birth_month==2 && $birth_day>28) { $birth_day = 28; } $age = GetAge($birth_year, $birth_month, $birth_day); $located = $city . ", " . $state;// . ", " . $country; ?>
"> "> members.

: at  
'; if($rs["address"]!="") echo lang("Street").': '.$rs["address"].'
'; if($rs["city"]!="") echo lang("City").': '.$rs["city"].'
'; if($rs["state"]!="") echo lang("State").': '.$rs["state"].'
'; if($rs["phone"]!="") echo lang("Phone").': '.formatphone($rs["phone"]).'
'; if($rs["type"]!="") echo lang("Event Type").': '.$rs["type"].'
'; if($rs["organizer"]!="") echo lang("Organized By").': '.$rs["organizer"].'
'; ?>
>>'.lang("more").'...'; } function inc_loginform(){ ?>
Username Password
Forgot password