

<style type="text/css">
.blank10 {clear:both; height:10px;}
.table { width:100%; text-align:left; font-size:12px; overflow:hidden; border:1px solid #DDD; border-collapse:collapse; }
.table * td{ padding:10px 6px; border:1px solid #EEE; }
.table thead * th{ background:#F5F5F5; border:1px solid #E3E3E3; padding:0px 6px; color:#999; }
.table tbody * th{  background:#F5F5F5; border:1px solid #DDD; }
.table tbody * th strong{ line-height:21px; text-indent:10px; color:#999; }
.td1{ text-align:right; color:#666; }
.td2,.td3,.td4,.td5,.td6,.td7,.td8,.td9{ text-align:center; }
.td5{ background:#F5F5F5; }
.td6,.td7,.td8,.td9{ background:#F5F5F5; }
.abctxt {padding:10px;}
.table .left {text-align:right;}

.table .input,.table .textarea
{
  height:28px;
  line-height:28px;
  padding:0px 10px;
  border:1px solid #ccc;
  font-weight:bold;
  font-size:12px;
  border-radius: 3px 3px 3px 3px;
}
.table .select {
  width:318px;
  height:28px;
  line-height:28px;
  padding:0px 10px;
  border:1px solid #ccc;
  font-weight:bold;
  font-size:12px;
  border-radius: 3px 3px 3px 3px;
  color:#666;
}

.table .textarea {
height:80px;
}
input.code {width:238px;}
input.register_btn {width:100%; height:38px;line-height:32px;}

input:hover, textarea:hover,select:hover {border:1px solid #A5C7FE;background-color:#FFC;
-moz-box-shadow:0px 0px 10px #A5C7FE;
-webkit-box-shadow:0px 0px 10px #A5C7FE;
box-shadow:0px 0px 10px #A5C7FE;}
#mobilenum
{
  width:298px;
  height:30px;
  line-height:30px;
  padding:0px 10px;
  border:1px solid #ccc;
  font-weight:bold;
  font-size:12px;
  border-radius: 3px 3px 3px 3px;
}
#btm_sendMobileCode { width:140px; height:32px;
  line-height:32px; border-radius: 3px 3px 3px 3px;}

#mobilenum {width:152px;}

.code {float:left; width:218px; height:28px; line-height:28px; margin-right:10px; padding:0px 10px; border:1px solid #ccc; color:#666; border-radius: 3px 0px 0px 3px;}

#verify {
 width:255px;
  height:30px;
  line-height:30px;
  margin:10px 0px;
  padding:0px 15px;
  border:1px solid #ccc;
border-radius: 5px 0px 0px 5px;
}
#verify:hover {
border:1px solid #A5C7FE;
-moz-box-shadow:0px 0px 10px #A5C7FE;
-webkit-box-shadow:0px 0px 10px #A5C7FE;
box-shadow:0px 0px 10px #A5C7FE;

}
</style>

<!-- 上传框 -->
<script src="{$base_url}/common/plugins/fileinput/js/fileinput.min.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.min.css" media="all" rel="stylesheet" type="text/css">


<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>

<script type="text/javascript">
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}
	return true;
}
</script>


<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>

<link href="{$base_url}/common/css/bootstrap/bootstrap-3.3.7/css/bootstrap.min.css" rel="stylesheet">
<!-- 上传组件 -->
<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">
</head>
<body>

<div id="upload_ue"></div>

<div class="content-form-title">
    <?php   $showname='cname_'.lang::getistemplate();?>
<h3>{=setting::$var[$archive['showform']]['myform'][$showname]}</h3>
<p>Form List</p>
</div>
<div class="blank5"></div>

<div style="padding-bottom:20px;">
    <form method="post" action="{$base_url}/index.php?case=form&act=add&form={$archive['showform']}&archiveid={$archive['aid']}" name="form1" onsubmit="return checkform();">

        <table class="table table-hover">

                {loop $field $f}
                <?php

                $name=$f['name'];
                $fielddata=setting::$var[$archive['showform']][$name];
     $showname='cname_'.lang::getistemplate();
                if($name==$primary_key) continue; ?>
                <tr onmouseover="this.bgColor='#FCFCFC';" onmouseout="this.bgColor='';" bgcolor="">
                    <td class="left">{$fielddata[$showname]}</td>
                    <td>
                        {form::getform($name,@$form,$field,@$data)}
                    </td>
                </tr>
                {/loop}
{if config::get('mobilechk_enable') && config::get('mobilechk_form')}
<script src="{$base_url}/js/mobilechk.js"></script>
<tr onmouseover="this.bgColor='#FCFCFC';" onmouseout="this.bgColor='';" bgcolor="">
<td class="left">{lang('mobile_phone_checksum')}</td>
<td>
<input type="text" placeholder="{lang('ordertel')}" name="telphone" id="telphone" class="input" />
<div class="blank10"></div>
<input type='text' id="mobilenum"  style="float:left;" tabindex="4" placeholder="{lang('please_enter_the_phone_verification_code')}" class="input"  name="mobilenum" /><input id="btm_sendMobileCode" onclick="sendMobileCode('{url('tool/smscode')}',$('#telphone'));"  style=" float:left;" type="button" value="{lang('send_mobile_phone_verification_code')}" />
</td>
</tr>
{/if}
{if config::get('verifycode')=='1'}
<tr onmouseover="this.bgColor='#FCFCFC';" onmouseout="this.bgColor='';" bgcolor="">
<td class="left">{lang('verifycode')}</td>
<td><input type='text' id="verify"  tabindex="3"  name="verify" />{verify()}</td>
</tr>
{/if}

{if config::get('verifycode')=='2'}
<tr onmouseover="this.bgColor='#FCFCFC';" onmouseout="this.bgColor='';" bgcolor="">
<td class="left">{lang('verifycode')}</td>
<td>
<div id="verifycode_embed"></div></td>
</tr>
<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}
<input type='hidden' id="aid" name="aid" value="{$archive['aid']}" />
<tr onmouseover="this.bgColor='#FCFCFC';" onmouseout="this.bgColor='';" bgcolor="">
<td></td>
<td align="left"><input type="submit" name="submit" value=" {lang('submit_on')} " class="btn" /></td>
</tr></table></form>
</div>
