<div id="admin_settings_main">
	<h1>Настройки сайта</h1>
	{if !$core_config.separate_config}<a href="{url}" title="Настройки сайта"><img src="/skins/default/images/icons/settings.png" alt="Настройки сайта" /></a> <a href="{url action="modules"}" title="Настройки модулей"><img src="/skins/default/images/icons/module.png" alt="Настройки модулей" /></a> {/if}
	<div id="core-content">
		<form method="post" action="">
			<div id="basic-accordian" >
				<input type="hidden" name="token" value="{$_user->token}" />
				{foreach $core_cfg as $id=>$group}
					<div id="core{$id}-header"  class="accordion_headings{if $group@first} header_highlight{/if}">{$group.name|escape}</div>
					<div id="core{$id}-content">
				
					<table class="accordion_child">
						{foreach $group.config as $conf=>$config}
							<tr class="row"><td class="lRow">{$config.title}<span class="small">{$config.describe}</span></td><td class="rRow">
								{if $config.type=='integer' || $config.type=='string'}
								<input type="text" name="core[{$conf}]" value="{$smarty.post.core.$conf|default:$config.val|escape}" />
								{elseif $config.type=='password'}
								<input type="password" name="core[{$conf}]" value="{$smarty.post.core.$conf|default:$config.val|escape}" />
								{elseif $config.type=='select'}
								{html_options options=$group.values.$conf selected=$config.val name="core[$conf]"}
								{elseif $config.type=='boolean'}
								<input type="checkbox" name="core[{$conf}]"{if $config.val} checked="checked"{/if} />
								{elseif $config.type=='select_multiple'}
								<select multiple="multiple" name="core[{$conf}][]">
								{html_options options=$group.values.$conf selected=$config.val}
								</select>
								{/if}
							</td></tr>
						{/foreach}
						<tr><td colspan="2">
							<input type="submit" value="Сохранить" />
						</td></tr>
					</table>
					</div>
				{/foreach}
			</div>
		</form>
	</div>
	<script type="text/javascript">
		new Accordian('basic-accordian',2,'header_highlight');
	</script>
</div>