<!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 name="generator" content="bluepower game system v1.0" />
        <meta name="description" content="<{$web_description}>" />
        <meta name="keywords" content="<{$web_keywords}>"/>
        <title><{$web_site}>-蓝色动力网络</title>
        <link href="<{$t_dir}>style.css" rel="stylesheet" type="text/css" />
        <link href="<{$t_dir}>layout.css" rel="stylesheet" type="text/css" />
                <link rel="stylesheet" type="text/css" href="<{$web_siteurl}>plugins/extjs/ext-3.2/resources/css/ext-all.css" />
                <script type="text/javascript" src="<{$web_siteurl}>plugins/extjs/ext-3.2/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="<{$web_siteurl}>plugins/extjs/ext-3.2/ext-all.js"></script>
<script type="text/javascript" src="<{$web_siteurl}>plugins/extjs/ext-3.2/ext-lang-zh_CN.js"></script>
        <script type="text/javascript" src="<{$t_dir}>js/jquery.js"></script>
        <script type="text/javascript" src="<{$t_dir}>js/login.js"></script>
        <script type="text/javascript" src="<{$t_dir}>js/register.js"></script>
        <script type="text/javascript" src="<{$t_dir}>js/ZeroClipboard.js"></script>
        <script type="text/javascript">
            $(document).ready(function(){
                $.get("admin/user.php?cmd=getUserId",function(data){
                   // alert(data);
                    if(data!=-1){
                        $(".userpanal").html("<span class='red'>"+data+"</span> ，欢迎您回来！<a href='admin/user.php?cmd=logout'>退出登录</a>");
                    }
                },"json")
            })
            function getCard(){
                var gameclass=$("#gameclass").val();
                //alert("aaaa");
                var url="card.php";
                $.get(url, {cmd:"getCard",gameclass: gameclass},
                   function(data){
                     //处理数据
                     $("#getcard").hide();
                     $("#result").show();
                     if(data.msg==0){
                         $("#result").attr("class","number");
                         $("#result h3").html(data.info);
                     }else{
                         $(".number").html(data.info);
                       }
                   }, "json");
            }
            function taoCard(){
                window.location.href="card.php?cmd=taoka";
            }

            function register(){
                regWin.show();
            }
            function login(){              
                var myW = new loginWin({
                            modal:true,        //此处配置属性将覆盖子类中定义的默认配置属性modal:false
                            width:400,
                            height:170,
                            title:'游戏卡领取系统'
                    }).show();
            }
            function getBack(){
                 $("#getcard").show();
                 $("#result").hide();
            }
            function numCopy(num){
                ZeroClipboard.setMoviePath("<{$t_dir}>js/ZeroClipboard.swf");
                //新建对象
                clip = new ZeroClipboard.Client();
                //设置指向光标为手型
                clip.setHandCursor( true );
                //通过传入的参数设置剪贴板内容
                clip.setText(num);
                //添加监听器，完成点击复制后弹出警告
                clip.addEventListener("complete", function (client, text) {
                    alert("您复制了卡号为：\n" + text );
                });
                //绑定触发对象按钮ID
                clip.glue("copyBtn");
            }

        </script>
    </head>

    <body id="index">
        <div id="main">
            <{include file='header.html'}>
                <div id="middle_column">
                    <div class="indent">
                        <div align="right" class="userpanal"><a href="javascript:void(0)" onclick="login()">登录</a>   <a href="javascript:void(0)" onclick="register()">注册</a></div>
                        <div class="overflow1">
                            <div class="pad">
                                <strong>蓝色动力网络新手卡领号程序系统. </strong>
                                <p>
                                    在这里你可以领到各种游戏的新手卡账号！！
                                </p>
                                <br style="line-height:8px" />
                                <div class="line"><img alt="" src="<{$t_dir}>images/spacer.gif" width="1" height="1" /><br />
                                </div>
                                <br style="line-height:10px" />
                                <div align="center" id="getcard">
                                    <div class="gameclass">
                                        请选择游戏分类：
                                        <select name="gameclass" id="gameclass">
                                            <{section name=l loop=$sm_class}>
                                                <option value="<{$sm_class[l].id}>"><{$sm_class[l].name}></option>
                                            <{/section}>
                                        </select>
                                    </div>
                                        <a href="javascript:void(0)" onclick="getCard()"><img src="<{$t_dir}>images/lq_1.gif" /></a> <a href="javascript:void(0)" onclick="taoCard()"><img src="<{$t_dir}>images/lq_2.gif" /></a>
                                </div>
                                <div style="display:none" id="result" align="center">
                                    <h3>您领取的卡号为：<span class="number"></span></h3>
                                    <div><a href="javascript:void(0)" onclick="getBack()"><img src="<{$t_dir}>images/back.gif" /></a></div>
                                </div>
                            </div>
                        </div>
                        <br style="line-height:22px" />
                        <div class="overflow2">
                            <div class="pad">                                
                                <ul >
                                    <{section name=l loop=$sm_news}>
                                    <li><span style="float:left"><a href="news.php?nid=<{$sm_news[l].newsid}>">[<{$sm_news[l].newsclassname}>]</a> <a href="news.php?id=<{$sm_news[l].id}>"><{$sm_news[l].title}></a></span> <span style="float:right;"><{$sm_news[l].posttime}></span></li>
			<{/section}>
                                </ul>
                                <div align="right"><a href="news.php">更多资讯</a></div>
                            </div>
                        </div>
                    </div>
                </div>
                <div id="right_column"></div>
                <div class="clear"></div>
            </div>
            <{include file='foot.html'}>
        </div>
    </body>

</html>