$sayfa = 'Örnek';
include("ust.php");
include("ustkisim.php");
$getid = $_GET[id];
if ( $getid == '') {
$getid = $bilgiler['id'];
}
$kullanicibilgi = mysql_fetch_array(mysql_query("Select * from kullanicilar where (id = $getid) "));
if ($kullanicibilgi['id'] == '') {
$getid = $bilgiler['id'];
} 
$kullanicibilgi = mysql_fetch_array(mysql_query("Select * from kullanicilar where (id = $getid) "));
$kullanicibilgi['kullaniciadi'] = ' '.$kullanicibilgi['kullaniciadi'].'
';
$kullanicibilgi['adsoyad'] = ' '.$kullanicibilgi['adsoyad'].'
';
if(isset($kullanicibilgi['id'])){$figuranlarim = mysql_query ("SELECT * FROM mevcutfiguranlar where (kullaniciid = $kullanicibilgi[id]) ");
$figuransayisi = mysql_num_rows($figuranlarim);
$toplamuretim = '0';
					while ($xxx = mysql_fetch_array ($figuranlarim)){
					$uretim = mysql_fetch_array(mysql_query("SELECT * from figuranlar where (id = '$xxx[figuranid]') "));
					$toplamuretim = $toplamuretim + $uretim['saatlikuretim'];
					}
}
if(isset($_POST['y_sat'])){
	$x = '1.5';
$ckhesap = (($bilgiler['puan'] * $altinoran['islem'] ) / 100 )  * $x;
$parahesap = (($bilgiler['puan'] * $tloran['islem'] ) / 100 )  * $x;
$sphesap = (($bilgiler['puan'] * $sanalparaoran['islem'] ) / 100 ) * $x;
	$captcha=$_POST['g-recaptcha-response'];
if(!$_POST){}
else{
    if(empty($captcha)){
        $bilgi = 'Bot olmadiginizi dogrulamadiniz!';
		$hata = '1';
    }
    elseif(!empty($captcha)){
if ( $bilgiler['puan'] > 0 ) {
	$satilcakpuan = $bilgiler['puan'];
	$oaltin = $bilgiler['altin'];
$saltin = $oaltin + $ckhesap;
mysql_query("UPDATE kullanicilar set puan = puan + $bilgiler[puan] / 10 where id = $bilgiler[ref];");
mysql_query("UPDATE kullanicilar set sanalpara = sanalpara + $sphesap,altin = altin + $ckhesap,refkazanc = $bilgiler[puan] / 10, puan = 0 where id = $bilgiler[id]");
mysql_query("insert into loglar (kullaniciid , tarih , ip , tur,islem) values ('$bilgiler[id]' , '$bugun', '$ip', 'sat', '$bilgiler[puan]')");
mysql_query("UPDATE kullanicilar set ip = '$ip' where (kullaniciadi = '$kadi') ");
$bilgi = 'başarılı bir şekilde topladınız. 
 Toplanan '.$satilcakpuan.' '.$oyunparasi['ek'].' Kazanç: 
  
 '.$sphesap.' '.$figuran['ek'].'';
$bilgiler['sanalpara'] = $bilgiler['sanalpara'] + $sphesap;
$bilgiler['puan'] = '0';
} else {
	$bilgi = 'Ne yazıkki hiç '.$oyunparasi['ek'].' yok.';
	$hata = '1';
}
}
 } 
}
?>
    
    
        
       
                                            
				    
  
     
     
     
     
 
 
                               
                                      Topla
										  <script></script>
                                 
                          
                
                      
								
									  
			
		
                                
                                
                           
                                
         
 
    
    
     
     
     
     
     
      
  

 
                    
 
                    