{include file="$admin_template_path/html/header.html"}
</head>
<body>
{include file="$admin_template_path/html/pagetops.html"}
{if $errorMessage}
<div id="errormsg">
<div class="msg">
  <div class="closebtn"><i data-icon="" class="icon-close"></i></div>
  {$errorMessage}
</div>
</div>
{literal}
<script type="text/javascript">
seajs.use(["modules/pageui/msg"], function(msg){
    msg.msginit("#errormsg");
});
</script>
{/literal}
{/if}

<div class="pagebg">
    <div class="mcontent pagemain clr">
        {include file="$admin_template_path/html/leftmenu.html"}
        <div class="pagemainconent">

        <div class="rightdetail_admin">
            {if is_array($data)}
            <div class="general_table_border">
                <table id="gentable" class="general_table" cellspacing="0" cellpadding="0" border="0">
                    <thead>
                    <tr>
                        <th></th>
                        <th>名称</th>
                        <th>状态</th>
                        <th width="150">操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    {foreach from=$data item=d}
                    <tr id="row{$d.id}" class="{cycle values=" no,alt
                    "}">
                    <td>
                        <input class="statusrad"
                               type="radio"
                               ajax-url="/apps/{$smarty.get.m}/ajax/edit.php"
                               ajax-data="{literal}{'edit':true,'value':'{/literal}{$d.title}{literal}'}{/literal}"
                               name="status"
                               id="status"
                               value="{$d.title}"
                        {if $status==$d.title}
                        checked="checked"
                        {/if}
                        >使用

                    </td>
                    <td>
                        {$d.title}
                    </td>
                    <td>{$d.status}</td>
                    <td>
                        <a href="?m=payments&c={$d.key}" title="编辑"><i class="fa fa-edit text-success m-r-xs"></i> 编辑</a>
                    </td>
                    </tr>
                    {/foreach}
                    </tbody>
                </table>
            </div>
            {literal}
            <script>
                seajs.use(["jq", "modules/ajax/btns"], function ($, aj) {
                    aj.ajaxradioinit("#gentable .statusrad", "ajax-url", "ajax-data", function () {
                        alert("修改支付方式成功");

                    })
                });
            </script>
            {/literal}
            {/if}
        </div>
        
        </div>
    </div>
</div>
</body>
</html>