function CMSADV(PID) { this.ID = PID; this.PosID = 0; this.PosInfo = ""; this.ADContent = ""; this.PaddingLeft = 0; this.PaddingRight = 0; this.PaddingTop = 0; this.PaddingBottom = 0; this.Width = 0; this.Height = 0; this.IsHitCount = "N"; this.UploadFilePath = ""; this.Step = 1; this.Delay= 20; this.WindowHeight = 0; this.WindowWidth = 0; this.Yon = 0; this.Xon = 0; this.Pause = true; this.Interval = null; this.URL = ""; this.SiteID = 0; this.ShowAD = showADContent; this.Start = doStart; this.Stat = statAD; } function statAD() { var new_element = document.createElement("script"); new_element.type = "text/javascript"; new_element.src="/adv/stat/" + this.PosID; document.body.appendChild(new_element); } function showADContent() { var content = this.ADContent; var pos_content = this.PosInfo; var str = "
"; if(pos_content.adv_position_type_info.adv_show_type == 2){ var view_adv = content[0]; if(view_adv.status != 1){ return false; } var s_time = new Date(view_adv.start_time); var n_time = new Date(); if(view_adv.end_time){ var e_time = new Date(view_adv.end_time); }else{ e_time = 0; } if(n_time < s_time){ return false; } if(e_time != 0){ if(e_time < n_time){ return false; } } if(view_adv.type == 1){ var view_adv_info = JSON.parse(view_adv.content); var i = 0; var adv_list = ''; for(i = 0; i'; if(view_adv_info[i].file != undefined){ adv_list += ''; }else{ adv_list += view_adv_info[i].des; } adv_list += ''; } str += adv_list; }else if(view_adv.type == 2){ var view_adv_info = JSON.parse(view_adv.content); var i = 0; var adv_list = ''; for(i = 0; i'+view_adv_info[i].des+''; } str += adv_list; }else if(view_adv.type == 3){ var view_adv_info = JSON.parse(view_adv.content); var i = 0; var adv_list = ''; for(i = 0; i'; adv_list += ""; adv_list += ""; adv_list += ""; adv_list += ""; adv_list += ""; adv_list += ""; adv_list += ''; } str += adv_list; }else if(view_adv.type == 4){ str += view_adv.content; } }else{ var a = 0; for(a = 0; a'; if(view_adv_info[i].file != undefined){ adv_list += ''; }else{ adv_list += view_adv_info[i].des; } adv_list += '
'; } str += adv_list; }else if(view_adv.type == 2){ var view_adv_info = JSON.parse(view_adv.content); var i = 0; var adv_list = ''; for(i = 0; i'+view_adv_info[i].des+''; } str += adv_list; }else if(view_adv.type == 3){ var view_adv_info = JSON.parse(view_adv.content); var i = 0; var adv_list = ''; for(i = 0; i'; adv_list += ""; adv_list += ""; adv_list += ""; adv_list += ""; adv_list += ""; adv_list += ""; adv_list += ''; } str += adv_list; }else if(view_adv.type == 4){ str += view_adv.content; } } } } str += "
关闭
"; str += ""; document.write(str); } function changePos(float) { float.WindowWidth = document.compatMode == "BackCompat" ? document.body.clientWidth : document.documentElement.clientWidth; float.WindowHeight = document.compatMode == "BackCompat" ? document.body.clientHeight : document.documentElement.clientHeight; document.getElementById("CMSADV_"+float.PosID).style.left = (float.PaddingLeft + (Math.max(document.documentElement.scrollLeft, document.body.scrollLeft)))+"px"; document.getElementById("CMSADV_"+float.PosID).style.top = (float.PaddingTop + (Math.max(document.documentElement.scrollTop, document.body.scrollTop)))+"px"; if (float.Yon){ float.PaddingTop = float.PaddingTop + float.Step; }else{ float.PaddingTop = float.PaddingTop - float.Step; } if (float.PaddingTop < 0){ float.Yon = 1; float.PaddingTop = 0; } if (float.PaddingTop >= (float.WindowHeight - float.Height)){ float.Yon = 0;float.PaddingTop = (float.WindowHeight - float.Height); } if (float.Xon){ float.PaddingLeft = float.PaddingLeft + float.Step; }else{ float.PaddingLeft = float.PaddingLeft - float.Step; } if (float.PaddingLeft < 0){ float.Xon = 1; float.PaddingLeft = 0; } if (float.PaddingLeft >= (float.WindowWidth - float.Width)){ float.Xon = 0; float.PaddingLeft = (float.WindowWidth - float.Width); } } function doStart(float){ return function(){ changePos(float); } } function cmsAD_2_pause_resume(){if(cmsAD_2.Pause){clearInterval(cmsAD_2.Interval);cmsAD_2.Pause = false;}else {cmsAD_2.Interval = setInterval(cmsAD_2.Start(cmsAD_2),cmsAD_2.Delay);cmsAD_2.Pause = true;}} var cmsAD_2 = new CMSADV('cmsAD_2'); cmsAD_2.PosID = 2; cmsAD_2.PosInfo = {"id":"2","site_id":"643","adv_position_type_id":"3","name":"\u6559\u52a1\u5904\u5e7f\u544a","width":"250","height":"98","left_padding":"0","right_padding":"0","top_padding":"0","bottom_padding":"0","css_setting":"","remark":"","create_time":"2019-07-01 14:32:08","update_time":"2019-07-01 14:36:40","status":"1","adv_position_type_info":{"id":"3","name":"float","title":"\u6f02\u6d6e\u79fb\u52a8","tpl_path":"","is_config_size":"1","is_config_position":"1","is_config_style":"1","adv_show_type":"1","adv_type":"1,3","number":"1","status":"1","create_time":"2017-06-22 14:27:15","update_time":"2018-08-14 13:47:52"},"adv_info":[{"id":"8","site_id":"643","title":"\u9ad8\u7b49\u6559\u80b2\u51fa\u7248\u793e\u4ea7\u54c1\u4fe1\u606f\u68c0\u7d22\u7cfb\u7edf","type":"1","adv_position_id":"2","start_time":"2019-07-01 14:32:35","end_time":null,"content":"[{\"file\":{\"id\":\"2179\",\"user_id\":\"1\",\"name\":\"5d19a9b624c0a.jpg\",\"savename\":\"5d1a0c76499cd.jpg\",\"savepath\":\"20190701\\\/\",\"path\":\"\\\/Uploads\\\/image\\\/20190701\\\/5d1a0c76499cd.jpg\",\"url\":\"https:\\\/\\\/admin.ahzyygz.edu.cn\\\/Uploads\\\/image\\\/20190701\\\/5d1a0c76499cd.jpg\",\"ext\":\"jpg\",\"mime\":\"image\\\/jpeg\",\"size\":\"4360\",\"md5\":\"5a55919aa714ae541191c1afe4bd968f\",\"sha1\":\"704ae0205bb50eb5db9db48bd931b7d6e97146f6\",\"location\":\"0\",\"create_time\":\"2019-07-01 21:36:54\",\"update_time\":\"2019-07-01 21:36:54\",\"status\":\"1\",\"share\":\"0\",\"share_time\":null,\"folder_id\":\"0\",\"ip\":\"60.169.129.68\",\"remark\":\"\",\"file_type\":\"1\"},\"des\":\"\\u9ad8\\u7b49\\u6559\\u80b2\\u51fa\\u7248\\u793e\\u4ea7\\u54c1\\u4fe1\\u606f\\u68c0\\u7d22\\u7cfb\\u7edf\",\"link\":\"http:\\\/\\\/xuanshu.hep.com.cn\"}]","create_time":"2019-07-01 14:35:35","update_time":"2022-05-26 21:24:20","css_setting":"","sort":"0","click":"0","status":"1"}]}; cmsAD_2.ADContent = [{"id":"8","site_id":"643","title":"\u9ad8\u7b49\u6559\u80b2\u51fa\u7248\u793e\u4ea7\u54c1\u4fe1\u606f\u68c0\u7d22\u7cfb\u7edf","type":"1","adv_position_id":"2","start_time":"2019-07-01 14:32:35","end_time":null,"content":"[{\"file\":{\"id\":\"2179\",\"user_id\":\"1\",\"name\":\"5d19a9b624c0a.jpg\",\"savename\":\"5d1a0c76499cd.jpg\",\"savepath\":\"20190701\\\/\",\"path\":\"\\\/Uploads\\\/image\\\/20190701\\\/5d1a0c76499cd.jpg\",\"url\":\"https:\\\/\\\/admin.ahzyygz.edu.cn\\\/Uploads\\\/image\\\/20190701\\\/5d1a0c76499cd.jpg\",\"ext\":\"jpg\",\"mime\":\"image\\\/jpeg\",\"size\":\"4360\",\"md5\":\"5a55919aa714ae541191c1afe4bd968f\",\"sha1\":\"704ae0205bb50eb5db9db48bd931b7d6e97146f6\",\"location\":\"0\",\"create_time\":\"2019-07-01 21:36:54\",\"update_time\":\"2019-07-01 21:36:54\",\"status\":\"1\",\"share\":\"0\",\"share_time\":null,\"folder_id\":\"0\",\"ip\":\"60.169.129.68\",\"remark\":\"\",\"file_type\":\"1\"},\"des\":\"\\u9ad8\\u7b49\\u6559\\u80b2\\u51fa\\u7248\\u793e\\u4ea7\\u54c1\\u4fe1\\u606f\\u68c0\\u7d22\\u7cfb\\u7edf\",\"link\":\"http:\\\/\\\/xuanshu.hep.com.cn\"}]","create_time":"2019-07-01 14:35:35","update_time":"2022-05-26 21:24:20","css_setting":"","sort":"0","click":"0","status":"1"}];cmsAD_2.URL = ""; cmsAD_2.SiteID = 643; cmsAD_2.PaddingLeft = 0; cmsAD_2.PaddingRight = 0; cmsAD_2.PaddingTop = 0; cmsAD_2.PaddingBottom = 0; cmsAD_2.Width = 250; cmsAD_2.Height = 98; cmsAD_2.UploadFilePath = ""; cmsAD_2.ShowAD(); var isIE=!!window.ActiveXObject; if (isIE){ if (document.readyState=="complete"){ //cmsAD_2.Stat(); } else { document.onreadystatechange=function(){ //if(document.readyState=="complete") cmsAD_2.Stat(); } } } else { //cmsAD_2.Stat(); } document.getElementById('CMSADV_2').visibility = 'visible'; cmsAD_2.Interval = setInterval(cmsAD_2.Start(cmsAD_2),cmsAD_2.Delay);