<?php

/**
 * iCMS - i Content Management System
 * Copyright (c) 2007-2017 iCMSdev.com. All rights reserved.
 *
 * @author icmsdev <master@icmsdev.com>
 * @site https://www.icmsdev.com
 * @licence https://www.icmsdev.com/LICENSE.html
 */
defined('iPHP') or exit('What are you doing?');
self::head();
?>
<style type="text/css">
    .add-on {
        width: 70px;
    }
</style>
<div class="content" id="<?php echo APP_MAINID; ?>">
    <div class="block">
        <div class="block-header block-header-default">
            <h3 class="block-title"><?php echo empty($this->id) ? '添加' : '修改'; ?>网站</h3>
        </div>
        <div class="block-content">
            <form action="<?php echo APP_URL; ?>&action=save" method="POST" id="<?php echo APP_FORMID; ?>" target="iPHP_FRAME">
                <input name="id" type="hidden" value="<?php echo $this->id; ?>" />
                <div class="tab-content">
                    <div id="-add-base" class="tab-pane active">
                        <div class="form-group row">
                            <label class="col-sm-1 col-form-label" for="">分类</label>
                            <div class="col-sm-8">
                                <input type="text" name="cid" class="form-control" id="cid" value="<?php echo $rs['cid']; ?>" />
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-1 col-form-label" for="">网站</label>
                            <div class="col-sm-8">
                                <input type="text" name="name" class="form-control" id="name" value="<?php echo $rs['name']; ?>" />
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-1 col-form-label" for="">logo</label>
                            <div class="col-sm-8">
                                <input type="text" name="logo" class="form-control" id="logo" value="<?php echo $rs['logo']; ?>" />
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-1 col-form-label" for="">链接</label>
                            <div class="col-sm-8">
                                <input type="text" name="url" class="form-control" id="url" value="<?php echo $rs['url']; ?>" />
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-1 col-form-label" for="">介绍</label>
                            <div class="col-sm-8">
                                <textarea name="intro" id="intro" class="form-control" style="height: 150px;"><?php echo $rs['intro']; ?></textarea>
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-1 col-form-label" for="">排序</label>
                            <div class="col-sm-8">
                                <input type="text" name="sortnum" class="form-control" id="sortnum" value="<?php echo $rs['sortnum']; ?>" />
                            </div>
                        </div>
                        <div class="form-group row">
                            <?php echo Former::layout(); ?>
                        </div>
                    </div>
                    <?php self::formSubmit(); ?>
                </div>
            </form>
        </div>
    </div>
</div>

<?php self::foot(); ?>