{include file="$admingentemplates/admin_top.tpl"}
<script language="JavaScript" type="text/javascript" src="{$site_root}{$template_root}/js/classifieds.js"></script>
<div class="back">
    <a href="{$site_url}{$site_root}/admin/admin_classified.php?id_cat={$object.id_parent}">{$lang.button.back}</a>
</div>
<div class="error_message"></div>
<div class="cr"></div>
<div class="show_help" style="display: none;">&nbsp;</div>
<div class="red_header">{$lang.admin_menu.cat_manager}</div>
<div class="cr">&nbsp;</div>
<div class="cr">&nbsp;</div>
<div class="help_text" style="display:block;">
    <div class="close_help">
        <img src="{$site_root}{$template_root}/images/close_help.png" alt="">
    </div>
    <div class="help_body">
        <span class="help_title">{$lang.help}:</span>{$lang.admin_help.catalog_view_hint}
    </div>
</div>
<span class="main_header_text" style="padding-left:15px;">{$lang.catalog.cat_level}:</span>&nbsp;
{section name=s loop=$level}
	{if $smarty.section.s.last}
		<font>{$level[s].name}</font>
	{else}
		<a href="{$view_link}?id_cat={$level[s].id}">{$level[s].name}>&nbsp;</a>
	{/if}
{/section}

<div class="cr" style="height: 20px;">&nbsp;</div>
<table width="100%" cellpadding="0" cellspacing="5">
	<tr>
		<td valign="top">
			{*<!--OBJECT TABLE-->*}
				<table cellpadding="5" cellspacing="0" width="80%">
					<tr class="odd">
						<td width="150px" class="main_header_text" valign="top">{$lang.catalog.posted_by}:</td>
						<td align="left">
							<img class="icon" align="middle" src="{$user.icon_path}">&nbsp;{$user.fname}&nbsp;{$user.sname}&nbsp;({$user.login})
						</td>
					</tr>
					<tr class="even">
						<td class="main_header_text">{$lang.catalog.date_posted}:</td>
						<td>
							{$object.date_created}
						</td>
					</tr>
					<tr class="odd">
						<td class="main_header_text">{$lang.common.subject}:</td>
						<td>
							{$object.name}
						</td>
					</tr>
					<tr class="even">
						<td class="main_header_text">{$lang.catalog.details}:</td>
						<td>
							<table width="100%" cellpadding="5" cellspacing="0">
							{section name=s loop=$object.ado}
								<tr>
									<td class="main_header_text">{$object.ado[s].field}</td>
									<td>
										{if $object.ado[s].value===false || !isset($object.ado[s].value)}
											{$lang.common.not_specified}
										{else}
											{if $object.ado[s].type=='checkbox'}
												{if $object.ado[s].value==1} {$lang.common.yes} {else} {$lang.common.no} {/if}
											{else}
												{$object.ado[s].value}
											{/if}
										{/if}
									</td>
								</tr>
							{/section}
							</table>
						</td>
					</tr>
					<tr class="odd">
						<td class="main_header_text" colspan="2">{$lang.common.body}:</td>
					</tr>
					<tr class="even">
						<td colspan="2"><div class="wysiwyg_content">{$object.body}</div></td>
					</tr>
					{if $object.image_count>0 || $object.audio_count>0 || $object.video_count>0}
						<tr>
							<td colspan="2">
								<table cellpadding="0" cellspacing="5">
									<tr>
										{foreach item=file key=id_attr from=$object.image}
											<td align="center" width="90px" valign="top">
												<a target="_blank" href="#" onclick="window.open('{$site_root}/ajax_class.php?sel=view_file&id_attr={$id_attr}&id_obj={$object.id}', 'view_img', 'height=300, resizable=yes, scrollbars=no, width=400, menubar=no,status=no, left=200, top=20'); return false;"><img class="icon" src="{$file.icon}"></a><br>
												<span class="main_header_text">{$file.field}</span>
											</td>
										{/foreach}
										{foreach item=file key=id_attr from=$object.audio}
											<td align="center" width="90px" valign="top">
												<a target="_blank" href="#" onclick="window.open('{$site_root}/ajax_class.php?sel=view_file&id_attr={$id_attr}&id_obj={$object.id}', 'view_img', 'height=300, resizable=yes, scrollbars=no, width=400, menubar=no,status=no, left=200, top=20'); return false;"><img class="icon" src="{$file.icon}"></a><br>
												<span class="main_header_text">{$file.field}</span>
											</td>
										{/foreach}
										{foreach item=file key=id_attr from=$object.video}
											<td align="center" width="90px" valign="top">
												<a target="_blank" href="#" onclick="window.open('{$site_root}/ajax_class.php?sel=view_file&id_attr={$id_attr}&id_obj={$object.id}', 'view_img', 'height=300, resizable=yes, scrollbars=no, width=400, menubar=no,status=no, left=200, top=20'); return false;"><img class="icon" src="{$file.icon}"></a><br>
												<span class="main_header_text">{$file.field}</span>
											</td>
										{/foreach}
									</tr>
								</table>
							</td>
						</tr>
					{/if}
				</table>
			{*<!--OBJECT TABLE-->*}
		</td>
	</tr>
</table>
<script type="text/javascript" src="{$site_root}{$template_root}/js/common.js"></script>
<div align="left" style="padding:15px 2px 2px">
	<a class="admin_button_major" onclick="javascript: location.href='{$edit_link}';">{$lang.button.edit}<span>&nbsp;</span></a>&nbsp;
	<a class="admin_button_major" onclick="javascript: if (window.confirm('{$lang.confirm.del_object|escape:javascript}')) location.href='{$del_link}';">{$lang.button.delete}<span>&nbsp;</span></a>&nbsp;
	<a class="admin_button_major" onclick="javascript: location.href='{$view_link}?id_cat={$object.id_parent}';">{$lang.button.up_level}<span>&nbsp;</span></a>&nbsp;
	<a class="admin_button_major" onclick="javascript: location.href='{$view_link}';">{$lang.button.up_root}<span>&nbsp;</span></a>&nbsp;
</div>
{include file="$admingentemplates/admin_bottom.tpl"}