Добавлена возможность поиска по группам для преподавателя и секретаря
This commit is contained in:
parent
2badc08f97
commit
4141009137
|
@ -107,7 +107,6 @@ class attendancelog {
|
|||
$rez['week1'] = $week['week_cur'];
|
||||
return $rez;
|
||||
}
|
||||
|
||||
function getGroupNameByID($id) {
|
||||
$sql_search = 'SELECT sokr, fo FROM acs_grupp WHERE id='. $id .' ';
|
||||
$tmp = $this->DB->QUR_SEL($sql_search);
|
||||
|
@ -136,6 +135,14 @@ class attendancelog {
|
|||
}
|
||||
return $search['id'];
|
||||
}
|
||||
public function gruppsSearch($request){
|
||||
if(isset($_POST['all_grupps_search'])){
|
||||
$sql_search = 'SELECT id, sokr, fo, kurs FROM acs_grupp WHERE fo="ОФО" AND sokr NOT LIKE "Выпуск%" AND sokr LIKE "%'. $this->DB->rescape($request) .'%" OR fo LIKE "%'. $this->DB->rescape($request) .'%"';
|
||||
$tmp = $this->DB->QUR_SEL($sql_search);
|
||||
unset($tmp[0]);
|
||||
return $tmp;
|
||||
}
|
||||
}
|
||||
public function AttendanceAddEdit()
|
||||
{
|
||||
if(isset($_POST['attendance_add_edit'])){
|
||||
|
@ -253,8 +260,11 @@ class attendancelog {
|
|||
$mainPageActionResult = $this->mainPageAction();
|
||||
$headmanPageActionResult = $this->headmanPageAction();
|
||||
$predmetsAddEdit = $this->predmetsAddEdit('Исследование операций и методы оптимизации');
|
||||
$gruppsSearch = $this->gruppsSearch($_POST['all_grupps_search']);
|
||||
|
||||
|
||||
//$html .= '<pre>'. print_r($groups,1) . '</pre>';
|
||||
//$html .= '<pre>'. print_r($gruppsSearch,1) . '</pre>';
|
||||
//$html .= '<pre>'. print_r($currentUserInfo,1) . '</pre>';
|
||||
//$html .= '<pre>'. print_r($mainPageActionResult,1) . '</pre>';
|
||||
//$html .= '<pre>'. print_r($headmanPageActionResult,1) . '</pre>';
|
||||
|
@ -287,6 +297,9 @@ class attendancelog {
|
|||
}
|
||||
$groups = $this->getAllGrupps();
|
||||
$facult_groups = $this->getAllGrupps($currentUserInfo['facult']['facult_id']);
|
||||
if(isset($_POST['all_grupps_search'])){
|
||||
$groups = $this->gruppsSearch($_POST['all_grupps_search']);
|
||||
}
|
||||
$smarty->assign('groups',$groups);
|
||||
$smarty->assign('facult_groups',$facult_groups);
|
||||
$smarty->clearCache('moduls/attendancelog/tpl/main_page.html');
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
<tr>
|
||||
<td style="vertical-align: middle; text-align: center; width: 5%"><h3 class="text-warning">{$class.time1}</h3></td>
|
||||
<td style="vertical-align: middle; text-align: center; width: 10%"> <h5>{$class.time_name.0} - {$class.time_name.1}</h5></td>
|
||||
<td style="vertical-align: middle; "><div class="accordion-group">
|
||||
<td><div class="accordion-group">
|
||||
<div class="accordion-heading">
|
||||
<a class="accordion-toggle {if $key != $currentTime.time1 } collapsed {/if}" data-toggle="collapse" data-parent="#accordion{$day.day1}" href="#collapse_{$class.day1}-{$class.time1}">
|
||||
{$class.predmet}
|
||||
|
@ -121,6 +121,7 @@
|
|||
</div>
|
||||
|
||||
</div></td>
|
||||
<!-- <td style="width: 20%"> <h5> - {$class.fio}</h5></td>-->
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
|
@ -173,8 +174,16 @@
|
|||
<span class="tools"><a href="javascript:;" class="icon-chevron-down"></a></span>
|
||||
</div>
|
||||
<div class="widget-body" style="height: 40em; overflow:scroll; overflow-x:hidden;">
|
||||
<div class="search-wrap">
|
||||
<form method="POST" class="hidden-phone">
|
||||
<div class="input-append search-input-area">
|
||||
<label for="appendedInputButton"> <small>поиск по названию и форме обучения</small> </label>
|
||||
<input class="" id="appendedInputButton" name="all_grupps_search" value="{$smarty.post.all_grupps_search}" type="text">
|
||||
<button class="btn" type="submit" ><i class="icon-search"></i> </button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<table class="table table-striped table-bordered">
|
||||
<caption><h4>Выберите группу для просмотра</h4> </caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Название</th>
|
||||
|
|
Loading…
Reference in New Issue