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

define('_IN_JOHNCMS', 1);
$textl = 'Anketa ochish';
$headmod = "anketayt";
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']==1){
switch($mod){
default:
echo '<div class="phdr"><b>Anketani ochish</b></div>';
echo'<div class="menu">Bizning saytimizda siz anketangizni ochish funksiyasini yoqishingiz mumkin.
<br/>Xizmatni faollashtirish narxi: 200 ball.<br/>
Sizning hisobingizda <b>'.$fay['balans'].'</b> ball bor.</div>';

if($fay['balans']>=200){
echo'<div class="menu"><a href="?mod=1"><span class="but">Xizmatni faollashtirish</span></a></div>';

}else{
echo '<div class="phdr"><b>Anketani ochish</b></div>'; echo '<div class="menu"><font color="red">Afsuski bu xizmatni faollashtirishga ballaringiz yetarli emas.</font></div>';}
echo '<a href="index.php">Do\'konga</a><br/>';
break;

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

?>








