예제 #1
0
     $student = $test->select_table_ocinka("SELECT DISTINCT table_ocinka.student_id FROM table_ocinka,excel WHERE excel.semester='" . $_GET['course'] . "' AND table_ocinka.group='" . $_GET['group'] . "' AND excel.speciality_id=" . $_GET['special'] . " AND excel.id=table_ocinka.excel_id;");
     echo "<table width='70%' id='t'>";
     for ($i = 0; $i < count($student); $i++) {
         $student_contingent = $fac->select_idstyd_tocontingent($student[$i]['student_id']);
         echo "<tr><td style='border:solid 1px black;'><a style='float:right;color:black;display:block;width:100%;' href='students.php?student_id=" . $student[$i]['student_id'] . "&faculty=" . $_GET['faculty'] . "&year=" . $_GET['year'] . "&special=" . $_GET['special'] . "&lang=" . $_GET['lang'] . "&course=" . $_GET['course'] . "&group=" . $_GET['group'] . "'>" . $student_contingent['FIO'] . "</a></td></tr>";
     }
     echo "</table>";
 }
 if ($_GET['student_id']) {
     $student_contingent = $fac->select_idstyd_tocontingent($_GET['student_id']);
     echo "<br><b>Успішність студента<br><CENTER><h2>" . $student_contingent['FIO'] . "</h2></CENTER></b>";
     $get_ocinku_excel = $test->select_table_ocinka("SELECT DISTINCT excel_id FROM `table_ocinka`WHERE `student_id` ='" . $_GET['student_id'] . "';");
     echo "<table width='100%' bgcolor='#c5d9e5' font-color='white' id='table0' style='border: 1px solid blue;' >";
     for ($i = 0; $i < count($get_ocinku_excel); $i++) {
         $excel_stud = $test->select_excel2("SELECT * FROM excel WHERE id='" . $get_ocinku_excel[$i]['excel_id'] . "';");
         $type_session = $test->select_type_session("id=" . $excel_stud[0]['type_sesion']);
         echo "<tr><td><b>Тип здачі " . $type_session[0]['type'] . "</td><td><b>Семестер " . $excel_stud[0]['semester'] . "</td><td><b> Частина " . $excel_stud[0]['chastuna'] . "</td><td><b> Дата " . $excel_stud[0]['date'] . "</td></tr>";
         $predmet = $test->select_module("SELECT * FROM module WHERE id_excel=" . $excel_stud[0]['id'] . ";");
         echo "<tbody><tr><td colspan='4'>\n        <table width='100%' bgcolor='white'><tr><td>";
         for ($j = 0; $j < count($predmet); $j++) {
             $ocinku = $test->select_table_ocinka("SELECT DISTINCT potochna,examen,ostatochna,sort FROM table_ocinka WHERE student_id='" . $_GET['student_id'] . "' AND excel_id='" . $excel_stud[0]['id'] . "' AND discipline_id='" . $predmet[$j]['id_discipline'] . "' AND module_id='" . $predmet[$j]['id_module'] . "' AND sort='" . $predmet[$j]['sort'] . "';");
             if ($ocinku[0]['examen'] || $ocinku[0]['examen'] == '0') {
                 if ($ocinku[0]['examen'] == '0') {
                     echo "<div style='border-bottom: solid 1px gray;background-color:#feddbf;'>" . $ocinku[0]['sort'] . ":  " . $predmet[$j]['name_discipline'] . " <div style='padding-left:18px;'> " . $predmet[$j]['name_module'] . "  <b style='float:right;'>Поточна : " . $ocinku[0]['potochna'] . " Екзамен : " . $ocinku[0]['examen'] . " Підсумкова : " . $ocinku[0]['ostatochna'] . " </b></div></div>";
                 } else {
                     echo "<div style='border-bottom: solid 1px gray;background-color:#bffec4;'>" . $ocinku[0]['sort'] . ":  " . $predmet[$j]['name_discipline'] . " <div style='padding-left:18px;'> " . $predmet[$j]['name_module'] . "  <b style='float:right;'>Поточна : " . $ocinku[0]['potochna'] . " Екзамен : " . $ocinku[0]['examen'] . " Підсумкова : " . $ocinku[0]['ostatochna'] . " </b></div></div>";
                 }
             }
         }
         echo "</td></tr></table></td></tr></tbody>";
     }
예제 #2
0
     $parameter = $parameter . " AND lang='" . $_GET['lang'] . "'";
 }
 if ($_GET['course']) {
     $parameter = $parameter . " AND semester='" . $_GET['course'] . "'";
 }
 if ($_GET['year']) {
     $parameter = $parameter . " AND type_atemp='" . $_GET['year'] . "'";
 }
 $excel = $test->select_excel($_GET['faculty'], $parameter);
 echo "<table width='100%'id='t' style='border: 1px solid blue;margin-top:20px;background-color:white;'>";
 //<tr><td>Вибір</td><td>Коротка інформація</td><td>Коротка статистика</td><td>Модулі які здавались</td></tr>
 for ($i = 0; $i < count($excel); $i++) {
     echo "<tr><td height='100px'>";
     $department = $fac->select_faculty($excel[$i]['faculty_id']);
     $speciality = $fac->select_speciality($excel[$i]['speciality_id']);
     $type_session = $test->select_type_session("id=" . $excel[$i]['type_sesion']);
     $predmet = $test->select_module("SELECT DISTINCT name_discipline,name_module,sort FROM module WHERE id_excel=" . $excel[$i]['id'] . ";");
     echo "<table width='100%'><tr><td width='4%'><input type='checkbox' name='" . $excel[$i]['id'] . "' value='" . $excel[$i]['id'] . "'></td><td width='30%' style='font-size:8pt;'>";
     echo "Факультет: " . $department['DEPARTMENT'] . "<br>";
     echo "Спеціальність: " . $speciality['SPECIALITY'] . "<br>";
     echo "Мова: " . $excel[$i]['lang'] . "<br>";
     echo "Семестер: " . $excel[$i]['semester'] . "<br>";
     echo "Тип здачі: " . $type_session[0]['type'] . "<br>";
     if ($excel[$i]['potik'] == '0') {
         $potik = "Без потоку";
     } else {
         $potik = $excel[$i]['potik'];
     }
     echo "Потік: " . $potik . "<br>";
     echo "Частина: " . $excel[$i]['chastuna'] . "<br>";
     echo "</td><td width='30%' style='font-size:8pt;'>";
예제 #3
0
<link rel='stylesheet' href='datepicker/datepicker.css' type='text/css' />

<?php 
require "auth.php";
echo "\n<script type='text/javascript' src='datepicker/jquery.js'></script>\n<script type='text/javascript' src='datepicker/date.js'></script>\n<script type='text/javascript' src='datepicker/jquery.datePicker-2.1.2.js'></script>\n \n<script type='text/javascript'>\n\$(function()\n{\n\$('#inputDate4').datePicker({\ncreateButton:false,\nclickInput:true,\nendDate: (new Date()).addDays(365).asString()\n});\n});\n</script>";
if ($_SESSION['login_name'] && $_SESSION['role'] == "admin") {
    require "header.php";
    require "menu.php";
    require "class/potochna.php";
    require "class/mysql-class.php";
    require "class/class_firebird.php";
    $test = new class_mysql_base();
    $ibase = new class_ibase();
    $type_session = $test->select_type_session("1");
    $year = $test->select_year("SELECT DISTINCT date,name,id FROM yearplan WHERE 1 ORDER BY id DESC;");
    echo " <br><center><h3>Завантажити файл з EXCEL </h3><br></center>\n    <form action='up_stat.php' method='post' enctype='multipart/form-data'>\n    \t\n        \n    <div class='kvadrant'><br>\n\tКороткий опис\n\t<input  name='title' value='' />\n\t<br><br>\n\t</div>  \n\n    <div class='kvadrant'><br>\n\tТип здачі \n\t<select name='year'>\n    ";
    for ($i = 0; $i < count($year); $i++) {
        echo "<option value='" . $year[$i]['id'] . "'>" . $year[$i]['date'] . "/" . $year[$i]['name'] . "</option>";
    }
    echo "\n\t</select>\n\t<br><br>\n\t</div>\n\n    <div class='kvadrant'><br>\n\tМова здачі \n\t<select name='lang'>\n    <option value='UA'>Українська</option>\n    <option value='ENG'>Іноземна</option>\n\t</select>\n\t<br><br>\n\t</div>\n      \n    <div class='kvadrant'><br>    \n\tДата здачі\n\t<input  id='inputDate4' name='date' value='" . Date("Y-m-d") . "' />\n\t<br><br>\n\t</div>\n    \n\t<div class='kvadrant'><br>\n\tТип здачі \n\t<select name='zdacha'>\n    ";
    for ($i = 0; $i < count($type_session); $i++) {
        echo "<option value='" . $type_session[$i]['id'] . "'>" . $type_session[$i]['type'] . "</option>";
    }
    echo "\n\t</select>\n\t<br><br>\n\t</div>\n\t\n\t<div class='kvadrant'><br>\n\tПотік \n\t<select name='potik'>\n\t\t<option value='0' name=''>Без потоку</option>\n\t\t<option value='1' name=''>І потік</option>\n\t\t<option value='2' name=''>ІІ потік</option>\n\t</select>\n\t<br><br>\n\t</div>\n\t\n\t<div class='kvadrant'><br>\n\tЧастина\n\t<select name='chastuna'>\n\t\t<option value='1' name=''>І частина</option>\n\t\t<option value='2' name=''>ІІ частина</option>\n\t</select>\n\t<br><br>\n\t</div>\n\t<div class='kvadrant'><br>\n\tВиберіть файл \n      <input type='file' name='filename'  value='Огляд'>\n      <br><br></div><br><br>\n      <input type='submit' value='Експортувати дані'><br></form>";
    if (isset($_FILES["filename"]["tmp_name"])) {
        if (is_uploaded_file($_FILES["filename"]["tmp_name"])) {
            $temp_file = date("d-m-i-s");
            move_uploaded_file($_FILES["filename"]["tmp_name"], "sheets/" . $temp_file . $_FILES["filename"]["name"]);
            include_once "Class/class reader.php";
            $data = new XLSToDB($temp_file . $_FILES["filename"]["name"], 'CP1251');
            $fileXLS = $temp_file . $_FILES["filename"]["name"];