124 lines
4.7 KiB
PHP
124 lines
4.7 KiB
PHP
|
<?
|
|||
|
//СВЕДЕНИЯ О НАУЧНО-ПЕДАГОГИЧЕСКОМ РАБОТНИКЕ
|
|||
|
|
|||
|
$id_user = $_SESSION['user']['id']; //айдишник работника
|
|||
|
$teach = $_SESSION['user']['teacher'];
|
|||
|
$msg = 0; //нет сообщений
|
|||
|
|
|||
|
//ОБРАЗОВАНИЕ
|
|||
|
if ($_GET['page'] == 'education'){
|
|||
|
|
|||
|
//добавить информацию об образовании
|
|||
|
if (isset($_POST['add_education'])){
|
|||
|
$profession = addslashes($_POST['profession']);
|
|||
|
$qualification = addslashes($_POST['qualification']);
|
|||
|
$vyz = addslashes($_POST['vyz']);
|
|||
|
$year = $_POST['year'];
|
|||
|
|
|||
|
$sql = 'INSERT INTO '.$ST['dbpf'].'_education (`id_user`, `profession`, `qualification`, `vuz`, `year`) VALUES ("'.$id_user.'", "'.$profession.'", "'.$qualification.'", "'.$vyz.'", "'.$year.'") ';
|
|||
|
//echo $sql;
|
|||
|
$rez = $DB->QUR($sql);
|
|||
|
$id = mysql_insert_id();
|
|||
|
|
|||
|
$msg = 1;
|
|||
|
save_logs('Загружен информация об образовании '.$id.' сотрудника №'.$id_user);
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
//образование сотрудника
|
|||
|
$educations = array();
|
|||
|
$sql = 'SELECT * FROM '.$ST['dbpf'].'_education WHERE id_user = "'.$id_user.'" ';
|
|||
|
$rez = $DB->QUR_SEL($sql);
|
|||
|
if ($rez){
|
|||
|
foreach ($rez as $key => $val) if ($key){
|
|||
|
|
|||
|
$educations[] = $val;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
$smarty->assign('msg', $msg);
|
|||
|
$smarty->assign('teach', $teach);
|
|||
|
$smarty->assign('educations', $educations);
|
|||
|
$maincontent = $smarty->fetch('tpl_information_education.html');
|
|||
|
}
|
|||
|
|
|||
|
//ПОВЫШЕНИЕ КВАЛИФИКАЦИИ
|
|||
|
if ($_GET['page'] == 'skills'){
|
|||
|
|
|||
|
//добавить информацию о повышении квалификации
|
|||
|
if (isset($_POST['add_skills'])){
|
|||
|
$type = $_POST['type'];
|
|||
|
$year = addslashes($_POST['year']);
|
|||
|
$name = addslashes($_POST['name']);
|
|||
|
$place = addslashes($_POST['place']);
|
|||
|
$organization = addslashes($_POST['organization']);
|
|||
|
$date_pr = strtotime($_POST['date_pr']);
|
|||
|
$number_docs = addslashes($_POST['number_docs']);
|
|||
|
|
|||
|
$sql = 'INSERT INTO '.$ST['dbpf'].'_skills_qual (`id_user`, `type`, `year`, `name`, `place`, `organization`, `date_pr`, `number_docs`) VALUES ("'.$id_user.'", "'.$type.'", "'.$year.'", "'.$name.'", "'.$place.'", "'.$organization.'", "'.$date_pr.'", "'.$number_docs.'") ';
|
|||
|
//echo $sql;
|
|||
|
$rez = $DB->QUR($sql);
|
|||
|
$id = mysql_insert_id();
|
|||
|
|
|||
|
$msg = 1;
|
|||
|
save_logs('Добавлена информация о повышении квалификации '.$id.' сотрудника №'.$id_user);
|
|||
|
}
|
|||
|
|
|||
|
//информация о повышениях квалификации сотрудника
|
|||
|
$skills = array();
|
|||
|
$sql = 'SELECT * FROM '.$ST['dbpf'].'_skills_qual WHERE id_user = "'.$id_user.'" ';
|
|||
|
$rez = $DB->QUR_SEL($sql);
|
|||
|
if ($rez){
|
|||
|
foreach ($rez as $key => $val) if ($key){
|
|||
|
switch ($val['type']){
|
|||
|
case 1: $val['type'] = 'Удостоверение о повышении квалификации'; break;
|
|||
|
case 2: $val['type'] = 'Свидетельство'; break;
|
|||
|
case 3: $val['type'] = 'Сертификат'; break;
|
|||
|
case 4: $val['type'] = 'Диплом о переподготовке'; break;
|
|||
|
}
|
|||
|
$val['date_pr'] = date("d.m.Y", $val['date_pr']);
|
|||
|
|
|||
|
$skills[] = $val;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
$smarty->assign('msg', $msg);
|
|||
|
$smarty->assign('teach', $teach);
|
|||
|
$smarty->assign('skills', $skills);
|
|||
|
$maincontent = $smarty->fetch('tpl_information_skills.html');
|
|||
|
}
|
|||
|
|
|||
|
//СТАЖ РАБОТЫ
|
|||
|
if ($_GET['page'] == 'staj'){
|
|||
|
|
|||
|
//сохранение информации о стаже работы
|
|||
|
if (isset($_POST['edit_staj'])){
|
|||
|
$date_staj_npr = strtotime($_POST['date_staj_npr']);
|
|||
|
$date_staj_in = strtotime($_POST['date_staj_in']);
|
|||
|
|
|||
|
$place_in = addslashes($_POST['place_in']); //место внешней организации
|
|||
|
$doljnost_in = addslashes($_POST['doljnost_in']); //должность во внешней организации
|
|||
|
|
|||
|
|
|||
|
$sql = 'UPDATE '.$ST['dbpf'].'_teachers SET date_staj_npr = "'.$date_staj_npr.'", date_staj_in = "'.$date_staj_in.'", place_in = "'.$place_in.'", doljnost_in = "'.$doljnost_in.'" WHERE id_user = "'.$id_user.'" ';
|
|||
|
//echo $sql;
|
|||
|
$rez = $DB->QUR($sql);
|
|||
|
$id = mysql_insert_id();
|
|||
|
|
|||
|
$msg = 1;
|
|||
|
save_logs('Сохранена информация о стаже работы сотрудника №'.$id_user);
|
|||
|
}
|
|||
|
|
|||
|
//информация о преподе
|
|||
|
$teach = $DB->QUR_SEL('SELECT * FROM '.$ST['dbpf'].'_teachers WHERE id_user = "'.$id_user.'" ');
|
|||
|
$teach[1]['date_staj_npr'] = date("Y-m-d", $teach[1]['date_staj_npr']);
|
|||
|
$teach[1]['date_staj_in'] = date("Y-m-d", $teach[1]['date_staj_in']);
|
|||
|
|
|||
|
|
|||
|
$smarty->assign('msg', $msg);
|
|||
|
$smarty->assign('teach', $teach[1]);
|
|||
|
$maincontent = $smarty->fetch('tpl_information_staj.html');
|
|||
|
}
|
|||
|
|
|||
|
?>
|