<?php
session_start();
include ($_SERVER['DOCUMET_ROOT'].'/private/mysql.php');
include ($_SERVER['DOCUMET_ROOT'].'/tmp/head.php');

if($user['level']<'3' or $user['profa']!=='fermer'){
    header('Location: /main');
    exit;
}

switch($sd){
default:


break;


case 'unset':

if($user['almaz']<'5'){
    header('Location: /profession');
    exit;
}

mysql_query("UPDATE `users` SET `profa`='',`almaz`=`almaz`-'5' WHERE `id`='$uid'");


header('Location: /profession');
exit;

break;

}
include ($_SERVER['DOCUMET_ROOT'].'/tmp/foot.php');
?>