<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Netclues PowerPanel</title>
        <link rel="shortcut icon" href="html/images/favicon.ico" type="image/x-icon" /> 
        <link rel="stylesheet" type="text/css" href="<?= GLOBAL_ADMIN_CSS_PATH ?>style.css" />
        <link rel="stylesheet" type="text/css" href="<?= GLOBAL_ADMIN_CSS_PATH ?>style1.css" />
        <script src="<?php echo GLOBAL_ADMIN_JS_PATH; ?>jquery.min.js"></script>
        <script type="text/javascript"  src="<?php echo GLOBAL_ADMIN_JS_PATH; ?>jquery.passstrength.js"></script>


        <script language="JavaScript">
            function checkemail(str)
            {
                var testresults;
                
                var filter=/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/i;

                if (filter.test(str))
                    testresults=true
                else
                    testresults=false

                return (testresults)
            }


            function ChkValid()
            {
                var myString=document.getElementById('ss_password').value;
                var digitString = myString.replace(/[^0-9]/g , "");
                var specialString = myString.replace(/[a-zA-Z0-9]/g, "");
                var charString = myString.replace(/[^A-Z]/g, "");
                
                var passlen=document.getElementById('ss_password').value;
                var len=passlen.length;
               
                if(document.getElementById('ss_username').value=="")
                {
                    alert("Please enter your Email ID.");
                    document.getElementById('ss_username').focus();
                    return false;
                }
                else if(!checkemail(document.getElementById('ss_username').value))
                {
                    alert("Please enter valid Email ID.");
                    document.getElementById('ss_username').focus();
                    return false;
                }
                else if(document.getElementById('ss_password').value=="")
                {
                    alert("Please enter your password.");
                    document.getElementById('ss_password').focus();
                    return false;
                }
                
                
                else if(len < 8){
                    alert("You have entered wrong Password.");
                    document.getElementById('ss_password').focus();
                    return false;
                }
                
                else if(len > 20){
                    alert("You have entered wrong Password.");
                    document.getElementById('ss_password').focus();
                    return false;
                }
                
                if(digitString < 1)
                {
                    alert("You have entered wrong Password.");
                    document.getElementById('ss_password').focus();
                    return false; 
                }
                if(charString < 1)
                {
                    alert("You have entered wrong Password.");
                    document.getElementById('ss_password').focus();
                    return false; 
                }
                
                else if(document.getElementById('pin_value_hdn')!=null)
                {
        
                    if(document.getElementById('enqcap').value=="")
                    {
                        alert("Please enter word shown in image..");
                        document.getElementById('enqcap').focus();
                        return false;
                    }
                    else if(document.getElementById('enqcap').value!=document.getElementById('pin_value_hdn').value)
                    {
                        alert("You have entered wrong word..Please try again..");
                        document.getElementById('enqcap').focus();
                        return false;
                    }
                }
                document.getElementById('h_save').value = 'T';
                return true;
            }	

            function setHeight()
            {
                var height = document.documentElement.clientHeight;
                document.getElementById('container').setAttribute('height', height);
            }
            //            function abc()
            //            {
            //
            //                loadScripts(["<?php echo GLOBAL_ADMIN_JS_PATH; ?>jquery.passstrength.js"],function(){});
            //            }
            //            
            function loadScripts(c,b){
                var a=function(g,f){
                    var d=document.createElement("script");
                    d.src=g;
                    d.onload=d.onreadystatechange=function(){
                        d.onreadystatechange=d.onload=null;
                        f()
                    };
            
                    var e=document.getElementsByTagName("head")[0];
                    (e||document.body).appendChild(d)
                };
                (function(){
                   
                    if(c.length!=0){
                        a(c.shift(),arguments.callee)
                    }else{
                        b&&b()
                    }
                })()
            }
           
        </script>
        <style>
            .display-message{background:#F1B1B4; border:1px solid #CC0000; font:bold 12px Arial,Helvetica,sans-serif; text-align:center; color:#000000; padding:10px 0; display:none;}
        </style>
    </head>
    <body>
        <div id="page-container">
            <div id="logo">
                <div class="logo"><a href="index.php">
                        <img src="<?php echo GLOBAL_ADMIN_IMAGES_PATH; ?>logo.jpg" alt="PowerPanel" /></a>
                </div>
                <div class="links" > <br />
                    <br />
                    <div class="welcome-main" style="width:265px;">
                        <div class="welcome-text">
                            <?php echo date("d-F-Y"); ?>
                        </div>
                    </div>
                </div>
            </div>
            <div class="clear"></div>
            <div class="middle-main">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td width="5%" align="left" valign="top">&nbsp;</td>
                        <td width="1%" align="left" valign="top">&nbsp;</td>
                        <td align="left" valign="top" width="93%">
                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td height="40" align="left" valign="top">&nbsp;</td>
                                </tr>
                                <tr>
                                    <td align="left" valign="top" class="login-heading-text">Welcome To Netclues PowerPanel</td>
                                </tr>
                                <tr>
                                    <td valign="top">
                                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                            <tr>
                                                <td width="48%"><p class="new-login-detail-text"> Netclues PowerPanel is a complete Content Management System, with phenomenal customizability.
                                                        After all, PowerPanel has:</p>
                                                    <p>&nbsp;</p>
                                                    <p class="new-login-detail-text-heading">Log Manager</p>
                                                    <p class="new-login-detail-text">The module manager manages the log in history, every log in and logout time is noted so you know how long you access the PowerPanel and which of your agents are accessing what areas.</p>
                                                    <p>&nbsp;</p>
                                                    <p class="new-login-detail-text-heading">Rich Text Editor</p>
                                                    <p class="new-login-detail-text">PowerPanel has a rich text box area with a WYSIWYG editor. Where changing or updating your site is just 3 clicks.</p>
                                                    <p>&nbsp;</p>
                                                    <p class="new-login-detail-text-heading">Trash Manager</p>
                                                    <p class="new-login-detail-text">Any content, property, specials deleted? Don’t worry we have trash manager and logs showing how they were deleted. Now undoing is never impossible.</p>
                                                    <p>&nbsp;</p>
                                                    <p class="new-login-detail-text-heading">Latest Updates from the Netclues can be found at: <a href="http://www.netclues.ky" target="_blank">www.netclues.ky</a></p></td>
                                                <td width="13%">&nbsp;</td>
                                                <td width="27%">

                                                    <form  method="post" name="logform" id="logform" onSubmit="return ChkValid();">
                                                        <table width="400" border="0" align="center" cellpadding="0" cellspacing="0" class="login-border">
                                                            <tr>
                                                                <td height="35" colspan="3" align="left" valign="middle" class="login-top">Login</td>
                                                            </tr>
                                                            <?php
                                                            if ($message != '') {

                                                                $style = 'style="display:block;"';
                                                            } else {
                                                                $style = 'style="display:none;"';
                                                            }
                                                            ?>
                                                            <tr>
                                                                <td width="106" align="left" valign="middle" class="add-new-user-text"><br />
                                                                    Email ID :</td>
                                                                <td width="220" align="left" valign="middle"><br />
                                                                    <input name="ss_username" type="text" class="login-textbox" id="ss_username" value="<?php echo $username ?>" /></td>
                                                                <input name="h_save" type="hidden" class="login-textbox" id="h_save" value="F" />
                                                                <input type="hidden" name="gotopath" class="login-textbox" value="<?php echo "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?>" />
                                                            </tr>

                                                            <tr>
                                                                <td align="left" valign="middle" class="add-new-user-text">Password :</td>
                                                                <td align="left" valign="middle">
                                                                    <input name="ss_password" type="password" class="login-textbox" id="ss_password"  value="<?php echo $passowrd ?>"  /></td>
                                                                <td align="left" valign="middle">  <span id="result" style="margin-left: 3px;"></span> </td>

                                                            </tr>


                                                            <tr>

                                                                <td align="left" valign="middle" colspan="3"> 
                                                                    <div style="float: right !important;" class="contact-comment-new">
                                                                        <span class="help-icon1" style="margin-left: -60px;margin-top: -26px;"></span>
                                                                    <div class="contact-hint fl" style="width: 395px; height: 36px;margin-left: 1163px !important;margin-top: 214px !important;"><?php echo "Password should be in between 8 to 20 characters long and must contain at least one capital alphabet and numeric." ?></div>
                                                                </div>
                                                                    </td>
                                                            </tr>
                                                            <?php echo $captcha ?>
                                                            <?php if ($captcha != '') { ?>
                                                                </td>
                                                                </tr>
                                                            <?php } ?>
                                                            <tr>
                                                                <td align="left" valign="middle">&nbsp;</td>
                                                                <td align="left" valign="middle" class="add-new-user-text2"><input type="checkbox" class="user-checkbox" name="chkrememberme" id="chkrememberme" <?php echo ($chkrememberme == "1") ? "checked" : ""; ?>/>
                                                                    <label for="chkrememberme" style="cursor:pointer;"> Remember Me</label></td>
                                                            </tr>
                                                            <tr>
                                                                <td align="left" valign="middle">&nbsp;</td>
                                                                <td align="left" valign="middle" style="padding-top:10px;">
                                                                    <input name="login" type="image" id="login" src="<?php echo GLOBAL_ADMIN_IMAGES_PATH; ?>login.gif" border="0" />
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td align="left" valign="middle">&nbsp;</td>
                                                                <td align="left" valign="middle" class="login-text1"><a href="index.php?module=login&action=frgtpassword">Forgot Password?</a></td>
                                                            </tr>
                                                            <tr>
                                                                <td colspan="2" align="left" valign="middle">&nbsp;</td>
                                                            </tr>
                                                        </table>
                                                    </form>
                                                    </table>



                                                </td>
                                               <td width="12%"></td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </div>
            </tr>
            </table>
        </div>
        </div>
        <div id="footer-container" style="position:fixed; bottom:0; width:100%; margin:-36px 0 0 0;">

            <div class="footer">
                <div class="footer-version">Version 4.0</div>
                <div class="footer-copyright">Copyright &copy; <?php echo date('Y'); ?> &nbsp;&nbsp;<a href="http://www.netclues.com/" target="_blank"><img src="<?php echo GLOBAL_ADMIN_IMAGES_PATH; ?>netclues.png" width="64" height="16" alt="netclues" /></a></div>
            </div>
        </div>
        <?php
        if ($message != '') {
            ?>
            <script type="text/javascript">
                alert("Login failed. Please try again.");
            </script>
        <?php } ?>
        <script type="text/javascript">         document.getElementById("ss_username").focus();           </script>
    </body>
</html>
