<!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" />
<link href="{$BASE_V}layout.css" rel="stylesheet" type="text/css" />
<title>酒店分销联盟管理系统</title>
<script language="javascript">
php_self = '{PHP_SELF}';
</script>
<script type="text/javascript" src="{$BASE}js/tools.js"></script>
<script type="text/javascript" src="{$BASE_V}article_class.js"></script>
</head>
<body>

<div style="z-index: 1; right: 20px; top: 30px; color: rgb(255, 255, 255); position: absolute; display: none;" id="loading"><img src="{$BASE_V}images/loader.gif"></div>

<div id="main">
  <div class="main_box">
    <h2><a{if $action == 'index'} style="color: deeppink;"{/if} href="{PHP_SELF}?m=article_class">分类管理首页</a>|<a{if $action == 'add'} style="color: deeppink;"{/if} href="{PHP_SELF}?m=article_class.add">新建分类</a>|<a{if $action == 'order'} style="color: deeppink;"{/if} href="{PHP_SELF}?m=article_class.order">分类排序</a> </h2>
    
<!--{if $action == 'add' }-->    
    <form method="post" action="{PHP_SELF}?m=article_class.save">
    <input type="hidden" value="$editinfo[class_id]" name="class_id">
    <table width="100%" cellspacing="1" cellpadding="3" border="0" align="center" class="t_list"> 
    <tbody>
    <tr> <th colspan="2">添加新分类</th></tr> <tr> <td width="30%" height="30">分类名称</td> <td width="70%"> <input type="text" size="35" name="sortname" value="$editinfo[class_name]"></td></tr> <tr style="display: none;"> <td height="24"><u>分类说明</u></td> <td> <textarea rows="3" cols="50" name="Readme">无</textarea></td></tr> <tr style="display: none;"> <td height="30"><u>所属类别</u></td> <td> <select name="classo"><option value="0">做为分类</option>
    </select></td> </tr>
    <tr>
        <td height="24">&nbsp;</td> <td> <input type="submit" value="$button" class="btn02" name="Submit"></td>
    </tr>
    </tbody>
    </table>
    </form>
<!--{/if}-->
    
<!--{if $action == 'index' }-->
    <table width="100%" cellspacing="1" cellpadding="2" align="center" class="t_list">
        <tbody>
            <tr>
                <th width="25%"><strong>分类</strong></th>
                <th><strong>操作</strong></th>
            </tr>
            <!--{loop $rs $k $v}-->
            <tr>
                <td width="25%"><b>$v[class_name]</b></td>
                <td width="65%" align="right"><a href="{PHP_SELF}?m=article_class.add&amp;class_id=$v[class_id]">修改</a>&nbsp;|&nbsp;&nbsp;<a onclick="{if(confirm('删除该分类，确定删除吗?')){return true;}return false;}"href="{PHP_SELF}?m=article_class.del&amp;class_id=$v[class_id]">删除</a></td>
            </tr>
            <!--{/loop}-->
        </tbody>
    </table>
    {$page}
<!--{/if}-->     

<!--{if $action == 'order' }-->
    <table width="100%" cellspacing="1" cellpadding="3" border="0" align="center"
    class="t_list">
        <tbody>
            <tr>
                <th>分类一级分类重新排序修改(请在相应分类的排序表单内输入相应的排列序号)</th>
            </tr>
            <tr>
                <td class="forumrow">
                    <table width="100%">
                        <tbody>
			            <!--{loop $rs $k $v}-->                        
                            <tr>
                                <td width="50%">$v[class_name]</td>
                                <td width="50%">
                                    <input type="text" value="$v[orderid]" size="4" name="orderid" id="order_$v[class_id]">
                                    <input type="hidden" value="$v[class_id]" name="class_id">
                                    &nbsp;&nbsp;
                                    <input type="button" value="修 改" class="btn02" name="Submit" onclick="order('{PHP_SELF}',$v[class_id])">
                                </td>
                            </tr>
                        <!--{/loop}-->   
                        </tbody>
                    </table>
                    分类一级分类重新排序修改(请在相应分类的排序表单内输入相应的排列序号)
                </td>
            </tr>
        </tbody>
    </table>
    {$page}
<!--{/if}-->
	</div>
</div>   

</body>
</html>