<?php ob_start(); 
error_reporting(0);
(@include ('./dt_page/common.php')) or die("<p style='font-family:Arial, Helvetica, sans-serif; margin-top:80px; font-size:16px; line-height:180%; letter-spacing:2px;' align='center'><img src='https://primadesain.com/images/block.png' width='90' height='90' /></br></br>Database failed, you can not access this script.<br>Please contact us to fix this error.<br><strong><a href='http://www.primadesain.com'>www.primadesain.com</a></strong></p><br><p style='font-family:Arial, Helvetica, sans-serif; margin-top:30px; font-size:12px; line-height:180%; letter-spacing:2px;' align='center'>&copy; 2009 - ".date("Y")." www.primadesain.com</p>");
(@include ('./dt_page/classMySQL.php')) or die("<p style='font-family:Arial, Helvetica, sans-serif; margin-top:80px; font-size:16px; line-height:180%; letter-spacing:2px;' align='center'><img src='https://primadesain.com/images/block.png' width='90' height='90' /></br></br>System failed, you can not access this script.<br>Please contact us to fix this error.<br><strong><a href='http://www.primadesain.com'>www.primadesain.com</a></strong></p><br><p style='font-family:Arial, Helvetica, sans-serif; margin-top:30px; font-size:12px; line-height:180%; letter-spacing:2px;' align='center'>&copy; 2009 - ".date("Y")." www.primadesain.com</p>");
$db = new db_mysql($server_name, $userdb, $passdb, $databasename,"");
(@include ('./dt_page/function.php')) or die("<p style='font-family:Arial, Helvetica, sans-serif; margin-top:80px; font-size:16px; line-height:180%; letter-spacing:2px;' align='center'><img src='https://primadesain.com/images/block.png' width='90' height='90' /></br></br>Function failed, you can not access this script.<br>Please contact us to fix this error.<br><strong><a href='http://www.primadesain.com'>www.primadesain.com</a></strong></p><br><p style='font-family:Arial, Helvetica, sans-serif; margin-top:30px; font-size:12px; line-height:180%; letter-spacing:2px;' align='center'>&copy; 2009 - ".date("Y")." www.primadesain.com</p>");
(@include ('./dt_page/affiliate.php')) or die("<p style='font-family:Arial, Helvetica, sans-serif; margin-top:80px; font-size:16px; line-height:180%; letter-spacing:2px;' align='center'><img src='https://primadesain.com/images/block.png' width='90' height='90' /></br></br>Refferal system failed, you can not access this script.<br>Please contact us to fix this error.<br><strong><a href='http://www.primadesain.com'>www.primadesain.com</a></strong></p><br><p style='font-family:Arial, Helvetica, sans-serif; margin-top:30px; font-size:12px; line-height:180%; letter-spacing:2px;' align='center'>&copy; 2009 - ".date("Y")." www.primadesain.com</p>");

if($lang == 1){
include("./dt_page/langid.php");
}else{
include("./dt_page/langen.php");
}
require_once('./dt_page/class.phpmailer.php');
include("./dt_page/class.smtp.php");

if ($blockie == 1 && preg_match("/MSIE/",getenv("HTTP_USER_AGENT")) ||
preg_match("/Internet Explorer/",getenv("HTTP_USER_AGENT"))) {
include ('./block_ie.php');
exit;
}   
$time0000=time();
$query113z = "SELECT * FROM ckpoint WHERE time <= '$time0000'"; 
$result113z = mysql_query($query113z);
$numus9999 = mysql_num_rows($result113z);
if($numus9999) {
while($row113z = mysql_fetch_array($result113z)){
$userckp = $row113z['username'];

$db->delete("ckpoint", "username='".$userckp."'");
$db->update("member", "batas='0'", "username='".$userckp."'");
}
}
?>

<!DOCTYPE html>
<!--[if IE 8]>
<html lang="en" class="ie8"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en">
<!--<![endif]-->
<head>
    <meta charset="utf-8"/>
    <meta name="author" content="<?php echo WEB_DOMAIN; ?>"/>
    <meta name="description" content="<?php echo WEB_DESC; ?>" />
    <meta name="keywords" content="<?php echo WEB_KEYWORDS; ?>" />
	<title>Login - <?php echo WEB_TITLE; ?></title>
    <link href="images/banner/<?php echo WEB_FAVCONS; ?>" rel="SHORTCUT ICON" /><!--favicon-->
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport"/>

    <!-- ================== BEGIN BASE CSS STYLE ================== -->
    <link href="themes/assets/plugins/jquery-ui/themes/base/minified/jquery-ui.min.css" rel="stylesheet"/>
    <link href="themes/assets/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet"/>
    <link href="themes/assets/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet"/>
    <link href="themes/assets/css/animate.min.css" rel="stylesheet"/>
    <link href="themes/assets/css/style.min.css" rel="stylesheet"/>
    <link href="themes/assets/css/style-responsive.min.css" rel="stylesheet"/>
    <link href="themes/assets/css/theme/default.css" rel="stylesheet" id="theme"/>
    <!-- ================== END BASE CSS STYLE ================== -->

    <!-- ================== BEGIN BASE JS ================== -->
    <script src="themes/assets/plugins/pace/pace.min.js"></script>
	<script src='https://www.google.com/recaptcha/api.js'></script>
    <!-- ================== END BASE JS ================== -->
    
<style type="text/css">
 body{
 width:100%;
 height:100%;
 margin:0;
 }
 div.popup{
 position:fixed;
 top:0;
 bottom:0;
 left:0;
 right:0;
 width:100%;
 height:100%;
 background: rgba(0,0,0,.8);
 z-index: 5000;
 }
 
 div#box{
 margin:5% auto;
 background:#fff;
 width:75%;
 height:75%;
 -webkit-box-shadow:0 0 15px #000;
 -moz-box-shadow:0 0 15px #000;
 box-shadow:0 0 15px #000;
 
 }
 
 a.close{
 text-decoration:none;
 color:#000;
 margin:10px 15px 0 0;
 float:right;
 font-family:tahoma;
 font-size:20px;
 }
</style>
</head>
<body class="pace-top bg-white">
<!-- begin #page-loader -->
<div id="page-loader" class="fade in"><span class="spinner"></span></div>
<!-- end #page-loader -->

<!-- begin #page-container -->
<div id="page-container" class="">
    <!-- begin login -->
    <div class="login login-with-news-feed">
        <!-- begin news-feed -->
        <div class="news-feed">
            <div class="news-image">
                <img src="themes/assets/img/login-bg/bg-15.jpg" alt="">
            </div>
            
        </div>
        <!-- end news-feed -->
        <!-- begin right-content -->
        <div class="right-content">
            <!-- begin login-header -->
            <div class="login-header">
                <center>
                  <img src="themes/img/coin.png" style="width:200px;">
                    <div class="brand">&nbsp;
                    </div>
                </center>
            </div>
            <!-- end login-header -->
            <!-- begin login-content -->
            <div class="login-content">
            
        
  <?php
$results = $_GET['result'];
$user = $_GET['user'];
$rem = $_GET['rem'];
if($results == "restrict") { 
echo "<div class='alert alert-danger'>You recently resend email activation code, please wait ".$rem." to be able to resend again.</div>";
}
?>              
  
                
     <?php
$results = $_GET['result'];
if($results == "wrong_captcha") { 
echo "<div class='alert alert-danger'>Wrong Captcha!</div>";
}
?>
           
                
                
      <?php
	 $results = $_GET['result'];
if($results == "cekpoint") { 
$ntm = base64_decode($_GET['tc']);
$bataslog = $db->config("log_salah");
		?> 
				<div class='alert alert-danger'>You have to enter a password more than <?php echo $bataslog;?> times. please wait <?php echo $ntm; ?> to try login again.</div>
				<?php } ?>
      

 <?php
$results = $_GET['result'];
if($results == "error") { 
echo "<div class='alert alert-danger'>Invalid session!</div>";
}
?>

				
		 <?php
	 $results = $_GET['result'];
	 if($results == "blocked") {
     echo "<div class='alert alert-danger'>your member area being blocked! contact administrator.</div>";
	 }?> 
				 
      
<?php
$results = $_GET['result'];
if($results == "wrong_user") { 
echo "<div class='alert alert-danger'>Username Not Found!</div>";
}
?>
<?php
$results = $_GET['result'];
if($results == "wrong_userx") { 
echo "<div class='alert alert-danger'>Wrong Username!</div>";
}
?>
<?php
$results = $_GET['result'];
$batase = $db->config("log_salah");
$co = $_GET['co'];
$sql="SELECT batas FROM member WHERE username = '".mysql_real_escape_string($co)."'"; 
$dt=mysql_query($sql);
$con=mysql_fetch_array($dt);
$batas = $con['batas']; 

if($results == "wrong_pass") { 
echo "<div class='alert alert-danger'>Wrong Password! Forgot password? Please reset your password.</div>";
}
?>
<?php
$results = $_GET['result'];
if($results == "inactive") { 
echo "<div class='alert alert-danger'>Your memberlist is not active! please contact administrator.</div>";
}
?>
<?php
$results = $_GET['result'];
$mle = $_GET['mle'];
if($results == "success") { 
echo "<div class='alert alert-success'>Reset the password has been sent to your email ".$mle.", please check your mailbox.</div>";
}
?>
<?php
$results = $_GET['result'];
$mlex = $_GET['p'];
$mlex2 = $_GET['u'];
if($results == "success_psw") { 
echo "<div class='alert alert-success'>Your password has been successfully updated! use this following password to login :<strong> ".$mlex."</strong>.<br>for security reason, change your password regularly in the member area.</div>";
}
?>
<?php
$results = $_GET['result'];
$mle = $_GET['mle'];
if($results == "successx") { 
echo "<div class='alert alert-success'>Your password has been reset earlier and unprocessed, we have sent password reset confirmation again, please chack your mailbox ".$mle.".</div>";
}
?>

<?php
$results = $_GET['result'];
if($results == "successreg") { 
echo "<div class='alert alert-success'>Your registration has been successful, please login your members area below.</div>";
}
?>
            
            
         <?php
$results = $_GET['result'];
if($results == "wrong_auth") { 
echo "<div class='alert alert-danger'>You're enable two factor authentication at your account, Please enter your google authenticator six-digit code!</div>";
}
?>       
            
            
             
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
                <form method="POST" action="lg_process.php" accept-charset="UTF-8" class="margin-bottom-0">
                                <div class="form-group m-b-15">
                    <input class="form-control input-lg" placeholder="Username" required name="userlogin" type="text" value="<?php echo $_GET['u']; ?>">
                </div>
                <div class="form-group m-b-15">
                    <input class="form-control input-lg" placeholder="Password" required name="passlogin" type="password" value="<?php echo $_GET['p']; ?>">
                </div>
               <div class="form-group m-b-15">
                 <div class="g-recaptcha" data-sitekey="<?php echo $site_key_google; ?>"></div>
                </div>
                <div class="login-buttons">
                    <button type="submit" class="btn btn-primary btn-block btn-lg">Login</button>
                </div>
                 <div class="m-t-20 m-b-40 p-b-40 text-inverse">
                    Forgot Password Click Here <a href="forgotpass.php" class="text-success">Here</a><br><?php if ($regpublic == 1){ ?><br><?php } ?>
                    
                </div>
                 <!--<div align="center" style="margin-top:-30px;">
               <a href="#" onclick="window.open('https://www.sitelock.com/verify.php?site=vpchain.co','SiteLock','width=600,height=600,left=160,top=170');" ><img class="img-responsive" alt="SiteLock" title="SiteLock" src="//shield.sitelock.com/shield/vpchain.co" /></a>
                </div>-->
                <hr/>
                <p class="text-center">
                  Copyright &copy;  <?php echo WEB_FOOTER; ?>
                </p>
                </form>
            </div>
            <!-- end login-content -->
        </div>
        <!-- end right-container -->
    </div>
    <!-- end login -->
</div>
<!-- end page container -->

<!-- ================== BEGIN BASE JS ================== -->
<script src="themes/assets/plugins/jquery/jquery-1.9.1.min.js"></script>
<script src="themes/assets/plugins/jquery/jquery-migrate-1.1.0.min.js"></script>
<script src="themes/assets/plugins/jquery-ui/ui/minified/jquery-ui.min.js"></script>
<script src="themes/assets/plugins/bootstrap/js/bootstrap.min.js"></script>
<!--[if lt IE 9]>
<script src="/assets/crossbrowserjs/html5shiv.js"></script>
<script src="/assets/crossbrowserjs/respond.min.js"></script>
<script src="/assets/crossbrowserjs/excanvas.min.js"></script>
<![endif]-->
<script src="themes/assets/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="themes/assets/plugins/jquery-cookie/jquery.cookie.js"></script>
<!-- ================== END BASE JS ================== -->

<!-- ================== BEGIN PAGE LEVEL JS ================== -->
<script src="themes/assets/js/apps.min.js"></script>
<!-- ================== END PAGE LEVEL JS ================== -->

<script>
  $(document).ready(function () {
    App.init()
  })
</script>
<?php if($stchat == 1) { echo $lchats; }?>
<script type="text/javascript">
 $(document).ready(function(){
 $('a.close').click(function(eve){
 
 eve.preventDefault();
 $(this).parents('div.popup').fadeOut('slow');
 });
 });
</script>
<?php
$querypopup = "SELECT title, maintext FROM content WHERE published=1 and catid=94"; 
$resultpopup = mysql_query($querypopup);
$ada_popup = mysql_num_rows($resultpopup);
$rowpopup = mysql_fetch_array($resultpopup) or die(mysql_error());

if($ada_popup){
?>
<!-- bagian popup -->
 <div class="popup">
 <div id="box">
 <a class="close" href="#">X</a>
 <br/>
 <div style="padding:10px;">
 <?php
echo $rowpopup['maintext'];
 ?>
 </div>
 </div> 
 </div>
 <!-- akhir dari popup -->
 <?php } ?>
</body>
</html>
<?php ob_flush(); ?>