<?php 
ob_start();
session_start();
if($_SESSION['frontuserid']=="")
{header("location:login");exit();}

if($_POST['submit']!='')
{
    include("include/connection.php");
    $userid=$_POST['id'];
    $name=$_POST['name'];
    $pincode=$_POST['pincode'];
    $mobile=$_POST['mobile'];
    $state=$_POST['state'];
    $city=$_POST['city'];
    $address=$_POST['address'];
    $selectBankQuery=mysqli_query($con,"select * from `tbl_address` where `userid`='".$userid."'");
    $bankRows=mysqli_num_rows($selectBankQuery);
    if($bankRows == 0){
    $sql= "INSERT INTO tbl_address(userid,name,mobile,pincode,state,city,address) VALUES ('$userid','$name','$mobile','$pincode','$state','$city','$address')";
if(mysqli_query($con,$sql)){

echo ("<script LANGUAGE='JavaScript'>
    window.alert('Succesfully Added');
    window.location.href='address';
    </script>");
}else{
 echo ("<script LANGUAGE='JavaScript'>
    window.alert('somthing wrong data not submited');
    window.location.href='add_address';
    </script>");   
}
}else{
   echo ("<script LANGUAGE='JavaScript'>
    window.alert('Address Already Exists');
    window.location.href='address';
    </script>");    
}
}
?>

<!doctype html>
<html lang="en">
     <?php
include("include/connection.php");
$userid=$_SESSION['frontuserid'];
$Query=mysqli_query($con,"select * from tbl_website WHERE id=1");
$rows=mysqli_fetch_array($Query);
?>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Mywin</title>
<link rel="shortcut icon" type="image/png" href="assets/img/logo_final.png"/>
<link rel="stylesheet" href="assets/css/style.css">
<link rel="stylesheet" href="assets/css/main.css">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
<link href="assets/css/dataTables.bootstrap.min.css" rel="stylesheet"/>

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<style>
  body {
	-ms-user-select:text;
	user-select:text;
	-moz-user-select:text;
	-webkit-user-select:text
}
.layout--tabs .nav-item{
    width:33%;
}
.table thead th{color:#000;}
.accordion .btn-link::after{
    display:none;
}
.card {
    border: 1px solid #E5E9F2;
    border-radius: 3px;
    padding: 0px;
}
.card .card-title {
    margin-bottom: 7px;
}

.nav-tabs.size2 .cvc {
  width: 33%;
}

h3{ font-weight:normal; font-size:20px;}
h4{ font-weight:normal; font-size:18px; color:#858585;}
.card-body{ padding:.6rem;}
td{ padding:3px;}
.btn-sm {
    height: 26px;
    padding: 0px 12px;
}
.form-control{box-shadow:none; border-bottom:#ccc solid 1px; margin-bottom:3px;}
#alert h4{font-size: 1rem; font-weight:bold; color:#333;}
#alert p{font-size: 13px; margin-top:20px;}
#alert .modal-content{border-radius:3px}
#alert .modal-dialog{padding:20px; margin-top:130px;}

label{ color:#999;}
#bonus .modal-dialog{margin-top:100px;}
#bonus .modal-footer{ border:none;}
.dropdown-menu{ background:#fff;top: -15px;
left: -145px; border:none;
border-radius:0px;
-webkit-box-shadow: 0 3px 1px -2px rgba(0, 0, 0, .2), 0 2px 2px 0 rgba(0, 0, 0, .14), 0 1px 5px 0 rgba(0, 0, 0, .12);
box-shadow: 0 3px 1px -2px rgba(0, 0, 0, .2), 0 2px 2px 0 rgba(0, 0, 0, .14), 0 1px 5px 0 rgba(0, 0, 0, .12);}
.appHeader1 .right{right:20px;}
.dropdown-item {
    padding: .75rem 1.5rem;
}

.nav-tabs .nav-link.active{
    background:#ccc !important;
        padding: 0 198px;

}

.tab-content {
  padding: 0;
}

.card {
  border-radius: 0 0 .25rem .25rem;
  border-top: 0;
}

.nav-tabs {
  height: 42px;
  padding: 0;
  position: relative;

  .nav-item {
    margin-left: 0;
 
    a {
      color: black;
      display: block;
      padding: 8px 25px;
    }


    &.overflow-tab {
      background-color: white;
      display: none;
      position: absolute;
      right: 0;
      width: 150px;
      z-index: 1;

      a {
        border: 1px solid lightgray;
        border-radius: 0;
        padding: 6px 10px;

        &:hover,
        &:focus,
        &:active,
        &.active {
          background-color: lightgray;
        }
      }
  
      &:last-child {
        border-radius: 0 0 0 4px;
      }

    }

    &.overflow-tab-action {
      position: absolute;
      right: 0;
    }
  }

}
.btn-sm {
    height: 26px;
    padding: 0px 12px;
    border-radius: 0px;
}
.btn-secondary:focus {
    color: #171717;
    background-color: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 0 0 0.2rem rgb(130 138 145 / 50%);
}

.input_card{
    width: 100%;
    padding: 15px 15px 64px 15px;
    box-sizing: border-box;
}

.input_card .card_ul li{
    padding: 4px;
    box-sizing: border-box;
    position: relative;
    display: flex;
    flex-direction: column;
}

.input_card .card_ul li p {
    font-size: 12px;
    color: #7d7d7d;
    margin-bottom: 10px;
}
.input_card .card_ul li input {
    background: transparent;
    font-size: 16px;
    border: 0;
    border-bottom: 1px solid #919191;
}
.continue_btn{
    width: 100%;
    padding: 15px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
}
.continue_btn button{
    width: 65%;
    padding: 12px 0;
    text-align: center;
    border: 0;
    border-radius: 2px;
    color: #fff;
    font-size: 14px;
    background: #009688;
    box-shadow: 0 3px 1px -2px rgb(0 0 0 / 20%), 0 2px 2px 0 rgb(0 0 0 / 14%), 0 1px 5px 0 rgb(0 0 0 / 12%);
}
.ripple {
    position: relative;
    overflow: hidden;
}
ul{
    padding:0px;
}

/*.appBottomMenu .item .ion-md-person{color: #0081ff!important;}
.appBottomMenu .item .toggleSidebar span{color: #0081ff!important;}*/
.img-wd{
    width:100%;
    min-height: 72px;
}
.bxtext{
        font-size: 12px;
    line-height: 13px;
    font-family: calibri;
    text-align: center;
    text-transform: uppercase;
    font-weight: 700;
    color: #fff;
    padding: 4px;
    background:var(--background-color);
}
.appHeader1{height:auto;}
@media only screen and (max-width: 600px) {
 .nav-tabs .nav-link.active {
    background: #ccc !important;
    padding: 0 28px;
}
.card_ul{
    margin: 0 auto;
    padding: 0px;
}
.img-wd {
        width: 72%;
    margin: 16px 48px;
}

}

</style>
</head>

<body>


  <div data-v-432e6ed0="" class="home mian game">
     
     
     

<!-- App Header -->
<div class="appHeader1" >
  <div class="left"> <a href="#" onClick="goBack();" class="icon goBack"> <i class="icon ion-md-arrow-back"></i> </a>
    <div class="pageTitle">Games</div>
  </div>
  
 <!-- <div class="right"> 
  <div class="dropdown">
  <a class="" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" style="font-size:25px;">
    <i class="icon ion-md-list"></i></a>
  

  <div class="dropdown-menu" aria-labelledby="dropdownMenuLink">
    <!--<a class="dropdown-item" href="promotionrecord.php">Promotion Record</a>->
    <a class="dropdown-item" href="bonusrecord.php">Bonus Record</a>
    <a class="dropdown-item" href="promotionApplyrecord.php">Apply Record</a>
  </div>
</div>
  </div>-->
</div>
<!-- searchBox --> 

<!-- * searchBox --> 
<!-- * App Header --> 
<?php  
$userid=$_SESSION['frontuserid'];
$sql="select * from tbl_user where id='$userid'";
$select=mysqli_query($con,$sql);
$val=mysqli_fetch_array($select);
?>
<!-- App Capsule -->
<div id="appCapsule" class="pb-2">
    
    <div class="container" style="margin-top:5%;">
        
        <div class="row">
            
            <div class="col-md-3 col-xs-6">
               <a href="gamedashboard.php"><img class="img-responsive img-wd" src="assets/img/colorgame.jpeg">
               <h4 class="bxtext">Color Game</h4>
               </a> 
            </div>
            
              <div class="col-md-3 col-xs-6">
               <a href="andarbahar"> <img class="img-responsive img-wd" src="assets/img/game3.png">
               <h4 class="bxtext">Play Now</h4>
               </a>
            </div>
            
            <div class="col-md-3 col-xs-6">
               <a href="#"> <img class="img-responsive img-wd" src="assets/img/dragon_tiger.jpeg">
               <h4 class="bxtext">Coming Soon</h4>
               </a>
            </div>
            
          
            
            <div class="col-md-3 col-xs-6">
                <a href="#"><img class="img-responsive img-wd" src="assets/img/game4.png">
                <h4 class="bxtext">Coming Soon</h4>
                </a>
            </div>
            
         
        </div>
        
        <div class="row" style="margin-top:20px; margin-bottom:40px;">
            
            <div class="col-md-3 ">
               <a href="#"> <img class="img-responsive img-wd" src="assets/img/car_roulette.jpeg">
               <h4 class="bxtext">Coming Soon</h4>
               </a>
            </div>
            
            <div class="col-md-3">
                <a href="#"> <img class="img-responsive img-wd" src="assets/img/ludo.jpeg">
                <h4 class="bxtext">Coming Soon</h4>
                </a>
            </div>
            
           <!-- <div class="col-md-3">
                <a href="#"><img class="img-responsive img-wd" src="assets/img/game7.png">
                <h4 class="bxtext">Coming Soon</h4>
                </a>
            </div>
            
            <div class="col-md-3">
                <a href="#"> <img class="img-responsive img-wd" src="assets/img/game8.png">
                
                </a>
            </div>-->
            
         
        </div>
        
        
        
    </div>
    
    
    
   
 
</div>
<!-- appCapsule -->
     
     
    </div>



<?php include("include/footer.php");?>
<div id="bonus" class="modal fade" role="dialog">
  <div class="modal-dialog modal-lg" role="document">
    <div class="modal-content ">
      <div class="modal-header paymentheader" id="paymenttitle"> 
      <h4 class="modal-title text-dark">Apply to Balance</h4>
       </div>
 <form action="#" method="post" id="bonusForm" autocomplete="off">
      <div class="modal-body mt-1" id="loadform">
      <div class="row">
                    <div class="col-12">
<div class="inner-addon left-addon mt-3">
      <i class="icon"><i class="fa fa-rupee"></i></i>
        <input type="number" id="bonusammount" name="bonusammount" class="form-control" placeholder="Bonus" onKeyPress="return isNumber(event)" >
      </div>                   
<input type="hidden" name="userid" id="userid" class="form-control" value="<?php echo $userid;?>">
<input type="hidden" name="action" id="action" class="form-control" value="bonus">
      
                    </div>
                </div>
      </div>
      <input type="hidden" name="tab" id="tab" value="parity">
      <div class="modal-footer"> 
   <a type="button" class="pull-left btn btn-sm closebtn" data-dismiss="modal">CANCEL</a>
<button type="submit" class="pull-left btn btn-sm btn-white text-info">CONFIRM</button> 
      </div>
      </form>
    </div>
  </div>
</div>

<div id="alert" class="modal fade" role="dialog">
  <div class="modal-dialog modal-sm" role="document">
    <div class="modal-content">
      <div class="modal-body" id="alertmessage"> </div>
      <div class="text-center pb-1">
    <a type="button" class="text-info" data-dismiss="modal">OK</a>
    </div> 
    </div>
  </div>
</div>
<!-- Jquery --> 
<script >
    /**
 * Defines the bootstrap tabs handler.
 *
 * @param {string} element
 *  Element.
 */
var tabsActions = function (element) {
  this.element = $(element);

  this.setup = function () {
    if (this.element.length <= 0) {
      return;
    }
    this.init();
    // Update after resize window.
    var resizeId = null;
    $(window).resize(function () {
      clearTimeout(resizeId);
      resizeId = setTimeout(() => {this.init()}, 50);
    }.bind(this));
  };
  
  this.init = function () {
 
    // Add class to overflow items.
    this.actionOverflowItems();
    var tabs_overflow = this.element.find('.overflow-tab');
 
    // Build overflow action tab element.
    if (tabs_overflow.length > 0) {
      if (!this.element.find('.overflow-tab-action').length) {
        var tab_link = $('<a>')
          .addClass('nav-link')
          .attr('href', '#')
          .attr('data-toggle', 'dropdown')
          .text('...')
          .on('click', function (e) {
            e.preventDefault();
            $(this).parents('.nav.nav-tabs').children('.nav-item.overflow-tab').toggle();
          });

        var overflow_tab_action = $('<li>')
          .addClass('nav-item')
          .addClass('overflow-tab-action')
          .append(tab_link);

        // Add hide to overflow tabs when click on any tab.
        this.element.find('.nav-link').on('click', function (e) {
          $(this).parents('.nav.nav-tabs').children('.nav-item.overflow-tab').hide();
        });
        this.element.append(overflow_tab_action);
      }
      
      this.openOverflowDropdown();
    }
    else {
      this.element.find('.overflow-tab-action').remove();
    }
 };
 
  this.openOverflowDropdown = function () {
    var overflow_sum_height = 0;
    var overflow_first_top = 41;
    
    this.element.find('.overflow-tab').hide();
    // Calc top position of overflow tabs.
    this.element.find('.overflow-tab').each(function () {
      var overflow_item_height = $(this).height() - 1;
      if (overflow_sum_height === 0) {
        $(this).css('top', overflow_first_top + 'px');
        overflow_sum_height += overflow_first_top + overflow_item_height;
      }
      else {
        $(this).css('top', overflow_sum_height + 'px');
        overflow_sum_height += overflow_item_height;
      }

    });
  };

  this.actionOverflowItems = function () {
    var tabs_limit = this.element.width() - 100;
    var count = 0;
    
    // Calc tans width and add class to any tab that is overflow.
    for (var i = 0; i < this.element.children().length; i += 1) {
      var item = $(this.element.children()[i]);
      if (item.hasClass('overflow-tab-action')) {
        continue;
      }
      
      count += item.width();
      if (count > tabs_limit) {
        item.addClass('overflow-tab');
      }
      else if (count < tabs_limit) {
        item.removeClass('overflow-tab');
        item.show();
      }
    }
  };
};

var tabsAction = new tabsActions('.layout--tabs .nav-tabs-wrapper .nav-tabs');
tabsAction.setup();

</script>
<script src="assets/js/lib/jquery-3.4.1.min.js"></script> 
<!-- Bootstrap--> 
<script src="assets/js/lib/popper.min.js"></script> 
<script src="assets/js/lib/bootstrap.min.js"></script> 
<!-- Owl Carousel --> 
<script src="assets/js/plugins/owl.carousel.min.js"></script> 
<!-- Main Js File --> 
<script src="assets/js/app.js"></script>
<script src="assets/js/jquery.validate.min.js"></script>
<script src="assets/js/bonus.js"></script>
<!-- <script> 
/** 
 * Disable right-click of mouse, F12 key, and save key combinations on page 
 */ 
 document.addEventListener("contextmenu", function(e){ 
 e.preventDefault(); 
 }, false); 
 document.addEventListener("keydown", function(e) { 
 //document.onkeydown = function(e) { 
 // "I" key 
 if (e.ctrlKey && e.shiftKey && e.keyCode == 73) { 
 disabledEvent(e); 
 } 
 // "J" key 
 if (e.ctrlKey && e.shiftKey && e.keyCode == 74) { 
 disabledEvent(e); 
 } 
 // "S" key + macOS 
 if (e.keyCode == 83 && (navigator.platform.match("Mac") ? e.metaKey : e.ctrlKey)) { 
 disabledEvent(e); 
 } 
 // "U" key 
 if (e.ctrlKey && e.keyCode == 85) { 
 disabledEvent(e); 
 } 
 // "F12" key 
 if (event.keyCode == 123) { 
 disabledEvent(e); 
 } 
 // "C" key 
 if (e.ctrlKey && event.keyCode == 67) { 
 disabledEvent(e); 
 } 
 }, false); 
 function disabledEvent(e){ 
 if (e.stopPropagation){ 
 e.stopPropagation(); 
 } else if (window.event){ 
 window.event.cancelBubble = true; 
 } 
 e.preventDefault(); 
 return false; 
 }</script>-->

</body>
</html>