select cell


/**
* This code is used to select a world cell.
*/

header("Pragma: no-cache");
header("Expires: now");
header("Cache-Control: no-cache");

include "misc_util.php";
include "db_conn.php";

if($_GET["FORMELEMENT"] != "")
$formelement=$_GET["FORMELEMENT"];
else
$formelement="CELLID";

$r=$db->Execute("SELECT MAX(X), MAX(Y) FROM MAP_GRID");
$w=$r->fields[0]+1;
$h=$r->fields[1]+1;
$r->Close();

echo "\n";
echo "\n";
echo "\n";
echo "Add map link\n";
echo "\n";
echo "\n";
echo "\n";
$s=stat("images/fullmap.png");
echo "\n";
echo "\n";
$r=$db->Execute("SELECT ID,X,Y FROM MAP_GRID");
while(!$r->EOF)
{
$px=$r->fields[1]+0;
$py=$r->fields[2]+0;
$id=$r->fields[0]+0;

$px+=floor($w/2);
if($px >= $w)
$px-=$w;
$py+=floor($h/2);
if($py >= $h)
$py-=$h;

$a=round($px*495/20);
$b=round($py*495/20);
$c=round(($px+1)*495/20-1);
$d=round(($py+1)*495/20-1);

echo "\n";
$r->MoveNext();
}
echo "
\n";
echo "\n";
echo "\n";

$db->Close();
?>

Wyszukiwarka

Podobne podstrony:
Functional Origins of Religious Concepts Ontological and Strategic Selection in Evolved Minds
function socket select
selectnpc
Coherence Selection Phase Cycling and Gradient Pulses
selectors
select color
select
Acronis OS Selector 5
selectFolder
Acronis OS Selector 8
Guide to Selection and Use of Disinfectants
select
function mysql select db
select?min

więcej podobnych podstron