';
$compas_center="not";
$compas="not";
}
if ($compas=="E") {
//echo $posx."
".$posy;
$query = "SELECT `ID`,`X`,`Y`,`PHOTO`,`NAME`,`RAITING`,`COMMENTS`,`APP_TXT` FROM `plovdiv` WHERE `APP`='1'";
$result = mysql_query($query) or die("Query failed");
$posxx=1000;
while($line = mysql_fetch_assoc($result)) {
//echo $posx."|".$posy."|".$posxx."
";
if ($line["X"]>$posx) {
if ($line["X"]<$posxx) {
$posx_new=$line["X"];
$posxx=$line["X"];
$posy=$line["Y"];
}
}
}
mysql_close($link);
$posx=$posx_new;
echo 'onload="scrollWindow('.(($posx)*$k-360).','.(($posy)*$k-300).')">';
}
if ($compas=="W") {
//echo $posx."
".$posy;
$query = "SELECT `ID`,`X`,`Y`,`PHOTO`,`NAME`,`RAITING`,`COMMENTS`,`APP_TXT` FROM `plovdiv` WHERE `APP`='1'";
$result = mysql_query($query) or die("Query failed");
$posxx=0;
while($line = mysql_fetch_assoc($result)) {
//echo $posx."|".$posy."|".$posxx."
";
if ($line["X"]<$posx) {
if ($line["X"]>$posxx) {
$posx_new=$line["X"];
$posxx=$line["X"];
$posy=$line["Y"];
}
}
}
mysql_close($link);
$posx=$posx_new;
echo 'onload="scrollWindow('.(($posx)*$k-360).','.(($posy)*$k-300).')">';
}
if ($compas=="N") {
//echo $posx."
".$posy;
$query = "SELECT `ID`,`X`,`Y`,`PHOTO`,`NAME`,`RAITING`,`COMMENTS`,`APP_TXT` FROM `plovdiv` WHERE `APP`='1'";
$result = mysql_query($query) or die("Query failed");
$posyy=0;
while($line = mysql_fetch_assoc($result)) {
//echo $posx."|".$posy."|".$posxx."
";
if ($line["Y"]<$posy) {
if ($line["Y"]>$posyy) {
$posy_new=$line["Y"];
$posyy=$line["Y"];
$posx=$line["X"];
}
}
}
mysql_close($link);
$posy=$posy_new;
echo 'onload="scrollWindow('.(($posx)*$k-360).','.(($posy)*$k-300).')">';
}
if ($compas=="S") {
//echo $posx."
".$posy;
$query = "SELECT `ID`,`X`,`Y`,`PHOTO`,`NAME`,`RAITING`,`COMMENTS`,`APP_TXT` FROM `plovdiv` WHERE `APP`='1'";
$result = mysql_query($query) or die("Query failed");
$posyy=1000;
while($line = mysql_fetch_assoc($result)) {
//echo $posx."|".$posy."|".$posxx."
";
if ($line["Y"]>$posy) {
if ($line["Y"]<$posyy) {
$posy_new=$line["Y"];
$posyy=$line["Y"];
$posx=$line["X"];
}
}
}
mysql_close($link);
$posy=$posy_new;
echo 'onload="scrollWindow('.(($posx)*$k-360).','.(($posy)*$k-300).'); thumbs.scr=photo_thumb.php?px=xxx&py=xxx">';
}
?>