<?php

$ul = array(
  array(
    'uri'  => '/index/lpo/id/' . $this->lpo->id,
    'text' => '<img src="/image/graph.png" />&nbsp;今日',
    'ul'   => array(),
    'attr' => (
      $this->chart == 'hourly' && $this->date == date('Y-m-d') ? array(
        'class' => array('selected')
      ) : array(array())
    ),
  ),
  array(
    'uri'  => '/index/lpo/chart/hourly/date/' . $this->yesterday . '/id/' . $this->lpo->id,
    'text' => '<img src="/image/graph.png" />&nbsp;昨日',
    'ul'   => array(),
    'attr' => (
      $this->chart == 'hourly' && $this->date == $this->yesterday ? array(
        'class' => array('selected')
      ) : array(array())
    ),
  ),
  array(
    'uri'  => '/index/lpo/chart/daily/id/' . $this->lpo->id,
    'text' => '<img src="/image/graph.png" />&nbsp;一ヶ月間',
    'ul'   => array(),
    'attr' => (
      $this->chart == 'daily' ? array(
        'class' => array('selected')
      ) : array(array())
    ),
  ),
  array(
    'uri'  => '/index/lpo/chart/monthly/id/' . $this->lpo->id,
    'text' => '<img src="/image/graph.png" />&nbsp;三ヶ月間',
    'ul'   => array(),
    'attr' => (
      $this->chart == 'monthly' ? array(
        'class' => array('selected')
      ) : array(array())
    ),
  ),
  array(
    'uri'  => '/index/lpo-update/id/' . $this->lpo->id,
    'text' => '<img src="/image/preference.png" />&nbsp;設定',
    'ul'   => array(),
    'attr' => (
      $this->action == 'lpo-update' ? array(
        'class' => array('selected')
      ) : array(array())
    ),
  ),
  array(
    'uri'  => '/index/lpo-delete/id/' . $this->lpo->id,
    'text' => '<img src="/image/delete.png" />&nbsp;削除',
    'ul'   => array(),
    'attr' => (
      $this->action == 'lpo-delete' ? array(
        'class' => array('selected')
      ) : array(array())
    ),
  ),
  array(
    'uri'  => '/index/lpo-condition-create/id/' . $this->lpo->id,
    'text' => '<img src="/image/create.png" />&nbsp;表示条件登録',
    'ul'   => array(),
    'attr' => (
      $this->action == 'lpo-condition-create' ? array(
        'class' => array('selected')
      ) : array(array())
    ),
  ),
);

?>
<div id="menu_sub">
  <ul><?php echo $this->partialLoop('index/menu-li.phtml', $ul); ?></ul>
</div>
<?php if($this->lpo && $this->lpo->status != 'active'): ?>
  <div id="inactive"><p>このLPO ページは設定が無効になっているためコンテンツは表示されません。<br />設定を有効にするにはメニューの<a href="/index/lpo-update/id/<?php echo $this->lpo->id ?>">設定</a>から有効をチェックして登録ボタンをクリックして下さい。</p></div>
<?php endif;
