<?PHP
$user_id = $_SESSION["user_id"];
$usid = $_SESSION["user_id"];
$db->Query("SELECT * FROM db_users_a WHERE id = '$usid'");
$user_data = $db->FetchArray();
$db->Query("SELECT * FROM db_users_a, db_users_b WHERE db_users_a.id = db_users_b.id AND db_users_a.id = '$usid'");
$prof_data = $db->FetchArray();
$sumzar = ($prof_data['payment_sum']*100)/$prof_data['insert_sum'];
?>
<!DOCTYPE html>
<html lang="en" class="borderimage">
<meta property="og:image" content="https://cashempire.cc/images/slider/slide2_en.jpg">
	<meta property="og:image:type" content="image/png">
<meta property="og:image:width" content="1024">
<meta property="og:image:height" content="1024">
<head>
    <meta charset="windows-1251">
	
    <title>Cash Empire - Innovative game with real cash withdrawal | Play and Make Real Money</title>
    <meta name="description" content="Cash Empire - the Game with real cash withdrawal, Cash Empire Game, cashempire, make real money by playing a simple game">
    <meta name="keywords" content="Game with real cash withdrawal, Cash Empire Game, Cash Empire, Earn by playing, make real money, invest, investing, big money, play and earn">
    <link rel="shortcut icon" type="image/png" href="/images/favicon.png">

    <link rel="stylesheet" href="/css/reset.css">
    <link href="/css/font/fonts.css" rel="stylesheet">
    
    <link rel="stylesheet" href="/css/style.min.css?34">
    <link rel="stylesheet" href="/css/custom1.css?1">
    <link rel="stylesheet" href="/css/animations.css">
    <link rel="stylesheet" href="/css/animate.css">
	<link rel="stylesheet" href="/css/axie.css">
    <link rel="stylesheet" href="/css/font-awesome/css/font-awesome.min.css">
    <link href="/js/slider/jquery.bxslider.css" rel="stylesheet" />
    <link href="/js/customscrollbar/jquery.mCustomScrollbar.css" rel="stylesheet" />
    <link rel="stylesheet" href="/js/owl-carousel/owl.carousel.css">
    <link rel="stylesheet" href="/js/owl-carousel/owl.theme.default.css">
	
	
<script type="text/javascript" src="/js/translate.js"></script>




   <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js" ></script>
   
	<!-- <script src="/js/jquery.min.js"></script> -->

    <script src="/js/scrollreveal/scrollreveal.min.js"></script>
	 <script src="/js/functions.js"></script>
	 <!-- Global site tag (gtag.js) - Google Ads: 10955064079 -->
<script async src="https://www.googletagmanager.com/gtag/js?id=AW-10955064079"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'AW-10955064079');
</script>


<div id="google_translate_element2"></div>

<style type="text/css">
#goog-gt-tt {display:none !important;}
.goog-te-banner-frame {display:none !important;}
.goog-te-menu-value:hover {text-decoration:none !important;}
body {top:0 !important;}
#google_translate_element2 {display:none!important;} 
</style>
 <script type="text/javascript">
function googleTranslateElementInit2() {new google.translate.TranslateElement({pageLanguage: 'en',autoDisplay: true}, 'google_translate_element2');}
</script>
<script type="text/javascript" src="https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit2"></script>
<script type="text/javascript">
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('6 7(a,b){n{4(2.9){3 c=2.9("o");c.p(b,f,f);a.q(c)}g{3 c=2.r();a.s(\'t\'+b,c)}}u(e){}}6 h(a){4(a.8)a=a.8;4(a==\'\')v;3 b=a.w(\'|\')[1];3 c;3 d=2.x(\'y\');z(3 i=0;i<d.5;i++)4(d[i].A==\'B-C-D\')c=d[i];4(2.j(\'k\')==E||2.j(\'k\').l.5==0||c.5==0||c.l.5==0){F(6(){h(a)},G)}g{c.8=b;7(c,\'m\');7(c,\'m\')}}',43,43,'||document|var|if|length|function|GTranslateFireEvent|value|createEvent||||||true|else|doGTranslate||getElementById|google_translate_element2|innerHTML|change|try|HTMLEvents|initEvent|dispatchEvent|createEventObject|fireEvent|on|catch|return|split|getElementsByTagName|select|for|className|goog|te|combo|null|setTimeout|500'.split('|'),0,{}))
</script>
<script>
    
    function myFunction() {
    document.getElementById("myDropdown").classList.toggle("show");
}

// Close the dropdown menu if the user clicks outside of it
window.onclick = function(event) {
  if (!event.target.matches('.dropbtn')) {

    var dropdowns = document.getElementsByClassName("dropdown-content");
    var i;
    for (i = 0; i < dropdowns.length; i++) {
      var openDropdown = dropdowns[i];
      if (openDropdown.classList.contains('show')) {
        openDropdown.classList.remove('show');
      }
    }
  }
}
let lang = window.navigator.languages ? window.navigator.languages[0] : null;
    lang = lang || window.navigator.language || window.navigator.browserLanguage || window.navigator.userLanguage;

let shortLang = lang;
if (shortLang.indexOf('-') !== -1)
    shortLang = shortLang.split('-')[0];

if (shortLang.indexOf('_') !== -1)
    shortLang = shortLang.split('_')[0];
if (shortLang !== 'en')
 doGTranslate('en|shortLang');

</script>

    <script type="text/javascript">!function(){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src='https://vk.com/js/api/openapi.js?169',t.onload=function(){VK.Retargeting.Init("VK-RTRG-1564270-clsUN"),VK.Retargeting.Hit()},document.head.appendChild(t)}();</script><noscript><img src="https://vk.com/rtrg?p=VK-RTRG-1564270-clsUN" style="position:fixed; left:-999px;" alt=""/></noscript>
	
</head>
<body>
<div id="fb-root"></div>
<script async defer crossorigin="anonymous" src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v15.0&appId=315064898956959&autoLogAppEvents=1" nonce="wE7Ivwfd"></script>

    <!-- Main Navbar-->
   <div id="wrapper" class="disable-selection">
        <div id="showBox" style="position: absolute; top: 0px !important; left: 0px; z-index:1 ; width: 100%; height: 100%; overflow: hidden !important;">
        </div>
                <audio id="collectcoinsaudio" preload="auto" ><source src="/media/sounds/collectcoins.mp3"></audio>
        <audio id="sellcoinsaudio" preload="auto" ><source src="/media/sounds/sellcoins.mp3"></audio>
        <audio id="menuaudio" preload="auto" ><source src="/media/sounds/bmove.mp3"></audio>
        <audio id="clickaudio" preload="auto" ><source src="/media/sounds/bclick.mp3"></audio>
        <audio id="letitsnow" preload="auto" loop ><source src="/media/sounds/letitsnow48b.mp3"></audio>
        <!--<div class="vk_repost_konk">
            <a href="https://vk.com/elven.gold?w=wall-102048537_56" target="_blank">
                <div class="vk_konk_banner pointercursor"></div>
            </a>
        </div>-->
        <!--<div class="header_right_banner">
            <div class="days100_banner en"></div>
        </div>-->
        <div class="lang-block">
            
             <img src="/images/bch.png" >
			
        </div>
        

        <?PHP if(!$_SESSION["user"]) { ?>
        <!-- Login Modal-->
		 <?PHP
                            $csrfCheck = $func->csrfVerify();
                            if(isset($_POST["email"]) && isset($_POST["password"]) && $csrfCheck == TRUE){

                                $is_valid = GUMP::is_valid($_POST, array(
                                    'email' => 'required|valid_email',
                                    'password' => 'required|max_len,20|min_len,4|alpha_numeric'
                                ));

                                if($is_valid === true) {
                                    $email = $_POST["email"];
                                    $password = $func->md5Password($_POST["password"]);
                                    if($email !== false && $password !== false){
                                        $db->Query("SELECT id, user, pass, referer_id, banned FROM db_users_a WHERE email = '$email'");
                                        if($db->NumRows() == 1){
                                            $data = $db->FetchArray();
                                            if(strtolower($data["pass"]) == strtolower($password)){
                                                if($data["banned"] == 0){
                                                    # Считаем рефералов
                                                    $db->Query("SELECT COUNT(*) FROM db_users_a WHERE referer_id = '".$data["id"]."'");
                                                    $refs = $db->FetchRow();
                                                    $db->Query("UPDATE db_users_a SET referals = '$refs', date_login = '".time()."', ip = INET_ATON('".$func->UserIP."') WHERE id = '".$data["id"]."'");
                                                    $_SESSION["user_id"] = $data["id"];
                                                    $_SESSION["user"] = $data["user"];
                                                    $_SESSION["referer_id"] = $data["referer_id"];
                                                    if($data['id'] == 1) $_SESSION['admin'] = TRUE;
													
                                                    Header("Location: /account");
													
                                                }else $showError = $lang['error_messages']['accountBanned'];
                                            }else $showError = $lang['error_messages']['wrongLogin'];
                                        }else $showError = $lang['error_messages']['notfoundAccount'];
                                    }else $showError = $lang['error_messages']['wrongLogin'];
                                }else{
                                    $showError = $lang['error_messages']['invalidData'];
                                }

                            }
                            if($showError){
                                echo "<div class='alert alert-danger'>{$showError}<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span> </button></div>";
                            }

                            ?>
<div class="login" id="login">
                <div class="login-form">
                    <form action="" id="top-login-form" method="post">
                        <input type="text" id="username" name="email" placeholder="Email">
                        <input type="password" id="password" name="password" placeholder="Password">

                        
						
						<button type="submit" class="btn btn-primary"><?php echo $lang['btn']['login'];?></button>
                        
                        <button><a href="/signup" class="btn btn-warning"><?php echo $lang['btn']['register'];?></a></button>

                       

                        <div style="margin-top: 2px; ">
                            <!--<a href="#">Forgot your password?</a>&nbsp;-->
                            <a href="/signup"><b>Not a member? Start Making REAL MONEY RIGHT NOW!</b></a>
                        </div>
                    </form>
                </div>
                <div class="reg_bonus_sticker" onclick="location.href='/signup'"></div>
            </div>	
			<script>
                $('#login2_btn').on('click', function() {
                    $('.g-recaptcha').fadeIn(300);
                    $(this).fadeOut(0); $('#login_btn').fadeIn(0);
                    return false;
                });
            </script>
	<!-- /loginModal-->
        <?php }
else {	?>
<div class="login animated" id="login">
            <div class="headerinfo">
			
			
			
                <div class="info_header">
				
                    Welcome <span class="info_name"><?php echo($_SESSION["user"]);?></span>
					
                        
                    
                </div>
				<div class="right_panel">
				
                    <form action="/account/exit" id="top-login-form" method="post">
                        <button  type="submit"><a href="<?php $func->url('account/exit');?>" class="nav-link">Log Out</a></button>
                    </form>
                </div>
				
                
						
				
				
                    
				
                <div class="header_stat">
                    <dfn data-info="Silver for purchases. Using this silver You can buy a variety of buildings and improvements.">
                        <span class="ic-gold1" style="margin-left: 0;"></span><span id="hl_money1">{!BALANCE_B!}</span>
                    </dfn>
                    <dfn data-info="Gold for purchases. Using this gold You can buy a variety of buildings and improvements.">
                        <span class="ic-gold2"></span><span id="hl_money2">{!BALANCE_B1!}</span>
                    </dfn>
					
					<dfn data-info="Silver for withdrawal. You can sell it to other players in crypto.">
                        <span class="ic-gold1"  ></span><span id="hl_money1">{!BALANCE_P!}</span>
                    </dfn>
                    <dfn data-info="Gold for withdrawal. You can sell it to other players in crypto. ">
                        <span class="ic-gold2"  ></span><span id="hl_money2"  >{!BALANCE_P1!}</span>
                    </dfn>
                    
                </div>
            </div>
        </div>
<?}
?>

        <header class="header short">
            <a href="/"><div id="logo" class="animated zoomIn "></div></a> 
            <div class="headertext">
                
                <img class="headimg2" src="/images/headertext2.png" alt="cashempire, Cash empire - the best game with money withdrawal">
            </div>

                        <div id="wrapper-video-bg" class="wrapper-video-bg">
                <div class="video-poster"></div>

                <video loop id="bgvid" preload="auto" autoplay autobuffer>
<!--                    <source src="--><!--images/video-bg/elvengold_video_bg.ogv"  type="video/ogv" >-->
                    <source src="/images/video-bg/elvengold_video_bg.mp4"  type="video/mp4" >

                </video>

            </div>

                    </header>

        <div class="devider"></div>
		
		<?php include('_menu_left.php');?>
            
