<?php

$ul = array(
  array(
    'uri'  => '/index/lpo-condition/id/' . $this->condition->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-condition/chart/hourly/date/' . $this->yesterday . '/id/' . $this->condition->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-condition/chart/daily/id/' . $this->condition->id,
    'text' => '<img src="/image/graph.png" />&nbsp;一ヶ月間',
    'ul'   => array(),
    'ul'   => array(),
    'attr' => (
      $this->chart == 'daily' ? array(
        'class' => array('selected')
      ) : array(array())
    ),
  ),
  array(
    'uri'  => '/index/lpo-condition/chart/monthly/id/' . $this->condition->id,
    'text' => '<img src="/image/graph.png" />&nbsp;三ヶ月間',
    'ul'   => array(),
    'attr' => (
      $this->chart == 'monthly' ? array(
        'class' => array('selected')
      ) : array(array())
    ),
  ),
  array(
    'uri'  => '/index/lpo-condition-update/id/' . $this->condition->id,
    'text' => '<img src="/image/preference.png" />&nbsp;設定',
    'ul'   => array(),
    'attr' => (
      $this->action == 'lpo-condition-update' ? array(
        'class' => array('selected')
      ) : array(array())
    ),
  ),
  array(
    'uri'  => '/index/lpo-condition-delete/id/' . $this->condition->id,
    'text' => '<img src="/image/delete.png" />&nbsp;削除',
    'ul'   => array(),
    'attr' => (
      $this->action == 'lpo-condition-delete' ? array(
        'class' => array('selected')
      ) : array(array())
    ),
  ),
  array(
    'uri'  => '/index/lpo-content-create/id/' . $this->condition->id,
    'text' => '<img src="/image/create.png" />&nbsp;LPO コンテンツ登録',
    'ul'   => array(),
    'attr' => (
      $this->action == 'lpo-content-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->condition && $this->condition->status != 'active'): ?>
  <div id="inactive"><p>この表示条件は設定が無効になっているためコンテンツは表示されません。<br />設定を有効にするにはメニューの<a href="/index/lpo-condition-update/id/<?php echo $this->condition->id ?>">設定</a>から有効をチェックして登録ボタンをクリックして下さい。</p></div>
<?php endif;
