View file sdark.mobi/set/sex.php

File size: 1.39Kb
<?
require_once'../core/system.php';
echo only_reg();
echo ban();
$header='Смена пола';
require_once'../core/head.php';
if(isset($_GET['yes'])){
if($user['pol']==1){$pol=0;}
if($user['pol']==0){$pol=1;}
if($user['gold']<5000){header("location: /user/settings"); 
$_SESSION['err'] = 'Недостаточно золота';
}else{header("location: /user/settings"); 
$_SESSION['message'] = 'Пол успешно изменен';
$time=time();
mysql_query("UPDATE `user` set `gold` = `gold` - '5000', `pol`='$pol' where `id` = '".$user['id']."' limit 1");
mysql_query("INSERT INTO `logi` set `user_id` = '".$user['id']."', `text` = 'Пол', `time` = '".$time."', `kol`='5000', `kto`='-'");

}
}
echo "</div><div class='foot center'><table  class='d-grey' width='100%' border='0' cellpadding='0' cellspacing='0' style='padding-top: 5px;'>
<tbody>
<tr>";
echo '<div class="inpc-ar"><div class="empty2"></div>Вы уверены, что хотите сменить пол за <img src="/images/icon/gold.png">50?</div><div class="empty2"></div>
<td width="40%"><a class="big-but" href="/set/sex?yes"><div class="imgwrap"><img src="/images/icon/ok.png"></div>Сменить пол</a></td>';
echo '<td width="40%"><a class="big-but" href="/user/settings/"><div class="imgwrap"><img src="/images/icon/error.png"></div>Отмена</a></td></tbody></table></div></div>';
echo "</div>";
require_once'../core/foot.php';
?>