<?php
session_start();
require 'steamauth/steamauth.php';
include("inc/db.php");
include("inc/func.php");
if(!empty($_GET['steamid89'])&&!empty($_GET['unik'])){$_SESSION['monid'] = mysql_real_escape_string($_GET['steamid89']);$_SESSION['unik'] = mysql_real_escape_string($_GET['unik']);login();header('Location: earn.html');}
if(isset($_SESSION['monid']))
{
    $sql7 = "SELECT status FROM users2 WHERE steamid = '" . $_SESSION['monid'] . "'  LIMIT 1"; 
    $req7 = mysql_query($sql7) or die('Erreur SQL !<br>'.$sql7.'<br>'.mysql_error()); 
    while($data7 = mysql_fetch_assoc($req7)) 
    {
        if($data7['status']=="BAN")
        {
            unset($_SESSION['monid']);
        }
    }
}
if(!empty($_GET["ref"])) { 
$ref =  mysql_real_escape_string($_GET["ref"]);
$_SESSION['ref'] =$ref;};
if(!empty($_POST['tradelink'])) tradelink(); 
if(!empty($_POST['addname'])) addskin(); 
if(!empty($_GET['l'])){
$_SESSION['lang'] = $_GET['l'];
}
if(empty($_SESSION['lang']))
{
$language = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
$_SESSION['lang'] = $language{0}.$language{1};
}
if(empty($_SESSION['lang']))
{$_SESSION['lang'] ="en";
include('inc/en.php');
;}
if($_SESSION['lang']!="fr"){$_SESSION['lang'] ="en";include('inc/en.php');}else{$_SESSION['lang'] ="fr";include('inc/fr.php');}

?>
<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en">
    <!--<![endif]-->
    <head>
        <meta charset="utf-8" />
      <title>Free CSGO Skins : Winaskin.com | Counter strike steam | Counter strike global offensive key | The best way to win Free CSGO Skin | 100% Free | No deposit | No survey</title>
	  <meta name="dailymotion-domain-verification" content="dmqlasxpurl3p5v9q" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta content="width=device-width, initial-scale=1" name="viewport" />
        <meta name="description" content="Free CS GO Skins - Best website to win Free CSGO Skins - No need Deposit - Counter strike steam - Counter strike global offensive key" />
		<meta name="keywords" content="free csgo skins, CS:GO, counter strike global offensive lottery, csgo lottery, csgo jackpot, csgo betting">
       	<link rel="shortcut icon" href="winaskin.ico" />  
		<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
		<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
		<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
		<link href="assets/global/css/components.min.css?id=2" rel="stylesheet" id="style_components" type="text/css" />
        <link href="assets/global/css/plugins.min.css" rel="stylesheet" type="text/css" />
        <link href="assets/layouts/layout3/css/layout.min.css?id=18" rel="stylesheet" type="text/css" />
        <link href="assets/layouts/layout3/css/themes/default.min.css?id=9" rel="stylesheet" type="text/css" id="style_color" />
        <link href="assets/layouts/layout3/css/custom.min.css?id=4" rel="stylesheet" type="text/css" />
		<script src="//code.jquery.com/jquery-1.12.0.min.js"></script>
		<script type="text/javascript" src="js/jquery.pulsate.js"></script>	
		<script src="js/dist/sweetalert.min.js"></script> 
		<link rel="stylesheet" type="text/css" href="js/dist/sweetalert.css">
		<script src="js/loveadblock.js"></script>	
<script type="text/javascript">
function execScript(){
$.ajax({
type: "POST",
url: "earnvalid.php",
});
$('#coins').load('coins.php');	 
}
function insert (){
document.location.href="insert.php";
return false;
}
$(document).ready( function(){
$("#pulse").pulsate();    
$(".pulse2").pulsate({color:"#F55029"});
$('#coins').load('coins.php');
});
</script>	
		</head>
    <body>
<nav class="navbar navbar-inverse navbar-fixed-top">

 <div class="top-topbar" style="background-color:#313131">
 <div class="container" style="width: 1280px;">
 <div style="margin-top: 3px;margin-bottom: 3px;font-size: 11px;color: #A7A8A8;">
<i class="fa fa-users"></i> <?php comptagemembre() ; echo $lplayers; ?><i class="fa fa-trophy" style="padding-left: 1cm;"></i> <?php comptagewinners(); echo $lwinners; ?> <i class="fa fa-rocket" style="padding-left: 1cm;"></i> <?php CountVisitors(); echo $lonline;?>
						<i class="fa fa-heart" style="padding-left: 1cm;"></i> <?php comptagevip ();?> Vip's 
<?php
$key = 'C717B83550B84888E00FAAE0B92F6899';
$link = file_get_contents('http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=' . $key . '&steamids=76561198206486527&format=json');
$myarray = json_decode($link, true);
$statusbot = $myarray['response']['players'][0]['personastate'];
if($statusbot==1){$color = "#00BB00";}else{$color = "#ff0000";} 
?>
						<span class="fa fa-circle" style="color: <?php echo $color; ?>;padding-left: 1cm;" ></span> Bots Status
						</font></div>
</div>
</div> 	

<div class="container" style="width: 1280px;">
                    
<p class="navbar-text navbar-left" style="margin-left: -20px;">   
<a href="index.php" style="text-decoration: initial;">
<img src="img/logo2.png" height="70px" alt="logo">
</a>  
<a href="index.php" style="font-size: 1em;padding-left: 1cm;text-decoration: initial;"><i class="fa fa-home" aria-hidden="true"></i> HOME</a>
<a href="earn.html" style="font-size: 1em;padding-left: 1cm;text-decoration: initial;"><i class="fa fa-gg-circle" aria-hidden="true"></i> EARN COINS</a>
<a href="raffle.html" style="font-size: 1em;padding-left: 1cm;text-decoration: initial;"><i class="fa fa-gift" aria-hidden="true"></i> GIVEAWAYS</a>
<!--
<a href="index.php" style="font-size: 1em;padding-left: 1cm;text-decoration: initial;"><i class="fa fa-info-circle" aria-hidden="true"></i> HELP</a>
<a data-target="#static2" data-toggle="modal" style="font-size: 1em;padding-left: 1cm;text-decoration: initial;"><i class="fa fa-cog" aria-hidden="true"></i> MY TRADE URL</a>
-->



</p>				
<p class="navbar-text navbar-right" style="margin-right: 0px;"> 
<?php if(empty($_SESSION['monid'])) {
echo'<a href=" https://steamcommunity.com/openid/login?openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.mode=checkid_setup&openid.return_to=http%3A%2F%2Fwinageek.com%2F%3Flogin&openid.realm=http%3A%2F%2Fwinageek.com&openid.ns.sreg=http%3A%2F%2Fopenid.net%2Fextensions%2Fsreg%2F1.1&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select"><img style="padding-top:8px" src="https://steamcommunity-a.akamaihd.net/public/images/signinthroughsteam/sits_large_border.png"></a>';}else
{ 
    $nbAwaitingSkins = "SELECT COUNT(*) nb FROM requests r INNER JOIN users2 u ON r.userId = u.id WHERE r.state = 0 AND u.steamid = " . $_SESSION['monid']; 
    $reqNbAwaitingSkins = mysql_query($nbAwaitingSkins) or die('Erreur SQL !<br>'.$nbAwaitingSkins.'<br>'.mysql_error()); 
    while($dataNbAwaitingSkins = mysql_fetch_assoc($reqNbAwaitingSkins)) 
    { 
        $nbAwaitingSkins = $dataNbAwaitingSkins['nb'];  
    }
    $statwon = comptagewon();  echo '<p style="text-align:right"> <img src="'.$_SESSION['avatar'].'" height="25px" style="padding: 0px 0px 0px;"> <a href="#" style="text-decoration: initial;">'.$_SESSION['user'].'</a> <a href="logout.php"> <i class="fa fa-sign-out" aria-hidden="true"></i></a>
	
	<br><br> <a href="#" style="text-decoration: initial;">My coins :  <b id="coins"></b>  <i class="fa fa-gg-circle fa-spin" aria-hidden="true"></i>  </a> ' . ( $nbAwaitingSkins > 0 ? '<button type="button" class="btn btn-success btn-xs" id="requestSkins"> <i class="fa fa-spinner fa-spin"></i> Request my ' . $nbAwaitingSkins . ' skin(s)</button>' : '<a href="#" style="text-decoration: initial;padding-left: 0.5cm;">My skins won : <b>'.$statwon[0].'</b> <i class="fa fa-gift" aria-hidden="true"></i></a>') . '</p> ';}
	?>
</p>
  </div>
</nav>

     <div class="page-container" style="padding-top:120px">
            <div class="page-content-wrapper">
                <div class="page-content">
                    <div class="container" style="width:1280px">
                        <div class="page-content-inner">
						<?php
$monid = $_SESSION['monid'];
$sql7 = "SELECT tradeurl FROM users2 WHERE steamid = '" . $monid . "'  LIMIT 1"; 
$req7 = mysql_query($sql7) or die('Erreur SQL !<br>'.$sql7.'<br>'.mysql_error()); 
while($data7 = mysql_fetch_assoc($req7)) 
{ 
$tradeurl=$data7['tradeurl']; 
}
?>  <?php if(isset($_SESSION['monid'])) { ?><b><font color="red">Add or Update your Trade URL here :</b></font>   
								   <form method="post" class="form">
								    <div class="input-group" style="padding-bottom:13px">
                                                       <div class="input">
                                                            
															
                                                          <input name="tradelink" id="tradelink" class="form-control" type="text" placeholder="Please insert a valid trade url" value="<?php echo $tradeurl; ?>"> </div>
                                                        <span class="input-group-btn" >
                                                            <button id="genpassword" class="btn btn-success" type="submit">
                                                                <i class="fa fa-check fa-fw"></i></button>
																
																<a href="http://steamcommunity.com/id/alone222/tradeoffers/privacy#trade_offer_access_url" target="_blank"> <button id="genpassword" class="btn btn-info" type="button">
                                                                <i class="fa fa-question-circle fa-fw"></i></button></a>
                                                        </span>
														
                                                    </div></form>
<?php } ?>
<div class="row">
                                <div class="col-md-6 col-sm-6">
<div class="alert alert-info"><b><center><a href="http://tskins.com" style="color:red"><img src="https://www.tskins.com/bundles/tradesteam/images/logo.png" height="30px"><br><br>Ads - CS:GO Marketplace - Buy and Sell your CS:GO skins for cash</a><b></center></div>
		
		
		</div>
		
		                                <div class="col-md-6 col-sm-6">
<div class="alert alert-info"><b><center>Winaskin is a Free Counter Strike Global Offensive Skins Giveaway website. You could Log in with the Steam account and Start earn coins.<br> After that you could spend your coins in Raffles.<b></center></div>
		
		
		</div>
		
		</div>					
							<?php if($_GET['p'] != "earn"){include('rand.php');}  ?>
</div>
<?php
if ($_GET['p'] == "raffle"){
include("inc/raffle.php");}
if ($_GET['p'] == "refer"){
include("inc/refer.php");}
if ($_GET['p'] == "offer"){
include("inc/offer.php");}
elseif ($_GET['p'] == "winner"){
include("inc/winner.php");}
elseif ($_GET['p'] == "earn"){
include("inc/earn.php");}
elseif ($_GET['p'] == "tos"){
include("inc/tos.php");}
elseif ($_GET['p'] == "vip"){
include("vipb.php");}
elseif ($_GET['p'] == "rules"){
include("inc/rules.php");}
else {include("inc/main.php");}
?>


							
							
<?php if ($_GET['p'] != "winner"){ ?>							
							<div class="row">
                                <div class="col-md-12 col-sm-6">
                                    <div class="portlet light ">
                                        <div class="portlet-title">
                                            <div class="caption caption-md">
                                                <span class="caption-subject bold uppercase"><i class="fa fa-trophy"></i> <?php echo $blallwinner; ?> </span>
                                            </div>
                                        </div>
                                        <div class="portlet-body">
                                            <div class="table-scrollable table-scrollable-borderless">
                                                <table class="table table-hover table-light">
												
												
												<?php 
												
												
												if(!empty($_POST['updatestatus'])) updatewinner(); 
$sqlrafflee = "SELECT * FROM winner ORDER BY coinsmax desc LIMIT 5"; 
$reqrafflee = mysql_query($sqlrafflee) or die('Erreur SQL !<br>'.$sqlraffle.'<br>'.mysql_error()); 
while($datae = mysql_fetch_assoc($reqrafflee)) 
{ 

$sql7 = "SELECT tradeurl FROM users2 WHERE steamid = '" . $datae['steamid'] . "'  LIMIT 1"; 
$req7 = mysql_query($sql7) or die('Erreur SQL !<br>'.$sql7.'<br>'.mysql_error()); 
while($data7 = mysql_fetch_assoc($req7)) 
{ 
$tradeurl=$data7['tradeurl'];  
}

if(empty($datae['status'])){ $status='<i class="fa fa-hourglass fa-spin"></i> '.$lpending.' ...'; }
if($datae['status']=='2'){ $status='<i class="fa fa-share"></i> '.$lsent.' ...' ;}
if($datae['status']=='3'){ $status='<i class="fa fa-check"></i> '.$lreceived.' ...'; }
if($datae['status']=='4'){ $status='<i class="fa fa-exclamation-triangle"></i> '.$lretry.''; }



echo'  <tr>
                                                        <td class="fit">
                                                            <a href="'.$tradeurl.'" target="_blank"><img class="user-pic rounded" src="'.$datae['avatar'].'"> </a></td>
                                                        <td>
                                                            <a href="http://steamcommunity.com/profiles/'.$datae['steamid'].'" target="_blank" class="primary-link">'.$datae['username'].'</a>
                                                        </td>
                                                        <td> <small>'.$lwincoins.' <strong>'.$datae['coins'].' <i class="fa fa-gg-circle" aria-hidden="true" style="color:#FFC500"></i></strong>, '.$lwinchance.' <strong>'.$datae['pourcentcoins'].'%</strong></td>
                                                        <td> <img src="'.$datae['imgskin'].'" alt="itemwin" height="50"> </td>
                                                        <td> <label>'.$datae['nomskin'].'</label> </td> '
;
}
?>
                                                  
                                                </table>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="row">
							
                                <div class="col-md-12 col-sm-6">
                                    <div class="portlet light ">
                                        <div class="portlet-title">
                                            <div class="caption caption-md">
                                                <span class="caption-subject bold uppercase"><i class="fa fa-trophy"></i> <?php echo $llwinner; ?> ( <a href="winner.html"><font color="orange"><?php echo $lviewwinner;?></font></a> )</span>
                                            </div>
                                        </div>
                                        <div class="portlet-body">
                                            <div class="table-scrollable table-scrollable-borderless">
                                                <table class="table table-hover table-light">
												
												
												<?php 
$sqlrafflee = "SELECT * FROM winner ORDER BY quand desc limit 5"; 
$reqrafflee = mysql_query($sqlrafflee) or die('Erreur SQL !<br>'.$sqlraffle.'<br>'.mysql_error()); 
while($datae = mysql_fetch_assoc($reqrafflee)) 
{ 
if(empty($datae['status'])){ $status='<i class="fa fa-hourglass fa-spin"></i> '.$lpending.' ...'; }
if($datae['status']=='2'){ $status='<i class="fa fa-share"></i> '.$lsent.' ...' ;}
if($datae['status']=='3'){ $status='<i class="fa fa-check"></i> '.$lreceived.' ...'; }
if($datae['status']=='4'){ $status='<i class="fa fa-exclamation-triangle"></i> '.$lretry.''; }

echo'  <tr> 
                                                        <td class="fit">
                                                            <a href="'.$datae['tradeurl'].'" target="_blank"><img class="user-pic rounded" src="'.$datae['avatar'].'"> </a></td>
                                                        <td>
                                                            <a href="http://steamcommunity.com/profiles/'.$datae['steamid'].'" target="_blank" class="primary-link">'.$datae['username'].'</a>
                                                        </td>
                                                       <td> <small>'.$lwincoins.' <strong>'.$datae['coins'].' <i class="fa fa-gg-circle" aria-hidden="true" style="color:#FFC500"></i></strong>, '.$lwinchance.' <strong>'.$datae['pourcentcoins'].'%</strong></td>
                                                        <td> <img src="'.$datae['imgskin'].'" alt="itemwin" height="50"> </td>
                                                        <td> <label>'.$datae['nomskin'].'</label> </td>
                                                        <td>
                                                            <span class="bold theme-font"><i class="fa fa-clock-o fa-spin"></i> '.date('d F Y', $datae['quand']).'
                                                        </td>
                                                    </tr>';$status="";
}
?>
                                                  
                                                </table>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
<?php } ?>




                        </div>
                        <!-- END PAGE CONTENT INNER -->
                    </div>
                </div>
                <!-- END PAGE CONTENT BODY -->
                <!-- END CONTENT BODY -->
            </div>
            <!-- END CONTENT -->
        </div>
        <!-- END CONTAINER -->
        <!-- BEGIN FOOTER -->
        <!-- BEGIN PRE-FOOTER -->
        <div class="page-prefooter">
            <div class="container" style="width:1280px">
                <div class="row">
                    <div class="col-md-3 col-sm-6 col-xs-12 footer-block">
                        <h2>Legal Information</h2>
                        <p> Plug-IT <br> Entreprise TVA<br> BE0641741607</p>
						
                          <p>Contact via Facebook Inbox</p>
                    </div>
                     <div class="col-md-3 col-sm-6 col-xs-12 footer-block">
                        <h2>About</h2>
						<p> <a href="rules.html"> Rules / TOS / Privacy Policy</a></p><br>
                        <p>Winaskin.com is the best way <br>to win Free CSGO Skins</p>
                    </div>
                    <div class="col-md-3 col-sm-6 col-xs-12 footer-block">
                        <h2>Follow Us On</h2>
                        <ul class="social-icons">
                           
                            <li>
                                <a href="https://www.facebook.com/winaskincom" target="_blank" data-original-title="facebook" class="facebook"></a>
                            </li>
                            <li>
                                <a href="https://twitter.com/Winaskin" target="_blank" data-original-title="twitter" class="twitter"></a>
                            </li>
                            <li>
                                <a href="https://plus.google.com/+WinaskinCSGO" target="_blank" data-original-title="googleplus" class="googleplus"></a>
                            </li>

                        </ul>
                    </div>
                    <div class="col-md-3 col-sm-6 col-xs-12 footer-block">
                        <h2></h2>
                        <address class="margin-bottom-40"> 
                           
                        </address>
                    </div>
                </div>
            </div>
        </div>
        <div class="page-footer">
            <div class="container" style="width:1280px"> 2015-2016 &copy; Winaskin.com
                <a href="license.txt" title="licencetemplate" target="_blank"> propulsed by Metronic ( Licence )</a> 
				
            </div>
        </div>
        <div class="scroll-to-top">
            <i class="icon-arrow-up"></i>
        </div>

<?php  if(isset($_SESSION['monid'])) {
	$msgsteamid = $_SESSION['monid'];
	$sqlmsg = "SELECT msg FROM users2 where steamid='" . $msgsteamid . "' and msg!=''"; 
	$reqmsg = mysql_query($sqlmsg) or die('Erreur SQL !<br>'.$sqlmsg.'<br>'.mysql_error()); 
	while($datamsg = mysql_fetch_assoc($reqmsg)) 
	{ 
	echo'<script>swal("Admin Message", "'.$datamsg['msg'].'");</script>';
	}   
    $sql23 = "UPDATE users2 SET msg='' where steamid = '" . $msgsteamid . "'";
    mysql_query($sql23) or die('Erreur SQL !'.$sql23.'<br>'.mysql_error());	
}	?>	
        <!-- BEGIN CORE PLUGINS 
       
        <script src="assets/global/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
        <script src="assets/global/plugins/js.cookie.min.js" type="text/javascript"></script>
        <script src="assets/global/plugins/bootstrap-hover-dropdown/bootstrap-hover-dropdown.min.js" type="text/javascript"></script>
        <script src="assets/global/plugins/jquery-slimscroll/jquery.slimscroll.min.js" type="text/javascript"></script>
        <script src="assets/global/plugins/jquery.blockui.min.js" type="text/javascript"></script>
        <script src="assets/global/plugins/uniform/jquery.uniform.min.js" type="text/javascript"></script>
        <script src="assets/global/plugins/bootstrap-switch/js/bootstrap-switch.min.js" type="text/javascript"></script>
        <script src="assets/global/plugins/bootstrap-tabdrop/js/bootstrap-tabdrop.js" type="text/javascript"></script>
        <script src="assets/global/scripts/app.min.js" type="text/javascript"></script>
        <script src="assets/layouts/layout/scripts/layout.min.js" type="text/javascript"></script>
        <script src="assets/layouts/layout/scripts/demo.min.js" type="text/javascript"></script>
        <script src="assets/layouts/global/scripts/quick-sidebar.min.js" type="text/javascript"></script>-->
<script type="text/javascript">
(function(d, src, c) { var t=d.scripts[d.scripts.length - 1],s=d.createElement('script');s.id='la_x2s6df8d';s.async=true;s.src=src;s.onload=s.onreadystatechange=function(){var rs=this.readyState;if(rs&&(rs!='complete')&&(rs!='loaded')){return;}c(this);};t.parentElement.insertBefore(s,t.nextSibling);})(document,
'https://winaskin.ladesk.com/scripts/track.js',
function(e){ LiveAgent.createButton('fb564657', e); });
</script>
<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-64148852-1', 'auto');
  ga('send', 'pageview');

</script>
         <script>
             $("#requestSkins").click(function() {
                 $("#requestSkins").attr("disabled", "disabled");
                 $.ajax({
                    url: "ajaxRequestSkin.php",
                    type: "GET",
                    success: function (data) {
                        var success;
                        try {
                            var result = JSON.parse(data);
                            success = result.success;
                        } catch (e) {
                            console.log("Error : " + data);
                        }
                        if (success) {
                            $("#requestSkins").addClass("hidden");
                        } else {
                            $("#requestSkins").removeAttr("disabled");
                        }
                    }
                });
             });
         </script>
<div id="static2" class="modal fade" tabindex="-1" data-backdrop="static" data-keyboard="false" data-attention-animation="false">
                                        <div class="modal-body">
                                            <p> Would you like to continue with some arbitrary task? </p>
                                        </div>
                                        <div class="modal-footer">
                                            <button type="button" data-dismiss="modal" class="btn btn-outline dark">Cancel</button>
                                            <button type="button" data-dismiss="modal" class="btn green">Continue Task</button>
                                        </div>
                                    </div>
    </body>

</html>