<?php
spl_autoload_register(function($class) {
include("classess/".$class.".php");
});
$sqlfun = new sqlfunction();
$admin = new admin_login();
$admin->security_check();
$sid = $admin->call_session();
$getdate =$admin->getdates();
ob_start();
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>MKO</title>
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!-- Bootstrap 3.3.7 -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Font Awesome -->
<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- Ionicons -->
<!--<link rel="stylesheet" href="css/ionicons.min.css">-->
<!-- Theme style -->
<link rel="stylesheet" href="css/AdminLTE.min.css">
<link rel="stylesheet" href="css/_all-skins.min.css">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap-datepicker.min.css">
<link rel="stylesheet" type="text/css" href="css/summernote.css">
<script src="js/jquery.min.js"></script>
<script src="js/jquery-ui.min.js"></script>
<script src="js/bootstrap-datepicker.min.js"></script>
<script type="text/javascript" src="js/summernote.min.js"></script>
<!-- Google Font -->
<link rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
<?php include('header.php');?>
<?php include('sidebar.php');?>
<?php
$succ = "";
if(isset($_GET['delid'])){
$delid = base64_decode($_GET['delid']);
$cnd1 = " id='$delid'";
if($sqlfun->del_data("game",$cnd1))
{
$succ="<div class='alert alert-success hideee'><span><b>Success! </b>Deleted successfully</span><a href='#' class='close' data-dismiss='alert'>×</a></div>";
?>
<script>setTimeout(function(){ $('.hideee').hide(); }, 2000);</script>
<?php }
else
{
$succ = "<p style = 'color:green;'>Something went wrong</p>";
}
}
?>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<div class="content-header">
<?php
if(isset($_GET['parent_id']) && isset($_GET['name']))
{
$parent_id = $_GET['parent_id'];
$name = $_GET['name'];
}
else
{
header("Location:players.php");
}
?>
<h1>Refers of (<?=$name?>)</h1>
<ol class="breadcrumb">
<li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
<li class="active">Players</li>
</ol>
</div>
<!-- Main content -->
<div class="content body">
<div class="row">
<div class="col-md-12">
<div class="box box-danger">
<div class="box-body">
<button type="button" id = "excel_button" class="btn btn-secondary waves-effect tt">Export</button>
<div class="table-responsive">
<table class="table table-bordered export_table">
<thead>
<tr>
<th>Sno.</th>
<th>Join Date</th>
<th>Pid</th>
<th>Player Name</th>
<th>Mobile No.</th>
<th>Available Balance </th>
</tr>
</thead>
<tbody>
<?php
$i = 1;
$cnd12 = "parent_id = '$parent_id'";
$check12 = $sqlfun->fetchdata("player",$cnd12);
while($row12 = $check12->fetch(PDO::FETCH_OBJ))
{
$row_id = $row12->p_id;
?>
<tr>
<td><?=$i++;?></td>
<td><?=$row12->reg_date?></td>
<td><?=$row12->code?></td>
<td><?=$row12->p_f_name?></td>
<td><?=$row12->p_mobile?></td>
<td><?=$row12->wallet?> </td>
</tr>
<?php }?>
</tbody>
</table>
</div>
</div><!-- /.box-body -->
</div><!-- /.box -->
</div><!-- /.col -->
</div>
</div>
<!-- ============================================================= --> </div><!-- /.content-wrapper -->
<?php include('footer.php');?>
</div><!-- ./wrapper -->
<!-- jQuery 3 -->
<!-- Bootstrap 3.3.7 -->
<script src="js/bootstrap.min.js"></script>
<!-- FastClick -->
<!--<script src="js/fastclick.min.js"></script>-->
<!-- AdminLTE App -->
<!--<script src="js/adminlte.min.js"></script>-->
<!-- SlimScroll -->
<script src="js/jquery.slimscroll.min.js"></script>
<!--<script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js"></script>-->
<!--<script src="js/docs.js"></script>-->
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<!-- FastClick -->
<script src="js/fastclick.js"></script>
<!-- AdminLTE App -->
<script src="js/adminlte.min.js"></script>
<!--<script src="js/dashboard2.js"></script>-->
<!--<script src="js/demo.js"></script>-->
<script>
$(document).ready(function () {
$('.sidebar-menu').tree();
$('.datatable').DataTable();
$('#datatable1').DataTable();
$('#datatable2').DataTable();
$('#datatable3').DataTable();
$('#editor1').summernote({ height: 200 });
// $('#editor2').summernote({ height: 200 });
});
$(document).ready(function () {
$('#datepicker').datepicker({
autoclose: true,
format:'dd-mm-yyyy'
// startDate:'1990-20-08',
// endDate:'1993-20-08'
});
$('#datepicker1').datepicker({ autoclose: true, format:'dd-mm-yyyy' });
$('#datepicker2').datepicker({ autoclose: true, format:'dd-mm-yyyy' });
});
$('#phonediv').hide();
$("#filter_type").on('change',function(){
var option = $('#filter_type').find(":selected").val();
if(option == "mobile")
{
$('#phonediv').show();
$('#datediv').hide();
$('#phone').attr("required","required");
$('#datepicker').removeAttr("required");
}
else
{
$('#phonediv').hide();
$('#datediv').show();
$('#phone').removeAttr("required");
$('#datepicker').attr("required","required");
}
});
//ready document
$(document).ready(function(){
var option = $('#filter_type').find(":selected").val();
if(option == "mobile")
{
$('#phonediv').show();
$('#datediv').hide();
$('#phone').attr("required","required");
$('#datepicker').removeAttr("required");
}
else
{
$('#phonediv').hide();
$('#datediv').show();
$('#phone').removeAttr("required");
$('#datepicker').attr("required","required");
}
});
</script>
<script src="//cdn.rawgit.com/rainabba/jquery-table2excel/1.1.0/dist/jquery.table2excel.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#excel_button').click(function(){
$('.export_table').table2excel({
name: "Players",
filename: "Players",
fileext: ".xls"
});
});
});
$(".button").on("click",function()
{
var row_idi = $(this).attr("id");
// alert(row_idi);
var rate = $("#rate"+row_idi).val();
var p_name = $("#p_name"+row_idi).val();
// alert(p_name);
// alert(rate);
$.ajax({
method:"POST",
url:"player_ajax.php",
data:{"rate":rate,"player_idi":row_idi},
success:function(res)
{
if(res == "1")
{
alert("Rate "+rate+" updated successfully for "+p_name);
}
}
});
});
</script>
</body>
</html>