<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CampaignReveal.aspx.cs"
    Inherits="RM.Web.Training.Campaign.CampaignReveal" %>

<!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 runat="server">
    <title>TKS -
        <%=title %></title>
    <link href="../../Themes/Styles/bootstrap-theme.min.css" rel="stylesheet" type="text/css" />
    <link href="../../Themes/Styles/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <script src="../../Themes/Scripts/jquery-1.8.2.min.js" type="text/javascript"></script>   
    <%--<script src="../../Themes/Scripts/bootstrap.js" type="text/javascript"></script>
    <script src="../../Themes/Scripts/bootstrap.min.js" type="text/javascript"></script>--%>
    <%--<script src="../../Themes/Scripts/jquery.qrcode.min.js" type="text/javascript"></script>  --%> 
    <script src="img/jquery.qrcode.min.js" type="text/javascript"></script> 
    <script type="text/javascript">
      
        function toUtf8(str) {
            var out, i, len, c;
            out = "";
            len = str.length;
            for (i = 0; i < len; i++) {
                c = str.charCodeAt(i);
                if ((c >= 0x0001) && (c <= 0x007F)) {
                    out += str.charAt(i);
                } else if (c > 0x07FF) {
                    out += String.fromCharCode(0xE0 | ((c >> 12) & 0x0F));
                    out += String.fromCharCode(0x80 | ((c >> 6) & 0x3F));
                    out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
                } else {
                    out += String.fromCharCode(0xC0 | ((c >> 6) & 0x1F));
                    out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
                }
            }
            return out;
        }  
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="container-fluid" style="width: 800px; max-width: 800px; margin: auto;">
        <div class="row-fluid">
            <div class="span12">
                <input type="hidden" id="codetext" runat="server" />
                <input type="hidden" id="codetext_bm" runat="server" />
                <h3 class="text-center">
                    <%=title %>
                </h3>
                <div style="min-height: 300px;">
                    <%=context %></div>
            </div>
            <div style="float: right; margin-right: 50px; margin-top: 30px; font-size: 13px;">
                <div>
                    <%--<img src="img/LOGO.png" width="10%" style="margin-left: 65px; margin-bottom: -120px;" alt="" />--%>
                    <div class="img-polaroid" id="code" >
                    
                    </div>
                    <p class=" text-center" style="font-size: 22px;">
                        扫描<strong>二维码</strong>签到
                    </p>
                </div>
                <div>
                   <%-- <img src="img/LOGO.png" width="10%" style="margin-left: 65px; margin-bottom: -120px;" alt="" />--%>
                    <div class="img-polaroid" id="code_" >
                    
                    </div>
                    <p class=" text-center" style="font-size: 22px;">
                        扫描<strong>二维码</strong>报名
                    </p>
                </div>
            </div>
            <div style="float: left;font-size: 22px; line-height:120px;">
                <p class=" text-right" style="margin-top: 20px;">
                    <span>
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CampaignOpenTime")+':'%></span>
                    <span id="???">
                        <%=time %></span></p>
                        
            </div>
        </div>
    </div>
    </form>
</body>
<script type="text/javascript">
    $(function () {
        //$('#code').qrcode(str);	
        $("#code").empty();
        //var str = toUtf8($("#codetext").val());
        $("#code").qrcode({
            //render: "table",
            width: 200,
            height: 200,
            text: $("#codetext").val(),
            src: 'img/LOGO.png'
        });
        $("#code_").empty();
        //var str = toUtf8($("#codetext_bm").val());
        
        $("#code_").qrcode({
            //render: "table",
            width: 200,
            height: 200,
            text: $("#codetext_bm").val(),
            src: "img/LOGO.png"
        });
    })

</script>
</html>
