include_once("loader.php");
$unlogin = 1;
$sflimit = 15;
if(!$sf) $sf = 0;
$pg = $sf*$sflimit;
if($arama) { $get = $arama; }
if($get) { $arama = $get; }
if($get == "on" or $online == "1") {
$arama = "genel";
$get = "on";
$_GET[online] = $online = "1";
}
$db->std = null;
$db->alan[] = "*";
$db->tablo = "sehirler";
$shr = $db->query();
while ($bb = $db->fetch_assoc($shr)) {
$a_shr[$bb[sehir]] = $bb[id];
}
$dhg = mysql_query("select * from cinsiyet");
while ($sew = mysql_fetch_assoc($dhg)) {
$cnsyt[$sew[id]] = $lang[$sew[cinsiyet]];
$cntur[$sew[id]] = $sew[turu];
}
if($arama == "genel" or $arama == "") {
$db->std[gorunur] = array("=",1);
if($tag != "") {
$tag = str_replace("-"," ",$tag);
$fkey = explode(" ",$tag);
preg_match_all("/(\d+) $lang[143]/i",$tag,$og);
foreach ($fkey as $v1 => $v2) {
$v2 = trim($v2);
foreach ($cnsyt as $c1 => $c2) {
if($v2 == $c2) {
$cinsiyet = $_GET[cinsiyet] = $c1;
}
}
}
foreach ($a_shr as $aaa1 => $aaa2) {
$a_shr2[seo_permalink($aaa1)] = $aaa2;
}
foreach ($fkey as $v1 => $v2) {
$v2 = trim($v2);
if($a_shr2[$v2] != "") {
$sehir = $_GET[sehir] = $a_shr2[$v2];
}
}
if($og[1][0] != "") { $yas1 = $_GET[yas1] = trim($og[1][0]); $yas2 = $_GET[yas2] = trim($og[1][0])+1; }
$og = null;
}
if($yas1 != "" and $yas2 != "") { $db->std[] = "and (dogumtarih <='".((date("Y")-($yas1-1))."-".date("m-d"))."' and dogumtarih >='".((date("Y")-($yas2-1))."-".date("m-d"))."')"; }
if($online != "") { $db->std[] = "and"; $db->std[online] = array("=",$online); }
if($uname != "") { $db->std[] = "and"; $db->std[user] = array("like","%$uname%"); }
if($cinsiyet != "") { $db->std[] = "and"; $db->std[cinsiyet] = array("=",$cinsiyet); }
if($fotograf != "") { $db->std[] = "and"; $db->std[resim] = array("=",$fotograf); }
if($sehir != "") { $db->std[] = "and"; $db->std[sehir] = array("=",$sehir); }
if($tumbotlar == "0") { $db->std[] = "and"; $db->std[uyedurum] = array("!=","3"); }
$dbwhere = $db->std;
$db->alan[] = "*";
if($u[uyedurum] != '2') {
$db->alan[] = "CASE uyedurum WHEN '2' THEN '1' WHEN '3' THEN '2' WHEN '1' THEN '3' end as uyesirala";
} else {
$db->alan[] = "CASE uyedurum WHEN '2' THEN '1' WHEN '1' THEN '2' WHEN '3' THEN '3' end as uyesirala";
}
$db->order[uyesirala] = "ASC";
$db->order[resim] = "DESC";
$db->order[sonislem] = "desc";
$db->tablo = "uyeler";
$db->limit = array($pg,$sflimit);
$ar1 = $db->query();
if($tag != "") {
if($yas1 != "" and $yas2 != "") { $pt[] = "$yas1 yaşında"; }
if($sehir != "") { $pt[] = sehir($sehir); }
if($cinsiyet != "") { $pt[] = $cnsyt[$cinsiyet]; }
$pt[] = $lang[146];
$p_title = implode(" ",$pt);
$p_description = str_replace("[p_title]",$p_title,$lang[147]);
$p_keywords = str_replace("[p_title]",$p_title,$lang[148]);
} else {
$p_title = "Arkadaş arama sonuçları";
$p_description = "Haritadan semtinize en yakın arkadaşları bulun, Sohbet edin, Görüşün. Son teknoloji arkadaşlık sitesi";
$p_keywords = "arkadaş, arkadaş ara, arkadaş bul, arkadaş arıyorum, arkadaş arama, arkadaş bulma, hemen arkadaş bul, arkadaş ortamı, arkadaşlık, chat, sohbet, muhabbet";
}
$db->std = $dbwhere;
$db->alan[] = "id";
$db->tablo = "uyeler";
$say = $db->num_rows();
} elseif ($arama == "detayli") {
$qq = array();
if($yas1 != "" and $yas2 != "") { $qq[] = "(u.dogumtarih <='".((date("Y")-$yas1)."-".date("m-d"))."' and u.dogumtarih >='".((date("Y")-$yas2)."-".date("m-d"))."')"; }
if($online>0) { $qq[] = "u.online = '$online'"; }
if($uname != "") { $qq[] = "u.user like '%$uname%'";}
if($cinsiyet>0) { $qq[] = "u.cinsiyet = '$cinsiyet'"; }
if($webcam=="1") { $qq[] = "(u.camonline = '$webcam' and u.webcambilgi = '1')"; } elseif ($webcam == "0") { $qq[] = "(u.webcambilgi = '0')"; }
if($fotograf>0) { $qq[] = "u.resim = '$fotograf'";}
if($sehir>0) { $qq[] = "u.sehir = '$sehir'"; }
if($ilce>0) { $qq[] = "u.ilce = '$ilce'"; }
if($medenidurum>0) { $qq[] = "p.medenidurum = '$medenidurum'"; }
if($boy>0) { $ddboy = explode("-",$boy); $qq[] = "(p.boy >= '$ddboy[0]' and p.boy <= '$ddboy[1]')"; }
if($kilo>0) { $ddkilo = explode("-",$kilo); $qq[] = "(p.kilo >= '$ddkilo[0]' and p.kilo <= '$ddkilo[1]')"; }
if($din>0) { $qq[] = "p.din = '$din'"; }
if($etnik>0) { $qq[] = "p.etnik = '$etnik'"; }
if($egitimdurum>0) { $qq[] = "u.egitimdurum = '$egitimdurum'"; }
if($meslek>0) { $qq[] = "u.meslek = '$meslek'"; }
if($sigara>0) { $qq[] = "p.sigara = '$sigara'"; }
if($alkol>0) { $qq[] = "p.icki = '$alkol'"; }
if($tumbotlar == "0") { $qq[] = "u.uyedurum != '3'"; }
if(count($qq)>0) {
$qqs = implode(" and ",$qq);
} else {
$qqs = 1;
}
$sorgumm = "select u.* from uyeler as u, profildetay as p where u.id = p.id and ".$qqs;
$sorgumm2 = "select u.id from uyeler as u, profildetay as p where u.id = p.id and ".$qqs;
$ar1 = mysql_query($sorgumm." order by resim desc,uyedurum desc,sonislem desc LIMIT $pg,$sflimit");
$arz = mysql_query($sorgumm2);
$say = mysql_num_rows($arz);
} elseif ($arama == "ruhikizi") {
$qqs = ruhikizim();
$_GET = $qqs['get'];
$_GET['arama'] = "detayli";
$qqs = $qqs[sql];
$sorgumm = "select u.* from uyeler as u, profildetay as p where u.id = p.id ".($tumbotlar == "0" ? "and u.uyedurum != '3'" : "")." and ".$qqs;
$sorgumm2 = "select u.id from uyeler as u, profildetay as p where u.id = p.id ".($tumbotlar == "0" ? "and u.uyedurum != '3'" : "")." and ".$qqs;
$ar1 = mysql_query($sorgumm." LIMIT $pg,$sflimit");
$arz = mysql_query($sorgumm2);
$say = mysql_num_rows($arz);
} elseif ($arama == "enyakin") {
$birp = 1/111;
$birm = 1/85;
$_GET['arama'] = "enyakin";
$_GET[coor_x1] = ($u[coorx]-($birp*10));
$_GET[coor_x2] = ($u[coorx]+($birp*10));
$_GET[coor_y1] = ($u[coory]-($birm*10));
$_GET[coor_y2] = ($u[coory]+($birm*10));
$qqs = "(coorx>='".$_GET['coor_x1']."' and coorx<='".$_GET['coor_x2']."') and (coory>='".$_GET['coor_y1']."' and coory<='".$_GET['coor_y2']."')";
$sorgumm = "select * from uyeler where ".($tumbotlar == "0" ? "u.uyedurum != '3' and " : "")." ".$qqs;
$sorgumm2 = "select id from uyeler where ".($tumbotlar == "0" ? "u.uyedurum != '3' and " : "")." ".$qqs;
$ar1 = mysql_query($sorgumm." LIMIT $pg,$sflimit");
$arz = mysql_query($sorgumm2);
$say = mysql_num_rows($arz);
}
if($arama != "") {
$querykeys = array("arama","uname","yas1","yas2","online","cinsiyet","fotograf","sehir","ilce","medenidurum","boy","kilo","din","etnik","egitimdurum","meslek","sigara","alkol","coor_x1","coor_x2","coor_y1","coor_y2");
foreach ($querykeys as $q1 => $q2) {
if($_GET[$q2] != "") {
$_search[$q2] = $_GET[$q2];
}
}
if(count($_search)>0) {
$realquery = http_build_query($_search);
}
}
include("ust.php");
?>
if($get == "on") {
if ($cinsiyet==1){
echo $lang[177]." ".$lang[368]." ".$lang[1252];
}elseif ($cinsiyet==2){
echo $lang[177]." ".$lang[369]." ".$lang[1252];
}else{
echo $lang[152];
}
} elseif ($get == "harita") {
echo $lang[153];
} elseif ($get == "ruhikizi") {
echo $lang[154];
} elseif ($get == "detayli") {
echo $lang[155];
} else {
echo $lang[156];
}
?>
if(($arama == "detayli" or $arama == "enyakin" or $arama == "ruhikizi") and $_SESSION['loggedid'] == "") {
?>
} elseif(($arama == "detayli" or $arama == "enyakin" or $arama == "ruhikizi") and $u[uyedurum] != "2") {
?>
} else {
if($get != "harita"){
if($say>0) {
?>
fetch_assoc($ar1)) {
$aci++;
?>
=$prf[user]?>
on} else {?>off}?>line" style="left:61px;float:left;margin-top:10px; ">
, =yas($prf[dogumtarih])?> =$lang[143];?>
=sehir($prf[sehir])?>
=$lang[163];?>: =sonislemtime($prf[sonislem])?>
onclick="" href=""}else{?> href="/mesajlar/write.php?s_==$prf[id];?>" class="msgpopbox button oval light"}?>>
}?>
} else {?>
=$lang[168];?>
}?>
} else {?>
<script>"></script>
<script>
google.loader.rm({"specs":[{"name":"books","baseSpec":{"uri":"=$googlemirror;?>books.google.com/books/api.js","ssl":null,"key":{"string":"key"},"version":{"string":"v"},"deferred":true,"params":{"callback":{"string":"callback"},"language":{"string":"hl"}}}},"feeds",{"name":"friendconnect","baseSpec":{"uri":"=$googlemirror;?>www.google.com/friendconnect/script/friendconnect.js","ssl":null,"key":{"string":"key"},"version":{"string":"v"},"deferred":false,"params":{}}},"spreadsheets","gdata","visualization",{"name":"sharing","baseSpec":{"uri":"=$googlemirror;?>www.google.com/s2/sharing/js","ssl":null,"key":{"string":"key"},"version":{"string":"v"},"deferred":false,"params":{"language":{"string":"hl"}}}},"search",{"name":"maps","baseSpec":{"uri":"=$googlemirror;?>maps.google.com/maps?file\u003dgoogleapi","ssl":"https://maps-api-ssl.google.com/maps?file\u003dgoogleapi","key":{"string":"key"},"version":{"string":"v"},"deferred":true,"params":{"callback":{"regex":"callback\u003d$1\u0026async\u003d2"},"language":{"string":"hl"}}},"customSpecs":[{"uri":"=$googlemirror;?>maps.google.com/maps/api/js","ssl":null,"key":{"string":"key"},"version":{"string":"v"},"deferred":true,"params":{"callback":{"string":"callback"},"language":{"string":"hl"}},"pattern":"^(3|3..*)$"}]},"annotations_v2","wave","orkut",{"name":"annotations","baseSpec":{"uri":"=$googlemirror;?>www.google.com/reviews/scripts/annotations_bootstrap.js","ssl":null,"key":{"string":"key"},"version":{"string":"v"},"deferred":true,"params":{"callback":{"string":"callback"},"language":{"string":"hl"},"country":{"string":"gl"}}}},"language","earth","ads","elements"]});
}?>
google.load("maps", "2.x");
</script>
<script>
cntur = new Array();
$cn2) {?>
cntur[=$cn1?>] = =$cn2?>;
}?>
$(document).ready(function(){
markers = new Array();
uyeid = new Array();
kisiler = new Array();
markerwindow = new Array();
img = new Array();
var accuracyToZoomLevel = [
1, // 0 - Unknown location
5, // 1 - Country
6, // 2 - Region (state, province, prefecture, etc.)
8, // 3 - Sub-region (county, municipality, etc.)
11, // 4 - Town (city, village)
13, // 5 - Post code (zip code)
15, // 6 - Street
16, // 7 - Intersection
17, // 8 - Address
17 // 9 - Premise
];
bgwinerkek = new Image();
bgwinerkek.src = "./images/mapwinerkek.png";
bgwinkiz = new Image();
bgwinkiz.src = "./images/mapwinkiz.png";
var map = new GMap2(document.getElementById("map"));
map.addControl(new google.maps.LargeMapControl());
map.addControl(new google.maps.MapTypeControl());
map.enableContinuousZoom();
map.enableScrollWheelZoom();
if(isdefined(google.loader.ClientLocation)) {
centerle = new google.maps.LatLng(
google.loader.ClientLocation.latitude,
google.loader.ClientLocation.longitude
)
map.setCenter(
centerle, 9
);
} else {
centerle = new google.maps.LatLng(
39.095962936305476,
35.33203125
)
map.setCenter(
centerle, 8
);
}
var geocoder = new GClientGeocoder();
var baseIcon = new GIcon();
baseIcon.iconSize = new GSize(20, 34);
// baseIcon.shadow = "";
baseIcon.iconAnchor = new GPoint(20, 34);
$('#haritasifirla').click(function() {
map.clearOverlays();
kisiler = new Array();
});
$('#haritaara').click(function() {
map.clearOverlays();
kisiler = new Array();
if($('#m_sehir').val() != "") {
geocode($('#m_sehir').val());
} else {
map.setCenter( centerle, 9 );
}
});
function isdefined( variable)
{
return (typeof(window[variable]) == "undefined")? false: true;
}
function geocodeComplete(result) {
if (result.Status.code != 200) {
alert('Could not geocode "' + result.name + '"');
return;
}
var placemark = result.Placemark[0]; // Only use first result
var accuracy = placemark.AddressDetails.Accuracy;
var zoomLevel = accuracyToZoomLevel[accuracy] || 1;
var lon = placemark.Point.coordinates[0];
var lat = placemark.Point.coordinates[1];
map.setCenter(new google.maps.LatLng(lat, lon), zoomLevel);
}
function geocode(location) {
geocoder.getLocations(location, geocodeComplete);
}
function cubukekle() {
// map.clearOverlays();
var bounds = map.getBounds();
var southWest = bounds.getSouthWest();
var southEast = bounds.getSouthWest();
var northEast = bounds.getNorthEast();
var json_uri = "uyearamajson.php?coorx1="+northEast.lat()+"&coorx2="+southWest.lat()+"&coory1="+northEast.lng()+"&coory2="+southWest.lng();
if($('#m_yas1').val() != "") {
var json_uri = json_uri + "&yas1="+$('#m_yas1').val();
}
if($('#m_yas2').val() != "") {
var json_uri = json_uri + "&yas2="+$('#m_yas2').val();
}
if($('#m_uname').val() != "") {
var json_uri = json_uri + "&uname="+$('#m_uname').val();
}
if($('#m_online').val() != "") {
var json_uri = json_uri + "&online="+$('#m_online').val();
}
if($('#m_cinsiyet').val() != "") {
var json_uri = json_uri + "&cinsiyet="+$('#m_cinsiyet').val();
}
if($('#m_fotograf').val() != "") {
var json_uri = json_uri + "&fotograf="+$('#m_fotograf').val();
}
$('#jdebug').html(json_uri);
$.ajax({
url: json_uri,
dataType: 'json',
success: function(JSON) {
$.each(JSON, function(no, u){
if(kisiler[u.id] == undefined) {
var letteredIcon = new GIcon(baseIcon);
if(cntur[u.cinsiyet] == "1") {
letteredIcon.image = "=$anaurl?>/images/erkek.png";
} else if (cntur[u.cinsiyet] == "2") {
letteredIcon.image = "=$anaurl?>/images/kiz.png";
} else if (cntur[u.cinsiyet] == "3") {
letteredIcon.image = "=$anaurl?>/images/grup.png";
}
markerOptions = { icon: letteredIcon,draggable: false };
var point = new GLatLng(u.coorx,u.coory);
markerwindow[no] = ''+u.user+''+u.yas+' yaşında'+u.sehir+''+(u.ilce != "" ? '/ '+ u.ilce : '' )+'';
uyeid[no] = u.id;
var markerOffset = map.fromLatLngToContainerPixel(point);
img[no] = new Image();
img[no].src = u.resim;
marker = new GMarker(point,markerOptions);
map.addOverlay(marker);
markers[no] = marker;
kisiler[u.id] = true;
}
});
$(markers).each(function(i,marker){
GEvent.addListener(marker, "mouseover", function(){
$("#messaged").html(markerwindow[i]);
coord = marker.getLatLng();
var markerOffset = map.fromLatLngToContainerPixel(coord);
arv = ($(window).width()-986)/2;
arv = arv - 96.5;
$("#messaged").show().css({ top:markerOffset.y+106, left:markerOffset.x+arv });
});
GEvent.addListener(marker, "mouseout", function(){
$("#messaged").hide();
});
GEvent.addListener(marker, "click", function() {
location.href= "kisi.php?id="+uyeid[i];
});
});
}
});
}
GEvent.addListener(map,"moveend", function() {
cubukekle();
});
cubukekle();
});
</script>
}
}
?>
}?>
}?>