// 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("https://5ish.net/plugin.php?id=it618_exam:ajax"+"&ac=renzheng&formhash=45651982",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("https://5ish.net/plugin.php?id=it618_exam:ajax&stylename="+stylename+"&formhash=45651982", {ac:"pcstyle"},function (data, textStatus){
if(data=="ok"){
location.reload();
}
}, "html");
}
IT618_EXAM.ajaxSetup({cache:false});
var dialog_renzheng;
KindEditor.ready(function(K) {K('.renzheng').click(function() {
getrenzheng(K);
});});
var dialog_mysale;
KindEditor.ready(function(K) {K('#mysale').click(function() {
getmysale(K);
});});
var dialog_mysubscribe;
KindEditor.ready(function(K) {K('#mysubscribe').click(function() {
getmysubscribe(K);
});});
var dialog_mygoods;
KindEditor.ready(function(K) {K('#mygoods').click(function() {
getmygoods(K);
});});
var dialog_mycollect;
KindEditor.ready(function(K) {K('#mycollect').click(function() {
getmycollect(K);
});});
var dialog_myerr;
KindEditor.ready(function(K) {K('#myerr').click(function() {
getmyerr(K);
});});
var dialog_mytest;
KindEditor.ready(function(K) {K('#mytest').click(function() {
getmytest(K);
});});
var dialog_myutest;
KindEditor.ready(function(K) {K('#myutest').click(function() {
getmyutest(K);
});});
var dialog_mytestpj;
KindEditor.ready(function(K) {K('#mytestpj').click(function() {
getmytestpj(K);
});});
var dialog_testpj,dialog_hftestpj,testpjid=0;
KindEditor.ready(function(K) {K('#testpj').click(function() {
gettestpj(K);
});});
KindEditor.ready(function(K) {K('#hftestpj').click(function() {
gethftestpj(K);
});});
function getrenzheng(K){
IT618_EXAM(".it618_members_login").click();return;
IT618_EXAM.get("https://5ish.net/plugin.php?id=it618_exam:showrenzheng", {ac:"add"},function (data, textStatus){
var tmparr=data.split("it618_split");
dialog_renzheng = K.dialog({
width : 1100,
height: 520,
title : tmparr[0],
body : '
'+tmparr[1]+'
',
closeBtn : {
name : '关闭',
click : function(e) {
dialog_renzheng.remove();
}
}
});
}, "html");
}
function getmysale(K){
IT618_EXAM.get("https://5ish.net/plugin.php?id=it618_exam:mysale", {ac:"add"},function (data, textStatus){
IT618_EXAM.get("https://5ish.net/plugin.php?id=it618_exam:ajax"+"&formhash=45651982", {ac:"salelist_get",ac1:"pcmysale"},function (data1, textStatus){
var tmparr=data.split("it618_split");
var tmparr1=data1.split("it618_split");
var bodytmp=tmparr[1];
bodytmp=bodytmp.replace("it618mysalesum",tmparr1[0]);
bodytmp=bodytmp.replace("it618mysalelist",tmparr1[1]);
bodytmp=bodytmp.replace("it618mysalepage",tmparr1[2]);
bodytmp=bodytmp.replace("it618myjfcount",tmparr1[3]);
dialog_mysale = K.dialog({
width : 1200,
height: 630,
title : tmparr[0],
body : bodytmp,
closeBtn : {
name : '关闭',
click : function(e) {
dialog_mysale.remove();
}
}
});
}, "html");
}, "html");
}
function getmysubscribe(K){
IT618_EXAM.get("https://5ish.net/plugin.php?id=it618_exam:mysubscribe", {ac:"it618"},function (data, textStatus){
IT618_EXAM.get("https://5ish.net/plugin.php?id=it618_exam:ajax"+"&formhash=45651982", {ac:"subscribe_get",ac1:"pcmysubscribe"},function (data1, textStatus){
var tmparr=data.split("it618_split");
var tmparr1=data1.split("it618_split");
var bodytmp=tmparr[1];
bodytmp=bodytmp.replace("it618mysalesum",tmparr1[0]);
bodytmp=bodytmp.replace("it618mysalelist",tmparr1[1]);
bodytmp=bodytmp.replace("it618mysalepage",tmparr1[2]);
dialog_mytest = K.dialog({
width : 1000,
height: 630,
title : tmparr[0],
body : bodytmp,
closeBtn : {
name : '关闭',
click : function(e) {
dialog_mytest.remove();
}
}
});
}, "html");
}, "html");
}
function getmygoods(K){
IT618_EXAM.get("https://5ish.net/plugin.php?id=it618_exam:mygoods", {ac:"it618"},function (data, textStatus){
IT618_EXAM.get("https://5ish.net/plugin.php?id=it618_exam:ajax"+"&formhash=45651982", {ac:"goods_get",ac1:"pcmygoods"},function (data1, textStatus){
var tmparr=data.split("it618_split");
var tmparr1=data1.split("it618_split");
var bodytmp=tmparr[1];
bodytmp=bodytmp.replace("it618mysalesum",tmparr1[0]);
bodytmp=bodytmp.replace("it618mysalelist",tmparr1[1]);
bodytmp=bodytmp.replace("it618mysalepage",tmparr1[2]);
dialog_mytest = K.dialog({
width : 1000,
height: 630,
title : tmparr[0],
body : bodytmp,
closeBtn : {
name : '关闭',
click : function(e) {
dialog_mytest.remove();
}
}
});
}, "html");
}, "html");
}
function getmycollect(K){
IT618_EXAM.get("https://5ish.net/plugin.php?id=it618_exam:mycollect", {ac:"it618"},function (data, textStatus){
IT618_EXAM.get("https://5ish.net/plugin.php?id=it618_exam:ajax"+"&formhash=45651982", {ac:"collectgoods_get",ac1:"pcmygoods"},function (data1, textStatus){
var tmparr=data.split("it618_split");
var tmparr1=data1.split("it618_split");
var bodytmp=tmparr[1];
bodytmp=bodytmp.replace("it618mysalesum",tmparr1[0]);
bodytmp=bodytmp.replace("it618mysalelist",tmparr1[1]);
bodytmp=bodytmp.replace("it618mysalepage",tmparr1[2]);
dialog_myplay = K.dialog({
width : 1100,
height: 630,
title : tmparr[0],
body : bodytmp,
closeBtn : {
name : '',
click : function(e) {
dialog_myplay.remove();
}
}
});
}, "html");
}, "html");
}
function delcollect(cid){
IT618_EXAM.get("https://5ish.net/plugin.php?id=it618_exam:ajax&cid="+cid+"&formhash=45651982",{ac:"delcollect"},function (data, textStatus){
alert(data);
getmycollectlist(document.getElementById("mysaleurl").value);
}, "html");
}
function getmyerr(K){
IT618_EXAM.get("https://5ish.net/plugin.php?id=it618_exam:myerr", {ac:"it618"},function (data, textStatus){
IT618_EXAM.get("https://5ish.net/plugin.php?id=it618_exam:ajax"+"&formhash=45651982", {ac:"err_get",ac1:"pcmyerr"},function (data1, textStatus){
var tmparr=data.split("it618_split");
var tmparr1=data1.split("it618_split");
var bodytmp=tmparr[1];
bodytmp=bodytmp.replace("it618mysalesum",tmparr1[0]);
bodytmp=bodytmp.replace("it618mysalelist",tmparr1[1]);
bodytmp=bodytmp.replace("it618mysalepage",tmparr1[2]);
dialog_myerr = K.dialog({
width : 1200,
height: 610,
title : tmparr[0],
body : bodytmp,
closeBtn : {
name : '关闭',
click : function(e) {
dialog_myerr.remove();
}
}
});
}, "html");
}, "html");
}
function saveadderrset(obj){
var isadderr=0;
if(obj.checked)isadderr=1;
IT618_EXAM.get("https://5ish.net/plugin.php?id=it618_exam:ajax"+"&isadderr="+isadderr+"&formhash=45651982", {ac:"saveadderrset"},function (data1, textStatus){
}, "html");
}
function getmytest(K){
IT618_EXAM.get("https://5ish.net/plugin.php?id=it618_exam:mytest", {ac:"it618"},function (data, textStatus){
IT618_EXAM.get("https://5ish.net/plugin.php?id=it618_exam:ajax"+"&formhash=45651982", {ac:"testlist_get",ac1:"pcmytest"},function (data1, textStatus){
var tmparr=data.split("it618_split");
var tmparr1=data1.split("it618_split");
var bodytmp=tmparr[1];
bodytmp=bodytmp.replace("it618mysalesum",tmparr1[0]);
bodytmp=bodytmp.replace("it618mysalelist",tmparr1[1]);
bodytmp=bodytmp.replace("it618mysalepage",tmparr1[2]);
dialog_mytest = K.dialog({
width : 1000,
height: 630,
title : tmparr[0],
body : bodytmp,
closeBtn : {
name : '关闭',
click : function(e) {
dialog_mytest.remove();
}
}
});
}, "html");
}, "html");
}
function getmyutest(K){
IT618_EXAM.get("https://5ish.net/plugin.php?id=it618_exam:myutest", {ac:"it618"},function (data, textStatus){
IT618_EXAM.get("https://5ish.net/plugin.php?id=it618_exam:ajax"+"&formhash=45651982", {ac:"utestlist_get",ac1:"pcmyutest"},function (data1, textStatus){
var tmparr=data.split("it618_split");
var tmparr1=data1.split("it618_split");
var bodytmp=tmparr[1];
bodytmp=bodytmp.replace("it618mysalesum",tmparr1[0]);
bodytmp=bodytmp.replace("it618mysalelist",tmparr1[1]);
bodytmp=bodytmp.replace("it618mysalepage",tmparr1[2]);
dialog_myutest = K.dialog({
width : 1000,
height: 630,
title : tmparr[0],
body : bodytmp,
closeBtn : {
name : '关闭',
click : function(e) {
dialog_myutest.remove();
}
}
});
}, "html");
}, "html");
}
function getmytestpj(K){
IT618_EXAM.get("https://5ish.net/plugin.php?id=it618_exam:mytestpj", {ac:"it618"},function (data, textStatus){
IT618_EXAM.get("https://5ish.net/plugin.php?id=it618_exam:ajax"+"&formhash=45651982", {ac:"testpjlist_get",ac1:"pcmytestpj"},function (data1, textStatus){
var tmparr=data.split("it618_split");
var tmparr1=data1.split("it618_split");
var bodytmp=tmparr[1];
bodytmp=bodytmp.replace("it618mysalesum",tmparr1[0]);
bodytmp=bodytmp.replace("it618mysalelist",tmparr1[1]);
bodytmp=bodytmp.replace("it618mysalepage",tmparr1[2]);
bodytmp=bodytmp.replace("it618myjfcount",tmparr1[3]);
dialog_mytest = K.dialog({
width : 1000,
height: 630,
title : tmparr[0],
body : bodytmp,
closeBtn : {
name : '关闭',
click : function(e) {
dialog_mytest.remove();
}
}
});
}, "html");
}, "html");
}
var sqlurl="";
function getmysalelist(url){
document.getElementById("img_loading").style.display="";
document.getElementById("mysalelist").style.display="none";
IT618_EXAM.get(url+sqlurl+"&formhash=45651982", {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="https://5ish.net/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=45651982", {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="https://5ish.net/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=45651982", {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="https://5ish.net/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=45651982", {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="https://5ish.net/plugin.php?id=it618_exam:ajax";
getmycollectlist(url);
document.getElementById("mysaleurl").value=url;
}
var sqlurl="";
function getmyerrlist(url){
document.getElementById("img_loading").style.display="";
document.getElementById("mysalelist").style.display="none";
IT618_EXAM.get(url+sqlurl+"&formhash=45651982", {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="https://5ish.net/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("https://5ish.net/plugin.php?id=it618_exam:ajax&qids="+qidchks+"&formhash=45651982", {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("https://5ish.net/plugin.php?id=it618_exam:ajax"+"&formhash=45651982", {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=45651982", {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="https://5ish.net/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=45651982", {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="https://5ish.net/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=45651982", {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="https://5ish.net/plugin.php?id=it618_exam:ajax";
getmytestpjlist(url);
document.getElementById("mysaleurl").value=url;
}
var pjtype,pjtype1;
function settestpj(pjid){
if(testpjid==0){
testpjid=pjid;
pjtype='testpj';
pjtype1='testpj';
IT618_EXAM("#testpj").click();
}
}
function goodstestpj(pjid,pjtypetmp){
if(testpjid==0){
testpjid=pjid;
pjtype='testpj';
pjtype1=pjtypetmp;
IT618_EXAM("#testpj").click();
}
}
function hftestpj(pjid){
if(testpjid==0){
testpjid=pjid;
IT618_EXAM("#hftestpj").click();
}
}
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();
})
}
var ispjpicdel=0;
function gettestpj(K){
IT618_EXAM.get("https://5ish.net/plugin.php?id=it618_exam:testpj"+"&testpjid="+testpjid, {ac:"it618"},function (data, textStatus){
var tmparr=data.split("it618_split");
dialog_testpj = K.dialog({
width : 520,
title : tmparr[0],
body : ''+tmparr[1]+'
',
closeBtn : {
name : '关闭',
click : function(e) {
dialog_testpj.remove();
testpjid=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;
}
editor.loadPlugin('image', function() {
editor.plugin.imageDialog({
showRemote : false,
clickFn : function(url, title, width, height, border, align) {
IT618_EXAM.get("https://5ish.net/plugin.php?id=it618_exam:ajax"+"&ac="+pjtype+"&testpjid="+testpjid+"&picurl="+url+"&formhash=45651982",{ac1:"addpjpic"},function (data, textStatus){
getpjpic(testpjid);
}, "html");
editor.hideDialog();
}
});
});
});
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("https://5ish.net/plugin.php?id=it618_exam:ajax"+"&ac="+pjtype+"&testpjid="+testpjid+"&score="+score+"&formhash=45651982",IT618_EXAM("#it618_testpj").serialize(),function (data, textStatus){
var tmparr=data.split("it618_split");
if(tmparr[0]=="ok"){
alert(tmparr[1]);
dialog_testpj.remove();
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();
}
}
testpjid=0;
}else if(tmparr[0]=="editok"){
alert(tmparr[1]);
dialog_testpj.remove();
getpjlist(pjurl);
testpjid=0;
}else{
alert(data);
}
}, "html");
}
}
})
IT618_EXAM('.ns-sub-b').click(function(){
dialog_testpj.remove();
testpjid=0;
})
}, "html");
}
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("https://5ish.net/plugin.php?id=it618_exam:ajax"+"&ac="+pjtype+"&testpjid="+pjid+"&pjpicid="+pjpicid+"&formhash=45651982",{ac1:"delpjpic"},function (data, textStatus){
getpjpic(pjid);
}, "html");
}
function getpjpic(pjid){
IT618_EXAM.get("https://5ish.net/plugin.php?id=it618_exam:ajax"+"&testpjid="+pjid+"&formhash=45651982", {ac:"getpjpic"},function (data, textStatus){
IT618_EXAM("#divpjpic").html(data);
}, "html");
}
function gethftestpj(K){
IT618_EXAM.get("https://5ish.net/plugin.php?id=it618_exam:hftestpj"+"&testpjid="+testpjid, {ac:"it618"},function (data, textStatus){
var tmparr=data.split("it618_split");
dialog_hftestpj = K.dialog({
width : 520,
title : tmparr[0],
body : ''+tmparr[1]+'
',
closeBtn : {
name : '关闭',
click : function(e) {
dialog_hftestpj.remove();
testpjid=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("https://5ish.net/plugin.php?id=it618_exam:ajax"+"&ac=hftestpj&testpjid="+testpjid+"&formhash=45651982",IT618_EXAM("#it618_hftestpj").serialize(),function (data, textStatus){
var tmparr=data.split("it618_split");
if(tmparr[0]=="ok"){
alert(tmparr[1]);
dialog_hftestpj.remove();
getpjlist(pjurl);
testpjid=0;
}else{
alert(data);
}
}, "html");
}
})
IT618_EXAM('.ns-sub-b').click(function(){
dialog_hftestpj.remove();
testpjid=0;
})
}, "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+'个字!';
}