business.html

<?php

    $biz = ROF\Business\Config::getLoader()::getBusinessByName(@$_GET['biz']);
    if ($biz===NULL){
      $title = "No Business Found";
    } else {
      $title = $biz->getName();
    }
?>
<?php
    if ($biz===NULL){
      (new \ROF\MessageForm("No Business Found", "No business was found with the short name \"".@$_GET['biz']."\"",
                           array("Home" => "/",
                            "Businesses" => "/businesses.php"
                                )
      ))->display();
      return;
    }
  ?> 
<div id="biz-container" itemscope itemtype="<?=$biz->getSchemaType()?>">
  
  <nav>
    <ol id="breadcrumbs" itemscope itemtype="http://schema.org/BreadcrumbList">
      <?php
      $i=1;
      $c = count($biz->getBreadcrumbs());
      foreach ($biz->getBreadcrumbs() as $name => $url){
      ?>
        <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
          <a itemprop="item" href="<?=$url?>"><span itemprop="name"><?=$name?></span></a>
          <meta itemprop="position" content="<?=$i?>" />
          <? if ($c!=$i)echo '-&gt;'; ?>
        </li>
      <?php
        $i++;
      }
      ?>
    </ol>
    <ul id="tags-list" itemprop="keywords">
       <?php
      foreach ($biz->getTags() as $name => $tag){
      ?>
        <li>
          <a class="tag" rel="tag" href="<?=$tag->getUrl()?>">
            <?=$name?>
          </a>
        </li>
      <?php
      }
      ?>
    </ul>
  <br>
  </nav>
    <section id="biz-header-area">
    <div id="biz-header">
      <img itemprop="image" src="<?=$biz->getPrimaryImageUrl()?>" alt="<?=$biz->getName()?>"/>
      <h1 class="image_title" itemprop="legalName">
        <?=$biz->getName()?>
      </h1>
      <p itemprop="description" class="image_description">
        <?=$biz->getBlurb()?>
      </p>
    </div>
    <br>
    <a class="link_button" href="<?=\ROF\Business::getChangeListingUrl()?>">Suggest a Change</a> 
    <a class="link_button" href="<?=\ROF\Business::getNewBizUrl()?>">Add a Business</a>
    <p itemprop="description">
      <?=$biz->getDescription()?>
    </p>
    </section>
  <div id="biz-sidebar">
    <section style="background:#E4E4E4;" itemscope itemtype="http://schema.org/PostalAddress" itemprop="address">
      <h2>
        <?=$biz->getLocationName();?>
      </h2>
      <span itemprop="streetAddress"><?=$biz->getStreetAddress()?></span>
      <span itemprop="addressLocality"><?=$biz->getCity()?></span>,
      <span itemprop="addressRegion"><?=$biz->getState()?></span><br>
      <a href="<?=$biz->getLocationsUrl()?>">All <?=$biz->getCompanyName()?> Locations</a>
    </section>
  <section style="background:#F4F4F4;">
      <h1>
        Hours
      </h1>
      <? foreach ($biz->getHoursList() as $display => $schema){ ?>
      <time itemprop="openingHours" datetime="<?=$schema?>"><?=$display?></time><br>
      <? } ?>
    </section>
    <section style="background:#EAEAEA;">
    <h2>
      Contact
    </h2>
      <span itemprop="telephone"><?=$biz->getPhoneNumber()?></span>
      <br>
      <span itemprop="email"><a href="mailto:<?=$biz->getEmail()?>"><?=$biz->getEmail()?></a></span>
      <br>
      <a href="<?=$biz->getContactUrl()?>">Contact Site</a>
    </section>
    <section style="background:#FAFAFA;">
      <h2>Links</h2>
      <div class="links">
        <a href="<?=$biz->getOfficialUrl()?>" itemprop="sameAs"><img src="/img/official_site.png" alt="OF "/>Official Site</a>
        <br>
        <a href="<?=$biz->getFacebookUrl()?>" itemprop="sameAs"><img src="/img/facebook_site.png" alt="FB " />Facebook</a>
        <br>
        <a href="<?=$biz->getMenuUrl()?>"><img src="/img/menu_site.png" alt="MU " />Menu</a>
        <br>
        <a href="<?=$biz->getYelpUrl()?>"><img src="/img/yelp_site.png" alt="YP " />Yelp</a>
      </div>
    </section>
  </div>
    <section>
      <h2>Images</h2>
      <div class="photo_rolodex">
        <span class="jsclass jsclass-left-arrow">&lt;</span>
        <? $i=0; foreach ($biz->getImages() as $url => $alt){  ?>
        <span data-position="<?=$i?>" class="wrapper <?= $i===0?'display':'hidden'?>">
          <div class="title">
            <h3><?=$alt?></h3>
          </div>
          <img src="<?=$url?>" alt="<?=$alt?>" />
        </span>
        <? $i++; } ?>
        <span class="jsclass jsclass-right-arrow">&gt;</span>
      </div>
    </section>
</div>