<?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=/shops/';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; ?>
<form id="myform" name="myform" action="<?php echo geturl('delete_register_config');?>" method="post">
<div class="pad-lr-10 col-sm-12">
	<div>
        <div class="mt15"></div>
        <div class="prompt_div bg-info" id="explanation">
            <p class="text-primary" id="checkZoom" ><i class="glyphicon glyphicon-bell mr5"></i>温馨提示<span id="explanationZoom" title="收起提示"></span></p>
            <ul>
                <li><i>·</i>入驻选项该功能可对店铺入驻时申请资料标签是否显示、必填进行修改操作。</li>
                <li><i>·</i>双击显示状态、是否必填可快速更改。</li>
                <li><i>·</i>选中必填时自动选中显示，不显示时自动取消必填。</li>
            </ul>
        </div>
     <!--    <div class="toolbars-hanchao mt15 clearfix">
            <div><a href="<?php echo geturl('shop_register_article');?>" class="btn btn-primary">入驻须知管理</a></div>
        </div> -->
        <table class="table table-hover table-striped table-hanchao mt15 table-bordered">
            <thead>
                <tr>
                    <th width="200"><?php echo orderurl('标签名称','label_name');;?></th>
                    <th width="60"><?php echo orderurl('显示状态','sort');;?></th>
                    <th width="60"><?php echo orderurl('是否必填','status');;?></th>
                    <th width="250"><?php echo (L("MANAGE")); ?></th>
                </tr>
            </thead>
            <tbody>
            <?php if(is_array($register_config)): $i = 0; $__LIST__ = $register_config;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$val): $mod = ($i % 2 );++$i;?><tr>
                    <td><?php echo (isset($register_config_name[$key])?$register_config_name[$key]:''); ?></td>
                    <td onclick="config_status('<?php echo (isset($key)?$key:''); ?>')"><img class='<?php echo (isset($key)?$key:''); ?>_img1' src="/Public/images/status_<?php if(($val) > "1"): ?>1<?php else: echo (isset($val)?$val:''); endif; ?>.gif"/></td>
                    <td onclick="config_status('<?php echo (isset($key)?$key:''); ?>',1)"><img class='<?php echo (isset($key)?$key:''); ?>_img2' src="/Public/images/status_<?php if(($val) < "1"): ?>0<?php else: echo ($val-1); endif; ?>.gif" /></td>
                    <td>
                        <a href="javascript:;" onclick="$.openUrl('<?php echo U('src_edit', array('name'=>$key));?>','<?php echo (L("EDIT")); ?>');"><?php echo (L("EDIT")); ?></a> 
                    </td>
                </tr><?php endforeach; endif; else: echo "" ;endif; ?>
            </tbody>
        </table>
        <!-- <div class="btn_party mt15">
            <label for="check_box" class="btn btn-default"><?php echo (L("SELECT_ALL")); ?>/<?php echo (L("CANCEL")); ?></label>
        	<button type="button" class="btn btn-danger" onclick="$.showConfirm('<?php echo (L("SURE_DELETE")); ?>',function(){$('#myform').submit();},'hc')"><?php echo (L("ALL_DEL")); ?></button>
        </div> -->
        <nav class="pages_hanchao" id="pages"><?php echo (isset($_page)?$_page:''); ?></nav>
    </div>
</div>
</form>
</body>
<script type="text/javascript">
// 更改装态
    function config_status(name,is_necessary=0){

        var query=new Object();
        query.name=name;
        query.is_necessary=is_necessary;
        $.ajax({
            url: APP+'Shops/src_status',
            data: query,
            type: "post",
            dataType: "json",
            success: function (data) {
                if(data.status==1){
                    var src=$("." + name +"_img1").attr('src');
                    var src2=$("." + name +"_img2").attr('src');
                    var status1=0,status2=0;
                    if(data.type==1){
                        status1=1;status2=0;
                    }
                    if(data.type==2){
                        status1=1;status2=1;
                    }
                    $("." + name +"_img1").attr('src', src.replace(/0|1/,status1));
                    $("." + name +"_img2").attr('src', src2.replace(/0|1/,status2));
                }else{
                    $.showError(data.msg);
                }


            }
        });

    }
</script>
</html>