{* header *}
{if $obj_found}
{auth->checkAuth assign=check}
  {if $check}
    {auth->getAuthData name=membercd assign=membercd}
    {header->getHeaderData membercd=$membercd assign=headerdata}
  {else}
    {header->getHeaderData assign=headerdata}
  {/if}
{/if}

{* URL *}
{if $smarty.get.action}
  {assign var="actionName" value=$smarty.get.action}
{elseif $smarty.post.action}
  {assign var="actionName" value=$smarty.post.action}
{else}
  {assign var="actionName" value=$smarty.const.DEFAULT_ACTION}
{/if}

{* タイトル名 *}
{if $action.title}
  {assign var="pageTitle" value=$action.title}
{else}
  {assign var="pageTitle" value=$headerdata.systeminfo.shopnm}
{/if}

{* ページ名 *}
{if $action.pagename}
  {assign var="pageName" value="`$action.pagename`："}
{else}
  {assign var="pageName" value=''}
{/if}

{* bodyタグのid *}
{if $action.bodyid}
  {assign var="bodyid" value=$action.bodyid}
{else}
  {assign var="bodyid" value='layout1'}
{/if}


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">
<head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
{if !empty($headerdata.systeminfo.meta_keywords)}
  <meta name="keywords" content="{$headerdata.systeminfo.meta_keywords}" />
{/if}
{if !empty($headerdata.systeminfo.meta_description)}
  <meta name="description" content="{$headerdata.systeminfo.meta_description}" />
{/if}
  <title>{$pageName}{$pageTitle}</title>
  <link rel="stylesheet" type="text/css" href="css/{$headerdata.systeminfo.design_css}import.css" media="screen,tv,print" />
{if $actionName=="general_portal"}
  <link rel="alternate" type="application/rss+xml" title="{$headerdata.systeminfo.shopnm} お知らせ一覧" href="{$smarty.const.URL_ROOT}{$dirName}/?action=rss&contents=news"/>
  <link rel="alternate" type="application/rss+xml" title="{$headerdata.systeminfo.shopnm} 新着商品一覧" href="{$smarty.const.URL_ROOT}{$dirName}/?action=rss&contents=list"/>
  <link rel="alternate" type="application/rss+xml" title="{$headerdata.systeminfo.shopnm} 新規商品一覧" href="{$smarty.const.URL_ROOT}{$dirName}/?action=rss&contents=newitem"/>
{elseif $actionName=="general_itemview_itemlist"}
  <link rel="alternate" type="application/rss+xml" title="{$headerdata.systeminfo.shopnm} 新着商品一覧" href="{$smarty.const.URL_ROOT}{$dirName}/?action=rss&contents=list"/>
  <link rel="alternate" type="application/rss+xml" title="{$headerdata.systeminfo.shopnm} 新規商品一覧" href="{$smarty.const.URL_ROOT}{$dirName}/?action=rss&contents=newitem"/>
{/if}

  <script src="./js/prototype.js" type="text/javascript"></script>
  <script src="./js/index_utils.js" type="text/javascript"></script>
</head>

<body id="{$bodyid}">
<a name="top" id="top"></a>
<div id="wrapper">
<div id="container">

<!-- ↓ヘッダ -->
<div id="header">
<div class="shopname">
<h1><a href="{$smarty.const.URL_ROOT}{$dirName}/">
  <img src="{$headerdata.systemimg.logo}" alt="{$headerdata.systeminfo.shopnm}" /></a></h1>
<h2>{$headerdata.systeminfo.shopcontent}</h2>
</div>
<div class="headnavi">
<ul>

{if $check}
  <li class="first">いらっしゃいませ！
    <a href="{$smarty.const.URL_ROOT}{$dirName}/?action=customer_mypage">
    {$headerdata.auth.nickname|escape}</a>様</li>
  <li class="cart"><a href="{$smarty.const.SSL_URL_ROOT}{$dirName}/?action=customer_itembuy_cart">
      カート{if $headerdata.cart.totalcount != 0}{$headerdata.cart.totalcount|escape}本{$headerdata.cart.totalprice|number_format}円{/if}</a></li>
  <li><a href="{$smarty.const.SSL_URL_ROOT}{$dirName}/?action=user_logout">
      ログアウト</a></li>
{else}
  <li class="first"><a href="{$smarty.const.SSL_URL_ROOT}{$dirName}/?action=customer_mypage_member_insert_form">会員登録はこちら</a></li>
  <li class="cart"><a href="{$smarty.const.SSL_URL_ROOT}{$dirName}/?action=customer_itembuy_cart">
    カート{if $headerdata.cart.totalcount != 0}{$headerdata.cart.totalcount|escape}本{$headerdata.cart.totalprice|number_format}円{/if}</a></li>
  <li><a href="{$smarty.const.SSL_URL_ROOT}{$dirName}/?action=user_login">ログイン</a></li>
{/if}
</ul>

<form action="{$smarty.const.URL_ROOT}{$dirName}/">
<input type="hidden" name="action" value="general_itemview_itemlist" />
<input class="search" name="q" type="text" size="20" value="{$action.q}" />
<input type="submit" class="submit3" value="商品検索" />
</form>

</div>
</div>
<!--↑ヘッダ-->


<!--↓ナビゲーション-->
<div id="navi">
<ul>
{if $actionName == "general_portal"}
<li class='on'>
  <a href="{$smarty.const.URL_ROOT}{$dirName}/">トップ</a></li>
{else}
<li>
  <a href="{$smarty.const.URL_ROOT}{$dirName}/">トップ</a></li>
{/if}
{if $actionName == "general_itemview_itemlist"}
<li class='on'>
  <a href="{$smarty.const.URL_ROOT}{$dirName}/?action=general_itemview_itemlist">商品一覧</a></li>
{else}
<li>
  <a href="{$smarty.const.URL_ROOT}{$dirName}/?action=general_itemview_itemlist">商品一覧</a></li>
{/if}
{if $actionName == "mypage" || $actionName == "customer_mypage"}
<li class='on'>
{if $check}
  <a href="{$smarty.const.URL_ROOT}{$dirName}/?action=customer_mypage">マイページ</a>
{else}
  <a href="{$smarty.const.URL_ROOT}{$dirName}/?action=mypage&v=customer">マイページ</a>
{/if}
{else}
<li>
{if $check}
  <a href="{$smarty.const.URL_ROOT}{$dirName}/?action=customer_mypage">マイページ</a>
{else}
  <a href="{$smarty.const.URL_ROOT}{$dirName}/?action=mypage&v=customer">マイページ</a>
{/if}
</li>
{/if}
{if $actionName == "general_itemview_itemsearch"}
<li class='on'>
  <a href="{$smarty.const.URL_ROOT}{$dirName}/?action=general_itemview_itemsearch">詳細検索</a></li>
{else}
<li>
  <a href="{$smarty.const.URL_ROOT}{$dirName}/?action=general_itemview_itemsearch">詳細検索</a></li>
{/if}
{if $actionName == "help" && $action.pageid =="pey"}
<li class='on'>
  <a href="{$smarty.const.URL_ROOT}{$dirName}/?action=help&pageid=pey">お支払い方法・送料</a></li>
{else}
<li>
  <a href="{$smarty.const.URL_ROOT}{$dirName}/?action=help&pageid=pey">お支払い方法・送料</a></li>
{/if}
{if $actionName == "help" && $action.pageid =="company"}
<li class='on'>
  <a href="{$smarty.const.URL_ROOT}{$dirName}/company.html">会社概要</a></li>
{else}
<li>
  <a href="{$smarty.const.URL_ROOT}{$dirName}/company.html">会社概要</a></li>
{/if}
{if $actionName == "help_mail_form"}
<li class='on'>
  <a href="{$smarty.const.SSL_URL_ROOT}{$dirName}/?action=help_mail_form&mail_dev=3">お問合せ</a></li>
{else}
<li>
  <a href="{$smarty.const.SSL_URL_ROOT}{$dirName}/?action=help_mail_form&mail_dev=3">お問合せ</a></li>
{/if}
</ul>
</div>
<!--↑ナビゲーション-->

