<?php if (!defined('ROOT')){ echo 'Deny ...'; exit; } extract($data); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>MAIN</title>
        <link href="<?php echo $base_url; ?>static/css/style.css" rel="stylesheet" type="text/css" />
        <link href="<?php echo $base_url; ?>static/css/select.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="<?php echo $base_url; ?>static/js/jquery.js"></script>
        <script type="text/javascript" src="<?php echo $base_url; ?>static/js/select-ui.min.js"></script>
    </head>

    <body>

        <div class="place">
            <span>位置：</span>
            <ul class="placeul">
                <li><a href="<?php echo $base->get_url(array('c' => 'frame', 'm' => 'main')); ?>">首页</a></li>
                <li><a href="<?php echo $base->get_url(array('c' => 'manager')); ?>">管理员</a></li>
                <li>编辑管理员</li>
            </ul>
        </div>

        <div class="formbody" style="margin-top: 10px;">
            <div class="usual"> 
                <?php echo form::start('form1');?>
                <?php echo form::input_hidden('id', $db['id']);?>
                <?php echo form::nonce($admin['id'], 'editAdmin');?>
                <div class="tabson">
                    <?php echo form::tip($admin['username'], '编辑管理员');?>
                    <ul class="forminfo">
                        <?php
                            echo form::input(array(
                                'title' => '用户名',
                                'name' => 'username',
                                'must' => 1,
                                'placeholder' => '',
                                'style' => '',
                                'value' => $db['username'],
                                'readonly' => 0
                            ));
                        ?>
                        <?php echo form::password('密码', 'password', 0, '留空为不修改密码')?>
                        <?php echo form::password('密码确认', 'password_again', 0, '')?>
                        <?php echo form::select('用户组', 'level', 1, $groups, 'id::name', 120, $db['level']); ?>
                        <?php 
                            $radios = array(
                                array(
                                    'id' => 1,
                                    'name' => '启用'
                                ),
                                array(
                                    'id' => 0,
                                    'name' => '禁用'
                                )
                            );
                            echo form::radio('状态', 'checked', 1, $radios, 'id::name::'.$db['checked']);
                        ?>
                        <?php echo form::submit('提交', 'btn88');?>
                    </ul>
                </div> 
                <?php echo form::end();?>
                <?php echo form::onclick('form1', 'btn88', '提交', $base->get_url(array('c' => 'manager', 'm' => 'editAJAX')), $base->get_url(array('c' => 'manager')));?>
            </div> 
        </div>
    </body>
</html>
