{template 'header.html'}



<script type="text/javascript" src="{$base_url}/common/js/ajaxfileupload/ajaxfileupload.js"></script>
    <script type="text/javascript" src="{$base_url}/common/js/ajaxfileupload/ThumbAjaxFileUpload.js"></script>

    <link rel="stylesheet" href="{$base_url}/common/js/jquery/ui/css/ui.datepicker.css" type="text/css" media="screen" title="core css file" charset="utf-8" />
    <script language="javascript" src="{$base_url}/common/js/jquery/ui/js/ui.datepicker.js"></script>
    <script type="text/javascript" src="{$base_url}/common/js/upimg/dialog.js"></script>
    <link href="{$base_url}/images/admin/dialog.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        function getEditor(name) {
            return FCKeditorAPI.GetInstance(name);
        }
        function checkform() {

            {loop $field $f}
            {if $f['notnull']}
        <?php $name=$f['name']; ?>
            if(!document.form1.{$f[name]}.value){
                alert("{lang('pinput')}{$name|lang}");
                document.form1.{$f[name]}.focus();
                return false;
            }
            {/if}
                {/loop}
                    {if config::get('mobilechk_enable') && config::get('mobilechk_form')}
                    if($('#mobilenum').val() == ''){
                        alert(lang('phone_verification_code')lang('enter'));
                        $('#mobilenum').focus();
                        return false;
                    }
                    {/if}
                        return true;
                    }
    </script>
    <?php $root = config::get('base_url').'/ueditor';?>
    <script type="text/javascript" charset="utf-8" src="{$root}/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="{$root}/ueditor.all.js"> </script>
    <script type="text/javascript" charset="utf-8" src="{$root}/lang/zh-cn/zh-cn.js"></script>
    <script type="text/javascript" charset="utf-8" src="{$root}/addCustomizeButton.js"></script>


    <!-- 上传组件 -->
    <script src="{$base_url}/common/plugins/fileinput/js/fileinput.js" type="text/javascript"></script>
    <script src="{$base_url}/common/plugins/fileinput/js/locales/zh.js" type="text/javascript"></script>
    <link href="{$base_url}/common/plugins/fileinput/css/fileinput.css" media="all" rel="stylesheet" type="text/css">

<div class="index-bg">
    <div class="container">
        <div class="section2">

            <div class="index-title">
                <?php   $showname='cname_'.lang::getistemplate();?>
                <h4>{=setting::$var[$manage]['myform'][$showname]}</h4>
            </div>


            <div class="user-content">






<center><strong style="color:red;">{message()}</strong></center>
<div class="box">
    <form method="post" action="" name="form1" onsubmit="return checkform();" class="custom-form">



        {loop $field $i $f}

        <?php
         $name=$f['name'];
         $fielddata=setting::$var[$formname][$name];
         if($name==$primary_key) continue;
        ?>
        <label>{$fielddata[$showname]}</label>
        <div class="blank5"></div>
        {form::getform($name,@$form,$field,@$data)}
        <div class="blank5"></div>
        {/loop}

        {if config::get('mobilechk_enable') && config::get('mobilechk_form')}
        <script src="{$base_url}/js/mobilechk.js"></script>
        <input type="text" placeholder="{lang('ordertel')}" name="telphone" id="telphone" class="form-control" />

        <div class="blank5"></div>
        <input type='text' id="mobilenum"  style="width:50%; float:left;" tabindex="4" placeholder="{lang('please_enter_the_phone_verification_code')}" class="form-control"  name="mobilenum" /><input id="btm_sendMobileCode" onclick="sendMobileCode('{url('tool/smscode')}',$('#telphone'));"  style="width:40%; float:right;" type="button" value="{lang('send_mobile_phone_verification_code')}" />
        <div class="blank5"></div>
        {/if}

        {if config::get('verifycode')=='1'}
        <input type='text' id="verify"  tabindex="3"  name="verify" />{verify()}
        <div class="blank5"></div>
        {/if}

        {if config::get('verifycode')=='2'}
        <div class="blank20"></div>
        <div id="verifycode_embed"></div>
        <script src="http://api.geetest.com/get.php"></script>
        <script>
            var loadGeetest = function(config) {
                window.gt_captcha_obj = new window.Geetest({
                    gt : config.gt,
                    challenge : config.challenge,
                    product : 'float',
                    offline : !config.success
                });
                gt_captcha_obj.appendTo("#verifycode_embed");
            };

            $.ajax({
                url : '{url("tool/geetest")}',
                type : "get",
                dataType : 'JSON',
                success : function(result) {
                    //console.log(result);
                    loadGeetest(result)
                }
            });
        </script>
        {/if}


        <div class="blank30"></div>
        <input type="submit" name="submit" value="{lang('submit_on')}" class="btn btn-primary" />
    </form>

    <div class="blank30"></div>
    <div class="blank30"></div>
</div>
        </div>
    </div>
</div>
</div>

{template 'footer.html'}