Compare commits
No commits in common. "c63df969c4aee7d15ae29e91cd36c715f6e41f70" and "79094a385aa915a6e1acef3378a641f011e65193" have entirely different histories.
c63df969c4
...
79094a385a
|
@ -18,19 +18,6 @@ class attendancelog {
|
||||||
$url = 'https://eios.mkgtu.ru/api.php?des=studentsByGrupp¶m1=' . $groupName . '¶m2=' . $educationForm;
|
$url = 'https://eios.mkgtu.ru/api.php?des=studentsByGrupp¶m1=' . $groupName . '¶m2=' . $educationForm;
|
||||||
return json_decode(file_get_contents($url),1);
|
return json_decode(file_get_contents($url),1);
|
||||||
}
|
}
|
||||||
function getClassesByGroup($groupName,$educationForm)
|
|
||||||
{
|
|
||||||
$tmp = explode('-', $groupName);
|
|
||||||
$groupName = trim($tmp[0]);
|
|
||||||
$groupNumber = substr($tmp[1],0,2);
|
|
||||||
$educationForm = urlencode($educationForm);
|
|
||||||
$groupName = urlencode($groupName);
|
|
||||||
$groupNumber = urlencode($groupNumber);
|
|
||||||
$url = 'https://local.mkgtu.ru/raspisnew/api.php?des=raspis_grupp&name='. $groupName .'&number='. $groupNumber .'&fo=' . $educationForm;
|
|
||||||
return json_decode(file_get_contents($url),1);
|
|
||||||
//return $url;
|
|
||||||
}
|
|
||||||
|
|
||||||
function getGroupNameByID($id) {
|
function getGroupNameByID($id) {
|
||||||
$sql_search = 'SELECT sokr, fo FROM acs_grupp WHERE id='. $id .' ';
|
$sql_search = 'SELECT sokr, fo FROM acs_grupp WHERE id='. $id .' ';
|
||||||
return $this->DB->QUR_SEL($sql_search);
|
return $this->DB->QUR_SEL($sql_search);
|
||||||
|
@ -39,19 +26,9 @@ class attendancelog {
|
||||||
{
|
{
|
||||||
$des = ''; if(isset($_GET['des'])) $des = $_GET['des'];
|
$des = ''; if(isset($_GET['des'])) $des = $_GET['des'];
|
||||||
if ($des == 'show'){
|
if ($des == 'show'){
|
||||||
//получаем список пар по имени группы
|
//получаем список студентов по группе
|
||||||
// $current_group = $this->getGroupNamebyID($_GET['id']);
|
|
||||||
// return $this->getStudentsByGroup($current_group[1]['sokr'], $current_group[1]['fo']);
|
|
||||||
|
|
||||||
|
|
||||||
$current_group = $this->getGroupNamebyID($_GET['id']);
|
$current_group = $this->getGroupNamebyID($_GET['id']);
|
||||||
$current_group_classes = $this->getClassesByGroup($current_group[1]['sokr'], $current_group[1]['fo']);
|
return $this->getStudentsByGroup($current_group[1]['sokr'], $current_group[1]['fo']);
|
||||||
$out = array();
|
|
||||||
foreach ($current_group_classes['raspis'] as $class) {
|
|
||||||
$out['info'][$class['week_name']][$class['day_name']][$class['time1']] = $class;
|
|
||||||
$out['students'] = $this->getStudentsByGroup($current_group[1]['sokr'], $current_group[1]['fo']);
|
|
||||||
}
|
|
||||||
return $out;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function HTML()
|
function HTML()
|
||||||
|
@ -61,7 +38,7 @@ class attendancelog {
|
||||||
$actionResult = $this->mainPageAction();
|
$actionResult = $this->mainPageAction();
|
||||||
//$html .= '<pre>'. print_r($groups,1) . '</pre>';
|
//$html .= '<pre>'. print_r($groups,1) . '</pre>';
|
||||||
//$html .= '<pre>'. print_r($actionResult,1) . '</pre>';
|
//$html .= '<pre>'. print_r($actionResult,1) . '</pre>';
|
||||||
//$html .= '<pre>'. print_r($_GET,1) . '</pre>';
|
$html .= '<pre>'. print_r($_GET,1) . '</pre>';
|
||||||
// $html .= '<pre>'. print_r($_SESSION,1) . '</pre>';
|
// $html .= '<pre>'. print_r($_SESSION,1) . '</pre>';
|
||||||
GLOBAL $smarty;
|
GLOBAL $smarty;
|
||||||
$page = ''; if(isset($_GET['page'])) $page = $_GET['page'];
|
$page = ''; if(isset($_GET['page'])) $page = $_GET['page'];
|
||||||
|
|
|
@ -38,64 +38,88 @@
|
||||||
<div class="widget-body">
|
<div class="widget-body">
|
||||||
<div class="tabbable custom-tab">
|
<div class="tabbable custom-tab">
|
||||||
<ul class="nav nav-tabs">
|
<ul class="nav nav-tabs">
|
||||||
{foreach from=$actionResult.info key=key item=week}
|
<li class="active"><a href="#tab_1_1" data-toggle="tab">Понедельник</a></li>
|
||||||
{if $key == 'Четная'}
|
<li class=""><a href="#tab_1_2" data-toggle="tab">Вторник</a></li>
|
||||||
{foreach from=$week key=key item=day}
|
<li class=""><a href="#tab_1_3" data-toggle="tab">Среда</a></li>
|
||||||
<li><a href="#tab_1_{$key}" data-toggle="tab">{$key}</a></li>
|
<li class=""><a href="#tab_1_4" data-toggle="tab">Четверг</a></li>
|
||||||
{/foreach}
|
<li class=""><a href="#tab_1_5" data-toggle="tab">Пятница</a></li>
|
||||||
{/if}
|
<li class=""><a href="#tab_1_6" data-toggle="tab">Суббота</a></li>
|
||||||
{/foreach}
|
<li class=""><a href="#tab_1_7" data-toggle="tab">Воскресенье</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
{foreach from=$actionResult.info key=key item=week}
|
<div class="tab-pane active" id="tab_1_1">
|
||||||
{if $key == 'Четная'}
|
<p>I'm in Section 1.</p>
|
||||||
{foreach from=$week key=key item=day}
|
<p>
|
||||||
<div class="tab-pane active" id="tab_1_{$key}">
|
Текст
|
||||||
<div class="accordion" id="accordion{$key}">
|
</p>
|
||||||
{foreach from=$day key=key item=class}
|
|
||||||
<div class="accordion-group">
|
|
||||||
<div class="accordion-heading">
|
|
||||||
<a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#accordion{$day.day1}" href="#collapse_{$class.day1}-{$class.time1}">
|
|
||||||
{$class.predmet}
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
<div id="collapse_{$class.day1}-{$class.time1}" class="accordion-body collapse in">
|
<div class="tab-pane" id="tab_1_2">
|
||||||
<div class="accordion-inner">
|
<p>Howdy, I'm in Section 2.</p>
|
||||||
<form action="" method="post">
|
<p>
|
||||||
|
Текст
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="tab-pane" id="tab_1_3">
|
||||||
|
<p>What up girl, this is Section 3.</p>
|
||||||
|
<p>
|
||||||
|
Текст
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="tab-pane" id="tab_1_4">
|
||||||
|
<p>What up girl, this is Section 3.</p>
|
||||||
|
<p>
|
||||||
|
Текст
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="tab-pane" id="tab_1_5">
|
||||||
|
<p>What up girl, this is Section 3.</p>
|
||||||
|
<p>
|
||||||
|
Текст
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="tab-pane" id="tab_1_6">
|
||||||
|
<p>What up girl, this is Section 3.</p>
|
||||||
|
<p>
|
||||||
|
Текст
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="tab-pane" id="tab_1_7">
|
||||||
|
<p>What up girl, this is Section 3.</p>
|
||||||
|
<p>
|
||||||
|
Текст
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span9">
|
||||||
|
<div class="widget blue">
|
||||||
|
<div class="widget-title">
|
||||||
|
<h4><i class="icon-reorder"></i></h4>
|
||||||
|
<span class="tools"><a href="javascript:;" class="icon-chevron-down"></a></span>
|
||||||
|
</div>
|
||||||
|
<div class="widget-body">
|
||||||
<table class="table table-striped table-bordered">
|
<table class="table table-striped table-bordered">
|
||||||
|
<caption> Студенты группы {$groupName}</caption>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>No</th>
|
<th>Номер</th>
|
||||||
<th>ФИО</th>
|
<th>Имя</th>
|
||||||
<th>Присутствие</th>
|
|
||||||
<th>Примечание</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{foreach from=$actionResult.students.students key=key item=student}
|
{foreach from=$actionResult['students'] key=key item=name}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{$key}</td>
|
<td>{$key +1 }</td>
|
||||||
<td>{$student}</td>
|
<td>{$name}</td>
|
||||||
<td><input type="checkbox" name="" id="{$key}"></td>
|
|
||||||
<td><input type="text" name="" id="" style="width: 90%"></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<button type="submit" class="btn btn-success">Сохранить</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
{/foreach}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{/foreach}
|
|
||||||
{/if}
|
|
||||||
{/foreach}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue