5 Star 0 Fork 0

Hellstalol/CampusHelper

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
teacher.html 65.54 KB
一键复制 编辑 原始数据 按行查看 历史
Githubit 提交于 2016-08-02 17:51 . 教师端(fin)
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>教师栏</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="./css/app.css">
<link rel="stylesheet" href="css/jquery.mobile-1.4.5.min.css" />
<script src="./js/jquery-1.12.4.min.js"></script>
<script src="./js/jquery.mobile-1.4.5.min.js"></script>
<script src="js/template.js"></script>
<script src="js/jquery.form.js"></script>
<script>
var TEAID="9191003";
</script>
</head>
<body>
<!--------------------教师端-信息箱页面,班级页面----------------------->
<div data-role="page" id="msg-class" data-theme="s">
<script>
$(document).on("pagecreate", "#msg-class", function () {
$(document).on("swiperight", "#msg-class", function (e) {
// We check if there is no open panel on the page because otherwise
// a swipe to close the left panel would also open the right panel (and v.v.).
// We do this by checking the data that the framework stores on the page element (panel: open).
if ($(".ui-page-active").jqmData("panel") !== "open") {
if (e.type === "swiperight") {
$("#person").panel("open");
}
}
});
});
var go_index = function () {
window.self.location = "#index";
}
</script>
<!--加载班级-->
<script>
$("#msg-class").on("pagebeforecreate", function (e) {
//TEAID = window.location.href.slice(-7);
var you_circle_icon;
$.ajax({
url: "http://123.206.198.158:9093/get_teacherimage"
, data: {
id: TEAID
}
, cache: true
, async: false
, type: "POST"
, dataType: "text"
, success: function (data) {
you_circle_icon = data;
}
});
$("#circle_tea_icon").attr("src", you_circle_icon);
var receive_student_course;
$.ajax({
url: "http://123.206.198.158:9093/get_myClass"
, data: {
tea_id: TEAID
}
, cache: true
, async: false
, type: "POST"
, dataType: "JSON"
, success: function (data) {
receive_student_course = data;
}
});
//alert(receive_student_course[3].c_name);
var course_data = {
list: receive_student_course
};
$("#teacher_course_ul").append(template("student_index", course_data));
});
</script>
<!--班级渲染模板-->
<script id="student_index" type="text/html"> {{each list as value i}}
<li id={{value.m_id}}x{{value.c_id}}y{{value.grade}}>
<a onclick="window.location.href= '#msg-class-message?id={{value.m_id}}w{{value.c_id}}x{{value.m_name}}y{{value.c_name}}z{{value.grade}}';return false" data-transition="slidedown">
<!--a onclick="we(this)" data-transition="slidedown" --><img class="msg-li-header" src="./img/header-bottle.png" alt="" />
<h1 class="msg-li-name">{{value.c_name}}——{{value.grade}}{{value.m_name}}</h1> </a>
</li> {{/each}} </script>
<script>
function we(self) {
var str = self.parentNode.id + "";
alert(str);
//alert(str.indexOf("a"));
alert(str.slice(0, str.indexOf("a")))
}
</script>
<div data-role="header" data-tap-toggle="false" data-position="fixed" data-fullscreen="true" data-theme="s">
<div data-role="navbar">
<ul>
<li class="msg-top-nav-head" data-role="controlgroup" data-type="horizontal" data-theme="l">
<a href="#person" data-role="button" class="nav_header_a" onclick="showPrivate()"><img id="circle_tea_icon" alt="个人中心" class="nav_header_img"></a>
</li>
<li class="msg-top-nav" data-role="controlgroup" data-type="horizontal" data-theme="j"><a href="" data-role="button" class="ui-btn-active ui-state-persist">班级</a> <a href="#msg-group" data-role="button" data-transition="slide">群组</a></li>
<li></li>
</ul>
</div>
</div>
<!------------------------------------------------------------------个人中心(首)------------------------------------------------------------->
<div data-role="panel" id="person" data-theme="k" data-display="overlay">
<script>
function go_index() {
window.location.href = "index.html";
}
function showPrivate() {
var myIcon;
$.ajax({
url: "http://123.206.198.158:9093/get_teacherimage"
, data: {
id: TEAID
}
, cache: true
, async: false
, type: "POST"
, dataType: "text"
, success: function (data) {
myIcon = data;
}
});
var myNick;
$.ajax({
url: "http://123.206.198.158:9093/get_teacherName"
, data: {
id: TEAID
}
, cache: true
, async: false
, type: "POST"
, dataType: "text"
, success: function (data) {
myNick = data;
}
});
$("#myImg").attr("src", myIcon);
$("#myNick").attr("value", myNick);
}
</script>
<script>
function ajaxTeaIconUP() {
$("#def_one").attr("value", TEAID);
var options = {
success: function (data) {
alert("修改成功!");
window.location.reload();
}
};
$("#changeIcon").ajaxSubmit(options);
}
</script>
<div class="choice_list">
<ul data-role="listview" data-inset="true">
<div class="img-center"> <img id="myImg" alt="头像" class="img-center-img"></div>
<input type="text" id="myNick" value="" contenteditable="false" readonly />
<li>
<div data-role="collapsible" data-inset="false" data-iconpos="none" data-mini="true">
<h3>修改头像</h3>
<form id="changeIcon" action="http://123.206.198.158:8080/webb/File/TeaUp" enctype="multipart/form-data" method="post">
<input id="def_one" type="hidden" name="tea_id" value="" />
<input type="file" data-mini="true" name="newStuIcon_input">
<input type="button" data-mini="true" value="保存" onclick="ajaxTeaIconUP()"> </form>
</div>
</li>
<li>
<div data-role="collapsible" data-inset="false" data-iconpos="none" data-mini="true">
<h3>关于APP</h3>
<textarea readonly="readonly">一款极其方便的校园助手APP</textarea>
</div>
</li>
<li>
<div data-role="collapsible" data-inset="false" data-iconpos="none" data-mini="true">
<h1>退出登录</h1>
<button onclick="go_index()" data-mini="true">确认</button>
</div>
</li>
</ul>
</div>
</div>
<!------------------------------------------------------------------个人中心(尾)------------------------------------------------------------->
<div data-role="content">
<div class="choice_list">
<ul id="teacher_course_ul" data-role="listview" data-inset="true" data-filter="true" data-filter-placeholder="搜索" data-icon="false"> </ul>
</div>
</div>
<div data-role="footer" data-tap-toggle="false" data-position="fixed" data-fullscreen="true">
<div data-role="navbar">
<ul>
<li><a href="#msg-class" data-icon="green-message1" class="ui-btn-active ui-state-persist">信息箱</a></li>
<li><a href="#post-official" data-icon="green-post2">海报栏</a></li>
<li><a href="#course-file" data-icon="green-lost2">课件屋</a></li>
<li><a href="#course" data-icon="green-course2">课程表</a></li>
</ul>
</div>
</div>
</div>
<!------------------------------------------------信息箱页面,课程消息页面----------------------------------------------------->
<div data-role="page" id="msg-class-message" data-theme="s">
<!--加载即时消息-->
<script>
$("#msg-class-message").on("pagebeforeshow", function (e) {
//alert(location.hash);
var msg_grade = location.hash.slice(location.hash.length - 4);
var msg_mid = location.hash.slice(22, location.hash.indexOf("w"));
var msg_cid = location.hash.slice(location.hash.indexOf("w") + 1, location.hash.indexOf("x"));
var msg_mname = location.hash.slice(location.hash.indexOf("x") + 1, location.hash.indexOf("y"));
var msg_cname = location.hash.slice(location.hash.indexOf("y") + 1, location.hash.indexOf("z"));
//alert(msg_cid);
document.getElementById("show_courseGroup_Chat").innerHTML = "";
document.getElementById("groupName").innerHTML = msg_cname + "(" + msg_grade.slice(2, 5) + msg_mname + ")";
var receive_StudentGroup_chat;
$.ajax({
url: "http://123.206.198.158:9093/get_myClassMessage"
, data: {
c_id: msg_cid
, m_id: msg_mid
, grade: msg_grade
}
, cache: true
, async: false
, type: "POST"
, dataType: "JSON"
, success: function (data) {
receive_StudentGroup_chat = data;
//alert(data);
}
});
var stuGroup_chat_data = {
list: receive_StudentGroup_chat
};
$("#show_courseGroup_Chat").append(template("studentIndex_groupTemplate", stuGroup_chat_data)).listview('refresh');
//$("#show_courseGroup_Chat").listview('refresh');
});
</script>
<!--即时消息模板-->
<script id="studentIndex_groupTemplate" type="text/html"> {{each list as value i}}
<li>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#"> <img src={{value.icon}}>
<p>{{value.date}}</p>
<textarea readonly="readonly">{{value.chat}}</textarea>
</a>
</li>{{/each}} </script>
<div data-role="header" data-tap-toggle="false" data-position="fixed" data-fullscreen="true">
<div data-role="navbar">
<ul>
<li class="msg-top-nav-head" data-role="controlgroup" data-type="horizontal" data-theme="l"><a href="#msg-class" data-role="button" class="ui-btn ui-icon-green-back1 ui-btn-icon-notext">返回</a></li>
<li class="msg-top-nav" data-role="controlgroup" data-type="horizontal" id="groupName">NULL</li>
<li data-role="controlgroup" data-type="horizontal"></li>
</ul>
</div>
</div>
<div data-role="content" class="choice_list">
<ul id="show_courseGroup_Chat" data-role="listview" data-icon="false"></ul>
</div>
<div data-role="footer" data-tap-toggle="false" data-position="fixed" data-fullscreen="true">
<label for="message-send-input-content" class="ui-hidden-accessible">消息发送</label>
<textarea type="text" name="message-send-input-content" id="message-send-input-content" cols="40" rows="2" class="message-send-input"></textarea>
<button class="message-send-btn ui-btn-right" data-theme="l" onclick="send_left()">发送</button>
</div>
<!--群发送消息-->
<script>
function send_left() {
var msg_grade = location.hash.slice(location.hash.length - 4);
var msg_mid = location.hash.slice(22, location.hash.indexOf("w"));
var msg_cid = location.hash.slice(location.hash.indexOf("w") + 1, location.hash.indexOf("x"));
var msg_mname = location.hash.slice(location.hash.indexOf("x") + 1, location.hash.indexOf("y"));
var msg_cname = location.hash.slice(location.hash.indexOf("y") + 1, location.hash.indexOf("z"));
$.ajax({
url: "http://123.206.198.158:9093/addteachercoursemessage"
, data: {
id: TEAID
, grade: msg_grade
, m_id: msg_mid
, c_id: msg_cid
, chat: $("#message-send-input-content").val()
}
, cache: true
, async: false
, type: "post"
, success: function () {
document.getElementById("show_courseGroup_Chat").innerHTML = "";
document.getElementById("groupName").innerHTML = msg_cname + "(" + msg_grade.slice(2, 5) + msg_mname + ")";
var receive_StudentGroup_chat;
$.ajax({
url: "http://123.206.198.158:9093/get_myClassMessage"
, data: {
c_id: msg_cid
, m_id: msg_mid
, grade: msg_grade
}
, cache: true
, async: false
, type: "POST"
, dataType: "JSON"
, success: function (data) {
receive_StudentGroup_chat = data;
}
});
var stuGroup_chat_data = {
list: receive_StudentGroup_chat
};
$("#show_courseGroup_Chat").append(template("studentIndex_groupTemplate", stuGroup_chat_data)).listview('refresh');
$("#message-send-input-content").val("");
}
});
}
</script>
</div>
<!----------------------------信息箱页面,群组信息----------------------------->
<div data-role="page" id="msg-group" data-theme="s">
<!--加载讨论组消息-->
<script>
$("#msg-group").on("pagebeforecreate", function (e) {
var receive_discussion_group;
$.ajax({
url: "http://123.206.198.158:9093/get_teacherSinDiscussion"
, data: {
tea_id: TEAID
}
, cache: true
, async: false
, type: "POST"
, dataType: "JSON"
, success: function (data) {
receive_discussion_group = data;
}
});
var discussion_data = {
list: receive_discussion_group
};
$("#discussion_group").append(template("discussion_template", discussion_data));
});
</script>
<!--讨论组消息渲染模板-->
<script id="discussion_template" type="text/html"> {{each list as value i}}
<li>
<a onclick="window.location.href='#msg-group-message?id={{value.id}}z{{value.nname}}';return false" data-transition="slidedown"> <img src="./img/header-bottle.png" class="msg-li-header" alt="" />
<h1>{{value.nname}}</h1> </a>
</li> {{/each}} </script>
<div data-role="header" data-tap-toggle="false" data-position="fixed" data-fullscreen="true" data-theme="s">
<div data-role="navbar">
<ul>
<li class="msg-top-nav-head" data-role="controlgroup" data-type="horizontal"></li>
<li class="msg-top-nav" data-role="controlgroup" data-type="horizontal" data-theme="j"><a href="#msg-class" data-role="button" data-transition="slide" data-direction="reverse">班级</a> <a href="#" data-role="button" class="ui-btn-active ui-state-persist">群组</a></li>
<li class="msg-top-nav-head-right" data-role="controlgroup" data-type="horizontal" data-theme="l"><a href="#msg-group-create" class="ui-btn ui-icon-green-plus1 ui-btn-icon-notext ui-corner-all">创建</a></li>
</ul>
</div>
</div>
<div data-role="content">
<div class="choice_list">
<ul id="discussion_group" data-role="listview" data-inset="true" data-filter="true" data-icon="false"> </ul>
</div>
</div>
<div data-role="footer" data-tap-toggle="false" data-position="fixed" data-fullscreen="true">
<div data-role="navbar">
<ul>
<li><a href="#msg-class" data-icon="green-message1" class="ui-btn-active ui-state-persist">信息箱</a></li>
<li><a href="#post-official" data-icon="green-post2">海报栏</a></li>
<li><a href="#course-file" data-icon="green-lost2">课件屋</a></li>
<li><a href="#course" data-icon="green-course2">课程表</a></li>
</ul>
</div>
</div>
</div>
<!----------------------------信息箱页面,群组消息页面----------------------------->
<div data-role="page" id="msg-group-message" data-theme="s">
<!--加载讨论组即时消息-->
<script>
$("#msg-group-message").on("pagebeforecreate", function (e) {
var dis_id = location.hash.slice(location.hash.indexOf("id") + 3, location.hash.indexOf("z"));
var dis_name = location.hash.slice(location.hash.indexOf("z") + 1);
document.getElementById("communication").innerHTML = "";
document.getElementById("disgroup").innerHTML = dis_name;
var receive_StudentGroup_communication;
$.ajax({
url: "http://123.206.198.158:9093/get_myDisMessage"
, data: {
id: dis_id
}
, cache: true
, async: false
, type: "POST"
, dataType: "JSON"
, success: function (data) {
receive_StudentGroup_communication = data;
}
});
var communication_chat_data = {
list: receive_StudentGroup_communication
};
$("#communication").append(template("communication_groupTemplate", communication_chat_data));
});
</script>
<!--讨论组即时消息模板-->
<script id="communication_groupTemplate" type="text/html"> {{each list as value i}}
<li>
&nbsp;&nbsp;&nbsp;<a href="#"> <img src={{value.icon}}>
<p>{{value.date}}</p>
<textarea readonly="readonly">{{value.chat}}</textarea>
</a>
</li> {{/each}} </script>
<div data-role="header" data-tap-toggle="false" data-position="fixed" data-fullscreen="true">
<div data-role="navbar">
<ul>
<li class="msg-top-nav-head" data-role="controlgroup" data-type="horizontal" data-theme="l"> <a data-role="button" data-rel="back" class="ui-btn ui-icon-green-back1 ui-btn-icon-notext">返回</a></li>
<li class="msg-top-nav" data-role="controlgroup" data-type="horizontal" id="disgroup" data-theme="l" style="font-size: 1.3em">NULL</li>
<li></li>
</ul>
</div>
</div>
<div data-role="content" class="choice_list">
<ul id="communication" data-role="listview"> </ul>
</div>
<div data-role="footer" data-tap-toggle="false" data-position="fixed" data-fullscreen="true">
<label for="message-send-input-content" class="ui-hidden-accessible">消息发送</label>
<textarea type="text" name="message-send-input-content" id="message-group-send-input-content" cols="50" rows="4" class="message-send-input"></textarea>
<button class="message-send-btn ui-btn-right" data-theme="l" onclick="send_right()">发送</button>
</div>
<!--讨论组发送消息-->
<script>
function send_right() {
var dis_id = location.hash.slice(location.hash.indexOf("id") + 3, location.hash.indexOf("z"));
var dis_name = location.hash.slice(location.hash.indexOf("z") + 1);
$.ajax({
url: "http://123.206.198.158:9093/add_DisChat"
, data: {
id: TEAID
, g_id: dis_id
, chat: $("#message-group-send-input-content").val()
}
, cache: true
, async: false
, type: "post"
, success: function () {
document.getElementById("communication").innerHTML = "";
document.getElementById("disgroup").innerHTML = dis_name;
var receive_StudentGroup_communication;
$.ajax({
url: "http://123.206.198.158:9093/get_myDisMessage"
, data: {
id: dis_id
}
, cache: true
, async: false
, type: "POST"
, dataType: "JSON"
, success: function (data) {
receive_StudentGroup_communication = data;
}
});
var communication_chat_data = {
list: receive_StudentGroup_communication
};
$("#communication").append(template("communication_groupTemplate", communication_chat_data)).listview('refresh');
$("#message-group-send-input-content").val("");
}
});
}
</script>
</div>
<!----------------------------信息箱页面,群组创建----------------------------->
<div data-role="page" id="msg-group-create" data-theme="s">
<!--加载师生资料-->
<script>
$("#msg-group-create").on("pagebeforecreate", function (e) {
var receive_material_data;
$.ajax({
url: "http://123.206.198.158:9093/get_groupNeed"
, data: {
tea_id: TEAID
}
, cache: true
, async: false
, type: "POST"
, dataType: "JSON"
, success: function (data) {
receive_material_data = data;
}
});
//alert(receive_student_course[3].c_name);
var material_data = {
list: receive_material_data
};
$("#material_group").append(template("material_template", material_data));
});
</script>
<!--师生资料渲染模板-->
<script id="material_template" type="text/html"> {{each list as value i}}
<li>
<label for={{value.id}}><span>{{value.name}}</span> <span>{{value.id}}</span> <span>{{value.s_name}}</span></label>
<input type="checkbox" name="data[]" value={{value.id}} id={{value.id}}> </li> {{/each}} </script>
<script>
function ajaxStuIconUP22() {
var options = {
success: function (data) {
alert("修改成功!");
window.location.reload();
}
};
$("#changeIcon22").ajaxSubmit(options);
}
</script>
<div data-role="header" data-tap-toggle="false" data-position="fixed" data-fullscreen="true">
<div data-role="navbar">
<ul>
<li class="msg-top-nav-head" data-role="controlgroup" data-type="horizontal" data-theme="l"><a href="#" data-role="button" data-rel="back" class="ui-btn ui-icon-green-back1 ui-btn-icon-notext ui-corner-all">返回</a></li>
<li class="msg-top-nav" data-role="controlgroup" data-type="horizontal" data-theme="l"><a href="#" data-role="button">讨论组创建</a></li>
<li class="msg-top-nav-head-right" data-role="controlgroup" data-type="horizontal"></li>
</ul>
</div>
</div>
<div data-role="content">
<div class="choice_list">
<form id="changeIcon22"action="http://123.206.198.158:9093/create_dis" enctype="multipart/form-data" method="post">
<input type="text" name="data[]" placeholder="请为您要创建的群组命名">
<input type="hidden" name="data[]" value="9191003" />
<input type="button" value="创建" class="lost-send-submit-btn" data-theme="l" data-mini="true" onclick="ajaxStuIconUP22()"/>
<fieldset data-role="controlgroup">
<ul id="material_group" data-role="listview" data-filter="true" data-filter-placeholder="搜索" class="choice_list" data-theme="a"> </ul>
</fieldset>
</form>
</div>
</div>
</div>
<!-- 溜金哇卡呀酷烈
教师端-海报栏海报
quu..__
$$$b `---.__
"$$b `--. ___.---uuudP
`$$b `.__.------.__ __.---' $$$$" .
"$b -' `-.-' $$$" .'|
". d$" _.' |
`. / ..." .' |
`./ ..::-' _.' |
/ .:::-' .-' .'
: ::''\ _.' |
.' .-. .-. `. .' |
: /'$$| .@"$\ `. .' _.-'
.'|$u$$| |$$,$$| | < _.-'
| `:$$:' :$$$$$: `. `. .-'
: `"--' | `-. \
:##. == .###. `. `. `\
|##: :###: | > >
|#' `..'`..' `###' x: / /
\ xXX| / ./
\ xXXX'| / ./
/`-. `. / /
: `- ..........., | / .'
| ``:::::::' . |< `.
| ``` | x| \ `.:``.
| .' /' xXX| `:`M`M':.
| | ; /:' xXXX'| -'MMMMM:'
`. .' : /:' |-'MMMM.-'
| | .' /' .'MMM.-'
`'`' : ,' |MMM<
| `' |tbap\
\ :MM.-'
\ | .''
\. `. /
/ .:::::::.. : /
| .:::::::::::`. /
| .:::------------\ /
/ .'' >::' /
`',: : .'
`:.:'-->
<!----------------------教师端-海报栏海报栏页面-------------------->
<div data-role="page" id="post" data-theme="s">
<!------------------------------------------------------学生组织海报栏模板----------------------------------------------------------------------------->
<script id="student_show_student_post" type="text/html"> {{each list as value i}}
<li id="student_student_post_list{{i}}">
<div class="post-show-div">
<div class="post-show-div-inner-left"><img src={{value.icon}} alt=""></div>
<div class="post-show-div-inner-right">
<a href="#popup-post{{i+1}}" data-rel="popup" data-position-to="window" data-transition="flow"><img src={{value.pic}} alt=""></a>
</div>
<div data-role="popup" id="popup-post{{i+1}}" data-overlay-theme="s" data-corners="false"><a href="#" data-rel="back" class="ui-btn ui-corner-all ui-shadow ui-btn-s ui-icon-delete ui-btn-icon-notext ui-btn-right">Close</a><img src={{value.pic}} alt=""></div>
</div>
</li> {{/each}} </script>
<!---------------------------------------------------学生组织海报栏渲染------------------------------------------------------>
<script>
$("#post").on("pagebeforecreate", function (e) {
var receive_post_data;
$.ajax({
url: "http://123.206.198.158:9093/get_studentnews"
, data: {}
, cache: true
, async: false
, type: "POST"
, dataType: "JSON"
, success: function (data) {
receive_post_data = data;
}
});
var post_data = {
list: receive_post_data
};
$("#post_student_student_ul").append(template("student_show_student_post", post_data));
});
</script>
<div data-role="header" data-tap-toggle="false" data-position="fixed" data-fullscreen="true" data-theme="s">
<div data-role="navbar">
<ul>
<li class="msg-top-nav-head" data-role="controlgroup" data-type="horizontal">
<!--<a href="#person" class="ui-btn ui-icon-user ui-btn-icon-notext ui-corner-all">个人</a>--></li>
<li class="msg-top-nav" data-role="controlgroup" data-type="horizontal" data-theme="j"><a href="#" class="ui-btn-active ui-state-persist">学生</a><a href="#post-official" data-transition="slide">校方</a></li>
<li></li>
</ul>
</div>
</div>
<div data-role="content">
<div class="choice_list">
<ul data-role="listview" data-inset="true" id="post_student_student_ul">
<!--模板区-->
</ul>
</div>
</div>
<div data-role="footer" data-tap-toggle="false" data-position="fixed" data-fullscreen="true">
<div data-role="navbar">
<ul>
<li><a href="#msg-class" data-icon="green-message2">信息箱</a></li>
<li><a href="#" data-icon="green-post1" class="ui-btn-active ui-state-persist">海报栏</a></li>
<li><a href="#course-file" data-icon="green-lost2">课件屋</a></li>
<li><a href="#course" data-icon="green-course2">课程表</a></li>
</ul>
</div>
</div>
</div>
<!--------------------------------------校方海报栏----------------------------------------------->
<div data-role="page" id="post-official" data-theme="s">
<!--校方海报栏模板-->
<script id="student_show_school_post" type="text/html"> {{each list as value i}}
<li id="student_school_post_list{{i}}">
<div class="post-show-div">
<div class="post-show-div-inner-left"><img src="{{value.icon}}" alt=""></div>
<div class="post-show-div-inner-right">
<a href="#popup_school_post{{i+1}}" data-rel="popup" data-position-to="window" data-transition="flow"><img src={{value.pic}} alt=""></a>
</div>
<div data-role="popup" id="popup_school_post{{i+1}}" data-overlay-theme="s" data-corners="false"><a href="#" data-rel="back" class="ui-btn ui-corner-all ui-shadow ui-btn-s ui-icon-delete ui-btn-icon-notext ui-btn-right">Close</a><img src={{value.pic}} alt=""></div>
</div>
</li> {{/each}} </script>
<!--海报栏渲染-->
<script>
$("#post-official").on("pagebeforecreate", function (e) {
var receive_post_data;
$.ajax({
url: "http://123.206.198.158:9093/get_schoolnews"
, data: {}
, cache: true
, async: false
, type: "POST"
, dataType: "JSON"
, success: function (data) {
receive_post_data = data;
}
});
var post_data = {
list: receive_post_data
};
$("#post_student_school_ul").append(template("student_show_school_post", post_data));
});
</script>
<div data-role="header" data-tap-toggle="false" data-position="fixed" data-fullscreen="true" data-theme="s">
<div data-role="navbar">
<ul>
<li class="msg-top-nav-head" data-role="controlgroup" data-type="horizontal">
<!--<a href="#person" class="ui-btn ui-icon-user ui-btn-icon-notext ui-corner-all">个人</a>--></li>
<li class="msg-top-nav" data-role="controlgroup" data-type="horizontal" data-theme="j"><a href="#post" data-transition="slide" data-direction="reverse">学生</a><a href="#" class="ui-btn-active ui-state-persist">校方</a></li>
<li></li>
</ul>
</div>
</div>
<div data-role="content">
<div class="choice_list">
<ul data-role="listview" data-inset="true" id="post_student_school_ul">
<!--模板区-->
</ul>
</div>
</div>
<div data-role="footer" data-tap-toggle="false" data-position="fixed" data-fullscreen="true">
<div data-role="navbar">
<ul>
<li><a href="#msg-class" data-icon="green-message2">信息箱</a></li>
<li><a href="#" data-icon="green-post1" class="ui-btn-active ui-state-persist">海报栏</a></li>
<li><a href="#course-file" data-icon="green-lost2">课件屋</a></li>
<li><a href="#course" data-icon="green-course2">课程表</a></li>
</ul>
</div>
</div>
</div>
<!--
教师端-课件屋
___====-_ _-====___
_--^^^#####// \\#####^^^--_
_-^##########// ( ) \\##########^-_
-############// |\^^/| \\############-
_/############// (@::@) \\############\_
/#############(( \\// ))#############\
-###############\\ (oo) //###############-
-#################\\ / VV \ //#################-
-###################\\/ \//###################-
_#/|##########/\######( /\ )######/\##########|\#_
|/ |#/\#/\#/\/ \#/\##\ | | /##/\#/ \/\#/\#/\#| \|
` |/ V V ` V \#\| | | |/#/ V ' V V \| '
` ` ` ` / | | | | \ ' ' ' '
( | | | | )
__\ | | | | /__
(vvv(VVV)(VVV)vvv)
---->
<!----------------------教师端-课件页面--------------------------->
<!------------------------------------------课件管理页面-------------------------------------------------->
<div data-role="page" id="course-file" data-theme="s">
<!--加载已传课件-->
<script>
$("#course-file").on("pagebeforecreate", function (e) {
var files_data;
$.ajax({
url: "http://123.206.198.158:9093/get_all_files"
, data: {
tea_id: TEAID
}
, cache: true
, async: false
, type: "POST"
, dataType: "JSON"
, success: function (data) {
files_data = data;
}
});
var file_data = {
list: files_data
};
$("#show_PPT").append(template("PPT_template", file_data));
});
</script>
<!--已传课件展示模板-->
<script id="PPT_template" type="text/html"> {{each list as value i}}
<li>
<h class="lost-content-time">{{value.nname}}-----上传时间{{value.date}}</h>
<p>{{value.remark}}</p>
<button id={{value.id}} onclick="delFile(this)" data-mini="true" data-inline="true" class="ui-btn-right" data-theme="l">删除</button>
</li> {{/each}} </script>
<script>
function delFile(self) {
$.ajax({
url: "http://123.206.198.158:9093/del_a_file"
, data: {
f_id: self.id
}
, cache: true
, async: false
, type: "POST"
, success: function (data) {
alert("删除成功!");
window.location.reload();
}
});
}
</script>
<div data-role="header" data-tap-toggle="false" data-position="fixed" data-theme="s">
<div data-role="navbar" class="top_nav_bar">
<ul>
<li class="msg-top-nav-head" data-role="controlgroup" data-type="horizontal"></li>
<li class="msg-top-nav" data-role="controlgroup" data-type="horizontal" data-theme="l"><a>我的课件</a></li>
<li class="msg-top-nav-head-right" data-role="controlgroup" data-type="horizontal" data-theme="l"><a href="#course-file-upload" class="ui-btn ui-icon-green-tag1 ui-btn-icon-notext ui-corner-all">发布</a></li>
</ul>
</div>
</div>
<div data-role="content">
<div class="choice-list">
<ul id="show_PPT" data-role="listview" data-inset="true" data-filter="true" data-filter-placeholder="搜索课件" data-mini="true"> </ul>
</div>
</div>
<div data-role="footer" data-tap-toggle="false" data-position="fixed" data-fullscreen="true">
<div data-role="navbar" class="top_nav_bar">
<ul>
<li><a href="#msg-class" data-icon="green-message2">信息箱</a></li>
<li><a href="#post-official" data-icon="green-post2">海报栏</a></li>
<li><a href="#" data-icon="green-lost1" class="ui-btn-active ui-state-persist">课件屋</a></li>
<li><a href="#course" data-icon="green-course2">课程表</a></li>
</ul>
</div>
</div>
</div>
<!-------------------------------------------------------课件上传页面------------------------------------------------>
<div data-role="page" id="course-file-upload" data-theme="s">
<!--加载教学对象-->
<script>
$("#course-file-upload").on("pagebeforecreate", function (e) {
var receive_object_data;
$.ajax({
url: "http://123.206.198.158:9093/getgrademajor"
, data: {
id: TEAID
}
, cache: true
, async: false
, type: "POST"
, dataType: "JSON"
, success: function (data) {
receive_object_data = data;
}
});
var object_data = {
list: receive_object_data
};
$("#UP_PPT").append(template("object_template", object_data));
});
</script>
<!--教学对象渲染模板-->
<script id="object_template" type="text/html"> {{each list as value i}}
<li>
<label for={{value.m_id}}{{value.grade}}>{{value.nname}}{{value.grade}}</label>
<input type="checkbox" name="data" value={{value.m_id}}{{value.grade}} id={{value.m_id}}{{value.grade}}> </li> {{/each}} </form>
</script>
<script>
function ajaxFileUP() {
$("#def_two").attr("value", TEAID);
var options = {
success: function (data) {
alert("上传成功!");
window.history.go(-1);
window.location.reload();
}
};
$("#myForm").ajaxSubmit(options);
}
</script>
<div data-role="header" data-tap-toggle="false" data-theme="s">
<div data-role="navbar" class="top_nav_bar">
<ul>
<li class="msg-top-nav-head" data-role="controlgroup" data-type="horizontal" data-theme="l"><a href="#course-file" class="ui-btn ui-icon-green-back1 ui-btn-icon-notext ui-corner-all">发布</a></li>
<li class="msg-top-nav" data-role="controlgroup" data-type="horizontal" data-theme="l"><a>课件上传</a></li>
<li class="msg-top-nav-head-right" data-role="controlgroup" data-type="horizontal" data-theme="l"></li>
</ul>
</div>
</div>
<div data-role="content">
<form id="myForm" action="http://123.206.198.158:8080/webb/File/FileUpload" enctype="multipart/form-data" method="post">
<input type="hidden" name="tea_id" value="" id="def_two" />
<fieldset data-role="fieldcontain" class="course-file-upload-type">
<div class="choice_list">
<ul id="UP_PPT" data-role="listview" data-theme="a" data-mini="false"> <span>发送班级:</span>
<!--<li>
<label for="xinxiguanli">信息管理</label>
<input type="checkbox" name="xinxiguanli" id="xinxiguanli" value="xinxiguanli"> </li>
<li>
<label for="jisuanji">计算机科学与技术</label>
<input type="checkbox" name="jisuanji" id="jisuanji" value="jisuanji"> </li>
<li>
<label for="ruanjian">软件工程</label>
<input type="checkbox" name="ruanjian" id="ruanjian" value="ruanjian"> </li>
-->
</ul>
</div> <span>课件备注:</span>
<input type="text" name="remark" placeholder="请输入对课件的补充,以便于您的学生查找并下载"> <span>课件选择:</span>
<input name="course-file-uploadfile" id="course-file-uploadfile" value="" type="file">
<input type="button" data-inline="true" value="上传" class="course-file-upload-submit-btn" data-mini="true" onclick="ajaxFileUP()"> </fieldset>
</form>
</div>
<div data-role="footer" data-tap-toggle="false" data-position="fixed" data-fullscreen="true"></div>
</div>
<!-- 溜金哇卡呀酷烈
教师端-课程表
11111111111111111111111111111111111111001111111111111111111111111
11111111111111111111111111111111111100011111111111111111111111111
11111111111111111111111111111111100001111111111111111111111111111
11111111111111111111111111111110000111111111111111111111111111111
11111111111111111111111111111000000111111111111111111111111111111
11111111111111111111111111100000011110001100000000000000011111111
11111111111111111100000000000000000000000000000000011111111111111
11111111111111110111000000000000000000000000000011111111111111111
11111111111111111111111000000000000000000000000000000000111111111
11111111111111111110000000000000000000000000000000111111111111111
11111111111111111100011100000000000000000000000000000111111111111
11111111111111100000110000000000011000000000000000000011111111111
11111111111111000000000000000100111100000000000001100000111111111
11111111110000000000000000001110111110000000000000111000011111111
11111111000000000000000000011111111100000000000000011110001111111
11111110000000011111111111111111111100000000000000001111100111111
11111111000001111111111111111111110000000000000000001111111111111
11111111110111111111111111111100000000000000000000000111111111111
11111111111111110000000000000000000000000000000000000111111111111
11111111111111111100000000000000000000000000001100000111111111111
11111111111111000000000000000000000000000000111100000111111111111
11111111111000000000000000000000000000000001111110000111111111111
11111111100000000000000000000000000000001111111110000111111111111
11111110000000000000000000000000000000111111111110000111111111111
11111100000000000000000001110000001111111111111110001111111111111
11111000000000000000011111111111111111111111111110011111111111111
11110000000000000001111111111111111100111111111111111111111111111
11100000000000000011111111111111111111100001111111111111111111111
11100000000001000111111111111111111111111000001111111111111111111
11000000000001100111111111111111111111111110000000111111111111111
11000000000000111011111111111100011111000011100000001111111111111
11000000000000011111111111111111000111110000000000000011111111111
11000000000000000011111111111111000000000000000000000000111111111
11001000000000000000001111111110000000000000000000000000001111111
11100110000000000001111111110000000000000000111000000000000111111
11110110000000000000000000000000000000000111111111110000000011111
11111110000000000000000000000000000000001111111111111100000001111
11111110000010000000000000000001100000000111011111111110000001111
11111111000111110000000000000111110000000000111111111110110000111
11111110001111111100010000000001111100000111111111111111110000111
11111110001111111111111110000000111111100000000111111111111000111
11111111001111111111111111111000000111111111111111111111111100011
11111111101111111111111111111110000111111111111111111111111001111
11111111111111111111111111111110001111111111111111111111100111111
11111111111111111111111111111111001111111111111111111111001111111
11111111111111111111111111111111100111111111111111111111111111111
11111111111111111111111111111111110111111111111111111111111111111-->
<!-----------------教师课程表-------------------------->
<div data-role="page" id="course" data-theme="s">
<script>
function tableMerge(tableID, position) {
poi = "" + position;
var firstTd = "";
var currentTd = "";
var spanNum = 0;
$(tableID + " tr td:nth-child(" + poi + ")").slice(0).each(function (i) {
var temp = $(this);
if (temp.text() != "") {
if (i == 0) {
firstTd = $(this);
spanNum = 1;
}
else {
currentTd = $(this);
if (firstTd.text() == currentTd.text()) {
spanNum++;
currentTd.hide();
firstTd.attr("rowSpan", spanNum);
}
else {
firstTd = $(this);
spanNum = 1;
}
}
}
});
}
</script>
<script>
var course;
$('#course').on('pagecreate', function (event) {
var URL = "";
switch ("teacher") {
case "student":
URL = "http://123.206.198.158:9093/get_studentcourse";
break;
case "teacher":
URL = "http://123.206.198.158:9093/get_teachercourse";
break;
}
$.ajax({
url: URL
, data: {
id: TEAID
}
, cache: true
, async: false
, type: "POST"
, dataType: "json"
, success: function (data) {
course = data;
}
});
if (course[0]["saturday"] == "false") {
$("#saturday").hide();
for (var j = 61; j <= 611; j++) {
var s = "#table" + j;
$(s).hide();
if ((j + 1) % 10 == 0) {
j *= 10;
j -= 81;
}
}
}
if (course[0]["sunday"] == "false") {
$("#sunday").hide();
for (var j = 71; j <= 711; j++) {
var s = "#table" + j;
$(s).hide();
if ((j + 1) % 10 == 0) {
j *= 10;
j -= 81;
}
}
}
if (course[0]["eleven"] == "false") {
$("#eleven").hide();
}
for (var i = 11; i <= 71; i += 10) {
for (var j = i; j <= i * 10 + 1; j++) {
var s = "#" + j;
if ((course[0][j] + "").slice(0, 2) == "单周") {
$(s).attr("onclick", "a(this)");
var temp = (course[0][j] + "").slice(0, course[0]["9" + j] - 6);
$(s).append(temp);
continue;
}
var s = "#table" + j;
if ((course[0][j] + "").slice(0, 2) == "单周") {
$(s).attr("onclick", "a(this)");
var temp = (course[0][j] + "").slice(0, course[0]["9" + j] - 6);
$(s).append(temp);
continue;
}
$(s).append(course[0][j]);
if ((j + 1) % 10 == 0) {
j *= 10;
j -= 81;
}
}
}
for (var i = 2; i < 9; i++) {
tableMerge("#timetable", i);
}
});
</script>
<script>
function a(self) {
var str = document.getElementById(self.id).innerHTML;
switch (str.slice(0, 2)) {
case "单周":
document.getElementById(self.id).innerHTML = (course[0][self.id] + "").slice(course[0]["9" + self.id]);
break;
case "双周":
document.getElementById(self.id).innerHTML = (course[0][self.id] + "").slice(0, course[0]["9" + self.id] - 6);
break;
}
}
</script>
<div data-role="header" data-tap-toggle="false" data-position="fixed" data-fullscreen="true" data-theme="k">
<div data-role="navbar">
<ul>
<li class="msg-top-nav-head" data-role="controlgroup" data-type="horizontal">
<!--<!--<a href="#person" class="ui-btn ui-icon-user ui-btn-icon-notext ui-corner-all">个人</a>--></li>
<li class="msg-top-nav" data-role="controlgroup" data-type="horizontal"><a>课程表</a></li>
<li></li>
</ul>
</div>
</div>
<div data-role="content" class="choice_list">
<table id="timetable" class="course-table" cellspacing="0px">
<thead>
<tr>
<th>课程</th>
<th>周一</th>
<th>周二</th>
<th>周三</th>
<th>周四</th>
<th>周五</th>
<th id="saturday">周六</th>
<th id="sunday">周日</th>
</tr>
</thead>
<tbody id="stu-course-table">
<tr>
<td>1</td>
<td id="table11" onclick=""></td>
<td id="table21" onclick=""></td>
<td id="table31" onclick=""></td>
<td id="table41" onclick=""></td>
<td id="table51" onclick=""></td>
<td id="table61" onclick=""></td>
<td id="table71" onclick=""></td>
</tr>
<tr>
<td>2</td>
<td id="table12" onclick=""></td>
<td id="table22" onclick=""></td>
<td id="table32" onclick=""></td>
<td id="table42" onclick=""></td>
<td id="table52" onclick=""></td>
<td id="table62" onclick=""></td>
<td id="table72" onclick=""></td>
</tr>
<tr>
<td>3</td>
<td id="table13" onclick=""></td>
<td id="table23" onclick=""></td>
<td id="table33" onclick=""></td>
<td id="table43" onclick=""></td>
<td id="table53" onclick=""></td>
<td id="table63" onclick=""></td>
<td id="table73" onclick=""></td>
</tr>
<tr>
<td>4</td>
<td id="table14" onclick=""></td>
<td id="table24" onclick=""></td>
<td id="table34" onclick=""></td>
<td id="table44" onclick=""></td>
<td id="table54" onclick=""></td>
<td id="table64" onclick=""></td>
<td id="table74" onclick=""></td>
</tr>
<tr>
<td>5</td>
<td id="table15" onclick=""></td>
<td id="table25" onclick=""></td>
<td id="table35" onclick=""></td>
<td id="table45" onclick=""></td>
<td id="table55" onclick=""></td>
<td id="table65" onclick=""></td>
<td id="table75" onclick=""></td>
</tr>
<tr>
<td>6</td>
<td id="table16" onclick=""></td>
<td id="table26" onclick=""></td>
<td id="table36" onclick=""></td>
<td id="table46" onclick=""></td>
<td id="table56" onclick=""></td>
<td id="table66" onclick=""></td>
<td id="table76" onclick=""></td>
</tr>
<tr>
<td>7</td>
<td id="table17" onclick=""></td>
<td id="table27" onclick=""></td>
<td id="table37" onclick=""></td>
<td id="table47" onclick=""></td>
<td id="table57" onclick=""></td>
<td id="table67" onclick=""></td>
<td id="table77" onclick=""></td>
</tr>
<tr>
<td>8</td>
<td id="table18" onclick=""></td>
<td id="table28" onclick=""></td>
<td id="table38" onclick=""></td>
<td id="table48" onclick=""></td>
<td id="table58" onclick=""></td>
<td id="table68" onclick=""></td>
<td id="table78" onclick=""></td>
</tr>
<tr>
<td>9</td>
<td id="table19" onclick=""></td>
<td id="table29" onclick=""></td>
<td id="table39" onclick=""></td>
<td id="table49" onclick=""></td>
<td id="table59" onclick=""></td>
<td id="table69" onclick=""></td>
<td id="table79" onclick=""></td>
</tr>
<tr>
<td>10</td>
<td id="table110" onclick=""></td>
<td id="table210" onclick=""></td>
<td id="table310" onclick=""></td>
<td id="table410" onclick=""></td>
<td id="table510" onclick=""></td>
<td id="table610" onclick=""></td>
<td id="table710" onclick=""></td>
</tr>
<tr id="eleven">
<td>11</td>
<td id="table111" onclick=""></td>
<td id="table211" onclick=""></td>
<td id="table311" onclick=""></td>
<td id="table411" onclick=""></td>
<td id="table511" onclick=""></td>
<td id="table611" onclick=""></td>
<td id="table711" onclick=""></td>
</tr>
</tbody>
<tfoot> </tfoot>
</table>
</div>
<div data-role="footer" data-tap-toggle="false" data-position="fixed" data-fullscreen="true">
<div data-role="navbar">
<ul>
<li><a href="#msg-class" data-icon="green-message2">信息箱</a></li>
<li><a href="#post-official" data-icon="green-post2">海报栏</a></li>
<li><a href="#course-file" data-icon="green-lost2">课件屋</a></li>
<li><a href="#" data-icon="green-course1">课程表</a></li>
</ul>
</div>
</div>
</div>
</body>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hellstalol/CampusHelper.git
git@gitee.com:hellstalol/CampusHelper.git
hellstalol
CampusHelper
CampusHelper
master

搜索帮助