checked<?php 
            }
            ?>
>&nbsp;<?php 
            echo $this->_tpl_vars['form']['fields'][$this->_sections['i']['index']]['name'];
            ?>
</label></p>
<?php 
        } elseif ($this->_tpl_vars['form']['fields'][$this->_sections['i']['index']]['type'] == 'date') {
            ?>
<p><?php 
            echo $this->_tpl_vars['form']['fields'][$this->_sections['i']['index']]['name'];
            ?>
:</p>
<p><?php 
            echo smarty_function_dateselect(array('name' => $this->_tpl_vars['form']['fields'][$this->_sections['i']['index']]['field'], 'date' => $this->_tpl_vars['form']['fields'][$this->_sections['i']['index']]['value']), $this);
            ?>
</p>
<?php 
        } elseif ($this->_tpl_vars['form']['fields'][$this->_sections['i']['index']]['type'] == 'text') {
            ?>
<p><?php 
            echo $this->_tpl_vars['form']['fields'][$this->_sections['i']['index']]['name'];
            ?>
:</p>
<p><?php 
            echo smarty_function_textarea(array('name' => $this->_tpl_vars['form']['fields'][$this->_sections['i']['index']]['field'], 'rows' => $this->_tpl_vars['form']['fields'][$this->_sections['i']['index']]['property'], 'text' => $this->_tpl_vars['form']['fields'][$this->_sections['i']['index']]['value']), $this);
            ?>
</p>
<?php 
        } elseif ($this->_tpl_vars['form']['fields'][$this->_sections['i']['index']]['type'] == 'format') {
<?php 
    echo smarty_function_hidden(array('name' => 'item', 'value' => $this->_tpl_vars['system']['item']), $this);
    ?>

<input type="checkbox" name="date"<?php 
    if ($_GET['date']) {
        ?>
 checked<?php 
    }
    ?>
>
с &nbsp;<?php 
    echo smarty_function_dateselect(array('name' => 'from', 'date' => $_GET['from'], 'onchange' => "this.form.date.checked=true"), $this);
    ?>
&nbsp;по&nbsp;<?php 
    echo smarty_function_dateselect(array('name' => 'to', 'date' => $_GET['to'], 'maxtime' => true, 'onchange' => "this.form.date.checked=true"), $this);
    ?>

&nbsp;сумма от <?php 
    echo smarty_function_editbox(array('name' => 'sum1', 'width' => '60px', 'text' => $_GET['sum1']), $this);
    ?>
 до <?php 
    echo smarty_function_editbox(array('name' => 'sum2', 'width' => '60px', 'text' => $_GET['sum2']), $this);
    ?>

&nbsp;<select name="status">
<option value="-1">-</option>
<option value="0"<?php 
    if (isset($_GET['status']) && $_GET['status'] == 0) {
        ?>
 selected<?php 
</div>
<p>Период показа:</p>
<p><input type="checkbox" name="date"<?php 
if ($this->_tpl_vars['form']['date'] == 'Y') {
    ?>
 checked<?php 
}
?>
>
с <?php 
echo smarty_function_dateselect(array('name' => 'date1', 'date' => $this->_tpl_vars['form']['date1'], 'onchange' => "this.form.date.checked=true"), $this);
?>

&nbsp;
по <?php 
echo smarty_function_dateselect(array('name' => 'date2', 'date' => $this->_tpl_vars['form']['date2'], 'maxtime' => true, 'onchange' => "this.form.date.checked=true"), $this);
?>

</p>
<?php 
echo smarty_function_hidden(array('name' => 'id', 'value' => $this->_tpl_vars['form']['id']), $this);
?>

<?php 
echo smarty_function_hidden(array('name' => 'idcat', 'value' => $this->_tpl_vars['form']['idcat']), $this);
?>

<?php 
echo smarty_function_hidden(array('name' => 'tab', 'value' => 'banners'), $this);
?>
<?php 
    echo $this->_tpl_vars['form']['filesbox']->getContent();
    ?>

<?php 
}
$_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "objcomp_fieldseditor_include.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
if (!$this->_tpl_vars['options']['usecats'] || !$this->_tpl_vars['form']['categories']) {
    if ($this->_tpl_vars['options']['usedate']) {
        ?>
<p>Дата:</p>
<p><?php 
        echo smarty_function_dateselect(array('name' => 'date', 'date' => $this->_tpl_vars['form']['date'], 'usetime' => true), $this);
        ?>
</p>
<?php 
    }
    echo smarty_function_hidden(array('name' => 'idcat', 'value' => 0), $this);
    ?>

<?php 
}
echo smarty_function_hidden(array('name' => 'id', 'value' => $this->_tpl_vars['form']['id']), $this);
?>

<?php 
echo smarty_function_hidden(array('name' => 'tab', 'value' => 'items'), $this);
?>
 checked<?php 
    }
    ?>
>
<?php 
} elseif ($this->_tpl_vars['form']['type'] == 'select') {
    ?>
<select name="value">
<?php 
    echo smarty_function_html_options(array('options' => $this->_tpl_vars['form']['selectvars'], 'selected' => $this->_tpl_vars['form']['value']), $this);
    ?>

</select>
<?php 
} elseif ($this->_tpl_vars['form']['type'] == 'date') {
    echo smarty_function_dateselect(array('name' => 'date', 'date' => $this->_tpl_vars['form']['value']), $this);
    ?>

<?php 
} else {
    echo smarty_function_editbox(array('name' => 'value', 'text' => $this->_tpl_vars['form']['value']), $this);
    ?>

<?php 
}
?>
</td>
<td width="150" align="center">
<input type="button" class="submit" name="bsave" value="Сохранить" onclick="saveopt(<?php 
echo $this->_tpl_vars['form']['id'];
?>