<commit_before><?
$page->title("Map: Details")
     ->navbar_image('map')
     ->header("Details");

function tabs() {
  $html = array();
  foreach(array("Map", "Photo", "What's Here") as $aTab) {
    if($url = selfURL($aTab)) {
      if(tab() == $aTab) {
        $html[] = '<span class="active">' . $aTab . '</span>';
      } else {
        $html[] = "<a href=\"$url\">$aTab</a>";
      }
    }
  }
  return implode("&nbsp;|&nbsp;", $html);
}

$page->content_begin();
?>

	<div class="shaded">
<? if($snippets) { ?>
                   <p class="foundat"><?=$snippets?> found in:</p>
<? } ?>
		<h2><?=$building_title?></h2>
		
<? if($tab == "Map") { ?>
  		   <p class="smallprint"><?=$data['street']?></p>
<? } ?>

		<div id="tabs">
		<?=$tabs_html?>
		</div>

	</div> <!-- class="shaded" -->

<? 
switch ($tab) {
case 'Map': ?>

	<div class="tabbody centered">
		<a name="scrolldown"> </a>
		<img id="mapimage" width="<?=$width?>" height="<?=$height?>" alt="Map" src="<?=imageURL($width, $height, $fontsize)?>" lowsrc="../../images/touch/loading3.gif" /> 
		<div class="zoomlinks">
			Zoom: <a href="<?=zoomInURL()?>">In</a>&nbsp;|&nbsp;<a href="<?=zoomOutURL()?>">Out</a>
			<br/>
			Scroll: <a href="<?=scrollURL('N')?>">N</a>&nbsp;|&nbsp;<a href="<?=scrollURL('S')?>">S</a>&nbsp;|&nbsp;<a href="<?=scrollURL('E')?>">E</a>&nbsp;|&nbsp;<a href="<?=scrollURL('W')?>">W</a><br/>
		</div>

<?
  break;
case "Photo": ?>

	<div class="tabbody centered">
		<p><img src="<?=$photoURL?>" alt="Photo" width="<?=$photoWidth?>" class="photo" lowsrc="../Touch/images/loading3.gif"<? if ($width < 250) { ?> width="<?=$width?>"<? } ?> /></p>
		<!--<p class="legend">View from <?=$data['viewangle']?><? if ($data['architect']) { ?><br/>Architect: <?=$data['architect']?><? } ?></p>-->

<?
  break;
case "What's Here": ?>

	<div class="tabbody">
		<ul>
<?     foreach($whats_here as $item) { ?>
			<li><?=$item?></li>
<?     } ?>
		</ul>
<?
  break;
}
?>

	</div>

<ul class="nav">
<li><a href="http://maps.google.com/maps?q=<?=$displayDetails['Address']?>,<?=$displayDetails['City']?>+<?=$displayDetails['State']?>" class="external">Google Map</a></li>
</ul>


<? $page->content_end(); ?><commit_msg>Fix for [#324], looks like the Touch map template wasn't updated after some naming conventions had been changed.<commit_after><?
$page->title("Map: Details")
     ->navbar_image('map')
     ->header("Details");

function tabs() {
  $html = array();
  foreach(array("Map", "Photo", "What's Here") as $aTab) {
    if($url = selfURL($aTab)) {
      if(tab() == $aTab) {
        $html[] = '<span class="active">' . $aTab . '</span>';
      } else {
        $html[] = "<a href=\"$url\">$aTab</a>";
      }
    }
  }
  return implode("&nbsp;|&nbsp;", $html);
}

$page->content_begin();
?>

	<div class="shaded">
		<h2><?=$name?></h2>
		<p class="smallprint"><?=$displayDetails['Address']?></p>

		<div id="tabs">
		<?=$tabs_html?>
		</div>

	</div> <!-- class="shaded" -->

<? 
switch ($tab) {
case 'Map': ?>

	<div class="tabbody centered">
		<a name="scrolldown"> </a>
		<img id="mapimage" width="<?=$imageWidth?>" height="<?=$imageHeight?>" alt="Map" src="<?=$imageUrl?>" lowsrc="../../images/touch/loading3.gif" /> 
		<div class="zoomlinks">
			Zoom: <a href="<?=$zoomInUrl?>">In</a>&nbsp;|&nbsp;<a href="<?=$zoomOutUrl?>">Out</a>
			<br/>
			Scroll: <a href="<?=$scrollNorth?>">N</a>&nbsp;|&nbsp;<a href="<?=$scrollSouth?>">S</a>&nbsp;|&nbsp;<a href="<?=$scrollEast?>">E</a>&nbsp;|&nbsp;<a href="<?=$scrollWest?>">W</a><br/>
		</div>
    </div>
<?
  break;
case "Photo": ?>

	<div class="tabbody centered">
		<p><img src="<?=$photoURL?>" alt="Photo" width="<?=$photoWidth?>" class="photo" lowsrc="../Touch/images/loading3.gif"<? if ($photoWidth < 250) { ?> width="<?=$photoWidth?>"<? } ?> /></p>
    </div>
<?
  break;
case "Details": ?>

	<div class="tabbody">
		<ul>
            <? foreach($displayDetails as $field => $value) { ?>
                <li><?=$field?>: <?=$value?></li>
            <? } ?>
		</ul>
	</div>
<?
  break;
}
?>


<ul class="nav">
<li><a href="http://maps.google.com/maps?q=<?=$displayDetails['Address']?>,<?=$displayDetails['City']?>+<?=$displayDetails['State']?>" class="external">Google Map</a></li>
</ul>


<? $page->content_end(); ?>
{'fraction_non_alphanumeric': 0.3096470588235294, 'fraction_numerical': 0.004, 'mean_word_length': 4.165249088699879, 'pattern_counts': {'":': 4, '<': 179, '<?xml version=': 0, '>': 188, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6413804', 'n_tokens_mistral': 1675, 'n_tokens_neox': 1606, 'n_words': 264}