BossBey File Manager
PHP:
7.3.31-1~deb10u1
OS:
Linux
User:
www-data
Root
/
home
/
www
/
inorg
/
coord_old
/
old
/
script
📤 Upload
рџ“ќ New File
рџ“Ѓ New Folder
Close
Editing: staff_add.php
<?php include_once("../auth_incl.php"); include_once("../db_connect_incl.php"); include_once("../settings_incl.php"); if ($rez>=50) { $fname=$HTTP_POST_VARS['fname']; $name=$HTTP_POST_VARS['name']; $sname=$HTTP_POST_VARS['sname']; $rank=$HTTP_POST_VARS['rank']; $title=$HTTP_POST_VARS['title']; $faculty=$HTTP_POST_VARS['faculty'.$rank]; $group=$HTTP_POST_VARS['group']; $year=$HTTP_POST_VARS['year'.$rank]; $degree=$HTTP_POST_VARS['degree']; $lab_head=$HTTP_POST_VARS['lab_head']; $deputy_lab_head=$HTTP_POST_VARS['deputy_lab_head']; $group_head=$HTTP_POST_VARS['group_head']; $science_group=$HTTP_POST_VARS['science_group']; $chief=$HTTP_POST_VARS['chief']; $day=$HTTP_POST_VARS['day']; $month=$HTTP_POST_VARS['month']; $byear=$HTTP_POST_VARS['byear']; $birth=$byear.'-'.$month.'-'.$day; $filefoto=$HTTP_POST_FILES['foto']; $about=$HTTP_POST_VARS['about']; if ($filefoto['name']=='') { $foto='Фотография отсутствует'; } else { $foto=$filefoto['name']; } /*echo $fname; echo $name; echo $sname; echo $rank; echo $title; echo $faculty; echo $group; echo $year; echo $degree; echo $lab_head; echo $deputy_lab_head; echo $group_head; echo $science_group; echo $chief; echo $birth; echo $foto['name']; echo $about;*/ if ($rank==1) { $sql_query="insert into staff values (null, '$fname', '$name', '$sname', '$science_group', $rank, '$title', '', $year, '$faculty', '$group', '$chief', '$birth', '$foto', '$about', '', '', '')"; } if ($rank==2) { $sql_query="insert into staff values (null, '$fname', '$name', '$sname', '$science_group', $rank, '$title', '', $year, '$faculty', '', '$chief', '$birth', '$foto', '$about', '', '', '')"; } if ($rank==3) { $sql_query="insert into staff values (null, '$fname', '$name', '$sname', '$science_group', $rank, '$title', '$degree', '', '', '', '', '$birth', '$foto', '$about', '$lab_head', '$deputy_lab_head', '$group_head')"; } mysql_query($sql_query); //echo $sql_query; if ($filefoto['name']!='') { $sql_query="select id from staff order by id desc limit 1;"; $result=mysql_query($sql_query); $id=mysql_result($result,0,id); mkdir("../images/staff/$id/", 0775); copy ($filefoto['tmp_name'], "../images/staff/$id/".$filefoto['name']); } } Header("Location:http://$domain/index.php?topic=2&show=edit_staff&action=add$add"); ?>
Save
Cancel