Location: PHPKode > projects > AppForMap > appformap/includes/dynamic_js.php
<script>
document.theForm.tool.value="x";
var flag=<?php if (isset($flag)) echo $flag.";";elseif (!isset($flag)) echo "1;"; ?>
var tab=<?php if (isset($tab)) echo "'".$tab."';";elseif (!isset($tab)) echo "'layer';"; ?>
if (!isSimple) {
	syn(tab,1);
	syn(flag,0);
}
function mainTabsOff()
{
	document.getElementById("1").style.display="none";
	document.getElementById("2").style.display="none";
	document.getElementById("3").style.display="none";
	document.getElementById("4").style.display="none";
	document.getElementById("5").style.display="none";
	document.getElementById("6").style.display="none";
	<? if ($mainTabStatus[1]==true) echo "document.getElementById('tab1').className='tab-button-blur';";?>
	<? if ($mainTabStatus[2]==true) echo "document.getElementById('tab2').className='tab-button-blur';";?>
	<? if ($mainTabStatus[3]==true) echo "document.getElementById('tab3').className='tab-button-blur';";?>
	<? if ($mainTabStatus[4]==true) echo "document.getElementById('tab4').className='tab-button-blur';";?>
	<? if ($mainTabStatus[5]==true) echo "document.getElementById('tab5').className='tab-button-blur';";?>
	<? if ($mainTabStatus[6]==true) echo "document.getElementById('tab6').className='tab-button-blur';";?>
}
function secondaryTabsOff()
{
	document.getElementById("layer").style.display="none";
	document.getElementById("legend").style.display="none";
	document.getElementById("query").style.display="none";
	document.getElementById("digi").style.display="none";
	document.getElementById("find").style.display="none";
	document.getElementById("ref").style.display="none";
	<? if ($secondaryTabStatus[1]==true) echo "document.getElementById('tablayer').className='tab-button-blur';";?>
	<? if ($secondaryTabStatus[2]==true) echo "document.getElementById('tablegend').className='tab-button-blur';";?>
	<? if ($secondaryTabStatus[3]==true) echo "document.getElementById('tabquery').className='tab-button-blur';";?>
	<? if ($secondaryTabStatus[4]==true) echo "document.getElementById('tabdigi').className='tab-button-blur';";?>
	<? if ($secondaryTabStatus[5]==true) echo "document.getElementById('tabfind').className='tab-button-blur';";?>
	<? if ($secondaryTabStatus[6]==true) echo "document.getElementById('tabref').className='tab-button-blur';";?>
}
function syn(mode,w)
{
	if (w==0) mainTabsOff();
	else if (w==1) secondaryTabsOff()
	document.getElementById(mode).style.display="inline";
	el="tab"+mode;
	if (mode!="query" && mode!="digi") document.getElementById(el).className="tab-button"; // exceptions for digi and query
	if (w==0) document.theForm.flag.value=mode;
	else if (w==1) document.theForm.tab.value=mode; // exceptions for digi and query
}


var jg_doc = new jsGraphics("draw");
var jg_doc_rectangle = new jsGraphics("drawRec");
<?php
if ($postgisObject -> editArray)
foreach ($postgisObject -> editArray as $value) {
	echo $value;
}; ?>
SET_DHTML(CURSOR_MOVE,'');
var tool;
document.getElementById("<?php if (!$tool) $tool='zoomin'; echo $tool; ?>").className = "pressed";
<?php echo $tool; ?>();
removeDiv();//This is for now needed
var pointArrayQuery="<? echo $pointArrayQuery; ?>";
var pointArrayRegen="<? echo $pointArrayRegen; ?>";
var jsGeomType="<? echo $jsGeomType; ?>";
if (pointArrayQuery!='' && pointArrayQuery!='rectangle' && (getQueryTool() != "point" && getQueryTool() != "rectangle" && getQueryTool() != "feature")) regenerateGeometry(pointArrayQuery);
if (pointArrayRegen!='') regenerateGeometry(pointArrayRegen);
if (editArray.length>0 && document.theForm.operation[1].checked) featureEdit(editArray,editKey,editShapeId,'<? echo $pg_digi_layer; ?>',geoType);
document.theForm.clickX.value="<? echo $map_x;?>";
document.theForm.clickY.value="<? echo $map_y;?>";
document.theForm.centerX.value="<? echo $controlObject->getCenterX();?>";
document.theForm.centerY.value="<? echo $controlObject->getCenterY();?>";
document.theForm.scale.value="<? echo round($controlObject->getScale(),0);?>";
function printVersion()
{
	document.theForm.action="print.phtml";
	document.theForm.target="blank";
	document.theForm.submit();
	document.theForm.target="";
	document.theForm.action="<? echo $_SERVER['PHP_SELF']; ?>";
}
function pdfVersion()
{
	<?php $controlObject->calculateCenter();?>
	document.theForm.action="pdfprint.phtml";
	
	document.theForm.target="blank";
	document.theForm.submit();
	document.theForm.target="";
	document.theForm.action="<? echo $_SERVER['PHP_SELF']; ?>";
}
</script>
Return current item: AppForMap