EIOS/sm.php

76 lines
2.6 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
session_start();
header('Content-Type: text/html; charset=utf-8');
date_default_timezone_set('Europe/Moscow');
include 'inc/_db.php';
include 'config.php';
//отобразим все материалы, лекции практические и т.д.
$sql = 'SELECT * FROM '.$ST['dbpf'].'_lections WHERE file!="" ORDER BY specialnost,kurs,semestr';
$rez = $DB->QUR_SEL($sql);
if($rez){
echo '<h2>Лекции</h2>';
echo '<table style="width:100%;" border="1">';
echo '<tr>
<td width="20%">Специальность</td>
<td width="5%">Курс</td>
<td width="5%">Семестр</td>
<td width="30%">Название</td>
<td width="10%">Файл</td>
<td width="30%">Описание</td>
</tr>';
foreach($rez as $key => $val)if($key){
echo '<tr>
<td>'.$val['specialnost'].'</td>
<td>'.$val['kurs'].'</td>
<td>'.$val['semestr'].'</td>
<td>'.$val['name'].'</td>
<td><a href="/upload/lections/'.$val['file'].'">скачать</a><br>';
$rez1 = $DB->QUR_SEL('SELECT * FROM '.$ST['dbpf'].'_practich WHERE id_lection='.$val['id'].' AND file!=""');
if($rez1){
echo '<b>Практические</b><br>';
foreach($rez1 as $key1 => $val1)if($key1){
echo '<a href="/upload/practic/'.$val1['file'].'" title="'.$val1['descrip'].'">'.$val1['name'].'</a><br>';
}
}
$rez1 = $DB->QUR_SEL('SELECT * FROM '.$ST['dbpf'].'_controln WHERE id_lection='.$val['id'].' AND file!=""');
if($rez1){
echo '<b>Контрольные</b><br>';
foreach($rez1 as $key1 => $val1)if($key1){
echo '<a href="/upload/controln/'.$val1['file'].'" title="'.$val1['descrip'].'">'.$val1['name'].'</a><br>';
}
}
echo '</td>
<td>'.$val['descrip'].'</td>
</tr>';
}
echo '</table>';
}
//отобразим все материалы, рабочие программы.
$sql = 'SELECT * FROM '.$ST['dbpf'].'_workprogram WHERE file!="" ORDER BY specialnost,kurs,semestr';
$rez = $DB->QUR_SEL($sql);
if($rez){
echo '<h2>Рабочие программы</h2>';
echo '<table style="width:100%;" border="1">';
echo '<tr>
<td width="30%">Специальность</td>
<td width="5%">Курс</td>
<td width="5%">Семестр</td>
<td width="30%">Название</td>
<td width="10%">Файл</td>
<td width="20%">Описание</td>
</tr>';
foreach($rez as $key => $val)if($key){
echo '<tr>
<td>'.$val['specialnost'].'</td>
<td>'.$val['kurs'].'</td>
<td>'.$val['semestr'].'</td>
<td>'.$val['name'].'</td>
<td><a href="/upload/lections/'.$val['file'].'">скачать</a></td>
<td>'.$val['descrip'].'</td>
</tr>';
}
echo '</table>';
}
?>