$.post("/php3688/showImagesIndex.php","",function(data){ data=JSON.parse(data); url="https://img.8bo8.com/"; for(i in data){ year=data[i].date.substr(0,4); img=url + "newsimg/dir/" + year + "/" + data[i].kind + "/" + data[i].name + ".jpg"; href="images.html?year=" + year + "&kind=" + data[i].kind + "&name=" + data[i].name; title=data[i].title; $(".slide-images" + i).find("a").attr("href",href); $(".slide-images" + i).find("img").attr("src",img); $(".slide-images" + i).find("span").text(title); } }); function getNews(kind){ $.post("/php3688/showNewsIndex.php",{"kind":kind},function(data){ data=JSON.parse(data); html=""; for(i in data){ date=data[i].date; month=date.replace("-",""); month=month.substr(0,6); name=data[i].name; title=data[i].title; href="news.html?month=" + month + "&kind=" + kind + "&name=" + name; img="https://img.8bo8.com/news/" + month + "/images/" + kind + "_" + name + "_p1.jpg"; html+='
  • '; html+=''; html+='' + title + ''; html+='' + date + '
  • '; } html=''; $("#news .content").html(html); }); } $("#news .clearfix a").click(function(e){ kind=$(this).attr("class"); getNews(kind); }); $("#recommend .clearfix a").click(function(e){ kind=$(this).attr("class"); getRecommend(kind); }); function getRecommend(kind){ var url = kind == 'reco' ? 'php3688/showRecommendIndex.php' : 'php3688/showOthersIndex.php'; $.post(url,{"kind":kind},function(data){ data=JSON.parse(data); var html = ''; for(i in data){ var name=data[i].name; var title=data[i].title; if( kind == 'analysis_nba' ) { var time = title.substr(0,16); var year = title.substr(0,4); title = title.substr(22); var href="recommend.html?kind=" + kind + "&year=" + year + "&name=" + name; }else if( kind == 'zaopan' || kind == 'qingbao' ){ var date=data[i].date; var month=date.replace("-",""); month=month.substr(0,6); var href= ( kind == "zaopan" ? "zaopan/" : "zaopan/qingbao.html" ) + "?month=" + month + "&name=" + name; }else if( kind == 'reco' || kind == 'analysis' ){ var date = data[i].date; var year = date.substr(0,4); var href="recommend.html?kind=" + kind + "&year=" + year + "&name=" + name; }else{ var date = data[i].date; var year = date.substr(0,4); var href="guess.html?kind=" + kind + "&year=" + year + "&name=" + name; } html+='
  • '; if( kind == 'analysis_nba' ) { html+=title; html+='比赛时间:' + time + '
  • '; }else{ html+='' + title + ''; html+='' + date + ''; } } html=''; $("#recommend .content").html(html); }); } function getPhotos(){ $.post("/php3688/showPhotosIndex.php","",function(data){ data=JSON.parse(data); html=""; for(i in data){ name=data[i].name; title=data[i].title; type=data[i].type; href="photos.html?type=" + type + "&name=" + name; img="https://img.8bo8.com/photos/dir/" + type + "/" + name + ".jpg"; html+='
  • '; html+=''; html+='' + title + '
  • '; } html=''; $("#photos .content").html(html); }); } /* function getZaopan(kind){ $.post("/php3688/showOthersIndex.php",{"kind":kind},function(data){ data=JSON.parse(data); html=""; for(i in data){ date=data[i].date; month=date.replace("-",""); month=month.substr(0,6); name=data[i].name; title=data[i].title; href="https://8bo8.net/" + kind + "/" + month + "/" + name + ".html"; if (kind == 'qingbao') href="https://8bo8.net/" + kind + "/qingbao/" + month + "/" + name + ".htm"; html+='
  • '; html+='' + title + ''; html+='' + date + '
  • '; } html=''; $("#recommend .content").html(html); }); } */ /* function getAnalysisNBA(kind){ $.post("/php3688/showOthersIndex.php",{"kind":kind},function(data){ data=JSON.parse(data); html=""; for(i in data){ title=data[i].title; time=title.substr(0,16); year=title.substr(0,4); name=data[i].name; title=title.substr(22); href="https://8bo8.net/" + kind + "/" + year + "/" + name + ".html"; html+='
  • '; html+=title; html+='比赛时间:' + time + '
  • '; } html=''; $("#recommend .content").html(html); }); } */ /* function getAnalysis(kind){ $.post("/php3688/showOthersIndex.php",{"kind":kind},function(data){ data=JSON.parse(data); html=""; for(i in data){ date=data[i].date; year=date.substr(0,4); name=data[i].name; title=data[i].title; href="https://8bo8.net/" + kind + "/" + year + "/" + name + ".html"; html+='
  • '; html+='' + title + ''; html+='' + date + '
  • '; } html=''; $("#recommend .content").html(html); }); } */ /* function getGuess(kind){ $.post("/php3688/showOthersIndex.php",{"kind":kind},function(data){ data=JSON.parse(data); html=""; for(i in data){ date=data[i].date; year=date.substr(0,4); name=data[i].name; title=data[i].title; href="https://8bo8.net/guess/" + kind + "/" + year + "/" + name + ".html"; html+='
  • '; html+='' + title + ''; html+='' + date + '
  • '; } html=''; $("#recommend .content").html(html); }); } */ /* $(".reco").click(function(e){ kind=$(this).attr("class"); getRecommend(kind); }); $(".analysis").click(function(e){ kind=$(this).attr("class"); getAnalysis(kind); }); $(".analysis_nba").click(function(e){ kind=$(this).attr("class"); getAnalysisNBA(kind); }); $(".zaopan").click(function(e){ kind=$(this).attr("class"); getZaopan(kind); }); $(".qingbao").click(function(e){ kind=$(this).attr("class"); getZaopan(kind); }); $(".foot").click(function(e){ kind=$(this).attr("class"); getGuess(kind); }); $(".basket").click(function(e){ kind=$(this).attr("class"); getGuess(kind); }); $(".win").click(function(e){ kind=$(this).attr("class"); getGuess(kind); }); $(".single").click(function(e){ kind=$(this).attr("class"); getGuess(kind); }); */