<?php if (!defined('THINK_PATH')) exit();?><!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" />
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="author" content="HANCHAO"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<?php $csscommon="/Public/bootstrap/css/bootstrap.min.css" ?>
<?php $csscommon.="|/Public/HanChaoUI/css/hanchaoui.css" ?>
<?php $CSSARR[]=THEME_PATH."/common/css/main.css" ?>
<?php $CSSARR[]="/Public/HanChaoUI/css/weebox.css" ?>
<link rel="stylesheet" href="<?php echo min_css($CSSARR,$csscommon);?>" media="all"/>
<?php $jscommon="/Public/script/jquery.min.js" ?>
<?php $jscommon.="|/Public/bootstrap/js/bootstrap.min.js" ?>
<?php $JSARR['min2']=THEME_PATH."/common/js/common.js" ?>
<?php $JSARR['min3']="/Public/HanChaoUI/js/weebox.js" ?>
<script language="javascript">var URL = '/admin.php?s=/sms/';var THEME_COLOR = '';var ROOT_PATH = '/';var APP   =   '/admin.php?s=/';var CONTROLLER_NAME   =   '<?php echo (CONTROLLER_NAME); ?>';var THEME_PATH   =   '<?php echo (TPL_PATH); ?>/';</script>
<script type="text/javascript" src="<?php echo min_js($JSARR,$jscommon);?>"></script><!--[if IE]>
<link href="/Public/bootstrap/css/bootstrap.ie.css" rel="stylesheet" type="text/css"/>
 <script src="/Public/bootstrap/js/html5shiv.js"></script>
<![endif]-->
<script language="javascript">
$(function($){
    $(window.parent.document).find('#loading').hide();
    var topid='<?php echo ($_GET['topid']); ?>';
    var leftid='<?php echo ($_GET['leftid']); ?>';
    changemenu(topid,leftid);
});
function changemenu(topid,leftid){
    if(!topid && !leftid)return false;
    if(topid)parent._OPENleft(topid);
    if(leftid){
        $(window.parent.document).find('#_OPENright'+leftid).parent().prev().click();
        $(window.parent.document).find('#_OPENright'+leftid+' a').click();
    }
}
</script>
<title><?php echo (L("website_manage")); ?>Powered by hanchao</title>
</head>
<body><?php if(!empty($big_menu)): ?><div class="pad-lr-10 col-sm-12">
    <div class="btn-handle mt15">
   <?php if(is_array($big_menu)): foreach($big_menu as $k=>$vo): ?><a class="btn <?php if(!empty($menu_hover)): if(in_array(($k), is_array($menu_hover)?$menu_hover:explode(',',$menu_hover))): ?>btn-primary<?php else: ?>btn-default<?php endif; ?>                
   <?php else: ?>btn-primary<?php endif; ?>" href="<?php echo (isset($vo)?$vo:''); ?>"><?php echo (isset($k)?$k:''); ?></a>&nbsp;&nbsp;<?php endforeach; endif; ?>
    </div>
</div><?php endif; ?>
<script type="text/javascript" src="/Public/script/MyDate/WdatePicker.js"></script><script type="text/javascript" src="/Public/script/kindeditor/kindeditor.js"></script><link rel="stylesheet" type="text/css" href="/Application/Runtime/statics/e0d943bb29a0cccaff68400c2dd58d24.css" /><script type="text/javascript" src="/Application/Runtime/statics/9c94dcc7a69f8ba27b0a8b72adc7a433.js"></script><script type="text/javascript">$(function(){$("a[rel^='prettyPhoto']").prettyPhoto();$("#myform").Validform({tiptype:3});})</script>
<?php if(empty($id)): ?><form action="<?php echo U('insert');?>" method="post" name="myform" id="myform">
<?php else: ?>
<form action="<?php echo U('update');?>" method="post" name="myform" id="myform"><?php endif; ?>
<div class="pad-lr-10 col-sm-12">
	<div class="mt15">
        <ul class="nav nav-tabs" role="tablist">
          <li role="presentation" class="active"><a href="#group_common" data-toggle="tab"><?php echo L('GENERAL_INFO');?></a></li>
        </ul>
        <div class="cont_hanchao pd15 tab-content" id="myTabContent">
            <div class="present tab-pane fade active in" id="group_common">    
            <table class="table_hanchao_z">
                    <tr>
                        <th><?php echo L('NAME');?></th>
                        <td><input type="text" name="name" id="name" value="<?php echo (isset($name)?$name:''); ?>" class="form-control f_l" datatype="*"><div class="Validform_checktip">&nbsp;</div></td>
                    </tr>
                    <tr>
                        <th>标识</th>
                        <td><input type="text" name="code" id="code" value="<?php echo (isset($code)?$code:''); ?>" class="form-control f_l" datatype="s1-50"><div class="Validform_checktip">&nbsp;</div></td>
                    </tr>
                    <tr>
                        <th>图片</th>
                        <td>
                            <script>KindEditor.ready(function(K) {var editor = K.editor({fileManagerJson: "/index.php?s=/home/file/filemanager.html",uploadJson: "/index.php?s=/home/file/upload.html"});K("#img_button").click(function() {editor.loadPlugin("image", function() {editor.plugin.imageDialog({imageUrl : K("#img_id").val(),clickFn : function(url, title, width, height, border, align) {K("#img_id").val(url);K("#showupimage_img_id").html("<a href=\""+url+"\" target=\"_bank\" rel=\"prettyPhotoimg_id\"><img src=\""+url+"\"/></a>");$("a[rel^='prettyPhoto']").prettyPhoto();editor.hideDialog();}});});});});</script><div><div class="upload_img_hanchao"><ul class="clearfix"><li id="showupimage_img_id"><?php if(!empty($img)){?><a href="<?php echo $img;?>" target="_bank" rel="prettyPhotoimg_id"><img src="<?php echo $img;?>" /></a><?php }else{?><img src="/Public/images/add_img_icon.png" /><?php }?></li></ul><input type="hidden" id="img_id" name="img" class="form-control f_l" value="<?php echo (isset($img)?$img:''); ?>" /><button type="button" id="img_button" class="btn btn-primary">选择图片</button>
                        </td>
                    </tr>
                    <tr>
                        <th><?php echo L('USER_NAME');?></th>
                        <td><input type="text" name="username" id="username" value="<?php echo (isset($username)?$username:''); ?>" class="form-control f_l" datatype="*"><div class="Validform_checktip">&nbsp;</div></td>
                    </tr>
                    <tr>
                        <th><?php echo L('PASSWORD');?></th>
                        <td> <input type="text" name="password" id="password" value="" class="form-control f_l" datatype="*"><div class="Validform_checktip">不修改请为空&nbsp;</div></td>
                    </tr>
                    <tr>
                        <th>备用参数1</th>
                        <td><input type="text" name="param1" id="param1" value="<?php echo (isset($param1)?$param1:''); ?>" class="form-control f_l"></td>
                    </tr>
                    <tr>
                        <th>备用参数2</th>
                        <td><input type="text" name="param2" id="param2" value="<?php echo (isset($param2)?$param2:''); ?>" class="form-control f_l"></td>
                    </tr>
                    <tr>
                        <th>介绍</th>
                        <td><script> var editor; KindEditor.ready(function(K) { editor = K.create('#content_editor', {fileManagerJson: "/index.php?s=/home/file/filemanager.html",uploadJson: "/index.php?s=/home/file/upload.html",});});</script><textarea id="content_editor" style="" name="content" ><?php echo (isset($content)?$content:''); ?></textarea></td>
                    </tr>
                    <tr>
                        <th><?php echo L('STATUS');?></th>
                        <td>
                           <?php $selectdvalue=0; $status_arr=strtoarray("1|LAN_ENABLE,0|LAN_DISABLE"); $i=1;$total=count($status_arr);foreach($status_arr as $key=>$val) { ?><label class="radio-inline"><input type="radio" name="status" value="<?php echo $key;?>" id="status_<?php echo $i;?>"<?php if(empty($status) && !is_numeric($status))$status=array();if((!empty($status) || is_numeric($status)) && $status==$key){echo " checked='checked'";$selectdvalue=1;}?>><?php echo $val.' ';?></label><?php ++$i;} if($selectdvalue==0)echo "<script>$(\"input[name='status'][value='1']\").attr(\"checked\",true);</script>";?>
                        </td>
                    </tr>
                </table>
                </div>
            </div>
        <div class="btn_group_btm">
            <input type="hidden" name="id" value="<?php echo (isset($id)?$id:''); ?>" />
        	<button type="submit" name="dosubmit" id="dosubmit" class="btn btn-primary"><?php echo L('SUBMIT');?></button>
            <button type="button" onclick="javascript:history.back(-1);" class="btn btn-warning"><?php echo L('GOBACK');?></button>
        </div>
    </div>
</div>
</form>
</body>
</html>