forked from che0/greybox
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathclovek.add.inc
90 lines (80 loc) · 3.95 KB
/
clovek.add.inc
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
80
81
82
83
84
85
86
87
88
89
90
<?php
/*
* greybox
* $Id: clovek.add.inc,v 1.9 2005/10/24 09:04:47 che0 Exp $
*/
$klub_id = $_REQUEST["klub_id"];
pg_head();
cph_p($lang['clovek.add.achtung']); // warning about adding already existing people
if ($GLOBALS["cps_lidi"] < 1) {
pg_achtung($lang['access denied']);
return;
}
$clovek_f = new cpykhen;
$clovek_f->form_attr["action"] = "./?page=clovek.edit.exec";
$clovek_f->form[] = new cpf_text($lang["name"] . ": ");
$clovek_f->form[] = new cpf_db_textbox("prijmeni","prijmeni",array("maxlength"=>60));
$clovek_f->form[] = new cpf_nl;
$clovek_f->form[] = new cpf_text($lang["surname"] . ": ");
$clovek_f->form[] = new cpf_db_textbox("jmeno","jmeno",array("maxlength"=>40));
$clovek_f->form[] = new cpf_nl;
$clovek_f->form[] = new cpf_text($lang["nick"] . ": ");
$clovek_f->form[] = new cpf_db_textbox("nick","nick",array("maxlength"=>60));
$clovek_f->form[] = new cpf_nl;
$clovek_f->form[] = new cpf_text("email: ");
$clovek_f->form[] = new cpf_db_textbox("email","email",array());
$clovek_f->form[] = new cpf_nl;
$clovek_f->form[] = new cpf_text($lang["club"] . ": ");
$clovek_f->form[] = new cpf_db_listbox("klub_id",array(
"select klub_ID, nazev from klub union select 0, :no_club as nazev", array(":no_club"=>$lang["no club"])),"klub_ID");
$clovek_f->form[] = new cpf_nl;
$clovek_f->form[] = new cpf_text($lang["born"] . ": ");
$clovek_f->form[] = new cpf_db_textbox("narozen","narozen",array("maxlength"=>10));
$clovek_f->form[] = new cpf_nl;
$clovek_f->form[] = new cpf_text("ulice a cislo: ");
$clovek_f->form[] = new cpf_db_textbox("ulice","ulice",array("class"=>'smartform-street-and-number'));
$clovek_f->form[] = new cpf_nl;
$clovek_f->form[] = new cpf_text("mesto: ");
$clovek_f->form[] = new cpf_db_textbox("mesto","mesto",array("class"=>'smartform-city'));
$clovek_f->form[] = new cpf_nl;
$clovek_f->form[] = new cpf_text("psc: ");
$clovek_f->form[] = new cpf_db_textbox("psc","psc",array("class"=>'smartform-zip'));
$clovek_f->form[] = new cpf_nl;
$clovek_f->form[] = new cpf_text("prukaz: ");
$clovek_f->form[] = new cpf_db_listbox_array("prukaz",array('op' => 'obcansky prukaz', 'pas' => 'cestovni pas', 'jiny' => 'jiny'));
$clovek_f->form[] = new cpf_nl;
$clovek_f->form[] = new cpf_text("cislo: ");
$clovek_f->form[] = new cpf_db_textbox("cislo","cislo",array());
$clovek_f->form[] = new cpf_nl;
$clovek_f->form[] = new cpf_text($lang["comment"] . ": ");
$clovek_f->form[] = new cpf_db_textarea("komentar","komentar",array("rows"=>4, "cols"=>60));
$clovek_f->form[] = new cpf_nl;
$clovek_f->form[] = new cpf_text($lang["active debater"] . ": ");
$clovek_f->form[] = new cpf_db_listbox_array("debater",array(1 => $lang['yes'], 0 => $lang['no']));
$clovek_f->form[] = new cpf_nl;
$clovek_f->form[] = new cpf_text($lang["full member"] . ": ");
if ($GLOBALS["cps_lidi"] >= 3) {
// only admins can edit membership
$clovek_f->form[] = new cpf_db_listbox_array("clen", array(1 => $lang['yes'], 0 => $lang['no']));
} else {
$clovek_f->form[] = new cpf_db_text("clen", array(), array(1 => $lang['yes'], 0 => $lang['no']));
}
if ($GLOBALS["cps_lidi"] >= 3) {
// only admins can edit membership
$clovek_f->form[] = new cpf_nl;
$clovek_f->form[] = new cpf_text($lang["member until"] . ": ");
$clovek_f->form[] = new cpf_db_textbox("clen_do","clen_do",array("maxlength"=>4));
// only admins can confirm application submission
$clovek_f->form[] = new cpf_nl;
$clovek_f->form[] = new cpf_text($lang["application"] . ": ");
$clovek_f->form[] = new cpf_db_listbox_array("prihlaska", array(1 => $lang['yes'], 0 => $lang['no']));
// only admins can confirm guardian statement submission
$clovek_f->form[] = new cpf_nl;
$clovek_f->form[] = new cpf_text($lang["guardian statement"] . ": ");
$clovek_f->form[] = new cpf_db_listbox_array("prohlaseni", array(1 => $lang['yes'], 0 => $lang['no']));
}
$clovek_f->form[] = new cpf_nl;
$clovek_f->form[] = new cpf_button("add",$lang["add"]);
$clovek_f->load_this(array("klub_ID"=>$klub_id, "debater"=>1, "clen"=>0, "clen_do"=>null));
$clovek_f->render();
?>