-
Notifications
You must be signed in to change notification settings - Fork 3
/
mns_user_edit.php
79 lines (66 loc) · 2.05 KB
/
mns_user_edit.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<?php /* adminova stranka - editace clena */
define("__HIDE_TEST__", "_KeAr_PHP_WEB_");
@extract($_REQUEST);
require_once ("./connect.inc.php");
require_once ("./sess.inc.php");
require_once ("ctable.inc.php");
require_once("./cfg/_globals.php");
if (!IsLoggedSmallManager())
{
header("location: ".$g_baseadr."error.php?code=21");
exit;
}
$id = (IsSet($id) && is_numeric($id)) ? (int)$id : 0;
db_Connect();
//cast pro aktualizaci udaje, zda clenovi plati trener
if (IsSet($chiefPayFor))
{
if (empty($chief_pay)) $chief_pay = "null";
$chief_pay_query = "update `".TBL_USER."` set chief_pay = $chief_pay where id = $chiefPayFor";
$chief_pay_result = query_db($chief_pay_query);
}
// id je z tabulky "users"
$query = "SELECT * FROM ".TBL_USER." WHERE id = '$id' LIMIT 1";
@$vysledek=query_db($query);
@$zaznam=mysqli_fetch_array($vysledek);
$update=$id;
require_once ("./header.inc.php"); // header obsahuje uvod html a konci <BODY>
require_once ("./common.inc.php");
require_once ("./common_user.inc.php");
DrawPageTitle('Členská základna - Editace uživatele');
?>
<TABLE width="100%" cellpadding="0" cellspacing="0" border="0">
<TR>
<TD width="2%"></TD>
<TD width="90%" ALIGN=left>
<CENTER>
<BR><hr><BR>
<? require_once "./user_new.inc.php"; ?>
<BR>
<?
//pridani formulare pro moznost zaskrtnuti placeni trenerem
$return_url = full_url();
$return_url = parse_url($return_url, PHP_URL_QUERY);
$user_id = $id;
$chief_query = "select u.chief_id, ch.sort_name as chief_name, u.chief_pay from `".TBL_USER."` u join `".TBL_USER."` ch on u.chief_id = ch.id where u.id = $user_id";
// echo "|$chief_query|";
$chief_result = query_db($chief_query);
$chief_record = mysqli_fetch_array($chief_result);
$chief_id = $chief_record["chief_id"];
if ($chief_id > 0) require_once 'us_setup_nursechild_form.inc.php';
?>
<A HREF="index.php?id=600&subid=1">Zpět na seznam členů</A><BR>
<BR><hr><BR>
</CENTER>
</TD>
<TD width="2%"></TD>
</TR>
<TR><TD COLSPAN=4 ALIGN=CENTER>
<!-- Footer Begin -->
<?require_once "./footer.inc.php"?>
<!-- Footer End -->
</TD></TR>
</TABLE>
<?
HTML_Footer();
?>