-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmn_groups_exc.php
44 lines (39 loc) · 1 KB
/
mn_groups_exc.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<? define("__HIDE_TEST__", "_KeAr_PHP_WEB_"); ?>
<?
@extract($_REQUEST);
require_once ("./connect.inc.php");
require_once ("./sess.inc.php");
if (!IsLoggedManager())
{
header("location: ".$g_baseadr."error.php?code=21");
exit;
}
db_Connect();
$id = (IsSet($id) && is_numeric($id)) ? (int)$id : 0;
$type = (IsSet($type) && is_numeric($type)) ? (int)$type : 0;
switch ($type)
{
case 1:
// reset trenera
$query = "UPDATE ".TBL_USER." SET chief_id = '0', chief_pay = null WHERE id='".$id."'";
$result=query_db($query);
break;
case 2:
// reset platiciho trenera
if (IsLoggedSmallAdmin())
{
$query = "UPDATE ".TBL_USER." SET chief_pay = null WHERE id='".$id."'";
$result=query_db($query);
}
break;
case 3:
// povol platiciho trenera
if (IsLoggedSmallAdmin())
{
$query = "UPDATE ".TBL_USER." SET chief_pay = chief_id WHERE id='".$id."'";
$result=query_db($query);
}
break;
}
header("location: ".$g_baseadr."index.php?id=500&subid=3");
?>