<?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($db->config("maintenance") == 1){ ?>
<!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>
<!--
	/* 
	#######################
	http://primadesain.com
	primapc57@gmail.com
    +62 8122222044
	#######################
	*/
-->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><?php echo $db->config("title"); ?></title>
<link href="images/banner/<?php echo $db->config("fcon"); ?>" rel="SHORTCUT ICON" />
<link href="https://fonts.googleapis.com/css?family=Raleway:100,600" rel="stylesheet" type="text/css">
<style>
 html, body {
                background-color: #fff;
                color: #636b6f;
                font-family: 'Raleway', sans-serif;
                font-weight: 100;
                margin: 0;
            }

            .flex-center {
                align-items: center;
                display: flex;
                justify-content: center;
            }
            .content {
                text-align: center;
				margin-top:50px;
            }

			.linetext {
                font-size: 20px;
                padding: 20px;
				max-width:600px;
				font-weight:bold;
				line-height:160%;
            }
			</style>
</head>
<body>
<div class="flex-center">
<div class="content">
<img src="images/maintenance.png" style="max-width:600px; width:100%;">
<div class="linetext"><?php echo $db->config("maintenance_info"); ?></div>
</div>
</div>
</body>
</html>
<?php } else { 
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>
<html class="no-js" lang="">

<head>
<!--
	/* 
	#######################
	http://primadesain.com
	primapc57@gmail.com
    +62 8122222044
	#######################
	*/
-->
    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
      <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 name="viewport" content="width=device-width, initial-scale=1">
    <!-- Favicon -->
    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="logintheme/css/bootstrap.min.css">
    <!-- Fontawesome CSS -->
    <link rel="stylesheet" href="logintheme/css/fontawesome-all.min.css">
    <!-- Flaticon CSS -->
    <link rel="stylesheet" href="logintheme/font/flaticon.css">
    <!-- Google Web Fonts -->
    <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" rel="stylesheet">
    <!-- Custom CSS -->
    <link rel="stylesheet" href="logintheme/style.css">
	<script src='https://www.google.com/recaptcha/api.js'></script>
  <script src="js/sweetalert-dev.js"></script>
  <link rel="stylesheet" href="css/sweetalert.css">  
</head>

<body>
    <!--[if lt IE 8]>
        <p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
    <![endif]-->     
    <section class="fxt-template-animation fxt-template-layout28" data-bg-image="logintheme/img/figure/bg28-l.jpg">  
        <!-- Animation Start Here -->
        <div id="particles-js"></div>
        <!-- Animation End Here -->     
        <div class="fxt-content">
            <div class="fxt-header" style="margin-top:-30px;">
                <a href="index.php" class="fxt-logo" style="margin-bottom:25px;"><img src="logintheme/img/logo-28.png" alt="Logo" style="width:<?php echo $withlogone; ?>px;"></a> 
                <ul class="fxt-switcher-wrap">
                    <li><a href="login.php" class="switcher-text active">Login</a></li>
                    <?php if($regpublic == 1){ ?><li><a href="signup.php" class="switcher-text">Register</a></li><?php } ?>
                    <li><a href="forgotpass.php" class="switcher-text">Forgot Password</a></li>
                </ul>
            </div>                            
            <div class="fxt-form"> 
                <div class="fxt-transformY-50 fxt-transition-delay-1">
                    <p>Login into your account</p>
                    
                    
    <?php
$results = $_GET['result'];
if($results == "successlogin") { 
$gourlee = base64_decode($_GET['go']);
$namaee = base64_decode($_GET['nm']);

echo "<script type=text/javascript>
              swal({
  title: 'Login Success',
  text: 'Welcome back ".$namaee."',
  type: 'success',
  timer: 5000,
  showConfirmButton: false
});;
              window.location = '".$gourlee."'
              </script>";
}
?>                    
                    
                    
                   <?php
$results = $_GET['result'];
if($results == "wrong_captcha") { 
echo '<script type=text/javascript>
              swal({
  title: "Wrong Captcha!",
  type: "error",
  showCancelButton: false,
  confirmButtonColor: "#DD6B55",
  confirmButtonText: "OK",
  cancelButtonText: "No, cancel plx!",
  closeOnConfirm: true,
  closeOnCancel: false
});
              </script>';	
}
?>   
      <?php
	 $results = $_GET['result'];
if($results == "cekpoint") { 
$ntm = base64_decode($_GET['tc']);
$bataslog = $db->config("log_salah");
echo '<script type=text/javascript>
              swal({
  title: "Error Login!",
  text: "You have to enter a password more than '.$bataslog.' times. please wait '.$ntm.' to try login again.",
  type: "error",
  showCancelButton: false,
  confirmButtonColor: "#DD6B55",
  confirmButtonText: "OK",
  cancelButtonText: "No, cancel plx!",
  closeOnConfirm: true,
  closeOnCancel: false
});
              </script>';	
	 } ?>
      

 <?php
$results = $_GET['result'];
if($results == "error") { 
echo '<script type=text/javascript>
              swal({
  title: "Session Error!",
  type: "error",
  showCancelButton: false,
  confirmButtonColor: "#DD6B55",
  confirmButtonText: "OK",
  cancelButtonText: "No, cancel plx!",
  closeOnConfirm: true,
  closeOnCancel: false
});
              </script>';	
}
?>			
		 <?php
	 $results = $_GET['result'];
	 if($results == "blocked") {
echo '<script type=text/javascript>
              swal({
  title: "Account Blocked",
  text: "your member area being blocked! contact administrator.",
  type: "error",
  showCancelButton: false,
  confirmButtonColor: "#DD6B55",
  confirmButtonText: "OK",
  cancelButtonText: "No, cancel plx!",
  closeOnConfirm: true,
  closeOnCancel: false
});
              </script>';	
	 }?> 
				 
      
<?php
$results = $_GET['result'];
if($results == "wrong_user") { 
echo '<script type=text/javascript>
              swal({
  title: "Username Not Found",
  type: "error",
  showCancelButton: false,
  confirmButtonColor: "#DD6B55",
  confirmButtonText: "OK",
  cancelButtonText: "No, cancel plx!",
  closeOnConfirm: true,
  closeOnCancel: false
});
              </script>';	
}
?>
<?php
$results = $_GET['result'];
if($results == "wrong_userx") { 
echo '<script type=text/javascript>
              swal({
  title: "Wrong Username",
  type: "error",
  showCancelButton: false,
  confirmButtonColor: "#DD6B55",
  confirmButtonText: "OK",
  cancelButtonText: "No, cancel plx!",
  closeOnConfirm: true,
  closeOnCancel: false
});
              </script>';	
}
?>
<?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 '<script type=text/javascript>
              swal({
  title: "Wrong Password",
  text: "Wrong Password! Forgot password? Please reset your password.",
  type: "error",
  showCancelButton: false,
  confirmButtonColor: "#DD6B55",
  confirmButtonText: "OK",
  cancelButtonText: "No, cancel plx!",
  closeOnConfirm: true,
  closeOnCancel: false
});
              </script>';	
}
?>
<?php
$results = $_GET['result'];
if($results == "inactive") { 
echo '<script type=text/javascript>
              swal({
  title: "Account Inactive",
  text: "Your memberlist is not active! please contact administrator.",
  type: "error",
  showCancelButton: false,
  confirmButtonColor: "#DD6B55",
  confirmButtonText: "OK",
  cancelButtonText: "No, cancel plx!",
  closeOnConfirm: true,
  closeOnCancel: false
});
              </script>';	
}
?>
<?php
$results = $_GET['result'];
$mle = $_GET['mle'];
if($results == "success") { 
echo '<script type=text/javascript>
              swal({
  title: "Reset Password",
  text: "Reset the password has been sent to your email '.$mle.', please check your mailbox.",
  type: "info",
  showCancelButton: false,
  confirmButtonColor: "#DD6B55",
  confirmButtonText: "OK",
  cancelButtonText: "No, cancel plx!",
  closeOnConfirm: true,
  closeOnCancel: false
});
              </script>';	
}
?>
<?php
$results = $_GET['result'];
$mlex = $_GET['p'];
$mlex2 = $_GET['u'];
if($results == "success_psw") { 
echo '<script type=text/javascript>
              swal({
  title: "Update Password",
  text: "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.",
  type: "info",
  showCancelButton: false,
  confirmButtonColor: "#DD6B55",
  confirmButtonText: "OK",
  cancelButtonText: "No, cancel plx!",
  closeOnConfirm: true,
  closeOnCancel: false
});
              </script>';	
}
?>
<?php
$results = $_GET['result'];
$mle = $_GET['mle'];
if($results == "successx") { 
echo '<script type=text/javascript>
              swal({
  title: "Reset Password",
  text: "Your password has been reset earlier and unprocessed, we have sent password reset confirmation again, please chack your mailbox '.$mle.'.",
  type: "info",
  showCancelButton: false,
  confirmButtonColor: "#DD6B55",
  confirmButtonText: "OK",
  cancelButtonText: "No, cancel plx!",
  closeOnConfirm: true,
  closeOnCancel: false
});
              </script>';	
}
?>

<?php
$results = $_GET['result'];
if($results == "successreg") { 
echo '<script type=text/javascript>
              swal({
  title: "Registration Success",
  text: "Your registration has been successful, please login your members area below.",
  type: "info",
  showCancelButton: false,
  confirmButtonColor: "#DD6B55",
  confirmButtonText: "OK",
  cancelButtonText: "No, cancel plx!",
  closeOnConfirm: true,
  closeOnCancel: false
});
              </script>';	
}
?>
            
            
         <?php
$results = $_GET['result'];
if($results == "wrong_auth") { 
echo '<script type=text/javascript>
              swal({
  title: "2FA Google Authenticator",
  text: "You are enable two factor authentication at your account, Please enter your google authenticator six-digit code!",
  type: "info",
  showCancelButton: false,
  confirmButtonColor: "#DD6B55",
  confirmButtonText: "OK",
  cancelButtonText: "No, cancel plx!",
  closeOnConfirm: true,
  closeOnCancel: false
});
              </script>';	
}
?>       
            
   <?php
$results = $_GET['result'];
if($results == "wrong_user_verification") { 
echo '<script type=text/javascript>
              swal({
  title: "Invalid Verification link",
  type: "error",
  showCancelButton: false,
  confirmButtonColor: "#DD6B55",
  confirmButtonText: "OK",
  cancelButtonText: "No, cancel plx!",
  closeOnConfirm: true,
  closeOnCancel: false
});
              </script>';	
}
?>
<?php
$results = $_GET['result'];
$user = $_GET['user'];
$rem = $_GET['rem'];
if($results == "restrict") { 
echo '<script type=text/javascript>
              swal({
  title: "Resend Verification",
  text: "You recently resend email confirmation, please wait to be able to resend again",
  type: "info",
  showCancelButton: false,
  confirmButtonColor: "#DD6B55",
  confirmButtonText: "OK",
  cancelButtonText: "No, cancel plx!",
  closeOnConfirm: true,
  closeOnCancel: false
});
              </script>';	
}
?>
 <?php
$results = $_GET['result'];
$user = $_GET['user'];
$mail = $_GET['mail'];
if($results == "send_mail") { 
echo '<script type=text/javascript>
              swal({
  title: "Resend Verification",
  text: "Confirmation link has been sent to : $mail, Please check your mailbox",
  type: "info",
  showCancelButton: false,
  confirmButtonColor: "#DD6B55",
  confirmButtonText: "OK",
  cancelButtonText: "No, cancel plx!",
  closeOnConfirm: true,
  closeOnCancel: false
});
              </script>';	
}
?>        
 <?php
$results = $_GET['result'];
if($results == "wrong_user_confirm") { 
echo '<script type=text/javascript>
              swal({
  title: "Error Verification",
  text: "User not found! You may have been confirmed before!",
  type: "error",
  showCancelButton: false,
  confirmButtonColor: "#DD6B55",
  confirmButtonText: "OK",
  cancelButtonText: "No, cancel plx!",
  closeOnConfirm: true,
  closeOnCancel: false
});
              </script>';	
}
?> 
<?php
$results = $_GET['result'];
if($results == "link_not_valid") { 
echo '<script type=text/javascript>
              swal({
  title: "Error Verification",
  text: "Invalid link! Make sure you use a valid link has been sent to your email!",
  type: "error",
  showCancelButton: false,
  confirmButtonColor: "#DD6B55",
  confirmButtonText: "OK",
  cancelButtonText: "No, cancel plx!",
  closeOnConfirm: true,
  closeOnCancel: false
});
              </script>';	
}
?>
 <?php
$results = $_GET['result'];
if($results == "error_validation") { 
echo '<script type=text/javascript>
              swal({
  title: "Error Verification",
  text: "Invalid link! User not found! Make sure you use a valid link has been sent to your email!",
  type: "error",
  showCancelButton: false,
  confirmButtonColor: "#DD6B55",
  confirmButtonText: "OK",
  cancelButtonText: "No, cancel plx!",
  closeOnConfirm: true,
  closeOnCancel: false
});
              </script>';	
}
?> 
<?php
$results = $_GET['result'];
if($results == "authenticated") { 
echo '<script type=text/javascript>
              swal({
  title: "Success Verification",
  text: "Your registration has been confirmed. You can login your Member Area using login form below.",
  type: "info",
  showCancelButton: false,
  confirmButtonColor: "#DD6B55",
  confirmButtonText: "OK",
  cancelButtonText: "No, cancel plx!",
  closeOnConfirm: true,
  closeOnCancel: false
});
              </script>';	
}
?>        
    <?php
$results = $_GET['result'];
if($results == "verification") { 
echo '<script type=text/javascript>
              swal({
  title: "Register Success",
  text: "Congratulations '.base64_decode($_GET['n']).', Your registration has been successfully submitted. we have sent a confirmation to your email address '.base64_decode($_GET['m']).'. Please check your email and confirm your registration.",
  type: "info",
  showCancelButton: false,
  confirmButtonColor: "#DD6B55",
  confirmButtonText: "OK",
  cancelButtonText: "No, cancel plx!",
  closeOnConfirm: true,
  closeOnCancel: false
});
              </script>';	
}


if (isset($_GET['c']) && $_GET['c'] == 1) {
	$dsssc="disabled";
}else{
	$dsssc="";
}
?>             
     <?php
$results = $_GET['result'];
$user = $_GET['user'];
$email = $db->dataku("email", $user); 
if($results == "noactive_mail") { 
echo '<script type=text/javascript>
              swal({
  title: "Verification Link",
  text: "We have sent confirmation link to your email ('.$email.'). Please check your mailbox.",
  type: "info",
  showCancelButton: false,
  confirmButtonColor: "#DD6B55",
  confirmButtonText: "OK",
  cancelButtonText: "No, cancel plx!",
  closeOnConfirm: true,
  closeOnCancel: false
});
              </script>';	
}
?>             
         
                    
                    
                    
                    
                    
                </div>
                <form action="lg_process.php" method="POST">
                    <div class="form-group"> 
                        <div class="fxt-transformY-50 fxt-transition-delay-2">   
						<input type="text" class="form-control" placeholder="Username" required name="userlogin" />                      
                        </div>
                    </div>
                    <div class="form-group">  
                        <div class="fxt-transformY-50 fxt-transition-delay-3">    
						<input type="password" id="password" class="form-control" placeholder="Password" required name="passlogin" />                
                            <i toggle="#password" class="fa fa-fw fa-eye toggle-password field-icon"></i>
                        </div>
                    </div>
                    
                <?php if($usecaptcha==1){ ?>
                    <div class="form-group">  
                        <div class="fxt-transformY-50 fxt-transition-delay-3">    
						<div class="g-recaptcha" data-sitekey="<?php echo $site_key_google; ?>"></div>
                        </div>
                    </div>
                <?php } ?>
                    
                    
                    <div class="form-group">
                        <div class="fxt-transformY-50 fxt-transition-delay-4">
                            <div class="fxt-checkbox-area">
                                <div class="checkbox">
                                    <input id="checkbox1" type="checkbox">
                                    <label for="checkbox1">Keep me logged in</label>
                                </div>
                               <div id="showme" style="display:none;"><a href="login.php"><button type="button" class="fxt-btn-fill">Reload</button></a></div>
  <div id="loadingGif" style="display:none">
                                <img src="images/ld.gif" style="width:100px;"></div>
                                <button type="submit" class="fxt-btn-fill" name="submit" id="Login" onclick="showDiv()">Log in</button>
                                
                                
                            </div>
                            
                   <?php if($db->config("appdownload") == 1){ ?>        
                    <div align="center"><a href="<?php echo $db->config("applinkdownload1");?>"><img src="images/app3.png" alt="app" style="width:180px;"></a></div>
                    <?php } ?>       
                            
                        </div>
                    </div>
                    
                    
                    
                </form>  
       <script type='text/javascript'>
   function showDiv() {
  document.getElementById('Login').style.display = "none";
  document.getElementById('loadingGif').style.display = "block";
  setTimeout(function() {
    document.getElementById('loadingGif').style.display = "none";
    document.getElementById('showme').style.display = "block";
  },30000);
   
}
</script>        
                             
            </div> 
         
          
        </div>
    </section>    
    <!-- jquery-->
    <script src="logintheme/js/jquery-3.5.0.min.js"></script>
    <!-- Popper js -->
    <script src="logintheme/js/popper.min.js"></script>
    <!-- Bootstrap js -->
    <script src="logintheme/js/bootstrap.min.js"></script>
    <!-- Imagesloaded js -->
    <script src="logintheme/js/imagesloaded.pkgd.min.js"></script>
    <!-- Particles js -->
    <script src="logintheme/js/particles.js"></script>
    <script src="logintheme/js/particles-1.js"></script>
    <!-- Validator js -->
    <script src="logintheme/js/validator.min.js"></script>
    <!-- Custom Js -->
    <script src="logintheme/js/main.js"></script>


<script>
var width = $('.g-recaptcha').parent().width();
if (width < 302) {
	var scale = width / 302;
	$('.g-recaptcha').css('transform', 'scale(' + scale + ')');
	$('.g-recaptcha').css('-webkit-transform', 'scale(' + scale + ')');
	$('.g-recaptcha').css('transform-origin', '0 0');
	$('.g-recaptcha').css('-webkit-transform-origin', '0 0');
}
</script><?php if($stchat == 1) { include("tawkto.php"); 
} else if($stchat == 2) { include("whatshelp.php"); 
} else if($stchat == 3) { include("whatshelptawk.php"); 
} ?> 
</body>
</html>
<?php } ?>