예제 #1
0
 <script type="text/javascript" src="script/jquery.js"></script> 
 <script type="text/javascript" src="https://www.google.com/jsapi"></script>
 <script type="text/javascript" src="script/graf.js"></script>

     
<?php
include "menu.php";
if ($_SESSION['name_sesion_a']=="admin"){
 include "class/function.php";
  include "class/mysql-class.php";
include_once("XLSToDBNew.class.php");

$base = new class_mysql_base();
$data = new XLSToDB("test.xls", 'CP1251');

$speciality = $base-> select("select id,name from speciality where 1;");
$year = $base-> select("select id,name from year where 1;");
//new
//$a=$_POST['filename'];
//echo $a;
//new

?>
<HTML>
<HEAD><TITLE>Валідність тестових завдань</TITLE>
<META http-equiv="Content-Type" Content="text/html; charset=windows-1251">
<link rel="stylesheet" href="css/style.css" type="text/css">
</HEAD>
<BODY bgcolor="#94AAB5">

<?php
예제 #2
0
 
 <link rel="stylesheet" href="css/style.css" type="text/css">

 <?php 
include "class/function.php";
include "class/mysql-class.php";
$base = new class_mysql_base();
include "menu.php";
if ($_GET['variant']) {
    $_POST['variant'] = $_GET['variant'];
    $_POST['predmet'] = 1;
}
echo "<center><form action='variant.php' method='POST' enctype='multipart/form-data'>\n <table width=90% style='border: 1px solid blue;margin-top:20px;background-color:white;'><tr><td>\n </td><td><center><h2><p><b>Введіть варіант та предмет </b></p></h2></center>\n<b>Варіант <input type='text' name='variant' value='" . $_POST['variant'] . "'> <b>Предмет </b><input type='text' name='predmet'  value='" . $_POST['predmet'] . "'>\n <input type='submit' value='Вибір'><br></table></form>";
if ($_POST['variant'] != '' && $_POST['predmet'] != '') {
    $type_old_var[0] = $base->select("SELECT distinct(variant.variant),variant.sumstyd,type_validn.date,speciality.name,year.name,type_validn.type,variant.type FROM variant,type_validn,speciality,year WHERE variant='" . $_POST['variant'] . "' AND type_validn.id=variant.type AND type_validn.id_spec=speciality.id AND type_validn.id_year=year.id;");
    $name_title_table[0] = array("Варіант", "Кількість студентів", "Дата", "Спеціальність", "Рік здачі", "Кількість питань", "--");
    $name_table = array("Найдені групи варіантів (" . count($type_old_var[0]) . ")");
    $table_id = array('1');
    table($name_table, $type_old_var, $table_id, $name_title_table);
    echo "<br>";
    if ($_GET['type'] != '') {
        $sql_variant = $_POST['variant'] . " AND type=" . $_GET['type'];
    } else {
        $sql_variant = $_POST['variant'];
    }
    $question = $base->select_question($sql_variant, $_POST['predmet']);
}
//print_r($question);
$suma = array();
if ($question != NULL) {
예제 #3
0
include "menu.php";
include "class/function.php";
include "class/mysql-class.php";
$base = new class_mysql_base();
if ($_SESSION['name_sesion_a'] == "admin") {
    if ($_GET['id']) {
        $var_del = $base->select_variant("SELECT id FROM variant WHERE type='" . $_GET['id'] . "';");
        for ($v = 0; $v < count($var_del); $v++) {
            $base->delete("DELETE FROM `group` WHERE `numvariant`='" . $var_del[$v]['id'] . "';");
        }
        $base->delete("DELETE FROM `variant` WHERE `type`='" . $_GET['id'] . "';");
        $base->delete("DELETE FROM `type_validn` WHERE `id`='" . $_GET['id'] . "';");
    }
}
echo "<center><form action='arh.php' method='POST' enctype='multipart/form-data'>\n <table width=90% style='border: 1px solid blue;margin-top:20px;background-color:white;'><tr><td>\n \n </td><td><center><h2><p><b>Архів груп варіантів</b></p></h2></center><br>\n ";
$speciality = $base->select("select id,name from speciality where 1;");
$year = $base->select("select id,name from year where 1;");
echo "<b><table><tr><td width='100px'><b>Фільтри</td><td><b>Виберіть спеціальність</b>";
navigate("Спеціальність", $speciality, "spec");
echo "</td><td><b>Виберіть рік здачі</b>";
navigate("Рік", $year, "year");
echo "</td><td><input type='submit' value='Задіяти'></td></tr></table>";
$sqls = '1';
if ($_POST['spec'] > 0) {
    $sqls = "id_spec=" . $_POST['spec'];
}
if ($_POST['year'] > 0) {
    $sqls = "id_year=" . $_POST['year'];
}
if ($_POST['spec'] > 0 && $_POST['year'] > 0) {
    $sqls = "id_spec=" . $_POST['spec'] . " AND id_year=" . $_POST['year'] . ";";