BossBey File Manager
PHP:
7.3.31-1~deb10u1
OS:
Linux
User:
www-data
Root
/
home
/
www
/
inorg
/
coord_old
📤 Upload
рџ“ќ New File
рџ“Ѓ New Folder
Close
Editing: staff_edit_incl.php
<?php defined ('head') or die("Запрещен прямой доступ"); include_once("auth_incl.php"); include_once("settings_incl.php"); $id=$_GET['id']; $sql_query="select * from staff where id=$id"; $result=mysql_query($sql_query); $fname=mysql_result($result,0,fname); $name=mysql_result($result,0,name); $sname=mysql_result($result,0,sname); $rank=mysql_result($result,0,rank); $science_group=mysql_result($result,0,science_group); $title=mysql_result($result,0,title); $year=mysql_result($result,0,year); $degree=mysql_result($result,0,degree); $birth=mysql_result($result,0,birth); $foto=mysql_result($result,0,foto); $about=mysql_result($result,0,about); $faculty=mysql_result($result,0,faculty); $group=mysql_result($result,0,group); $chief=mysql_result($result,0,chief); $lab_head=mysql_result($result,0,lab_head); $deputy_lab_head=mysql_result($result,0,deputy_lab_head); $group_head=mysql_result($result,0,group_head); echo (" <blockquote><br><form name=staff_add action=script/staff_edit.php?id=$id$add method=post enctype=multipart/form-data> <table width=850 cellspacing=1 bgcolor=000000> <tr height=40 bgcolor=ffffff> <td width=100% align=center> <table width=100% cellspacing=1 bgcolor=000000> <tr height=20 bgcolor=ffffff> <td width=33% align=center>Фамилия</td> <td width=34% align=center>Имя</td> <td width=33% align=center>Отчечтво</td> </tr> <tr height=20 bgcolor=ffffff> <td width=33% align=center><input type=text name=fname size=25 maxlength=30 value=$fname></td> <td width=34% align=center><input type=text name=name size=25 maxlength=30 value=$name></td> <td width=33% align=center><input type=text name=sname size=25 maxlength=30 value=$sname></td> </tr> </table> </td> </tr> <tr height=40 bgcolor=ffffff> <td width=100% align=center> <table width=100% cellspacing=1 bgcolor=000000> <tr height=20 bgcolor=ffffff> "); if ($rank!=1) { echo (" <td width=20% align=left> <input type=radio name=rank value=1 onClick='document.all.studenttitle.disabled=false; document.all.aspiranttitle.disabled=true; document.all.customtitle.disabled=true; document.all.definedtitle.disabled=true; document.all.title_data_type1.disabled=true; document.all.title_data_type2.disabled=true'> Студент</td> <td width=20% align=center><input id=studenttitle disabled type=text name=title size=25 maxlength=100 value=студент></td> <td width=40% align=center> <table width=100%> <tr> <td align=left> <input type=radio name=faculty_data_type1 value=1 checked onClick='document.all.customfaculty1.disabled=true; document.all.definedfaculty1.disabled=false'> <select id=definedfaculty1 name=faculty1> <option value='Факультета Наук о Материалах'>Факультета Наук о Материалах</option> <option value='Химического факультета'>Химического факультета</option> </select> </td> <td rowspan=2 align=center> <input type=text name=group size=3 maxlength=5><br> Группы </td> </tr> <tr> <td align=left> <input type=radio name=faculty_data_type1 value=2 onClick='document.all.customfaculty1.disabled=false; document.all.definedfaculty1.disabled=true'> <input id=customfaculty1 disabled type=text name=faculty1 size=30 maxlength=50> </td> </tr> </table> </td> <td width=20% align=center> <table width=100%> <tr> <td align=left> <input type=radio name=year_data_type1 value=1 checked onClick='document.all.customyear1.disabled=true; document.all.definedyear1.disabled=false'> <select id=definedyear1 name=year1> <option value=1>1</option> <option value=2>2</option> <option value=3>3</option> <option value=4>4</option> <option value=5>5</option> <option value=6>6</option> </select> </td> <td rowspan=2 align=center> Курса </td> </tr> <tr> <td align=left> <input type=radio name=year_data_type1 value=2 onClick='document.all.customyear1.disabled=false; document.all.definedyear1.disabled=true'> <input id=customyear1 disabled type=text name=year1 size=1 maxlength=3> </td> </tr> </table> </td> "); } else{ echo (" <td width=20% align=left> <input type=radio name=rank value=1 checked onClick='document.all.studenttitle.disabled=false; document.all.aspiranttitle.disabled=true; document.all.customtitle.disabled=true; document.all.definedtitle.disabled=true; document.all.title_data_type1.disabled=true; document.all.title_data_type2.disabled=true'> Студент</td> <td width=20% align=center><input id=studenttitle type=text name=title size=25 maxlength=100 value='$title'></td> <td width=40% align=center> <table width=100%> <tr> <td align=left> <input type=radio name=faculty_data_type1 value=1 checked onClick='document.all.customfaculty1.disabled=true; document.all.definedfaculty1.disabled=false'> <select id=definedfaculty1 name=faculty1> <option value='$faculty'>$faculty</option> <option value='Факультета Наук о Материалах'>Факультета Наук о Материалах</option> <option value='Химического факультета'>Химического факультета</option> </select> </td> <td rowspan=2 align=center> <input type=text name=group size=3 maxlength=5 value=$group><br> Группы </td> </tr> <tr> <td align=left> <input type=radio name=faculty_data_type1 value=2 onClick='document.all.customfaculty1.disabled=false; document.all.definedfaculty1.disabled=true'> <input id=customfaculty1 disabled type=text name=faculty1 size=30 maxlength=50> </td> </tr> </table> </td> <td width=20% align=center> <table width=100%> <tr> <td align=left> <input type=radio name=year_data_type1 value=1 checked onClick='document.all.customyear1.disabled=true; document.all.definedyear1.disabled=false'> <select id=definedyear1 name=year1> <option value=$year>$year</option> <option value=1>1</option> <option value=2>2</option> <option value=3>3</option> <option value=4>4</option> <option value=5>5</option> <option value=6>6</option> </select> </td> <td rowspan=2 align=center> Курса </td> </tr> <tr> <td align=left> <input type=radio name=year_data_type1 value=2 onClick='document.all.customyear1.disabled=false; document.all.definedyear1.disabled=true'> <input id=customyear1 disabled type=text name=year1 size=1 maxlength=3> </td> </tr> </table> </td> "); } echo (" </tr> <tr height=20 bgcolor=ffffff> "); if ($rank!=2) { echo (" <td width=20% align=left> <input type=radio name=rank value=2 onClick='document.all.studenttitle.disabled=true; document.all.aspiranttitle.disabled=false; document.all.customtitle.disabled=true; document.all.definedtitle.disabled=true; document.all.title_data_type1.disabled=true; document.all.title_data_type2.disabled=true'> Аспирант</td> <td width=20% align=center><input id=aspiranttitle disabled type=text name=title size=25 maxlength=100 value=аспирант></td> <td width=40% align=center> <table width=100%> <tr> <td align=left> <input type=radio name=faculty_data_type2 value=1 checked onClick='document.all.customfaculty2.disabled=true; document.all.definedfaculty2.disabled=false'> <select id=definedfaculty2 name=faculty2> <option value='аспирантуры Факультета Наук о Материалах'>Факультета Наук о Материалах</option> <option value='аспирантуры Химического факультета'>Химического факультета</option> </select> </td> </tr> <tr> <td align=left> <input type=radio name=faculty_data_type2 value=2 onClick='document.all.customfaculty2.disabled=false; document.all.definedfaculty2.disabled=true'> <input id=customfaculty2 disabled type=text name=faculty2 size=30 maxlength=50> </td> </tr> </table> </td> <td width=20% align=center> <table width=100%> <tr> <td align=left> <input type=radio name=year_data_type2 value=1 checked onClick='document.all.customyear2.disabled=true; document.all.definedyear2.disabled=false'> <select id=definedyear2 name=year2> <option value=1>1</option> <option value=2>2</option> <option value=3>3</option> </select> </td> <td rowspan=2 align=center> Г/О </td> </tr> <tr> <td align=left> <input type=radio name=year_data_type2 value=2 onClick='document.all.customyear2.disabled=false; document.all.definedyear2.disabled=true'> <input id=customyear2 disabled type=text name=year2 size=1 maxlength=3> </td> </tr> </table> </td> "); } else{ echo (" <td width=20% align=left> <input type=radio name=rank value=2 checked onClick='document.all.studenttitle.disabled=true; document.all.aspiranttitle.disabled=false; document.all.customtitle.disabled=true; document.all.definedtitle.disabled=true; document.all.title_data_type1.disabled=true; document.all.title_data_type2.disabled=true'> Аспирант</td> <td width=20% align=center><input id=aspiranttitle type=text name=title size=25 maxlength=100 value='$title'></td> <td width=40% align=center> <table width=100%> <tr> <td align=left> <input type=radio name=faculty_data_type2 value=1 onClick='document.all.customfaculty2.disabled=true; document.all.definedfaculty2.disabled=false'> <select id=definedfaculty2 disabled name=faculty2> <option value='аспирантуры Факультета Наук о Материалах'>Факультета Наук о Материалах</option> <option value='аспирантуры Химического факультета'>Химического факультета</option> </select> </td> </tr> <tr> <td align=left> <input type=radio name=faculty_data_type2 value=2 checked onClick='document.all.customfaculty2.disabled=false; document.all.definedfaculty2.disabled=true'> <input id=customfaculty2 type=text name=faculty2 size=30 maxlength=50 value='$faculty'> </td> </tr> </table> </td> <td width=20% align=center> <table width=100%> <tr> <td align=left> <input type=radio name=year_data_type2 value=1 checked onClick='document.all.customyear2.disabled=true; document.all.definedyear2.disabled=false'> <select id=definedyear2 name=year2> <option value=$year>$year</option> <option value=1>1</option> <option value=2>2</option> <option value=3>3</option> </select> </td> <td rowspan=2 align=center> Г/О </td> </tr> <tr> <td align=left> <input type=radio name=year_data_type2 value=2 onClick='document.all.customyear2.disabled=false; document.all.definedyear2.disabled=true'> <input id=customyear2 disabled type=text name=year2 size=1 maxlength=3> </td> </tr> </table> </td> "); } echo (" </tr> <tr height=20 bgcolor=ffffff> "); if ($rank!=3) { echo (" <td width=20% align=left> <input type=radio name=rank value=3 onClick='document.all.studenttitle.disabled=true; document.all.aspiranttitle.disabled=true; document.all.customtitle.disabled=true; document.all.definedtitle.disabled=false; document.all.title_data_type1.disabled=false; document.all.title_data_type2.disabled=false'> Сотрудник</td> <td width=20% align=center> <input type=radio disabled id=title_data_type1 name=title_data_type value=1 checked onClick='document.all.customtitle.disabled=true; document.all.definedtitle.disabled=false'> <select disabled id=definedtitle name=title> <option value='доцент'>доцент</option> <option value='ведущий научный сотрудник'>ведущий научный сотрудник</option> <option value='старший научный сотрудник'>старший научный сотрудник</option> <option value='младший научный сотрудник'>младший научный сотрудник</option> </select><br> <input type=radio disabled id=title_data_type2 name=title_data_type value=2 onClick='document.all.customtitle.disabled=false; document.all.definedtitle.disabled=true'> <input id=customtitle disabled type=text name=title size=30 maxlength=50> </td> <td width=40% align=center> <table width=100%> <tr> <td align=left> <input type=radio name=degree_data_type value=1 checked onClick='document.all.customdegree.disabled=true; document.all.defineddegree.disabled=false'> <select id=defineddegree name=degree> <option value='кандидат химических наук'>кандидат химических наук</option> <option value='доктор химических наук'>доктор химических наук</option> </select> </td> </tr> <tr> <td align=left> <input type=radio name=degree_data_type value=2 onClick='document.all.customdegree.disabled=false; document.all.defineddegree.disabled=true'> <input id=customdegree disabled type=text name=degree size=30 maxlength=50> </td> </tr> </table> </td> <td width=20% align=center> <input type=checkbox name=lab_head value=1>Зав. лаб.<br> <input type=checkbox name=deputy_lab_head value=1>Зам. зав. лаб.<br> <input type=checkbox name=group_head value=1>Зав. груп. </td> </tr> </table> </td> "); } else { if ($lab_head==1) {$checked1=' checked';} else {$checked1='';}; if ($deputy_lab_head==1) {$checked2=' checked';} else {$checked2='';}; if ($group_head==1) {$checked3=' checked';} else {$checked3='';}; echo (" <td width=20% align=left> <input type=radio name=rank value=3 checked onClick='document.all.studenttitle.disabled=true; document.all.aspiranttitle.disabled=true; document.all.customtitle.disabled=true; document.all.definedtitle.disabled=false; document.all.title_data_type1.disabled=false; document.all.title_data_type2.disabled=false'> Сотрудник</td> <td width=20% align=center> <input type=radio id=title_data_type1 name=title_data_type value=1 checked onClick='document.all.customtitle.disabled=true; document.all.definedtitle.disabled=false'> <select id=definedtitle name=title> <option value='$title'>$title</option> <option value='доцент'>доцент</option> <option value='ведущий научный сотрудник'>ведущий научный сотрудник</option> <option value='старший научный сотрудник'>старший научный сотрудник</option> <option value='младший научный сотрудник'>младший научный сотрудник</option> </select><br> <input type=radio id=title_data_type2 name=title_data_type value=2 onClick='document.all.customtitle.disabled=false; document.all.definedtitle.disabled=true'> <input id=customtitle disabled type=text name=title size=30 maxlength=50> </td> <td width=40% align=center> <table width=100%> <tr> <td align=left> <input type=radio name=degree_data_type value=1 checked onClick='document.all.customdegree.disabled=true; document.all.defineddegree.disabled=false'> <select id=defineddegree name=degree> <option value='$degree'>$degree</option> <option value='кандидат химических наук'>кандидат химических наук</option> <option value='доктор химических наук'>доктор химических наук</option> </select> </td> </tr> <tr> <td align=left> <input type=radio name=degree_data_type value=2 onClick='document.all.customdegree.disabled=false; document.all.defineddegree.disabled=true'> <input id=customdegree disabled type=text name=degree size=30 maxlength=50> </td> </tr> </table> </td> <td width=20% align=center> <input type=checkbox$checked1 name=lab_head value=1>Зав. лаб.<br> <input type=checkbox$checked2 name=deputy_lab_head value=1>Зам. зав. лаб.<br> <input type=checkbox$checked3 name=group_head value=1>Зав. груп. </td> </tr> </table> </td> "); } $byear=substr($birth,0,4); $month=substr($birth,5,2); $day=substr($birth,8,2); $name2_0=''; echo (" </tr> <tr height=40 bgcolor=ffffff> <td width=100% align=center> <table width=100% cellspacing=1 bgcolor=000000> <tr height=20 bgcolor=ffffff> <td width=50% align=center>Группа:</td> <td width=50% align=center>Научный руководитель:</td> </tr> <tr bgcolor=ffffff> <td width=50% align=center> <select name=science_group> <option value='$science_group'>${'name2_'.$science_group}</option> <option value=''> </option> "); for ($i=1; $i<=3; $i++) { echo ("<option value=$i>${'name2_'.$i}</option>"); } echo(" </select> </td> <td width=50%> <table width=100%> <tr> <td align=left> <input type=radio name=chief_data_type value=1 checked onClick='document.all.customchief.disabled=true; document.all.definedchief.disabled=false'> <select id=definedchief name=chief> <option value='$chief'>$chief</option> "); $sql_query="select fname, name, sname from staff where rank=3 order by fname;"; $result=mysql_query($sql_query); $num=mysql_numrows($result); for ($i=0; $i<$num; $i++) { $fname=mysql_result($result,$i,fname); $name=mysql_result($result,$i,name); $sname=mysql_result($result,$i,sname); $s=substr($sname, 0, 1); $n=substr($name, 0, 1); $value=$fname.' '.$n.'.'.$s.'.'; echo ("<option value='$value'>$value</option>"); } $sql_query="select fname, name, sname from staff where rank=2 order by fname;"; $result=mysql_query($sql_query); $num=mysql_numrows($result); for ($i=0; $i<$num; $i++) { $fname=mysql_result($result,$i,fname); $name=mysql_result($result,$i,name); $sname=mysql_result($result,$i,sname); $s=substr($sname, 0, 1); $n=substr($name, 0, 1); $value=$fname.' '.$n.'.'.$s.'.'; echo ("<option value='$value'>$value</option>"); } echo(" </select> </td> </tr> <tr> <td align=left> <input type=radio name=chief_data_type value=2 onClick='document.all.customchief.disabled=false; document.all.definedchief.disabled=true'> <input id=customchief disabled type=text name=chief size=30 maxlength=50> </td> </tr> </table> </td> </tr> </table> </td> </tr> <tr height=40 bgcolor=ffffff> <td width=100% align=center> <table width=100% cellspacing=1 bgcolor=000000> <tr height=20 bgcolor=ffffff> <td width=30% align=center> Дата рождения: </td> <td width=30% align=center>Фото:</td> <td width=40% align=center>Дополнительно:</td> </tr> <tr height=20 bgcolor=ffffff> <td width=30% align=center> <select name=day> <option value=$day>$day</option> <option value=00> </option> <option value=01>1</option> <option value=02>2</option> <option value=03>3</option> <option value=04>4</option> <option value=05>5</option> <option value=06>6</option> <option value=07>7</option> <option value=08>8</option> <option value=09>9</option> <option value=10>10</option> <option value=11>11</option> <option value=12>12</option> <option value=13>13</option> <option value=14>14</option> <option value=15>15</option> <option value=16>16</option> <option value=17>17</option> <option value=18>18</option> <option value=19>19</option> <option value=20>20</option> <option value=21>21</option> <option value=22>22</option> <option value=23>23</option> <option value=24>24</option> <option value=25>25</option> <option value=26>26</option> <option value=27>27</option> <option value=28>28</option> <option value=29>29</option> <option value=30>30</option> <option value=31>31</option> </select> <select name=month> <option value=$month>$month</option> <option value=00> </option> <option value=01>Января</option> <option value=02>Февраля</option> <option value=03>Марта</option> <option value=04>Апреля</option> <option value=05>Мая</option> <option value=06>Июня</option> <option value=07>Июля</option> <option value=08>Августа</option> <option value=09>Сентября</option> <option value=10>Октября</option> <option value=11>Ноября</option> <option value=12>Декабря</option> </select> <select name=byear> <option value=$byear>$byear</option> <option value=0000> </option> "); for ($i=2000; $i>=1930; $i--) { echo ("<option value=$i>$i</option>"); } echo(" </select> </td> <td width=30% align=center> <input type=file name=foto> <input type=hidden name=oldfoto value='$foto'> "); if ($foto!='Фотография отсутствует') { echo(" <br><img src=images/staff/down.gif border=0 alt='Показать фотографию' style=\"cursor: hand;\" onclick='document.all.fotoimg.style.visibility=\"visible\"; document.all.fotoimg.style.position=\"relative\";'> <img src=images/staff/up.gif border=0 alt='Скрыть фотографию' style=\"cursor: hand;\" onclick='document.all.fotoimg.style.visibility=\"hidden\"; document.all.fotoimg.style.position=\"absolute\";'> <br><input type=checkbox name=delfoto value=1> Удалить фотографию <br><img id=fotoimg src=images/staff/$id/$foto style=\"position:absolute; top:0; left:0; visibility:hidden; width=auto; height=auto\"> "); } echo (" </td> <td width=40% align=center><textarea cols=30 rows=3 name=about>$about</textarea></td> </tr> </table> </td> </tr> <tr height=20 bgcolor=ffffff> <td width=100% align=center> <table width=850 cellspacing=1 bgcolor=000000> <tr height=20 bgcolor=ffffff> <td width=100% align=center><input type=submit value='Сохранить Изменения'> <input type=button value='Назад' onClick='history.go(-1)'></td> </tr> </table> </td> </tr> </table> </form></blockquote> "); ?>
Save
Cancel