1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
| <?php
if(!defined("IN_ADMIN")) die;
require "query.php";
//------------------------------DATA-----------------------------------------------------------------
$post_delete_undef=mysql_escape_string(trim($_POST['delete_undef']));
$post_group_name=mysql_escape_string(trim($_POST['group_name']));
$post_new_group=mysql_escape_string(trim($_POST['new_group']));
$post_show_results=mysql_escape_string(trim($_POST['show_results']));
//------------------------------TEACHER_s_DATA-------------------------------------------------------
echo("<br>Вибір групи.<br>");
//------------------------------SPECIALTY_GROUP_SUBJECT_SELECTION------------------------------------
echo("<table>");
// echo("<tr>");
// echo("<td>");
// TODO echo(" Напрям ");
// make dependency for echo("</td>");
// group echo("<td>");
// TODO selectChecker("specialty", $specialty_query, "id", "specialty_name");
// echo("</td>");
// echo("</tr>");
echo("<tr>");
echo("<td>");
echo(" Група : ");
echo("</td>");
echo("<td>");
// selectChecker("group_name", $group_from_specialty_query, "gid", "gname");
selectCommonChecker("group_name", $group_from_specialty_query, "gid", $post_group_name, "gname");
echo("</td>");
echo("<td>");
paramChekerAutoSub("new_group", $post_new_group, "Редагувати групу");
echo("</td>");
echo("</tr>");
echo("</table>");
paramChekerAutoSub("show_results", $post_show_results, "Показать данные");
//------------------------------------------------------------------------------------------------------
//после нажатия на етот переключатель должна открыватся таблица-ведомость
//------------------------------------------------------------------------------------------------------
if(!empty($post_show_results)) {
echo("<br>Ведомость для группы что выбрана на форме выше");
//
?>
<script language="JavaScript">
function disableEnterKey(e)
{
var key;
if(window.event)
key = window.event.keyCode; //IE
else
key = e.which; //firefox
if(key == 13)
return false;
else
return true;
}
</script>
<table id="list" class="scroll"></table>
<div id="pager" class="scroll" style="text-align:center;"></div>
<script type="text/javascript">
jQuery(document).ready(function(){
var lastSel;
jQuery("#list").jqGrid({
url:'getdata.php',
datatype: 'json',
height: "auto",
mtype: 'POST',
colNames:['#', 'Преподователь', 'Предмет', 'Группа', 'П', 'М0', 'М1', 'М2', 'М3', 'М4', 'М5', 'М6', 'М7', 'М8', 'П', 'М0', 'М1', 'М2', 'М3', 'М4', 'М5', 'М6', 'М7', 'М8', 'ПОМ', 'ЕО', 'СО'],
colModel :[
{name:'id', index:'id', width:50, editable: false}
,{name:'teacher', index:'teacher', width:90, align:'left', editable:true, edittype:"text"}
,{name:'subject', index:'subject', width:95,align:'left', editable:true, edittype:"text"}
,{name:'grupa', index:'grupa', width:80, align:'left', editable:true, edittype:"text"}
,{name:'p_max', index:'p_max', width:40, align:'left', editable:true, edittype:"text"}
,{name:'m0_max', index:'m0_max', width:40, align:'left', editable:true, edittype:"text"}
,{name:'m1_max', index:'m1_max', width:40, align:'left', editable:true, edittype:"text"}
,{name:'m2_max', index:'m2_max', width:40, align:'left', editable:true, edittype:"text"}
,{name:'m3_max', index:'m3_max', width:40, align:'left', editable:true, edittype:"text"}
,{name:'m4_max', index:'m4_max', width:40, align:'left', editable:true, edittype:"text"}
,{name:'m5_max', index:'m5_max', width:40, align:'left', editable:true, edittype:"text"}
,{name:'m6_max', index:'m6_max', width:40, align:'left', editable:true, edittype:"text"}
,{name:'m7_max', index:'m7_max', width:40, align:'left', editable:true, edittype:"text"}
,{name:'m8_max', index:'m8_max', width:40, align:'left', editable:true, edittype:"text"}
,{name:'p_date', index:'p_date', width:40, align:'left', editable:true, edittype:"select",editoptions:{value:"0:0;1:1;2:2;3:3;4:4;5:5;6:6;7:7;8:8;9:9;10:10"}}
,{name:'m0_date', index:'m0_date', width:40, align:'left', editable:true, edittype:"select",editoptions:{value:"0:0;1:1;2:2;3:3;4:4;5:5;6:6;7:7;8:8;9:9;10:10"}}
,{name:'m1_date', index:'m1_date', width:40, align:'left', editable:true, edittype:"select",editoptions:{value:"0:0;1:1;2:2;3:3;4:4;5:5;6:6;7:7;8:8;9:9;10:10"}}
,{name:'m2_date', index:'m2_date', width:40, align:'left', editable:true, edittype:"select",editoptions:{value:"0:0;1:1;2:2;3:3;4:4;5:5;6:6;7:7;8:8;9:9;10:10"}}
,{name:'m3_date', index:'m3_date', width:40, align:'left', editable:true, edittype:"select",editoptions:{value:"0:0;1:1;2:2;3:3;4:4;5:5;6:6;7:7;8:8;9:9;10:10"}}
,{name:'m4_date', index:'m4_date', width:40, align:'left', editable:true, edittype:"select",editoptions:{value:"0:0;1:1;2:2;3:3;4:4;5:5;6:6;7:7;8:8;9:9;10:10"}}
,{name:'m5_date', index:'m5_date', width:40, align:'left', editable:true, edittype:"select",editoptions:{value:"0:0;1:1;2:2;3:3;4:4;5:5;6:6;7:7;8:8;9:9;10:10"}}
,{name:'m6_date', index:'m6_date', width:40, align:'left', editable:true, edittype:"select",editoptions:{value:"0:0;1:1;2:2;3:3;4:4;5:5;6:6;7:7;8:8;9:9;10:10"}}
,{name:'m7_date', index:'m7_date', width:40, align:'left', editable:true, edittype:"select",editoptions:{value:"0:0;1:1;2:2;3:3;4:4;5:5;6:6;7:7;8:8;9:9;10:10"}}
,{name:'m8_date', index:'m8_date', width:40, align:'left', editable:true, edittype:"select",editoptions:{value:"0:0;1:1;2:2;3:3;4:4;5:5;6:6;7:7;8:8;9:9;10:10"}}
,{name:'pom_date', index:'pom_date', width:40, align:'left', editable:true, edittype:"select",editoptions:{value:"0:0;1:1;2:2;3:3;4:4;5:5;6:6;7:7;8:8;9:9;10:10"}}
,{name:'eo_date', index:'eo_date', width:40, align:'left', editable:true, edittype:"select",editoptions:{value:"0:0;1:1;2:2;3:3;4:4;5:5;6:6;7:7;8:8;9:9;10:10"}}
,{name:'so_date', index:'so_date', width:40, align:'left', editable:true, edittype:"select",editoptions:{value:"0:0;1:1;2:2;3:3;4:4;5:5;6:6;7:7;8:8;9:9;10:10"}}
],
pager: jQuery('#pager'),
rowNum:20,
rowList:[20,30,40],
sortname: 'id',
sortorder: "asc",
viewrecords: true,
imgpath: 'themes/basic/images',
caption: 'Дані',
ondblClickRow: function(id) {
if (id && id != lastSel) {
jQuery("#list").restoreRow(lastSel);
jQuery("#list").editRow(id, true);
lastSel = id;
}
},
// editurl: 'saverow.php'
});
});
</script> |