// 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==""){
sendmsg('ajaxtips',"请填写讲师名称!");
return false;
}
if(document.getElementById("it618_tel").value==""){
sendmsg('ajaxtips',"请填写联系电话!");
return false;
}
if(document.getElementById("it618_about").value==""){
sendmsg('ajaxtips',"请填写讲师简介!");
return false;
}
IT618_VIDEO.post("https://my.smartbi.com.cn/plugin.php?id=it618_video:ajax"+"&ac=renzheng&formhash=1beb4b00",IT618_VIDEO("#it618_renzheng").serialize(),function (data, textStatus){
if(data=="ok"){
document.getElementById("ul1").style.display="none";
document.getElementById("ul2").style.display="";
}else{
sendmsg('ajaxtips',data);
}
}, "html");
}
function templatestyle(stylename){
IT618_VIDEO.get("https://my.smartbi.com.cn/plugin.php?id=it618_video:ajax&stylename="+stylename+"&formhash=1beb4b00", {ac:"pcstyle"},function (data, textStatus){
if(data=="ok"){
location.reload();
}
}, "html");
}
IT618_VIDEO.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);
});});
//cf5934800a97b4cf9fe4c7cb421e1096
var dialog_mygoods;
KindEditor.ready(function(K) {K('#mygoods').click(function() {
getmygoods(K);
});});
var dialog_myplay;
KindEditor.ready(function(K) {K('#myplay').click(function() {
getmyplay(K);
});});
var dialog_myplaypj;
KindEditor.ready(function(K) {K('#myplaypj').click(function() {
getmyplaypj(K);
});});
var dialog_playpj,dialog_hfplaypj,playpjid=0;
KindEditor.ready(function(K) {K('#playpj').click(function() {
getplaypj(K);
});});
KindEditor.ready(function(K) {K('#hfplaypj').click(function() {
gethfplaypj(K);
});});
var it618123="8735a915956d31acd59ee0e4eba4515b";
function getrenzheng(K){
if(confirm('抱歉,请先登录!也可以点确定直接跳转到登录页面!')){
location.href="member.php?mod=logging"+"&action=login";
return;
}else{
return;
}
IT618_VIDEO.get("https://my.smartbi.com.cn/plugin.php?id=it618_video: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_VIDEO.get("https://my.smartbi.com.cn/plugin.php?id=it618_video:mysale", {ac:"add"},function (data, textStatus){
IT618_VIDEO.get("https://my.smartbi.com.cn/plugin.php?id=it618_video:ajax"+"&formhash=1beb4b00", {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_VIDEO.get("https://my.smartbi.com.cn/plugin.php?id=it618_video:mysubscribe", {ac:"it618"},function (data, textStatus){
IT618_VIDEO.get("https://my.smartbi.com.cn/plugin.php?id=it618_video:ajax"+"&formhash=1beb4b00", {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_myplay = K.dialog({
width : 1000,
height: 630,
title : tmparr[0],
body : bodytmp,
closeBtn : {
name : '关闭',
click : function(e) {
dialog_myplay.remove();
}
}
});
}, "html");
}, "html");
}
function getmygoods(K){
IT618_VIDEO.get("https://my.smartbi.com.cn/plugin.php?id=it618_video:mygoods", {ac:"it618"},function (data, textStatus){
IT618_VIDEO.get("https://my.smartbi.com.cn/plugin.php?id=it618_video:ajax"+"&formhash=1beb4b00", {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_myplay = K.dialog({
width : 1000,
height: 630,
title : tmparr[0],
body : bodytmp,
closeBtn : {
name : '关闭',
click : function(e) {
dialog_myplay.remove();
}
}
});
}, "html");
}, "html");
}
var it611128123="46d0f216a37eeabd208e8d75512d7e9b";
function getmyplay(K){
IT618_VIDEO.get("https://my.smartbi.com.cn/plugin.php?id=it618_video:myplay", {ac:"it618"},function (data, textStatus){
IT618_VIDEO.get("https://my.smartbi.com.cn/plugin.php?id=it618_video:ajax"+"&formhash=1beb4b00", {ac:"playlist_get",ac1:"pcmyplay"},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 : 1000,
height: 630,
title : tmparr[0],
body : bodytmp,
closeBtn : {
name : '关闭',
click : function(e) {
dialog_myplay.remove();
}
}
});
}, "html");
}, "html");
}
function getmyplaypj(K){
IT618_VIDEO.get("https://my.smartbi.com.cn/plugin.php?id=it618_video:myplaypj", {ac:"it618"},function (data, textStatus){
IT618_VIDEO.get("https://my.smartbi.com.cn/plugin.php?id=it618_video:ajax"+"&formhash=1beb4b00", {ac:"playpjlist_get",ac1:"pcmyplaypj"},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_myplay = K.dialog({
width : 1000,
height: 630,
title : tmparr[0],
body : bodytmp,
closeBtn : {
name : '关闭',
click : function(e) {
dialog_myplay.remove();
}
}
});
}, "html");
}, "html");
}
var sqlurl="";
function getmysalelist(url){
document.getElementById("img_loading").style.display="";
document.getElementById("mysalelist").style.display="none";
IT618_VIDEO.get(url+sqlurl+"&formhash=1beb4b00", {ac:"salelist_get",ac1:"pcmysale"},function (data, textStatus){
var tmparr=data.split("it618_split");
IT618_VIDEO("#mysalesum").html(tmparr[0]);
IT618_VIDEO("#mysalelist").html(tmparr[1]);
IT618_VIDEO("#mysalepage").html(tmparr[2]);
IT618_VIDEO("#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://my.smartbi.com.cn/plugin.php?id=it618_video:ajax";
getmysalelist(url);
document.getElementById("mysaleurl").value=url;
}
function getmysubscribelist(url){
document.getElementById("img_loading").style.display="";
document.getElementById("mysalelist").style.display="none";
IT618_VIDEO.get(url+sqlurl+"&formhash=1beb4b00", {ac:"subscribe_get",ac1:"pcmysubscribe"},function (data, textStatus){
var tmparr=data.split("it618_split");
IT618_VIDEO("#mysalesum").html(tmparr[0]);
IT618_VIDEO("#mysalelist").html(tmparr[1]);
IT618_VIDEO("#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://my.smartbi.com.cn/plugin.php?id=it618_video: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_VIDEO.get(url+sqlurl+"&formhash=1beb4b00", {ac:"goods_get",ac1:"pcmygoods"},function (data, textStatus){
var tmparr=data.split("it618_split");
IT618_VIDEO("#mysalesum").html(tmparr[0]);
IT618_VIDEO("#mysalelist").html(tmparr[1]);
IT618_VIDEO("#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://my.smartbi.com.cn/plugin.php?id=it618_video:ajax";
getmygoodslist(url);
document.getElementById("mysaleurl").value=url;
}
var sqlurl="";
function getmyplaylist(url){
document.getElementById("img_loading").style.display="";
document.getElementById("mysalelist").style.display="none";
IT618_VIDEO.get(url+sqlurl+"&formhash=1beb4b00", {ac:"playlist_get",ac1:"pcmyplay"},function (data, textStatus){
var tmparr=data.split("it618_split");
IT618_VIDEO("#mysalesum").html(tmparr[0]);
IT618_VIDEO("#mysalelist").html(tmparr[1]);
IT618_VIDEO("#mysalepage").html(tmparr[2]);
document.getElementById("mysaleurl").value=url;
document.getElementById("img_loading").style.display="none";
document.getElementById("mysalelist").style.display="";
}, "html");
}
function searchmyplay(){
var pid=document.getElementById("pid").value;
var vid=document.getElementById("vid").value;
sqlurl="&pid="+pid+"&vid="+vid;
url="https://my.smartbi.com.cn/plugin.php?id=it618_video:ajax";
getmyplaylist(url);
document.getElementById("mysaleurl").value=url;
}
var it6118123="f9554611bcc8bdae176b5294ed44cd44";
var sqlurl="";
function getmyplaypjlist(url){
document.getElementById("img_loading").style.display="";
document.getElementById("mysalelist").style.display="none";
IT618_VIDEO.get(url+sqlurl+"&formhash=1beb4b00", {ac:"playpjlist_get",ac1:"pcmyplaypj"},function (data, textStatus){
var tmparr=data.split("it618_split");
IT618_VIDEO("#mysalesum").html(tmparr[0]);
IT618_VIDEO("#mysalelist").html(tmparr[1]);
IT618_VIDEO("#mysalepage").html(tmparr[2]);
IT618_VIDEO("#myjfcount").html(tmparr[3]);
document.getElementById("mysaleurl").value=url;
document.getElementById("img_loading").style.display="none";
document.getElementById("mysalelist").style.display="";
}, "html");
}
function searchmyplaypj(){
var pname=document.getElementById("pname").value;
sqlurl="&pname="+pname;
url="https://my.smartbi.com.cn/plugin.php?id=it618_video:ajax";
getmyplaypjlist(url);
document.getElementById("mysaleurl").value=url;
}
var pjtype;
function setplaypj(pjid){
if(playpjid==0){
playpjid=pjid;
pjtype='playpj';
IT618_VIDEO("#playpj").click();
}
}
function hfplaypj(pjid){
if(playpjid==0){
playpjid=pjid;
IT618_VIDEO("#hfplaypj").click();
}
}
function starh(spans,ia){
var _span=IT618_VIDEO(spans);
var _star=_span.find('a');
var _ias=IT618_VIDEO(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_VIDEO(this).addClass('ns-sider-starc');
IT618_VIDEO(this).prevAll().addClass('ns-sider-starc');
IT618_VIDEO(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_VIDEO(this).addClass('ns-sider-star');
IT618_VIDEO(this).prevAll().addClass('ns-sider-star');
IT618_VIDEO(this).nextAll().removeClass('ns-sider-star');
IT618_VIDEO(this).parents('li').removeClass('doo');
var sb=IT618_VIDEO(this).parents('li').find('span');
var sa=sb.eq(2).hide();
})
}
var ispjpicdel=0;
function getplaypj(K){
IT618_VIDEO.get("https://my.smartbi.com.cn/plugin.php?id=it618_video:playpj"+"&playpjid="+playpjid, {ac:"it618"},function (data, textStatus){
var tmparr=data.split("it618_split");
dialog_playpj = K.dialog({
width : 520,
title : tmparr[0],
body : ''+tmparr[1]+'
',
closeBtn : {
name : '关闭',
click : function(e) {
dialog_playpj.remove();
playpjid=0;
}
}
});
var editor = K.editor({
uploadJson : 'source/plugin/it618_video/kindeditor/php/upload_json.php?uid='+tmparr[4]+'&imgwidth=680',
fileManagerJson : 'source/plugin/it618_video/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_VIDEO.get("https://my.smartbi.com.cn/plugin.php?id=it618_video:ajax"+"&ac="+pjtype+"&playpjid="+playpjid+"&picurl="+url+"&formhash=1beb4b00",{ac1:"addpjpic"},function (data, textStatus){
getpjpic(playpjid);
}, "html");
editor.hideDialog();
}
});
});
});
getpjpic(playpjid);
starh('.sp_a','.ias');
starh('.sp_b','.ibs');
starh('.sp_c','.ics');
starh('.sp_d','.ids');
if(tmparr[3]!='')window.eval(tmparr[3]);
IT618_VIDEO('.ns-sub-a').click(function(){
if (IT618_VIDEO('.doo').find('span').hasClass('mag')){
IT618_VIDEO('.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_VIDEO('.sp_a').find('a').filter('.ns-sider-star').length;
var score2 = IT618_VIDEO('.sp_b').find('a').filter('.ns-sider-star').length;
var score3 = IT618_VIDEO('.sp_c').find('a').filter('.ns-sider-star').length;
var score4 = IT618_VIDEO('.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_VIDEO.post("https://my.smartbi.com.cn/plugin.php?id=it618_video:ajax"+"&ac="+pjtype+"&playpjid="+playpjid+"&score="+score+"&formhash=1beb4b00",IT618_VIDEO("#it618_playpj").serialize(),function (data, textStatus){
var tmparr=data.split("it618_split");
if(tmparr[0]=="ok"){
alert(tmparr[1]);
//刷新当前页面
window.location.reload()
dialog_playpj.remove();
if(pjtype=='playpj'){
getmyplaypjlist(document.getElementById("mysaleurl").value);
}else{
if(ispj==1){
getsalelist(salelisturl);
getpjlist(pjlisturl);
}else{
location.reload();
}
}
playpjid=0;
}else if(tmparr[0]=="editok"){
alert(tmparr[1]);
dialog_playpj.remove();
getpjlist(pjurl);
playpjid=0;
}else{
alert(data);
}
}, "html");
}
}
})
IT618_VIDEO('.ns-sub-b').click(function(){
dialog_playpj.remove();
playpjid=0;
})
}, "html");
}
function getbigpjpic(pjid,bigpjpic){
IT618_VIDEO("#bigpjpic"+pjid).html("");
IT618_VIDEO("#bigpjpic"+pjid).show();
}
function hidebigpjpic(obj){
obj.style.display='none';
}
function delpjpic(pjid,pjpicid){
IT618_VIDEO.get("https://my.smartbi.com.cn/plugin.php?id=it618_video:ajax"+"&ac="+pjtype+"&playpjid="+pjid+"&pjpicid="+pjpicid+"&formhash=1beb4b00",{ac1:"delpjpic"},function (data, textStatus){
getpjpic(pjid);
}, "html");
}
var it61128123="7db59c8befdde8f8c56284c22e68e046";
function getpjpic(pjid){
IT618_VIDEO.get("https://my.smartbi.com.cn/plugin.php?id=it618_video:ajax"+"&playpjid="+pjid+"&formhash=1beb4b00", {ac:"getpjpic"},function (data, textStatus){
IT618_VIDEO("#divpjpic").html(data);
}, "html");
}
function gethfplaypj(K){
IT618_VIDEO.get("https://my.smartbi.com.cn/plugin.php?id=it618_video:hfplaypj"+"&playpjid="+playpjid, {ac:"it618"},function (data, textStatus){
var tmparr=data.split("it618_split");
dialog_hfplaypj = K.dialog({
width : 520,
title : tmparr[0],
body : ''+tmparr[1]+'
',
closeBtn : {
name : '关闭',
click : function(e) {
dialog_hfplaypj.remove();
playpjid=0;
}
}
});
IT618_VIDEO('.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_VIDEO.post("https://my.smartbi.com.cn/plugin.php?id=it618_video:ajax"+"&ac=hfplaypj&playpjid="+playpjid+"&formhash=1beb4b00",IT618_VIDEO("#it618_hfplaypj").serialize(),function (data, textStatus){
var tmparr=data.split("it618_split");
if(tmparr[0]=="ok"){
alert(tmparr[1]);
dialog_hfplaypj.remove();
getpjlist(pjurl);
playpjid=0;
}else{
alert(data);
}
}, "html");
}
})
IT618_VIDEO('.ns-sub-b').click(function(){
dialog_hfplaypj.remove();
playpjid=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+'个字!';
}