<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
{include file=$HEAD}
<!--tooltip/-->
<link rel="stylesheet" type="text/css" href="../../js/yui/2.5.1/container/assets/container.css">
<script type="text/javascript" src="../../js/yui/2.5.1/yahoo-dom-event/yahoo-dom-event.js"></script> 
<script type="text/javascript" src="../../js/yui/2.5.1/animation/animation-min.js"></script> 
<script type="text/javascript" src="../../js/yui/2.5.1/container/container-min.js"></script>

<script src="../../js/prototype.js" type="text/javascript"></script>
<script src="../../js/scriptaculous.js?load=effects,builder" type="text/javascript"></script>
<script type="text/javascript" src="../../js/lightbox2/js/lightbox.js"></script>
<link href="../../js/lightbox2/css/lightbox.css" rel="stylesheet" type="text/css" media="all">
<script type="text/javascript">
//<![CDATA[
LightboxOptions.fileLoadingImage = "../../js/lightbox2/images/loading.gif";
LightboxOptions.fileBottomNavCloseImage = "../../js/lightbox2/images/closelabel.gif";
//]]>
</script>

{literal}
<style type="text/css">
<!--
#tip01 {
	width: 300px;
}
-->
{/literal}
</style>
<!--/tooltip-->
								

<script type="text/javascript">
//<![CDATA[{literal}
function setPublic(code) {
	if(code!=''&&code>0) {
		document.form.pubcode.value = code;
	}
	document.form.BTNdispflg.value = true;
	document.form.submit();
}
function goEdit(code) {
	//document.form.action = "edit.php?BTNReEdit=1&sidx_code="+code;
	document.form.pubcode.value = code;
	document.form.BTNeditflg.value = true;
	document.form.submit();
}
window.onload = function(){
	new YAHOO.widget.Tooltip("tip01",{
		context:"context1",
		showDelay:0
	}); 
}
{/literal}//]]>
</script>
<body id="pageMenu">
<form  action="index.php" method="post" name="form" id="form">
<!--wrapper/-->
<div id="wrapper">
	{include file=$HEADER}
	<div id="localNaviArea">
		<!--title/-->
		<div id="ttlAreaOuter">
			<div id="ttlArea">
				<h2>メニュー管理</h2>
				<p class="titleInfo"><a href="#" id="context1" title="グローバルメニュー、またはローカルメニューの名称変更、URL変更を行う場合は変更したいメニューの「公開メニューを元に再編集」ボタンをクリックしてください。"><img src="../common-img/ico_help.gif" width="21" height="21" border="0"/></a></p>
			</div>
		</div>
		<!--/title-->
	</div>
	<!--pageBody/-->
	<div id="pageBody">
		<div id="pageBodyInner" class="clearfix">
			<div id="localNavi">
				<input name="BTNeditNew" type="button" id="BTNeditNew" class="bBtnNewGlobalMenu" value=" 新規グローバルメニュー登録 "  onClick="location.href='edit.php'">
			</div>
			<!--エラーコメント/-->
			{foreach from=$ERROR item="msg" name="err"}
			{if $smarty.foreach.err.first}
			<p class="errBox">
				{/if}
				{$msg}<br>
				{if $smarty.foreach.err.last}
			</p>
			{/if}
			{/foreach}
			<!--/エラーコメント-->
			<div id="main1Col">
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td valign="top">
							<!--main/-->
							<div id="mainCol">
								<!-- pager/ -->
								<table>
									<tr>
										<td valign="top">{if $NewBTNDisp}
											<table width="100%" border="0" cellspacing="0" cellpadding="0">
												<tr>
													<td width="50%" align="right">{$Pages}</td>
												</tr>
											</table>
											{else}
											&nbsp;
											{/if}
										</td>
									</tr>
									<!-- /pager -->
								</table>
								
									<table class="contentTable">
										<tr>
											<th colspan="4" class="ct c05">公開中メニュー</th>
											<th rowspan="2" class="ct w8" style="background: #F4F4F4 !important; color:#333 !important;">編集/公開</th>
											<th colspan="5" class="ct c05">編集中メニュー</th>
										</tr>
										<tr>
											<th width="50" class="ct bt">表示順</th>
											<th class="ct bt">グロバールメニュー名称<br>URL</th>
											<th class="ct w6 bt">最終更新日</th>
											<th class="ct w15 bt">テンプレート名称</th>
											<th colspan="2" class="ct bt">グローバルメニュー名称</th>
											<th class="ct bt" style="width: 50px;">ローカル<br>
											メニュー</th>
											<th class="ct w17 bt">テンプレート名</th>
											<th class="w7 ct bt">ページ編集<br>
											担当者</th>
										</tr>
										{foreach from="$list" item="record" name="list"}
										<tr class="{*cycle values="c03,c02"*}">
											<td class="ct" style="padding: 0;">{if $record.sidx_code_tmp==1}
												0
												{else}
												<input type="text" name="order[{$record.sidx_code_tmp}]" value="{$record.sidx_order_tmp}" class="w2" maxlength="3" style="ime-mode:disabled" >
												{/if}</td>
											<td>
{if $record.sidx_code}											
											<table width="100%" border="0" cellspacing="0" cellpadding="0">
												<tr>
													<td width="22" style="border-bottom: none; padding: 3px;">
													{if $record.sidx_menuflg==1}
													<img src="../common-img/ico_show.gif" width="22" height="13" alt="メニュー表示：ON" title="メニュー表示：ON">
													{else}
													<img src="../common-img/ico_hide.gif" width="22" height="13" alt="メニュー表示：OFF" title="メニュー表示：OFF">
													{/if}													</td>
													<td style="border-bottom: none; padding: 0 0 0 5px;">
													<em>{$record.sidx_title|default:"<p class=\"fc04 ct\" style=\"font-weight: normal\">---</p>"}</em><br>{$record.url}
													</td>
													<td width="17" style="border-bottom: none; padding: 0;"><a href="{$record.url}" target="_blank" title="プレビュー"><img src="../common-img/btn_preview.gif" alt="プレビュー" width="17" height="17"></a></td>
												</tr>
											</table>
{else}
											<p class="fc04 ct" style="font-weight: normal">---</p>
{/if}
											</td>
											<td>{if $record.sidx_view==2}
												{$record.sidx_u_date|date_format:"%Y/%m/%d<br>
												%H:%M"}
												{/if}</td>
											<td>{if $record.sidx_view==2}
												{assign var=code value=$record.sidx_tpl_code}
												<table width="100%" border="0" cellspacing="0" cellpadding="0">
													<tr>
{if $record.sidx_tpl_code != $record.sidx_tpl_code_tmp}
														<td width="60" valign="top" class="bn"><a href="../..{$tpllist[$code].thum}" rel="lightbox[skin]" title="{$tpllist[$code].tpl_name}"><img src="../..{$tpllist[$code].thum}" width="60"></a></td>
{/if}
														<td align="left" valign="top" class="bn"><span id="ltooltip{$record.sidx_code_tmp}">{$tpllist[$code].tpl_name}<br><img src="../common-img/ico_help.gif" width="15" border="0"/></span>
<script type="text/javascript">
{literal}
var ltooltip{/literal}{$record.sidx_code_tmp}{literal} = new YAHOO.widget.Tooltip("ltt{/literal}{$record.sidx_code_tmp}{literal}",{
    context:"ltooltip{/literal}{$record.sidx_code_tmp}{literal}",
    text:'<table><tr><td align="right">テンプレートマスタ： </td><td>{/literal}{$tpllist[$code].skin_name}{literal}</td></tr><tr><td align="right">サイドバー編集エリア： </td><td>{/literal}{if $tpllist[$code].skin_side==1}○{else}×{/if}{literal}</td></tr><tr><td align="right">説明： </td><td>{/literal}{$tpllist[$code].skin_type}{literal}</td></tr><tr><td align="right">メモ： </td><td>{/literal}{$tpllist[$code].tpl_summary}{literal}</td></tr><tr><td align="right">パンくず： </td><td>{/literal}{if $tpllist[$code].tpl_pagenavi}○{else}×{/if}{literal}</td></tr></table>'
});
{/literal}
</script>

</td>
													</tr>
												</table>
											{/if}</td>
											<td class="ct" style="padding: 0;">{if $record.sidx_view_tmp==2}
												<input type="button" class="bBtnReedition" value="再編集" name="BTNReEdit" onClick="goEdit({$record.sidx_code_tmp})">
												{else}
												<input type="button" class="bBtnOpen" value="公開" name="BTNdisp2" onClick="setPublic({$record.sidx_code_tmp})">
												{/if}</td>
											<td>
{if $record.sidx_view_tmp==2}<span class="fc03"><em>公開中</em></span>
{else}
											<table width="100%" border="0" cellspacing="0" cellpadding="0">
												<tr>
													<td width="22" style="border-bottom: none; padding: 3px;">
														{if $record.sidx_menuflg_tmp==1}
														<img src="../common-img/ico_show.gif" width="22" height="13" alt="メニュー表示：ON" title="メニュー表示：ON">
														{elseif $record.sidx_menuflg_tmp==2}
														△
														{else}
														<img src="../common-img/ico_hide.gif" width="22" height="13" alt="メニュー表示：OFF" title="メニュー表示：OFF">
														{/if}													</td>
													<td style="border-bottom: none; padding: 0;"><em>{$record.sidx_title_tmp|default:"<p class=\"fc04 ct\">---</p>"}</em></td>
												</tr>
											</table>
{/if}
											</td>
											<td class="w5" style="padding: 0;">{if $record.sidx_view_tmp!=2}
												<input type="button" class="bBtnEdit" value="編集" name="goContentEdit2" onClick="location.href='edit.php?sidx_code={$record.sidx_code_tmp}';">
												{/if}</td>
<td class="ct" style="padding: 0;">
{if $record.sidx_code_tmp!=1 &&$record.sidx_view_tmp!=2}
												<input type="button" class="bBtnManagement" value="管理" name="goList2" onClick="location.href='category/index.php?sidx_code={$record.sidx_code_tmp}';">
{else}
												<p class="fc04 ct">---</p>
{/if}											</td>
											<td>
												{if $record.sidx_view_tmp!=2}
												<table width="100%" border="0" cellspacing="0" cellpadding="0">
													<tr>
														<td class="bn">
														{assign var=code value=$record.sidx_tpl_code_tmp}
														<table width="100%" border="0" cellspacing="0" cellpadding="0">
															<tr>
{if $record.sidx_tpl_code != $record.sidx_tpl_code_tmp}
																<td class="bn" width="60" valign="top"><a href="../..{$tpllist[$code].thum}" rel="lightbox[skin]" title="{$tpllist[$code].tpl_name}"><img src="../..{$tpllist[$code].thum}" width="60"></a></td>
{/if}
																<td class="bn" align="left" valign="top">
<span id="rtooltip{$record.sidx_code_tmp}">{$tpllist[$code].tpl_name}<br><img src="../common-img/ico_help.gif" width="15" border="0"/></span>
<script type="text/javascript">
{literal}
var rtooltip{/literal}{$record.sidx_code_tmp}{literal} = new YAHOO.widget.Tooltip("rtt{/literal}{$record.sidx_code_tmp}{literal}",{
    context:"rtooltip{/literal}{$record.sidx_code_tmp}{literal}",
    text:'<table><tr><td align="right">テンプレートマスタ： </td><td>{/literal}{$tpllist[$code].skin_name}{literal}</td></tr><tr><td align="right">サイドバー編集エリア： </td><td>{/literal}{if $tpllist[$code].skin_side==1}○{else}×{/if}{literal}</td></tr><tr><td align="right">説明： </td><td>{/literal}{$tpllist[$code].skin_type}{literal}</td></tr><tr><td align="right">メモ： </td><td>{/literal}{$tpllist[$code].tpl_summary}{literal}</td></tr><tr><td align="right">パンくず： </td><td>{/literal}{if $tpllist[$code].tpl_pagenavi}○{else}×{/if}{literal}</td></tr></table>'
});
{/literal}
</script>
																</td>
															</tr>
														</table>
														</td>
														<td width="17" class="bn" style="padding: 0;"><a href="{$record.preurl}&mprev=1" target="_blank" title="プレビュー"><img src="../common-img/btn_preview.gif" alt="プレビュー" width="17" height="17"></a></td>
													</tr>
												</table>
												{/if}											</td>
											<td class="ct">{foreach from=$record.ulist name="usrlist" item="usr"}
												{$usr.usr_sei}{$usr.usr_mei}<br>
												{foreachelse}
												管理者のみ
												{/foreach}</td>
										</tr>
										{foreachelse}
										<tr>
											<td colspan="10" class="ct"><span class="fc04">登録されている情報はありません</span></td>
										</tr>
										{/foreach}
										{if $smarty.foreach.list.iteration > 1}
										<tr>
											<td class="ct bn"><input type="submit" class="bBtnSave" name="BTNOrderSAVE" value="保存" onClick="return confirm('グローバルメニューの表示順変更は即座に公開中のサイトに適用されます。よろしいですか？');"></td>
											<td colspan="3" class="ct bn">&nbsp;</td>
											{if $pubCnt>=2}
											<td class="ct bn" style="padding: 0;"><input type="button" class="bBtnAllOpen" value="一括公開" name="BTNdisp" onClick="setPublic()"></td>
											{/if}
											<td colspan="5" class="ct bn">&nbsp;</td>
										</tr>
									{/if}
									<input type="hidden" name="pubcode" value="">
									<input type="hidden" name="BTNdispflg" value="">
									<input type="hidden" name="BTNeditflg" value="">
									</table>
								<!-- pager/ -->
								<table>
									<tr>
										<td align="right">{$Pages}</td>
									</tr>
								</table>
								<!-- /pager -->
							</div>
							<!--/main-->
						</td>
					</tr>
				</table>
			</div>
		</div>
	</div>
	<!--/pageBody-->
	{include file=$FOOTER}
</div>
<!--/wrapper-->
</form>
</body>
</html>
