<?php
   #####################################
   ##                                 ##
 ####       Powered by (GENERAL)      ####
 ####         UZMASTER.RU             ####
   ##                                 ##
   #####################################

define('_IN_JOHNCMS', 1);
$textl = 'Anketa yopish';
$headmod = "anketay";
require_once ("../incfiles/core.php");
require_once ("../incfiles/head.php");

$fay=mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id`='$user_id'"));
if ($user['id'] != $user_id) {
if($fay['eas']==0){
switch($mod){
default:
echo '<div class="phdr">Anketani yopish</div>';
echo'<div class="menu">Bizning saytimizda siz anketangizni yopish funksiyasini yoqishingiz mumkin.
<br/>Xizmatni faollashtirish narxi: 1000 ball.<br/>
Sizning hisobingizda <b>'.$fay['balans'].'</b> ball bor.</div>';
if($fay['balans']>=1000){
echo'<div class="menu"><a href="?mod=1"><span class="but">Xizmatni faollashtirish</span></a></div>';

}else{
echo '<div class="menu"><font color="red">Afsuski bu xizmatni faollashtirishga ballaringiz yetarli emas.</font></div>';}
break;

case'1':
$bale=$fay['balans']-1000; mysql_query("UPDATE `users` SET `balans`='$bale' WHERE `id`='$user_id'");
mysql_query("UPDATE `users` SET `eas`='1' WHERE `id`='$user_id'");
echo '<div class="phdr">Anketani yopish</div>';
echo'<div class="menu"><font color="red">Xizmat muvaffaqiyatli faollashtirildi! Sizning <a href="/users/profile.php">Anketangiz</a> yopildi!</font></div>';
break;
}
}else{echo '<div class="phdr"><b>Anketani yopish</b></div>'; echo'<div class="menu"><font color="red"> Siz bu xizmatni faollashtirib bo`lgansiz</font><br/>
Anketangizni ochishni istasyiz unda <a href="anketa_ochish.php"><b>Bu yerda</b></a> ochishingiz mumkin!</div>';}
}
else{echo'<div class="menu"> Xato! Siz ro\'yhatdan o\'tmagansiz!<br></div>
';
}
require_once ("../incfiles/end.php");

?>








