// JavaScript Document
var lang1="请输入试卷关键词";
var lang2="题 型:";
function sendmsg(msgid,msgvalue){
document.getElementById(msgid).innerHTML=msgvalue;
setTimeout('sendmsg1("'+msgid+'")',8000);
}
function sendmsg1(msgid){
document.getElementById(msgid).innerHTML="";
}
function savarenzheng(){
if(document.getElementById("it618_name").value==""){
alert("请填写老师名称!");
document.getElementById("it618_name").focus();
return false;
}
if(document.getElementById("it618_tel").value==""){
alert("请填写联系电话!");
document.getElementById("it618_tel").focus();
return false;
}
if(document.getElementById("it618_about").value==""){
alert("请填写老师简介!");
document.getElementById("it618_about").focus();
return false;
}
IT618_EXAM.post("http://moockxuecheng.com/plugin.php?id=it618_exam:ajax"+"&ac=renzheng&formhash=d5ae4f5c",IT618_EXAM("#it618_renzheng").serialize(),function (data, textStatus){
var tmparr=data.split("it618_split");
if(tmparr[1]=="ok"){
document.getElementById("ul1").style.display="none";
document.getElementById("ul2").style.display="";
}else if(tmparr[1]=="vipok"){
alert("您是讲师VIP,已为您自动审核通过!点击确定,自动进入讲师后台!");
location.href=tmparr[2];
}else{
alert(data);
}
}, "html");
}
function templatestyle(stylename){
IT618_EXAM.get("http://moockxuecheng.com/plugin.php?id=it618_exam:ajax&stylename="+stylename+"&formhash=d5ae4f5c", {ac:"pcstyle"},function (data, textStatus){
if(data=="ok"){
location.reload();
}
}, "html");
}
var layerclose = {};
function showlayerwin(it618type,type,title,content,width,height,wintype){
if(type==1){
content='
'+content+'
';
}
if(wintype==0){
var maxmin=false;
var shade=0.3;
}else{
var maxmin=true;
var shade=false;
}
if(height>IT618_EXAM(window).height()*0.8){
height=IT618_EXAM(window).height()*0.8;
}
layerclose[it618type]=layer.open({
type: type,
title: ""+title+"
",
shadeClose: false,
scrollbar: false,
shade: shade,
maxmin: maxmin,
area: [width+"px",height+"px"],
content: content,
cancel: function(index, layero){
if(it618type=='codepay'){
clearInterval(tmptime);
}
}
});
}
IT618_EXAM.ajaxSetup({cache:false});
IT618_EXAM(document).ready(function() {
//31fc3fbca2987657e38af3c255812c17
IT618_EXAM(".renzheng").click(function(){
if(confirm('抱歉,请先登录!也可以点确定直接跳转到登录页面!')){
location.href="member.php?mod=logging"+"&action=login";
return;
}else{
return;
}
IT618_EXAM.get("http://moockxuecheng.com/plugin.php?id=it618_exam:showrenzheng", {ac:"add"},function (data, textStatus){
var tmparr=data.split("it618_split");
showlayerwin('renzheng',1,tmparr[0],tmparr[1],1100,550,1);
}, "html");
});
//570d065a786e2ab6e39393197272f3f2
IT618_EXAM("#mysale").click(function(){
showlayerwin('mysale',1,'我的交易','',1200,610,1);
IT618_EXAM("#layer_mysale").html('
');
IT618_EXAM.get("http://moockxuecheng.com/plugin.php?id=it618_exam:mysale", {ac:"add"},function (data, textStatus){
IT618_EXAM.get("http://moockxuecheng.com/plugin.php?id=it618_exam:ajax"+"&formhash=d5ae4f5c", {ac:"salelist_get",ac1:"pcmysale"},function (data1, textStatus){
var tmparr1=data1.split("it618_split");
var bodytmp=data;
bodytmp=bodytmp.replace("it618mysalesum",tmparr1[0]);
bodytmp=bodytmp.replace("it618mysalelist",tmparr1[1]);
bodytmp=bodytmp.replace("it618mysalepage",tmparr1[2]);
bodytmp=bodytmp.replace("it618myjfcount",tmparr1[3]);
IT618_EXAM("#layer_mysale").html(bodytmp);
laydate.render({trigger: "click",
elem: '#it618_time1'
});
laydate.render({trigger: "click",
elem: '#it618_time2'
});
}, "html");
}, "html");
});
//92b80f2aa0c4de57885165c8d40f638d
IT618_EXAM("#mysalekm").click(function(){
showlayerwin('mysalekm',1,'','',1200,610,1);
IT618_EXAM("#layer_mysalekm").html('
');
IT618_EXAM.get("http://moockxuecheng.com/plugin.php?id=it618_exam:mysalekm", {ac:"add"},function (data, textStatus){
IT618_EXAM.get("http://moockxuecheng.com/plugin.php?id=it618_exam:ajax"+"&formhash=d5ae4f5c", {ac:"salekmlist_get",ac1:"pcmysalekm"},function (data1, textStatus){
var tmparr1=data1.split("it618_split");
var bodytmp=data;
bodytmp=bodytmp.replace("it618mysalesum",tmparr1[0]);
bodytmp=bodytmp.replace("it618mysalelist",tmparr1[1]);
bodytmp=bodytmp.replace("it618mysalepage",tmparr1[2]);
IT618_EXAM("#layer_mysalekm").html(bodytmp);
laydate.render({trigger: "click",
elem: '#it618_time1'
});
laydate.render({trigger: "click",
elem: '#it618_time2'
});
}, "html");
}, "html");
});
//7e017e1873c148764df938c1d58e3cf2
IT618_EXAM("#mysubscribe").click(function(){
showlayerwin('mysubscribe',1,'我的关注','',1200,610,1);
IT618_EXAM("#layer_mysubscribe").html('
');
IT618_EXAM.get("http://moockxuecheng.com/plugin.php?id=it618_exam:mysubscribe", {ac:"it618"},function (data, textStatus){
IT618_EXAM.get("http://moockxuecheng.com/plugin.php?id=it618_exam:ajax"+"&formhash=d5ae4f5c", {ac:"subscribe_get",ac1:"pcmysubscribe"},function (data1, textStatus){
var tmparr1=data1.split("it618_split");
var bodytmp=data;
bodytmp=bodytmp.replace("it618mysalesum",tmparr1[0]);
bodytmp=bodytmp.replace("it618mysalelist",tmparr1[1]);
bodytmp=bodytmp.replace("it618mysalepage",tmparr1[2]);
IT618_EXAM("#layer_mysubscribe").html(bodytmp);
}, "html");
}, "html");
});
//88028f68a2310df972d508736adabfc6
IT618_EXAM("#mygoods").click(function(){
showlayerwin('mygoods',1,'我的试卷','',1200,610,1);
IT618_EXAM("#layer_mygoods").html('
');
IT618_EXAM.get("http://moockxuecheng.com/plugin.php?id=it618_exam:mygoods", {ac:"it618"},function (data, textStatus){
IT618_EXAM.get("http://moockxuecheng.com/plugin.php?id=it618_exam:ajax"+"&formhash=d5ae4f5c", {ac:"goods_get",ac1:"pcmygoods"},function (data1, textStatus){
var tmparr1=data1.split("it618_split");
var bodytmp=data;
bodytmp=bodytmp.replace("it618mysalesum",tmparr1[0]);
bodytmp=bodytmp.replace("it618mysalelist",tmparr1[1]);
bodytmp=bodytmp.replace("it618mysalepage",tmparr1[2]);
IT618_EXAM("#layer_mygoods").html(bodytmp);
}, "html");
}, "html");
});
//f514ae4101d812abcd44b7a3f7428701
IT618_EXAM("#mycollect").click(function(){
showlayerwin('mycollect',1,'我的收藏','',1200,610,1);
IT618_EXAM("#layer_mycollect").html('
');
IT618_EXAM.get("http://moockxuecheng.com/plugin.php?id=it618_exam:mycollect", {ac:"it618"},function (data, textStatus){
IT618_EXAM.get("http://moockxuecheng.com/plugin.php?id=it618_exam:ajax"+"&formhash=d5ae4f5c", {ac:"collectgoods_get",ac1:"pcmygoods"},function (data1, textStatus){
var tmparr1=data1.split("it618_split");
var bodytmp=data;
bodytmp=bodytmp.replace("it618mysalesum",tmparr1[0]);
bodytmp=bodytmp.replace("it618mysalelist",tmparr1[1]);
bodytmp=bodytmp.replace("it618mysalepage",tmparr1[2]);
IT618_EXAM("#layer_mycollect").html(bodytmp);
}, "html");
}, "html");
});
//71f939993bd4bf95121d70cc1fd2346e
IT618_EXAM("#mytest").click(function(){
showlayerwin('mytest',1,'我的成绩','',1200,610,1);
IT618_EXAM("#layer_mytest").html('
');
IT618_EXAM.get("http://moockxuecheng.com/plugin.php?id=it618_exam:mytest", {ac:"it618"},function (data, textStatus){
IT618_EXAM.get("http://moockxuecheng.com/plugin.php?id=it618_exam:ajax"+"&formhash=d5ae4f5c", {ac:"testlist_get",ac1:"pcmytest"},function (data1, textStatus){
var tmparr1=data1.split("it618_split");
var bodytmp=data;
bodytmp=bodytmp.replace("it618mysalesum",tmparr1[0]);
bodytmp=bodytmp.replace("it618mysalelist",tmparr1[1]);
bodytmp=bodytmp.replace("it618mysalepage",tmparr1[2]);
IT618_EXAM("#layer_mytest").html(bodytmp);
}, "html");
}, "html");
});
//f27656a9ecaa4a4fd08a27f01fc0ce2a
IT618_EXAM("#myutest").click(function(){
showlayerwin('myutest',1,'我的自测','',1200,610,1);
IT618_EXAM("#layer_myutest").html('
');
IT618_EXAM.get("http://moockxuecheng.com/plugin.php?id=it618_exam:myutest", {ac:"it618"},function (data, textStatus){
IT618_EXAM.get("http://moockxuecheng.com/plugin.php?id=it618_exam:ajax"+"&formhash=d5ae4f5c", {ac:"utestlist_get",ac1:"pcmyutest"},function (data1, textStatus){
var tmparr1=data1.split("it618_split");
var bodytmp=data;
bodytmp=bodytmp.replace("it618mysalesum",tmparr1[0]);
bodytmp=bodytmp.replace("it618mysalelist",tmparr1[1]);
bodytmp=bodytmp.replace("it618mysalepage",tmparr1[2]);
IT618_EXAM("#layer_myutest").html(bodytmp);
}, "html");
}, "html");
});
//248c0af1a765206a220bbba437408ef7
IT618_EXAM("#myerr").click(function(){
showlayerwin('myerr',1,'我的错题','',1200,610,1);
IT618_EXAM("#layer_myerr").html('
');
IT618_EXAM.get("http://moockxuecheng.com/plugin.php?id=it618_exam:myerr", {ac:"it618"},function (data, textStatus){
IT618_EXAM.get("http://moockxuecheng.com/plugin.php?id=it618_exam:ajax"+"&formhash=d5ae4f5c", {ac:"err_get",ac1:"pcmyerr"},function (data1, textStatus){
var tmparr1=data1.split("it618_split");
var bodytmp=data;
bodytmp=bodytmp.replace("it618mysalesum",tmparr1[0]);
bodytmp=bodytmp.replace("it618mysalelist",tmparr1[1]);
bodytmp=bodytmp.replace("it618mysalepage",tmparr1[2]);
IT618_EXAM("#layer_myerr").html(bodytmp);
}, "html");
}, "html");
});
//cbd2244dd49faf3a6bc960e2962d499c
IT618_EXAM("#myquestion").click(function(){
showlayerwin('myquestion',1,'我的题库','',1200,610,1);
IT618_EXAM("#layer_myquestion").html('
');
IT618_EXAM.get("http://moockxuecheng.com/plugin.php?id=it618_exam:myquestion", {ac:"it618"},function (data, textStatus){
IT618_EXAM.get("http://moockxuecheng.com/plugin.php?id=it618_exam:ajax"+"&formhash=d5ae4f5c", {ac:"myquestion_get",ac1:"pcmyquestion"},function (data1, textStatus){
var tmparr1=data1.split("it618_split");
var bodytmp=data;
bodytmp=bodytmp.replace("it618mysalesum",tmparr1[0]);
bodytmp=bodytmp.replace("it618mysalelist",tmparr1[1]);
bodytmp=bodytmp.replace("it618mysalepage",tmparr1[2]);
IT618_EXAM("#layer_myquestion").html(bodytmp);
}, "html");
}, "html");
});
//697c0ea108261281a8574ecc31a5edd2
IT618_EXAM("#myread").click(function(){
showlayerwin('myread',1,'我的查看','',1200,610,1);
IT618_EXAM("#layer_myread").html('
');
IT618_EXAM.get("http://moockxuecheng.com/plugin.php?id=it618_exam:myread", {ac:"it618"},function (data, textStatus){
IT618_EXAM.get("http://moockxuecheng.com/plugin.php?id=it618_exam:ajax"+"&formhash=d5ae4f5c", {ac:"myread_get",ac1:"pcmyread"},function (data1, textStatus){
var tmparr1=data1.split("it618_split");
var bodytmp=data;
bodytmp=bodytmp.replace("it618mysalesum",tmparr1[0]);
bodytmp=bodytmp.replace("it618mysalelist",tmparr1[1]);
bodytmp=bodytmp.replace("it618mysalepage",tmparr1[2]);
IT618_EXAM("#layer_myread").html(bodytmp);
laydate.render({trigger: "click",
elem: '#it618_time1'
});
laydate.render({trigger: "click",
elem: '#it618_time2'
});
}, "html");
}, "html");
});
//d5b1cc402a6dc80c3efb042a79b62f57
IT618_EXAM("#myadd").click(function(){
showlayerwin('myadd',1,'我的加入','',1200,610,1);
IT618_EXAM("#layer_myadd").html('
');
IT618_EXAM.get("http://moockxuecheng.com/plugin.php?id=it618_exam:myadd", {ac:"it618"},function (data, textStatus){
IT618_EXAM.get("http://moockxuecheng.com/plugin.php?id=it618_exam:ajax"+"&formhash=d5ae4f5c", {ac:"myadd_get",ac1:"pcmyadd"},function (data1, textStatus){
var tmparr1=data1.split("it618_split");
var bodytmp=data;
bodytmp=bodytmp.replace("it618mysalesum",tmparr1[0]);
bodytmp=bodytmp.replace("it618mysalelist",tmparr1[1]);
bodytmp=bodytmp.replace("it618mysalepage",tmparr1[2]);
IT618_EXAM("#layer_myadd").html(bodytmp);
laydate.render({trigger: "click",
elem: '#it618_time1'
});
laydate.render({trigger: "click",
elem: '#it618_time2'
});
}, "html");
}, "html");
});
//92c4dbcb0a5df6d12544e893e4f08404
IT618_EXAM("#mytestpj").click(function(){
showlayerwin('mytestpj',1,'试卷评价','',1200,610,1);
IT618_EXAM("#layer_mytestpj").html('
');
IT618_EXAM.get("http://moockxuecheng.com/plugin.php?id=it618_exam:mytestpj", {ac:"it618"},function (data, textStatus){
IT618_EXAM.get("http://moockxuecheng.com/plugin.php?id=it618_exam:ajax"+"&formhash=d5ae4f5c", {ac:"testpjlist_get",ac1:"pcmytestpj"},function (data1, textStatus){
var tmparr1=data1.split("it618_split");
var bodytmp=data;
bodytmp=bodytmp.replace("it618mysalesum",tmparr1[0]);
bodytmp=bodytmp.replace("it618mysalelist",tmparr1[1]);
bodytmp=bodytmp.replace("it618mysalepage",tmparr1[2]);
bodytmp=bodytmp.replace("it618myjfcount",tmparr1[3]);
IT618_EXAM("#layer_mytestpj").html(bodytmp);
}, "html");
}, "html");
});
});
function delcollect(cid){
IT618_EXAM.get("http://moockxuecheng.com/plugin.php?id=it618_exam:ajax&cid="+cid+"&formhash=d5ae4f5c",{ac:"delcollect"},function (data, textStatus){
alert(data);
getmycollectlist(document.getElementById("mysaleurl").value);
}, "html");
}
function saveadderrset(obj){
var isadderr=0;
if(obj.checked)isadderr=1;
IT618_EXAM.get("http://moockxuecheng.com/plugin.php?id=it618_exam:ajax"+"&isadderr="+isadderr+"&formhash=d5ae4f5c", {ac:"saveadderrset"},function (data1, textStatus){
}, "html");
}
var sqlurl="";
function getmysalelist(url){
document.getElementById("img_loading").style.display="";
document.getElementById("mysalelist").style.display="none";
IT618_EXAM.get(url+sqlurl+"&formhash=d5ae4f5c", {ac:"salelist_get",ac1:"pcmysale"},function (data, textStatus){
var tmparr=data.split("it618_split");
IT618_EXAM("#mysalesum").html(tmparr[0]);
IT618_EXAM("#mysalelist").html(tmparr[1]);
IT618_EXAM("#mysalepage").html(tmparr[2]);
IT618_EXAM("#myjfcount").html(tmparr[3]);
document.getElementById("mysaleurl").value=url;
document.getElementById("img_loading").style.display="none";
document.getElementById("mysalelist").style.display="";
}, "html");
}
function searchmysale(){
if(parseInt(document.getElementById("it618_time1").value.replace(/-/g,""))>parseInt(document.getElementById("it618_time2").value.replace(/-/g,""))){
alert("开始日期不能大于截止日期!");
return false;
}
var mysalepname=document.getElementById("mysalepname").value;
var it618_time1=document.getElementById("it618_time1").value;
var it618_time2=document.getElementById("it618_time2").value;
sqlurl="&pname="+mysalepname+"&it618_time1="+it618_time1+"&it618_time2="+it618_time2;
url="http://moockxuecheng.com/plugin.php?id=it618_exam:ajax";
getmysalelist(url);
document.getElementById("mysaleurl").value=url;
}
function getmysubscribelist(url){
document.getElementById("img_loading").style.display="";
document.getElementById("mysalelist").style.display="none";
IT618_EXAM.get(url+sqlurl+"&formhash=d5ae4f5c", {ac:"subscribe_get",ac1:"pcmysubscribe"},function (data, textStatus){
var tmparr=data.split("it618_split");
IT618_EXAM("#mysalesum").html(tmparr[0]);
IT618_EXAM("#mysalelist").html(tmparr[1]);
IT618_EXAM("#mysalepage").html(tmparr[2]);
document.getElementById("mysaleurl").value=url;
document.getElementById("img_loading").style.display="none";
document.getElementById("mysalelist").style.display="";
}, "html");
}
function searchmysubscribe(){
url="http://moockxuecheng.com/plugin.php?id=it618_exam:ajax";
getmysubscribelist(url);
document.getElementById("mysaleurl").value=url;
}
var sqlurl="";
function getmygoodslist(url){
document.getElementById("img_loading").style.display="";
document.getElementById("mysalelist").style.display="none";
IT618_EXAM.get(url+sqlurl+"&formhash=d5ae4f5c", {ac:"goods_get",ac1:"pcmygoods"},function (data, textStatus){
var tmparr=data.split("it618_split");
IT618_EXAM("#mysalesum").html(tmparr[0]);
IT618_EXAM("#mysalelist").html(tmparr[1]);
IT618_EXAM("#mysalepage").html(tmparr[2]);
document.getElementById("mysaleurl").value=url;
document.getElementById("img_loading").style.display="none";
document.getElementById("mysalelist").style.display="";
}, "html");
}
function searchmygoods(){
var pname=document.getElementById("pname").value;
sqlurl="&pname="+pname;
url="http://moockxuecheng.com/plugin.php?id=it618_exam:ajax";
getmygoodslist(url);
document.getElementById("mysaleurl").value=url;
}
var sqlurl="";
function getmycollectlist(url){
document.getElementById("img_loading").style.display="";
document.getElementById("mysalelist").style.display="none";
IT618_EXAM.get(url+sqlurl+"&formhash=d5ae4f5c", {ac:"collectgoods_get",ac1:"pcmygoods"},function (data, textStatus){
var tmparr=data.split("it618_split");
IT618_EXAM("#mysalesum").html(tmparr[0]);
IT618_EXAM("#mysalelist").html(tmparr[1]);
IT618_EXAM("#mysalepage").html(tmparr[2]);
document.getElementById("mysaleurl").value=url;
document.getElementById("img_loading").style.display="none";
document.getElementById("mysalelist").style.display="";
}, "html");
}
function searchmycollect(){
var pname=document.getElementById("pname").value;
sqlurl="&pname="+pname;
url="http://moockxuecheng.com/plugin.php?id=it618_exam:ajax";
getmycollectlist(url);
document.getElementById("mysaleurl").value=url;
}
var sqlurl="";
function getmyreadlist(url){
document.getElementById("img_loading").style.display="";
document.getElementById("mysalelist").style.display="none";
IT618_EXAM.get(url+sqlurl+"&formhash=d5ae4f5c", {ac:"myread_get",ac1:"pcmyread"},function (data, textStatus){
var tmparr=data.split("it618_split");
IT618_EXAM("#mysalesum").html(tmparr[0]);
IT618_EXAM("#mysalelist").html(tmparr[1]);
IT618_EXAM("#mysalepage").html(tmparr[2]);
document.getElementById("mysaleurl").value=url;
document.getElementById("img_loading").style.display="none";
document.getElementById("mysalelist").style.display="";
}, "html");
}
function searchmyread(){
var pname=document.getElementById("pname").value;
sqlurl="&pname="+pname;
url="http://moockxuecheng.com/plugin.php?id=it618_exam:ajax";
getmyreadlist(url);
document.getElementById("mysaleurl").value=url;
}
var sqlurl="";
function getmyaddlist(url){
document.getElementById("img_loading").style.display="";
document.getElementById("mysalelist").style.display="none";
IT618_EXAM.get(url+sqlurl+"&formhash=d5ae4f5c", {ac:"myadd_get",ac1:"pcmyadd"},function (data, textStatus){
var tmparr=data.split("it618_split");
IT618_EXAM("#mysalesum").html(tmparr[0]);
IT618_EXAM("#mysalelist").html(tmparr[1]);
IT618_EXAM("#mysalepage").html(tmparr[2]);
document.getElementById("mysaleurl").value=url;
document.getElementById("img_loading").style.display="none";
document.getElementById("mysalelist").style.display="";
}, "html");
}
function searchmyadd(){
var pname=document.getElementById("pname").value;
sqlurl="&pname="+pname;
url="http://moockxuecheng.com/plugin.php?id=it618_exam:ajax";
getmyaddlist(url);
document.getElementById("mysaleurl").value=url;
}
var sqlurl="";
function getmyquestionlist(url){
document.getElementById("img_loading").style.display="";
document.getElementById("mysalelist").style.display="none";
IT618_EXAM.get(url+sqlurl+"&formhash=d5ae4f5c", {ac:"myquestion_get",ac1:"pcmyquestion"},function (data, textStatus){
var tmparr=data.split("it618_split");
IT618_EXAM("#mysalesum").html(tmparr[0]);
IT618_EXAM("#mysalelist").html(tmparr[1]);
IT618_EXAM("#mysalepage").html(tmparr[2]);
document.getElementById("mysaleurl").value=url;
document.getElementById("img_loading").style.display="none";
document.getElementById("mysalelist").style.display="";
}, "html");
}
function searchmyquestion(){
var pname=document.getElementById("pname").value;
sqlurl="&pname="+pname;
url="http://moockxuecheng.com/plugin.php?id=it618_exam:ajax";
getmyquestionlist(url);
document.getElementById("mysaleurl").value=url;
}
function checkquestion(obj){
var qids=document.getElementById("qids").value;
var tmparr=qids.split(",");
for(var i=0;i0)document.getElementById("chk_q"+tmparr[i]).checked=obj.checked;
}
}
function delquestion(){
var qidchks="";
var qids=document.getElementById("qids").value;
var tmparr=qids.split(",");
for(var i=0;i0){
if(document.getElementById("chk_q"+tmparr[i]).checked){
qidchks=qidchks+"@"+tmparr[i];
}
}
}
if(qidchks==""){
alert("抱歉,请先选择要删除的题目!");
return;
}
if(confirm("确定要删除选中题目?此操作不可逆!")){
IT618_EXAM.get("http://moockxuecheng.com/plugin.php?id=it618_exam:ajax&qids="+qidchks+"&formhash=d5ae4f5c", {ac:"myquestion_del"},function (data, textStatus){
var tmparr=data.split("it618_split");
if(tmparr[1]=="ok"){
alert(tmparr[2]);
getmyquestionlist(document.getElementById("mysaleurl").value);
}else{
alert(data);
}
document.getElementById("chkallDx4b").checked=false;
}, "html");
}
}
function clearquestion(){
if(confirm("确定要清空所有题目?此操作不可逆!")){
IT618_EXAM.get("http://moockxuecheng.com/plugin.php?id=it618_exam:ajax"+"&formhash=d5ae4f5c", {ac:"myquestion_clear"},function (data, textStatus){
var tmparr=data.split("it618_split");
if(tmparr[1]=="ok"){
alert(tmparr[2]);
getmyquestionlist(document.getElementById("mysaleurl").value);
}
}, "html");
}
}
var sqlurl="";
function getmyerrlist(url){
document.getElementById("img_loading").style.display="";
document.getElementById("mysalelist").style.display="none";
IT618_EXAM.get(url+sqlurl+"&formhash=d5ae4f5c", {ac:"err_get",ac1:"pcmyerr"},function (data, textStatus){
var tmparr=data.split("it618_split");
IT618_EXAM("#mysalesum").html(tmparr[0]);
IT618_EXAM("#mysalelist").html(tmparr[1]);
IT618_EXAM("#mysalepage").html(tmparr[2]);
document.getElementById("mysaleurl").value=url;
document.getElementById("img_loading").style.display="none";
document.getElementById("mysalelist").style.display="";
}, "html");
}
function searchmyerr(){
var pname=document.getElementById("pname").value;
var eid=document.getElementById("eid").value;
sqlurl="&pname="+pname+"&eid="+eid;
url="http://moockxuecheng.com/plugin.php?id=it618_exam:ajax";
getmyerrlist(url);
document.getElementById("mysaleurl").value=url;
}
function checkerr(obj){
var qids=document.getElementById("qids").value;
var tmparr=qids.split(",");
for(var i=0;i0)document.getElementById("chk_q"+tmparr[i]).checked=obj.checked;
}
}
function delerr(){
var qidchks="";
var qids=document.getElementById("qids").value;
var tmparr=qids.split(",");
for(var i=0;i0){
if(document.getElementById("chk_q"+tmparr[i]).checked){
qidchks=qidchks+"@"+tmparr[i];
}
}
}
if(qidchks==""){
alert("抱歉,请先选择要删除的题目!");
return;
}
if(confirm("确定要删除选中题目?此操作不可逆!")){
IT618_EXAM.get("http://moockxuecheng.com/plugin.php?id=it618_exam:ajax&qids="+qidchks+"&formhash=d5ae4f5c", {ac:"err_del"},function (data, textStatus){
var tmparr=data.split("it618_split");
if(tmparr[1]=="ok"){
alert(tmparr[2]);
getmyerrlist(document.getElementById("mysaleurl").value);
}else{
alert(data);
}
document.getElementById("chkallDx4b").checked=false;
}, "html");
}
}
function clearerr(){
if(confirm("确定要清空所有题目?此操作不可逆!")){
IT618_EXAM.get("http://moockxuecheng.com/plugin.php?id=it618_exam:ajax"+"&formhash=d5ae4f5c", {ac:"err_clear"},function (data, textStatus){
var tmparr=data.split("it618_split");
if(tmparr[1]=="ok"){
alert(tmparr[2]);
getmyerrlist(document.getElementById("mysaleurl").value);
}
}, "html");
}
}
var sqlurl="";
function getmytestlist(url){
document.getElementById("img_loading").style.display="";
document.getElementById("mysalelist").style.display="none";
IT618_EXAM.get(url+sqlurl+"&formhash=d5ae4f5c", {ac:"testlist_get",ac1:"pcmytest"},function (data, textStatus){
var tmparr=data.split("it618_split");
IT618_EXAM("#mysalesum").html(tmparr[0]);
IT618_EXAM("#mysalelist").html(tmparr[1]);
IT618_EXAM("#mysalepage").html(tmparr[2]);
document.getElementById("mysaleurl").value=url;
document.getElementById("img_loading").style.display="none";
document.getElementById("mysalelist").style.display="";
}, "html");
}
function searchmytest(){
var pname=document.getElementById("pname").value;
sqlurl="&pname="+pname;
url="http://moockxuecheng.com/plugin.php?id=it618_exam:ajax";
getmytestlist(url);
document.getElementById("mysaleurl").value=url;
}
var sqlurl="";
function getmyutestlist(url){
document.getElementById("img_loading").style.display="";
document.getElementById("mysalelist").style.display="none";
IT618_EXAM.get(url+sqlurl+"&formhash=d5ae4f5c", {ac:"utestlist_get",ac1:"pcmyutest"},function (data, textStatus){
var tmparr=data.split("it618_split");
IT618_EXAM("#mysalesum").html(tmparr[0]);
IT618_EXAM("#mysalelist").html(tmparr[1]);
IT618_EXAM("#mysalepage").html(tmparr[2]);
document.getElementById("mysaleurl").value=url;
document.getElementById("img_loading").style.display="none";
document.getElementById("mysalelist").style.display="";
}, "html");
}
function searchmyutest(){
var pname=document.getElementById("pname").value;
sqlurl="&pname="+pname;
url="http://moockxuecheng.com/plugin.php?id=it618_exam:ajax";
getmyutestlist(url);
document.getElementById("mysaleurl").value=url;
}
var sqlurl="";
function getmytestpjlist(url){
document.getElementById("img_loading").style.display="";
document.getElementById("mysalelist").style.display="none";
IT618_EXAM.get(url+sqlurl+"&formhash=d5ae4f5c", {ac:"testpjlist_get",ac1:"pcmytestpj"},function (data, textStatus){
var tmparr=data.split("it618_split");
IT618_EXAM("#mysalesum").html(tmparr[0]);
IT618_EXAM("#mysalelist").html(tmparr[1]);
IT618_EXAM("#mysalepage").html(tmparr[2]);
IT618_EXAM("#myjfcount").html(tmparr[3]);
document.getElementById("mysaleurl").value=url;
document.getElementById("img_loading").style.display="none";
document.getElementById("mysalelist").style.display="";
}, "html");
}
function searchmytestpj(){
var pname=document.getElementById("pname").value;
sqlurl="&pname="+pname;
url="http://moockxuecheng.com/plugin.php?id=it618_exam:ajax";
getmytestpjlist(url);
document.getElementById("mysaleurl").value=url;
}
var pjtype,pjtype1;
function settestpj(testpjid){
pjtype='testpj';
pjtype1='testpj';
gettestpj(testpjid);
}
function goodstestpj(testpjid,pjtypetmp){
pjtype='testpj';
pjtype1=pjtypetmp;
gettestpj(testpjid);
}
function hftestpj(testpjid){
IT618_EXAM.get("http://moockxuecheng.com/plugin.php?id=it618_exam:hftestpj"+"&testpjid="+testpjid, {ac:"it618"},function (data, textStatus){
var tmparr=data.split("it618_split");
showlayerwin('gethfsalepj',1,tmparr[0],tmparr[1],523,398,0);
IT618_EXAM('.ns-sub-a').click(function(){
var it618_content=document.getElementById("hfvalue").value;
if(it618_content==''){
alert("抱歉,请输入评价回复内容!");
return;
}
if(confirm("确定要提交评价回复内容?")){
document.getElementById("hfvalue").value=it618_content.replace(/\n/g,"[br]");
IT618_EXAM.post("http://moockxuecheng.com/plugin.php?id=it618_exam:ajax"+"&ac=hftestpj&testpjid="+testpjid+"&formhash=d5ae4f5c",IT618_EXAM("#it618_hftestpj").serialize(),function (data, textStatus){
var tmparr=data.split("it618_split");
if(tmparr[0]=="ok"){
alert(tmparr[1]);
layer.close(layerclose['gethfsalepj']);
getpjlist(pjurl);
}else{
alert(data);
}
}, "html");
}
})
IT618_EXAM('.ns-sub-b').click(function(){
layer.close(layerclose['gethfsalepj']);
})
}, "html");
}
var K;
KindEditor.ready(function(ktmp) {
K=ktmp;
});
var ispjpicdel=0;
var ish5oss=0;
function gettestpj(testpjid){
IT618_EXAM.get("http://moockxuecheng.com/plugin.php?id=it618_exam:testpj"+"&testpjid="+testpjid, {ac:"it618"},function (data, textStatus){
var tmparr=data.split("it618_split");
showlayerwin('getsalepj',1,tmparr[0],tmparr[1],523,398,0);
var editor = K.editor({
uploadJson : 'source/plugin/it618_exam/kindeditor/php/upload_json.php?uid='+tmparr[4]+'&imgwidth=680',
fileManagerJson : 'source/plugin/it618_exam/kindeditor/php/file_manager_json.php?uid='+tmparr[4],
allowFileManager : true
});
K('#pjpic_addbtn').click(function() {
if(document.getElementById("pjpiccount").value>=5){
return;
}
if(ish5oss==1){
getimagejs(pjtype,testpjid);
}else{
editor.loadPlugin('image', function() {
editor.plugin.imageDialog({
showRemote : false,
clickFn : function(url, title, width, height, border, align) {
IT618_EXAM.get("http://moockxuecheng.com/plugin.php?id=it618_exam:ajax"+"&ac="+pjtype+"&testpjid="+testpjid+"&picurl="+url+"&formhash=d5ae4f5c",{ac1:"addpjpic"},function (data, textStatus){
getpjpic(testpjid);
}, "html");
editor.hideDialog();
}
});
var dlgh=K(".ke-dialog-default").height;
var dlgw=K(".ke-dialog-default").width;
var ntop=(window.innerHeight-dlgh)/2;
var nleft=(window.innerWidth-dlgw)/2;
K(".ke-dialog-default").css({"top":ntop,"left":nleft});
});
}
});
getpjpic(testpjid);
starh('.sp_a','.ias');
starh('.sp_b','.ibs');
starh('.sp_c','.ics');
starh('.sp_d','.ids');
if(tmparr[3]!='')window.eval(tmparr[3]);
IT618_EXAM('.ns-sub-a').click(function(){
if (IT618_EXAM('.doo').find('span').hasClass('mag')){
IT618_EXAM('.doo .mag').show();
}else{
var it618_content=document.getElementById("pjvalue").value;
if(getstrlen(it618_content)<5){
alert("评价内容字数至少5个!");
return false;
}
if(getstrlen(it618_content)>400){
alert("评价内容字数最多400个!");
return false;
}
if(confirm(tmparr[2])){
var score1 = IT618_EXAM('.sp_a').find('a').filter('.ns-sider-star').length;
var score2 = IT618_EXAM('.sp_b').find('a').filter('.ns-sider-star').length;
var score3 = IT618_EXAM('.sp_c').find('a').filter('.ns-sider-star').length;
var score4 = IT618_EXAM('.sp_d').find('a').filter('.ns-sider-star').length;
var score=score1+'@'+score2+'@'+score3+'@'+score4;
document.getElementById("pjvalue").value=it618_content.replace(/\n/g,"[br]");
IT618_EXAM.post("http://moockxuecheng.com/plugin.php?id=it618_exam:ajax"+"&ac="+pjtype+"&testpjid="+testpjid+"&score="+score+"&formhash=d5ae4f5c",IT618_EXAM("#it618_testpj").serialize(),function (data, textStatus){
var tmparr=data.split("it618_split");
if(tmparr[0]=="ok"){
alert(tmparr[1]);
layer.close(layerclose['getsalepj']);
if(pjtype=='testpj'){
if(pjtype1=='playpj'){
getmytestpjlist(document.getElementById("mysaleurl").value);
}else{
location.reload();
}
}else{
if(ispj==1){
getsalelist(salelisturl);
getpjlist(pjlisturl);
}else{
location.reload();
}
}
}else if(tmparr[0]=="editok"){
alert(tmparr[1]);
layer.close(layerclose['getsalepj']);
getpjlist(pjurl);
}else{
alert(data);
}
}, "html");
}
}
})
IT618_EXAM('.ns-sub-b').click(function(){
layer.close(layerclose['getsalepj']);
})
}, "html");
}
function starh(spans,ia){
var _span=IT618_EXAM(spans);
var _star=_span.find('a');
var _ias=IT618_EXAM(ia);
var _i=_ias.find('i');
_star.hover(function(){
var index=_span.index(this);
var indexs=_star.index(this);
if (_i.hasClass('ns-star-tag'))
{return;}
else {
_ias.eq(index).addClass('ns-star-tags');
_i.removeClass('ns-star-tags');
_i.eq(indexs).addClass('ns-star-tags');
}
IT618_EXAM(this).addClass('ns-sider-starc');
IT618_EXAM(this).prevAll().addClass('ns-sider-starc');
IT618_EXAM(this).nextAll().removeClass('ns-sider-starc');
},function(){
_star.removeClass('ns-sider-starc');
_ias.removeClass('ns-star-tags');
_i.removeClass('ns-star-tags');
})
_star.click(function(){
var index=_span.index(this);
var indexs=_star.index(this);
_i.removeClass('ns-star-tag');
_i.eq(indexs).addClass('ns-star-tag');
_ias.eq(index).addClass('ns-star-tag');
IT618_EXAM(this).addClass('ns-sider-star');
IT618_EXAM(this).prevAll().addClass('ns-sider-star');
IT618_EXAM(this).nextAll().removeClass('ns-sider-star');
IT618_EXAM(this).parents('li').removeClass('doo');
var sb=IT618_EXAM(this).parents('li').find('span');
var sa=sb.eq(2).hide();
})
}
function getbigpjpic(pjid,bigpjpic){
IT618_EXAM("#bigpjpic"+pjid).html("
");
IT618_EXAM("#bigpjpic"+pjid).show();
}
function hidebigpjpic(obj){
obj.style.display='none';
}
function delpjpic(pjid,pjpicid){
IT618_EXAM.get("http://moockxuecheng.com/plugin.php?id=it618_exam:ajax"+"&ac="+pjtype+"&testpjid="+pjid+"&pjpicid="+pjpicid+"&formhash=d5ae4f5c",{ac1:"delpjpic"},function (data, textStatus){
getpjpic(pjid);
}, "html");
}
function getpjpic(pjid){
IT618_EXAM.get("http://moockxuecheng.com/plugin.php?id=it618_exam:ajax"+"&testpjid="+pjid+"&formhash=d5ae4f5c", {ac:"getpjpic"},function (data, textStatus){
IT618_EXAM("#divpjpic").html(data);
}, "html");
}
function getstrlen(str) {
var realLength = 0, len = str.length, charCode = -1;
for (var i = 0; i < len; i++) {
charCode = str.charCodeAt(i);
if (charCode >= 0 && charCode <= 128) realLength += 1;
else realLength += 2;
}
return realLength;
}
function getstrlenspan(str){
var strlen=getstrlen(str);
if(strlen<5){document.getElementById('strlentips').innerHTML='评价内容字数至少5个!';return;}
if(strlen>400){document.getElementById('strlentips').innerHTML='评价内容字数最多400个!';return;}
document.getElementById('strlentips').innerHTML='您输入了'+strlen+'个字!';
}