-
Notifications
You must be signed in to change notification settings - Fork 0
/
user_education.php
executable file
·72 lines (55 loc) · 1.77 KB
/
user_education.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
<?
$page = "user_education";
include "header.php";
$task = rc_toolkit::get_request('task','main');
$result = "";
$rc_validator = new rc_validator();
$rc_education = new rc_education($user->user_info[user_id]);
if($user->level_info[level_education_allow] == 0) { header("Location: user_home.php"); exit(); }
if ($task == 'dosave') {
$educations = $_POST['educations'];
//rc_toolkit::debug($educations);
foreach ($educations as $eid=>$education) {
if (strlen($education['education_name'])==0) {
$rc_education->delete($eid);
}
elseif ($eid == 'new') {
$rc_education->insert($education);
}
else {
$rc_education->update($eid,$education);
}
}
$result = 11040714;
}
$educations = $rc_education->get_educations();
$educations['new'] = array(
'education_id' => 'new',
'education_name' => '',
'education_year' => '',
'education_for' => '',
'education_degree' => '',
'education_concentration1' => '',
'education_concentration2' => '',
'education_concentration3' => ''
);
$yearoptions = array();
foreach (range(date('Y') + 4, date('Y') - 100) as $number) {
$yearoptions[$number] = $number;
}
$foroptions = array();
foreach (explode('|',SE_Language::_get(11040103)) as $v) {
$foroptions[$v] = $v;
}
//print_r($foroptions);
//print_r($yearoptions);
$smarty->assign('yearoptions',$yearoptions);
$smarty->assign('foroptions',$foroptions);
// ASSIGN VARIABLES AND INCLUDE FOOTER
$smarty->assign('educations', $educations);
$smarty->assign('rc_education', $rc_education);
$smarty->assign('is_error', $rc_validator->has_errors());
$smarty->assign('error_message', join(" ",$rc_validator->get_errors()));
$smarty->assign('result', $result);
include "footer.php";
?>