another final version
This commit is contained in:
parent
99168f1eac
commit
ab1ca6cc43
@ -29,6 +29,7 @@ function setProfession($name, $type, $needMoney, $needLevel)
|
|||||||
if ($name == 'medic') $profId = 22;
|
if ($name == 'medic') $profId = 22;
|
||||||
if (!empty($profId)) {
|
if (!empty($profId)) {
|
||||||
db::c()->query('UPDATE `users` SET ?f = ?i, `money` = `money` - ?i WHERE `id` = ?i', 'prof' . $type, $profId, $needMoney, $_SESSION['uid']);
|
db::c()->query('UPDATE `users` SET ?f = ?i, `money` = `money` - ?i WHERE `id` = ?i', 'prof' . $type, $profId, $needMoney, $_SESSION['uid']);
|
||||||
|
$user['prof'.$type] = true;
|
||||||
return 'Вы получили профессию!';
|
return 'Вы получили профессию!';
|
||||||
} else return 'Что-то пошло не так...';
|
} else return 'Что-то пошло не так...';
|
||||||
}
|
}
|
||||||
@ -50,7 +51,7 @@ if ($get == 'exit') {
|
|||||||
<link href="css/secondary.css" rel="stylesheet"/>
|
<link href="css/secondary.css" rel="stylesheet"/>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="topRoomButtons">
|
<div style="float: right;">
|
||||||
<button onclick="location.href='main.php'">Обновить</button>
|
<button onclick="location.href='main.php'">Обновить</button>
|
||||||
<button onclick="location.href='?exit'">Вернуться</button>
|
<button onclick="location.href='?exit'">Вернуться</button>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user