Ejemplo n.º 1
0
</select>
		
		автор доклада<br>
	 <textarea name="text_content_<?php 
        echo $row_id_detail;
        ?>
" rows="6" cols="60"></textarea> текст доклада	  

	  	 <p>Постановили 
		   <select name="opinion_id_<?php 
        echo $row_id_detail;
        ?>
" style="width:300;">	  	 	
		  <?php 
        $query = 'select id,name from protocol_opinions order by name';
        echo getFrom_ListItemValue($query, 'id', 'name', 'opinion_id_' . $row_id_detail);
        ?>
</select>
		   решение <br>
		   <textarea name="opinion_text_<?php 
        echo $row_id_detail;
        ?>
" rows="2" cols="60"></textarea> дополнение к решению
		   <p>
		   <label title="позволяет отслеживать выполнение в общем списке протоколов"><input type="checkbox" name="on_control_<?php 
        echo $row_id_detail;
        ?>
"> <span class=warning>на контроле</span> </label> &nbsp;  &nbsp;
		   <input type="file" name="file_name_<?php 
        echo $row_id_detail;
        ?>
Ejemplo n.º 2
0
            $add_string = reset_param_name($query_string, 'trip_id');
            //для фильтра по преп-лю
            $add_string = reset_param_name($add_string, 'page');
            //для перехода к первой странице сортировки по преп-лю
            //echo ' admin_role='.$admin_role;
            ?>
	Протокол № <select name="trip_id" id="trip_id" style="width:200;" onChange="javascript:window.location.href='?<?php 
            echo reset_param_name($query_string, 'trip_id');
            ?>
&trip_id='+this.options[this.selectedIndex].value;"> 
	<?php 
            //getFrom_ListItemValue($listQuery,$listId,$listName,$FormListItemName)
            $query_ = 'select pt.id, concat(p.num," от ",DATE_FORMAT(p.date_text,"%d.%m.%Y") ," (", 
			   (select count(*) from protocol_trip_details ptd where ptd.trip_id=pt.id),")") as name 
			   from protocol_trips pt left join protocols p on p.id=pt.protocol_id order by 2 desc';
            echo getFrom_ListItemValue($query_, 'id', 'name', 'trip_id');
            ?>
</select>
	<?php 
            //persons_select($add_string.'&page=1&trip_id');
            echo '&nbsp;&nbsp;<input type=button value="Все" onclick=javascript:window.location.href="' . $main_page . '";>&nbsp;&nbsp;';
            //echo showPrintSaveOpt('print&doc',$_SERVER['QUERY_STRING']);
            echo ' <b>список</b>: ' . showPrintSaveOpt('print&doc', $_SERVER['QUERY_STRING'], '');
            if ($trip_id > 0) {
                //showPrintSaveOpt('print&doc',$_SERVER['QUERY_STRING']);
                echo ' <b>выписка</b>: ' . showPrintSaveOpt('print&doc', 'trip_id=' . $trip_id, 'protocol_trip_print.php');
            }
            echo '</td> 
	<td align=right><input type=text name="q" id="q" width=50 value=""> &nbsp; 
		<input type=button value="Найти" title="поиск проводится в текущем разделе (архив или тек.уч.год) выбором соот.ссылки" OnClick=javascript:go2search(\'' . $trip_id . '\',\'';
            if (isset($_GET['archiv'])) {
  $('#list1').change(function(){  	
	  //главный список, фильтруемый список, тип_запроса, разворачивать_при_пустом_главном
	  adjustList2('list1','list2','StGroup2Students','allowMainIsNull');	
  }).change();

});
</script>
</head>
<body>
<?php 
$files_path = '../../';
//include '../asu/sql_connect.php';
include $files_path . 'sql_connect.php';
?>
  
  <div class="border">
  <label>Страна</label><br />
  <select id="list1">
	<?php 
$listQuery = "SELECT id,\r\n\t  concat(name,' (',(\r\n\t    select count(*) from students s where s.group_id=sg.id\r\n\t    ),')') as name\r\n\t  FROM study_groups sg WHERE 1 order by sg.name";
echo getFrom_ListItemValue($listQuery, 'id', 'name', 'list1');
?>
  </select>
  </div>
  <div class="border">
  <label>Автомобиль</label> <span id="ac_loading" class="cascadeSelect_loading" style="display:none";> </span> <br />
  <select id="list2" disabled="disabled"></select> 
  </div>
</body>
</html>
Ejemplo n.º 4
0
<?php 
if (!isset($_GET['save']) && !isset($_GET['print'])) {
    ?>

<div id="div_filter" class=text style="text-align:center;display:none;">
	<form name=dateFilter action="" method="get" id="dateFilter">
	дата начала<select name="dateFrom" id="dateFrom">
	<?php 
    $query = 'select distinct `year` from `izdan` where TRIM(`year`)<>"" order by `year` desc';
    echo getFrom_ListItemValue($query, 'year', 'year', 'dateFrom');
    ?>
	</select> 
	окончания<select name="dateTo" id="dateTo">
	<?php 
    $query = 'select distinct `year` from `izdan` where TRIM(`year`)<>"" order by `year` desc';
    echo getFrom_ListItemValue($query, 'year', 'year', 'dateTo');
    ?>
	</select> 
	<input type=button onClick='resetFilter()' value="x" title="сбросить фильтр">
	<input type=button onClick='date_test()' value='Ok'>
	</form>
</div>
<div class=text style="text-align:center;">
	<a href="#" onclick="hide_show('div_filter');">отобрать публикации по дате</a>
</div>
<?php 
    echo "<div style='text-align:right;'>\r\n\t<a class=text href='?" . $_SERVER["QUERY_STRING"] . "&save&attach=xls' title='Выгрузить для анализа' target='_blank'>Передать в MS Excel</a>&nbsp;&nbsp;&nbsp;\r\n\t<a class=text href='?" . $_SERVER["QUERY_STRING"] . "&print' title='Распечатать' target='_blank'>Печать</a></div>";
}
$rateArr = array();
$rateArr[0] = array('пособия, монографии и учебники', 0.5, '`izdan`.type_book=1 or `izdan`.type_book=27');
$rateArr[1] = array('пособия или учебники с гр. УМО', 1, '`izdan`.type_book=2 or `izdan`.type_book=28');
Ejemplo n.º 5
0
        $query .= $search_query;
    }
}
$query .= ' order by ' . $groupArr[0][2] . ',' . $groupArr[1][2] . ',' . $groupArr[2][2] . ',4 ';
//echo '$query='.$query;
$res_PP = mysql_query($query . ' limit ' . ($page - 1) * $pageVals . ',' . $pageVals);
if (mysql_num_rows($res_PP) == 0) {
    echo '<p class=warning style="width:80%;text-align:center;">В текущем учебном году записей не обнаружено. Возможно не указана предполагаемая дата защиты дипломного проекта, либо она раньше <u>' . DateTimeCustomConvert(substr($def_settings['date_start'], 0, 10), 'd', 'mysql2rus') . '</u>. Подробнее смотрите в <u>Примечание</u></p>';
} else {
    if (!isset($_GET['save']) && !isset($_GET['print'])) {
        echo '<table width=99% class="notinfo"><tr>';
        echo '<td align=left width=350>
	Специальность &nbsp;  
	<select name="speciality_id" id="speciality_id" style="width:200;" onChange=javascript:window.location.href="?"+this.id+"="+this.options[this.selectedIndex].value+"&' . reset_param_name(reset_param_name($query_string, 'speciality_id'), 'page') . '">';
        $query_ = 'select id,name from specialities order by name';
        echo getFrom_ListItemValue($query_, 'id', 'name', 'speciality_id');
        echo '</select> </td><td> ';
        echo '<input type=button value="Все" onclick=javascript:window.location.href="' . $curpage . '";>&nbsp;&nbsp;
	<input type=button value="Печать" onclick=javascript:window.location.href="?print=1&' . $_SERVER["QUERY_STRING"] . '";>&nbsp;&nbsp;
	<input type=button value="в Word" onclick=javascript:window.location.href="?save&attach=doc&' . $_SERVER["QUERY_STRING"] . '"></td> 
	<td align=right><input type=text name="q" id="q" width=50 value=""> &nbsp; <input type=button value="Найти" 
	OnClick=javascript:go2search();></td>
	</tr></table>';
        echo '<p>';
        ?>
<form name=order_list id=order_list action="" method="get"> порядок группировки:
<?php 
        if (isset($_GET['archiv'])) {
            echo '<input type=hidden id=archiv name=archiv>';
        }
        for ($j = 0; $j < count($groupArr); $j++) {
Ejemplo n.º 6
0
            echo '<p class="notinfo"><a href="?action=add&' . $_SERVER["QUERY_STRING"] . '"> Добавить</a> &nbsp;
	<a href="filial_form.php" title="более наглядно"> Добавить через печатную форму</a> <br/>
	<b>Справочники:</b> <a href="spravochnik.php?sprav_id=23&spr_type=0#id_23">филиалы</a> &nbsp;
	<a href="spravochnik.php?sprav_id=22&spr_type=0#id_22">тип проезда транспортом</a> &nbsp;
	<a href="spravochnik.php?sprav_id=21&spr_type=0#id_21">действия в командировке</a> &nbsp;
	<p>';
        }
        echo '<table width=99% class="notinfo"><tr>';
        echo '<td align=left width=150>
	Сотрудник* &nbsp; </td><td> 
	<select name="kadri_id" id="kadri_id" style="width:300;" onChange=javascript:window.location.href="?kadri_id="+this.options[this.selectedIndex].value+"&' . reset_param_name($query_string, 'kadri_id') . '">';
        $query = 'select kadri.id, concat(kadri.fio, " (",count(*),")") as caption  
from kadri right join filial_going fg on kadri.id = fg.kadri_id ' . ($view_all_mode ? "" : " where kadri.id=" . $kadri_id) . '
group by kadri.id,kadri.fio 
order by 2 ASC limit 0,1000';
        echo getFrom_ListItemValue($query, 'id', 'caption', 'kadri_id');
        echo '</select> &nbsp;&nbsp; ';
        if ($view_all_mode) {
            echo '<input type=button value="Все" onclick=javascript:window.location.href="' . $curpage . '";>&nbsp;&nbsp;';
        }
        echo '<input type=button value="Печать" onclick=javascript:window.location.href="?print=1&' . $_SERVER["QUERY_STRING"] . '";>&nbsp;&nbsp;
	<input type=button value="в Word" onclick=javascript:window.location.href="?save&attach=doc&' . $_SERVER["QUERY_STRING"] . '"></td> 
	<td align=right><input type=text name="q" id="q" width=50 value=""> &nbsp; <input type=button value="Найти" 
	OnClick=javascript:go2search();></td>
	</tr></table>
	<p>';
    }
    if ($q != '') {
        echo '<div>Поиск: <b><u>' . $q . '</u></b> <a href="?' . reset_param_name($query_string, 'q') . '">сбросить поиск</a></div><br>';
        $search_query = 'and (kadri.`fio` like "%' . $q . '%" or 
					kadri.`fio_short` like "%' . $q . '%" or 
Ejemplo n.º 7
0
function print_hours($year, $part)
{
    global $hour_kind_name, $hour_kind_code;
    global $total_year;
    //для расчета общего итога
    global $total_year_fil;
    global $part_num;
    global $kind_type_defaults;
    global $lect_control;
    global $lect_id;
    $hours_kind_type_selected = '';
    //среди чего выборка по типу нагрузки
    $query = 'select id from hours_kind_type order by id';
    $res = mysql_query($query);
    while ($a = mysql_fetch_array($res)) {
        //$select_val='';
        if (isset($_GET['kind_type' . $a['id']]) && $_GET['kind_type' . $a['id']] == 'on') {
            if ($hours_kind_type_selected == '') {
                $hours_kind_type_selected = $a['id'];
            } else {
                $hours_kind_type_selected = $hours_kind_type_selected . ',' . $a['id'];
            }
        }
        //echo '<option value="'.$a['id'].'"'.$select_val.'>'.$a['name'].'</option>';
    }
    $query_all = 'SELECT hours_kind.id,hours_kind.stud_cnt, subjects.name as subj_name, specialities.name as spec_name, levels.name as level_name, study_groups.name as group_name, study_groups.man_cnt as man_cnt,hours_kind.hours_kind_type,hours_kind.groups_cnt,hours_kind.comment,hours_kind.year_id,hours_kind.part_id,
	lects, practs, labor, rgr, recenz, kurs_proj, consult, test, exams, study_pract, work_pract, consult_dipl, gek, aspirants, aspir_manage, duty,
	time_intervals.name as year_name, time_parts.name as part_name,hours_kind_type.name as hours_kind_type_name,hours_kind.on_filial  
	FROM hours_kind left join subjects on hours_kind.subject_id=subjects.id 
					left join specialities on specialities.id=hours_kind.spec_id 
					left join levels on levels.id=hours_kind.level_id 
					left join study_groups on study_groups.id=hours_kind.group_id
					left join time_intervals on time_intervals.id=hours_kind.year_id
					left join time_parts on time_parts.id=hours_kind.part_id
					left join hours_kind_type on hours_kind_type.id=hours_kind.hours_kind_type
	 where kadri_id=' . $_GET['kadri_id'] . ' and time_intervals.name="' . $year . '" and time_parts.name="' . $part . '" 
	 			and hours_kind_type in(' . $hours_kind_type_selected . ') limit 0,100 ';
    //echo $query_all;
    if ($res_all = mysql_query($query_all) and mysql_numrows($res_all) > 0) {
        /*echo '<hr><font size=-1> Найдено записей: '.mysql_numrows($res_all).'</font><br>';*/
    } else {
        if (!isset($_GET['save']) && !isset($_GET['print'])) {
            echo '<hr><font color="red" size=-1>Записей за указанный семестр нет</font>';
        }
    }
    //echo $query_all;
    //для расчета нагрузки - список показателей видов часов
    echo '<div align="center"> ' . strtoupper($part) . ' СЕМЕСТР</div>';
    $cols_disable = 0;
    //число скрытых столцов
    $not_print_cols = 0;
    //число непечатаемых столбцов (в нумерации столбцов)
    //echo ' kind_type_defaults='.$kind_type_defaults;
    echo '<form name="h_copy_' . $part_num . '" method="POST" action="?kadri_id=' . $_GET['kadri_id'] . '&year=' . $_GET['year'] . '&export' . $kind_type_defaults . '"><table name=tab1 border=1 cellpadding="0" cellspacing="0" width="">
	<tr align="center" class="title">';
    if (!isset($_GET['save']) && !isset($_GET['print']) && $_SESSION['userType'] == 'admin') {
        echo '<td width="50"><input type=checkbox name="checkbox_del_all' . $part_num . '" title="для копирования нагрузки" onClick="javascript:mark_all(this.name,' . $part_num . ');"> </td>
			<td width="50"><img src="images/todelete.png" title="Удалить">&nbsp;&nbsp;&nbsp;<img src="images/toupdate.png" title="Правка"></td>';
    }
    if ($_SESSION['userType'] != 'admin') {
        $cols_disable = 2;
    }
    echo '<td width="20">№</td>';
    echo '<td width="230">НАИМЕНОВАНИЕ ДИСЦИПЛИН</td>';
    //250
    echo '<td width="20"><img src="images/hours_pics/facul.gif" border=0 title="Факультет"></td>';
    echo '<td width="20"><img src="images/hours_pics/special.gif" border=0 title="Cпециальность"></td>';
    echo '<td width="20"><img src="images/hours_pics/kurs.gif" border=0 title="Курс"></td>';
    echo '<td width="20"><img src="images/hours_pics/gr_number.gif" border=0 title="Число групп"></td>';
    echo '<td width="20"><img src="images/hours_pics/stud_number.gif" border=0 title="Количество студентов"></td>';
    if (!isset($_GET['save']) && !isset($_GET['print'])) {
        //echo '<td width="60">группа</td>';
        echo '<td width="100">тип нагрузки</td>';
        echo '<td width="60">комментарий</td>';
    } else {
        $not_print_cols = 4;
    }
    //вывод видов часов (лекция, практ, лабор...)
    for ($i = 0; $i < sizeof($hour_kind_name); $i++) {
        echo '<td><img src="images/hours_pics/' . $hour_kind_code[$i] . '.gif" alt="' . $hour_kind_name[$i] . '"></td>';
    }
    echo '<td><img src="images/hours_pics/sum.gif" alt="Всего часов"></td>';
    $add_col = 0;
    //добавочный номер для столбца
    if (isset($_GET['filial_flag']) && $_GET['filial_flag'] == 'on') {
        echo '<td><img src="images/hours_pics/add_filials.gif" alt="надбавка 50% к всего"></td>';
        //$cols_disable--;$not_print_cols--;
        $add_col = 1;
    }
    echo '</tr><tr align="center" class="main_">';
    if (!isset($_GET['save']) && !isset($_GET['print'])) {
        for ($i = 1; $i < sizeof($hour_kind_name) + 13 - $cols_disable + $add_col; $i++) {
            echo '<td>' . $i . '</td>';
        }
    } else {
        for ($i = 1; $i < sizeof($hour_kind_name) + 13 - $not_print_cols + $add_col; $i++) {
            echo '<td>' . $i . '</td>';
        }
    }
    echo '</tr>';
    //	echo '<h3>$total='.$total.'</h3>';
    $total = 0;
    $sumCol = array();
    //итоги по столбцам
    for ($i = 0; $i < sizeof($hour_kind_code); $i++) {
        $sumCol[$i] = 0;
    }
    $j = 0;
    $sumColFilial = 0;
    while ($tmpval = mysql_fetch_array($res_all)) {
        $sum = 0;
        $j++;
        echo '<tr align="left" class="main_">';
        if (!isset($_GET['save']) && !isset($_GET['print']) && $_SESSION['userType'] == 'admin') {
            echo '
				<td width="50"><input type=checkbox name="checkbox_h_copy_' . $tmpval['id'] . '" title="для копирования нагрузки"> </td>
				<td align="center"> <a href=javascript:del_confirm(' . $_GET['kadri_id'] . ',' . $tmpval['id'] . ',' . $tmpval['year_id'] . ') title="Удалить">
				<img src="images/todelete.png" alt="Удалить" border="0"></a>&nbsp;&nbsp;&nbsp;
				<a href="s_hours.php?kadri_id=' . $_GET['kadri_id'] . '&hours_id=' . $tmpval['id'] . '&tab=2" title="Правка">
				<img src="images/toupdate.png" alt="Правка" border="0"></a></td>';
        }
        //else {}
        echo '<td width="">' . $j . '&nbsp;</td>';
        echo '<td width="230" align=left>' . $tmpval['subj_name'] . '&nbsp</td>';
        echo '<td width="30">&nbsp; ИРТ</td>';
        echo '<td width="30" align=center>' . $tmpval['spec_name'] . '&nbsp</td>';
        echo '<td width="30" align=right>' . $tmpval['level_name'] . '&nbsp</td>';
        if (trim($tmpval['man_cnt']) != '') {
            $tmpval['man_cnt'] = ' ( ' . $tmpval['man_cnt'] . 'чел. )';
        } else {
            $tmpval['man_cnt'] = '';
        }
        if ($tmpval['groups_cnt'] == 0) {
            $tmpval['groups_cnt'] = '';
        }
        echo '<td align=right>' . $tmpval['groups_cnt'] . '&nbsp</td>';
        if ($tmpval['stud_cnt'] == 0) {
            $tmpval['stud_cnt'] = '';
        }
        echo '<td align=right>' . $tmpval['stud_cnt'] . '&nbsp</td>';
        //число студентов
        if (!isset($_GET['save']) && !isset($_GET['print'])) {
            //echo '<td>'.$tmpval['group_name'].$tmpval['man_cnt'].'&nbsp</td>';
            /*if ($tmpval['hours_kind_type']==0) {$tmpval['hours_kind_type']='основная';}
            		else {$tmpval['hours_kind_type']='дополнительная';}*/
            echo '<td>' . $tmpval['hours_kind_type_name'] . '&nbsp</td>';
            echo '<td>' . $tmpval['comment'] . '&nbsp</td>';
        }
        for ($i = 0; $i < sizeof($hour_kind_code); $i++) {
            if ($tmpval[$hour_kind_code[$i]] == 0) {
                $tmpval[$hour_kind_code[$i]] = '';
            }
            echo '<td align="center">' . $tmpval[$hour_kind_code[$i]] . '&nbsp</td>';
            $sum += $tmpval[$hour_kind_code[$i]];
            $sumCol[$i] += $tmpval[$hour_kind_code[$i]];
        }
        echo '<td align="center">' . $sum . '&nbsp</td>';
        if (isset($_GET['filial_flag']) && $_GET['filial_flag'] == 'on') {
            //вывод с учетом выезда
            if ($tmpval['on_filial'] == 1) {
                echo '<td align="center">' . $sum * 0.5 . '&nbsp</td>';
                $sumColFilial += $sum * 0.5;
            } else {
                echo '<td align="center">&nbsp</td>';
            }
        }
        echo '</tr>';
        $total += $sum;
        $part_id = $tmpval['part_id'];
        $year_id = $tmpval['year_id'];
    }
    echo '<tr>';
    //<td>&nbsp;</td><td>&nbsp;</td>';
    if (!isset($_GET['save']) && !isset($_GET['print']) && $_SESSION['userType'] == 'admin') {
        echo '<td colspan=2>&nbsp;</td>';
    }
    echo '<td  align="center" colspan=2>&nbsp; Итого часов: </td><td>&nbsp;</td>';
    for ($i = 0; $i < 6 - $not_print_cols / 2; $i++) {
        echo '<td  align="center">&nbsp;</td>';
    }
    $sumTimeTibleCheck = 0;
    //для сверки с расписанием
    for ($i = 0; $i < sizeof($hour_kind_code); $i++) {
        if ($sumCol[$i] > 0) {
            //подсчет суммы (Лекции+ЛабРаб+Практики) для сверки с расписанием
            if ($i < 3 && !isset($_GET['save']) && !isset($_GET['print'])) {
                $sumTimeTibleCheck += $sumCol[$i];
                //-------------------------
                $sum_l_h = 0;
                //.$hour_kind_name[$i]
                switch ($hour_kind_name[$i]) {
                    case 'лаборатор. занятий':
                        //
                        $sum_l_h = hour_cnt($lect_id, $year_id, $part_id, 'л/р');
                        break;
                    case 'лекции':
                        //
                        $sum_l_h = hour_cnt($lect_id, $year_id, $part_id, 'л');
                        break;
                    case 'практич.':
                        //
                        $sum_l_h = hour_cnt($lect_id, $year_id, $part_id, 'пр');
                        break;
                }
                //-------------------------
                if ($sumCol[$i] != $sum_l_h) {
                    echo '<td  align="center">' . $sumCol[$i] . '<span class=warning>' . $sum_l_h . '</span></td>';
                } else {
                    echo '<td  align="center">' . $sumCol[$i] . '</td>';
                }
            } else {
                echo '<td  align="center">' . $sumCol[$i] . '</td>';
            }
        } else {
            echo '<td  align="center">&nbsp;</td>';
        }
    }
    echo '<td  align="center">' . $total . '</td>';
    //учет при выборе "с учетом Филиалов"
    if (isset($_GET['filial_flag']) && $_GET['filial_flag'] == 'on') {
        $total_year_fil += $total + $sumColFilial;
        if ($sumColFilial > 0) {
            echo '<td  align="center">' . $sumColFilial . '&nbsp;</td>';
        } else {
            echo '<td  align="center">&nbsp;</td>';
        }
    }
    echo '</tr>';
    $total_year += $total;
    echo '</table>';
    //окончание формы часов
    if (!isset($_GET['save']) && !isset($_GET['print']) && $lect_control) {
        ?>

<select name=type_copy style="width:300;">
<option value=0> копировать с перемещением (удаляем у одного- добавляем другому) </option>
<option value=1> только копирование (сохраняем у одного и добавляем другому)</option>
</select> 

<select id="teach_name" name="teach_name" style="width:200;"><?php 
        if ($_SESSION['userType'] == 'admin' || $_SESSION['role'] == 'izdan') {
            $listQuery = 'select k.id,k.fio from kadri k left join person_types pt on pt.id=k.person_type 
			where pt.name_short like "%ППС%" 
			order by fio ';
        } else {
            $listQuery = 'select k.id,k.fio from kadri k left join person_types pt on pt.id=k.person_type 
			where pt.name_short like "%ППС%" and k.id="' . trim($_GET['kadri_id']) . '" 
			order by fio ';
        }
        echo getFrom_ListItemValue($listQuery, 'id', 'fio', 'kadri_id');
        ?>
</select>
		
<select name="year_list" style="width:100;"> 
		<option value="0">год</option>
		<?php 
        $query = 'select id,name from time_intervals order by name desc';
        $res = mysql_query($query);
        while ($a = mysql_fetch_array($res)) {
            $select_val = '';
            if (isset($tmpval)) {
                if ($tmpval['year_id'] == $a['id']) {
                    $select_val = ' selected';
                }
            } else {
                if (isset($_POST['year_list'])) {
                    if ($_POST['year_list'] == $a['id']) {
                        $select_val = ' selected';
                    }
                } else {
                    if (isset($def_settings)) {
                        if ($def_settings['year_id'] == $a['id']) {
                            $select_val = ' selected';
                        }
                    }
                }
            }
            echo '<option value="' . $a['id'] . '"' . $select_val . '>' . $a['name'] . '</option>';
        }
        ?>
</select>
<select name="part_list" style="width:100;"> 
		<option value="0">семестр</option>
		<?php 
        $query = 'select id,name from time_parts order by name desc ';
        $res = mysql_query($query);
        while ($a = mysql_fetch_array($res)) {
            $select_val = '';
            if (isset($tmpval)) {
                if ($tmpval['part_id'] == $a['id']) {
                    $select_val = ' selected';
                }
            } else {
                if (isset($_POST['part_list'])) {
                    if ($_POST['part_list'] == $a['id']) {
                        $select_val = ' selected';
                    }
                } else {
                    if (isset($def_settings)) {
                        if ($def_settings['part_id'] == $a['id']) {
                            $select_val = ' selected';
                        }
                    }
                }
            }
            echo '<option value="' . $a['id'] . '"' . $select_val . '>' . $a['name'] . '</option>';
        }
        ?>
</select>
<input type=button value="Ok" onClick="javascript:test_copy(<?php 
        echo $part_num;
        $part_num++;
        ?>
);">
</form>
<?php 
        $sum_l_h = 0;
        $sum_l_h = hour_cnt($lect_id, $year_id, $part_id, '');
        //echo 'lect_id='.$lect_id.', year='.$tmpval['year_id'].', part='.$tmpval['part_id'].', sum_l_h='.$sum_l_h;
        if ($sum_l_h != $sumTimeTibleCheck) {
            echo '<div class=warning> за <u>' . $part . '</u> семестр  ошибка сверки с расписанием. в расписании=' . $sum_l_h . ', в нагрузке=' . $sumTimeTibleCheck . '</div>';
        } else {
            echo '<div class=success>за <u>' . $part . '</u> семестр  сверено с расписанием</div>';
        }
    }
    //echo '<div align="left"> Итого часов: '.$total.'</div>';
}
Ejemplo n.º 8
0
echo $dolgnost;
?>
</span></u></b> 
  <span style='font-size:10.0pt'>Ф.И.О.</span><b><u><span
  style='font-size:10.0pt'>
<?php 
if (!isset($_GET['save']) && !isset($_GET['print'])) {
    ?>
		 <select id="kadri_id3" name="kadri_id3" 
		 onChange="javascript:confirm_url('?kadri_id='+this.options[this.selectedIndex].value+'&<?php 
    echo reset_param_name($query_string, 'kadri_id');
    ?>
');" style="width:80;"><?php 
    $listQuery = "select k.id,k.fio_short as name \r\n\t\t \tfrom kadri k \r\n\t\t\torder by k.fio";
    //getFrom_ListItemValue($listQuery,$listId,$listName,$FormListItemName)
    echo getFrom_ListItemValue($listQuery, 'id', 'name', 'kadri_id');
    ?>
</select>	<?php 
} else {
    echo '<b><u>' . $fio_short . '</u></b>';
}
?>
  
  </span></u></b></p>
  <p class=MsoBodyText2 style='margin-top:6.0pt'>Назначение аванса:</p>
  <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0
   style='margin-left:5.4pt;border-collapse:collapse;border:none'>
   <tr style='page-break-inside:avoid;height:18.7pt'>
    <td width=83 style='width:62.2pt;border:solid windowtext 1.0pt;border-left:
    none;padding:0cm 5.4pt 0cm 5.4pt;height:18.7pt'>
    <p class=MsoNormal align=center style='text-align:center'><span
Ejemplo n.º 9
0
                $query = 'SELECT s.id, concat(s.fio," (",sg.name,")") as name
			  FROM    study_groups sg RIGHT OUTER JOIN  students s  ON (sg.id = s.group_id) ';
                if ($param1 != '' && $param1 == 'true') {
                    //текущий год
                    $query .= 'WHERE (sg.year_id = ' . $def_settings['year_id'] . ') order by 2';
                } else {
                    //поиск в архиве
                    $query .= 'WHERE (sg.year_id < ' . $def_settings['year_id'] . ' or sg.year_id is NULL) order by 2';
                }
                break;
            case 'pract_list':
                $query = 'select id,concat(name," (",replace((select count(*) from `diploms` where diploms.pract_place_id=pract_places.id),"0","-"),")") as name from pract_places ';
                if ($param2 != '' && $param2 == 'true' && $param1 != '') {
                    //применить фильтр
                    $query .= 'WHERE (name like "%' . $param1 . '%" or comment like "%' . $param1 . '%")';
                } else {
                    //отменить фильтр
                }
                $query .= ' order by 2';
                break;
            default:
                $query = '';
        }
        if ($listId != '' && $selectId > 0) {
            $res_edit[$listId] = $selectId;
        }
        $list_str = getFrom_ListItemValue($query, 'id', 'name', $listId);
        //$list_str='<option>'.'$listId='.$listId.',$selectId='.$selectId.'</option>';
        echo mb_convert_encoding($list_str, "UTF-8", "cp1251");
    }
}
Ejemplo n.º 10
0
echo '
	<tr><td> специальность *</td><td>	<select name="spec_id" id="spec_id" style="width:300;">';
$listQuery = 'select id,name from specialities order by name';
echo getFrom_ListItemValue($listQuery, 'id', 'name', 'spec_id');
echo '	</select></td></tr>';
echo '
	<tr><td> курс *	</td><td>	<select name="level_id" style="width:300;">';
$listQuery = 'select id,name from levels order by name';
echo getFrom_ListItemValue($listQuery, 'id', 'name', 'level_id');
echo '	</select></td></tr>';
//------------------------------------------------------------------------------
?>
                <tr><td> тип нагрузки</td><td>	<select name="hours_kind_type" style="width:300;">
                            <?php 
$listQuery = 'select id,name from hours_kind_type order by id';
echo getFrom_ListItemValue($listQuery, 'id', 'name', 'hours_kind_type');
?>
                        </select><br>
                        <label><input type=checkbox name="filial_flag" <?php 
if (isset($res_edit) && $res_edit['on_filial'] == 1) {
    echo ' checked';
}
?>
>
                            <font color=red>с учетом выезда</font></label>
                    </td></tr>
                <tr><td> число групп</td>
                    <td><input type=text maxlength="3" value="<?php 
if (isset($res_edit)) {
    echo $res_edit['groups_cnt'];
}