{include file="$admingentemplates/admin_top.tpl"}

<font class=red_header>{$lang.groups.razdel_name}</font><font class=red_sub_header>&nbsp;|&nbsp;{$lang.pays.list_group}</font>

	<div class="help_text">
            <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.groups_costs_1}
            </div>
        </div>
	<form action="{$form.action}" name="cost" method="post">
	{$form.hiddens}
				<div align="center">
					<table border=0 class="table_main" cellspacing=1 cellpadding=5 width="60%">
							<tr class="table_header">
								<td class="main_header_text" align="center" width="10">{$lang.pays.number}</td>
								<td class="main_header_text" align="center">{$lang.pays.group}</td>
								<td class="main_header_text" align="center" >{$lang.pays.period} - {$lang.pays.pay}</td>
						  </tr>
							{if $groups}
							{section name=u loop=$groups}
							<tr bgcolor="#ffffff">
								<td class="main_content_text" align="center">{$smarty.section.u.index_next}</td>
								<td class="main_content_text" align="center">{$groups[u].name}</td>
								<td class="main_content_text" align="center">{include file="$admingentemplates/admin_billing_group_period_row.tpl" period=$groups[u].period}</td>
							</tr>
							{/section}
							{else}
							<tr bgcolor="#ffffff" height="40">
								<td class="main_error_text" align="left" colspan="3">{$lang.pays.empty_group}</td>
							</tr>
							{/if}
					</table>
<br>
	{if $groups}
				<table cellpadding=0 cellspacing=0  class="main_content_text"><tr>
				<td><B>{$lang.pays.add_period}:</B>&nbsp;<select name=group style="width:150px">
				{section name=u loop=$groups}
				<option value="{$groups[u].id}">{$groups[u].name}</option>
				{/section}
				</select>&nbsp;&nbsp;&nbsp;</td>
				<td>{$lang.pays.period}:&nbsp;<input type="text" name=count style="width:50px">&nbsp;</td>
				<td>&nbsp;<select name=period style="width:70px">
				<option value="day">{$lang.pays.periods.day}</option>
				<option value="week">{$lang.pays.periods.week}</option>
				<option value="month">{$lang.pays.periods.month}</option>
				<option value="year">{$lang.pays.periods.year}</option>
				</select>&nbsp;&nbsp;&nbsp;</td>
				<td>{$lang.pays.pay}:&nbsp;<input type="text" name=cost style="width:50px">&nbsp;{$form.costunits}&nbsp;</td>
				<td><input type="submit" value="{$lang.button.add}" class="button"></td>
				</tr></table>
	{/if}
	</div>
	</form>
	<!-- /main spr row -->
{include file="$admingentemplates/admin_bottom.tpl"}