<% @Import Namespace="Seven.Front" %>
<% @Import Namespace="Seven.Front.Globals" %>
<% @Import Namespace="Seven.Front.Objects" %>
<%@ Page Language="C#" MasterPageFile="ModelDMZ.Master" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="Seven.Front._Default" %>

<%@ Register Assembly="CaptchaUltimateCustomControl" Namespace="PeterKellner.Utils"
    TagPrefix="CAPTCHA" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cpHeader" runat="server">

    <title><%=L.LBL("LblGENLogin") %></title>

    <script type="text/javascript">

        function mostrarAjaxDatos(juego) {
            $.ajax({
                type: "GET",
                url: "Servicio.svc/GetDatosCombo",
                data: { "IdJuego": juego, "LangCode": "<%=LangCode %>" },
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                beforeSend: function () {
                    $("#cbDatos").prop("disabled", true);
                },
                success: function (json) {
                    $("#cbDatos").html(json.d);
                    $("#cbDatos").prop("disabled", false);
                    jQueryUIOtraVez();
                }
            });
        };

        $(document).ready(function () {
            $(":submit").button();
            $(":text").addClass("ui-widget-content");
            $(":password").addClass("ui-widget-content");

            mostrarAjaxDatos($("#cbJuegos").val());
        });

    </script>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="cpPrincipal" runat="server">

    <div id="SevenBreadcrumb" class="ui-state-default">
        <table style="width: 100%; white-space: nowrap;">
            <tr>
                <td>
                    Seven Front Desk <%=Parametros.Version %> - <%=L.LBL("LblGENLogin") %>
                </td>
                <td style="width: 100%;"></td>
                <td>
                    <%=L.LBL("LblGENLanguage") %>
                </td>
                <td>
                    <!-- #include file="LanguageCombo.html" -->
                </td>
            </tr>
        </table>
        
    </div>
        
    <div id="SevenPrincipal">
            
        <div id="SevenMedio">
                
            <div id="SevenInterno" style="width: 570px; height: 385px; background-image: url(img/Cover.png); background-repeat: no-repeat; padding-top: 10px; padding-left: 20px;">
                <table style="width: 100%;">
                    <tr>
                        <td width="70%">
                            <% if(!String.IsNullOrEmpty(Mensaje)){ %>
                            <span class="SevenMsgError" style="font-size: 10pt;"><%=Mensaje %></span>
                            <% }else if(!String.IsNullOrEmpty(MensajeBueno)){ %>
                            <span class="SevenMsgExito" style="font-size: 10pt;"><%=MensajeBueno %></span>
                            <% }else{ %>
                            <span style="font-size: 10pt;">&nbsp;</span>
                            <% } %>
                                        
                        </td>
                        <td style="width: 100%;"></td>
                        <td style="text-align: right;">
                            <span style="color: #42434F; font-size: 10pt;"></span>
                        </td>
                    </tr>
                    <tr>
                    <% if (Captcha)
                        { %>
                        <td colspan="3">
                            <div style="height: 210px;"></div>
                        </td>
                    <% } %>
                    <% if (!Captcha)
                        { %>
                        <td colspan="3">
                            <div style="height: 245px;"></div>
                        </td>
                    <% } %>
                    </tr>
                    <tr>
                    <td colspan="3">

                        <table>
                            <tr>
                                <td>
                                    <span style="color: #42434F; font-size: 10pt; font-weight: bold;"><%=L.LBL("LblGENUser") %>:</span>
                                </td>
                                <td>
                                    <span style="color: #42434F; font-size: 10pt; font-weight: bold;"><%=L.LBL("LblGENPassword") %>:</span>
                                </td>
                                <% if (Captcha)
                                    { %>
                                <td>
                                    <span style="color: #42434F; font-size: 10pt; font-weight: bold;"><%=L.LBL("LblGENVerification") %>:</span>
                                </td>
                                <% } %>
                            </tr>
                            <tr>
                                <td>
                                    <input type="text" name="txtUsuario" value="" size="10" />
                                </td>
                                <td>
                                    <input type="password" name="txtPassWord" value="" size="10" />
                                </td>
                                <td>
                                <% if (Captcha)
                                    { %>
                                    <CAPTCHA:CaptchaUltimateControl ID="CaptchaUltimateControl1" runat="server" 
                                        Title="" ButtonRedisplayCaptchaText="Aceptar" 
                                        CaptchaBackgroundColor="Transparent" CaptchaBorder="1" CaptchaLength="4" 
                                        CaptchaType="2" CommandArg1="" CommandArg2="" CommandArg3="" CommandArg4="" 
                                        CommandArg5="" EncryptedValue="" FontFamilyString="Courrier New" 
                                        HeightCaptchaPixels="35" InvalidCaptchaMessage="Verificación Incorrecta" PlainValue="" 
                                        ShowPromo="False" ShowRecalculateCaptchaButton="True" ShowTitle="False" 
                                        WidthCaptchaPixels="120" onverified="CaptchaUltimateControl1_Verified" 
                                        onverifying="CaptchaUltimateControl1_Verifying">
                                        <ItemTemplate>
                                            <table id="Table1" runat="server">
                                                <tr id="Tr1" runat="server">
                                                    <td id="Td1" runat="server">
                                                        <table>
                                                            <tr>
                                                                <td>
                                                                    <asp:Image ID="CaptchaImageID" runat="server" ImageUrl="~/CaptchaType.ashx" />
                                                                </td>
                                                                <td>
                                                                    <asp:TextBox ID="VerificationID" runat="server" size="7"></asp:TextBox>
                                                                </td>
                                                                <td>
                                                                    <asp:Button ID="ButtonDisplayNextID" runat="server" />
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td id="Td2" runat="server">
                                                        <% if (CaptchaMalo)
                                                            { %>
                                                        <span class="SevenMsgError" style="font-size: 10pt;">
                                                        <% } %>
                                                        <asp:CustomValidator ID="CustomValidatorID" runat="server">&nbsp;<%=L.ERR("LblGENVerificationIncorrect") %>&nbsp;</asp:CustomValidator>
                                                        <% if (CaptchaMalo)
                                                            { %>
                                                        </span>
                                                        <% } %>
                                                    </td>
                                                </tr>
                                            </table>
                                        </ItemTemplate>
                                    </CAPTCHA:CaptchaUltimateControl>
                                </td>
                                <% } %>
                            </tr>
                                        
                        </table>

                        <table>
                            <tr>
                                <td>
                                    <span style="color: #42434F; font-size: 10pt; font-weight: bold;"><%=L.LBL("LblGENEntity") %>:</span>
                                </td>
                                <td>
                                    <span style="color: #42434F; font-size: 10pt; font-weight: bold;"><%=L.LBL("LblGENDomain") %>:</span>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <%=cbJuego %>
                                </td>
                                <td>
                                    <select name="cbDatos" id="cbDatos" style="width: 180px;"></select>
                                </td>
                                <td style="width: 20px;"></td>
                                <td colspan="2" style="text-align: left;">
                                    <button onclick="this.form.submit();">
                                        <table>
                                            <tr>
                                                <td>
                                                    <img src="img/tick.png" alt="<%=L.LBL("LblGENLogin") %>" />
                                                </td>
                                                <td>
                                                    <%=L.LBL("LblGENLogin") %>
                                                </td>
                                            </tr>
                                        </table>
                                    </button>
                                </td>
                            </tr>
                        </table>
                                
                    </td>
                    </tr>
                </table>
            </div>
                
        </div>
            
    </div>

</asp:Content>
