<%@ Page language="c#" AutoEventWireup="false" debug="true"%> <%@ Import Namespace="CommonUtil8.Common" %> <%@ Import Namespace="System" %> <%@ Import Namespace="System.Collections" %> <%@ Import Namespace="System.ComponentModel" %> <%@ Import Namespace="System.Data" %> <%@ Import Namespace="System.Drawing" %> <%@ Import Namespace="System.Web" %> <%@ Import Namespace="System.Web.SessionState" %> <%@ Import Namespace="System.Data.SqlClient" %> <%@ Import Namespace="System.ComponentModel" %> <% strSQL=""; //期刊简介 strSQL = "select top 1 id,title,url,image_url,content,news_abstract from t_public_board where category_id='bkjj' order by sequence asc,send_time desc"; DataSet bkjj=Helper.GetDataSet(WebSiteConn,strSQL,"t_public_board"); //杂志信息 strSQL = "select top 4 id,title,url,send_time from t_public_board where category_id='xxgg' and category_id<>'ebook_en' and category_id<>'ebook_list' order by sequence asc,send_time desc"; DataSet zxdt=Helper.GetDataSet(WebSiteConn,strSQL,"t_public_board"); //编读往来 string strFeatured="select top 7 id,title,click_num,send_time,journal_id,url from t_public_board where category_id='bdwl' order by send_time desc"; DataSet bdwl=Helper.GetDataSet(WebSiteConn,strFeatured,"t_public_board"); //投稿指南 string strAuthorGuide="select id,title,url,send_time,click_num from t_public_board where category_id='tgxz' order by send_time desc,sequence desc"; DataSet tgxz=Helper.GetDataSet(WebSiteConn,strAuthorGuide,"t_public_board"); //友情链接 strSQL = "select top 6 label,target,pic_url from t_friendlink order by sequence asc,id desc"; DataSet FriendLink=Helper.GetDataSet(WebSiteConn,strSQL,"t_friendlink"); //图片新闻 strSQL = "select top 6 id,title,image_url,url from t_public_board where category_id='ggtp' order by sequence asc,send_time desc"; DataSet ggtp=Helper.GetDataSet(WebSiteConn,strSQL,"t_public_board"); //信息公告 strSQL = "select top 8 id,title,url,image_url from t_public_board where category_id='xxgg' order by sequence asc,send_time desc"; DataSet xxgg=Helper.GetDataSet(WebSiteConn,strSQL,"t_public_board"); //首页期刊简介 strSQL = "select fixed_content from t_fixed_content where fixed_title='首页期刊简介'"; DataSet About=Helper.GetDataSet(WebSiteConn,strSQL,"t_fixed_content"); string strAbout=""; if(About!=null && About.Tables.Count>0 && About.Tables[0].Rows.Count>0){ strAbout= About.Tables[0].Rows[0]["fixed_content"].ToString(); } /*****************************/ string strYearID=""; string strIssue=""; string strBookNo=""; string strQkxxContent=""; string strImageURL=""; string strImportant=""; try{ strYearID=Request.Params["year_id"]; strIssue=Request.Params["quarter_id"]; }catch{ strYearID=""; strIssue=""; } //过滤,防止SQL注入 strYearID=Helper.FilterRequest(strYearID); strIssue=Helper.FilterRequest(strIssue); strSQL="select year_id,year_name,year_en_name from t_year where has_article=1 order by year_id desc"; string ConnString=Helper.GetJournalConnString(strJournalID); //所有文章列表 string strAllArticleList=""; DataSet YearList=new DataSet(); DataSet IssueList=new DataSet(); DataSet Article=new DataSet(); DataSet ScrollPic=new DataSet(); DataSet AllarticleClickNum=new DataSet(); string AllClickNums=""; System.Data.SqlClient.SqlConnection conn = new System.Data.SqlClient.SqlConnection(ConnString); try{ conn.Open(); //保存年份数据 YearList=Helper.GetDataSet(conn,strSQL,"t_year"); //保存期刊 strSQL="select quarter_id,year_id,quarter_name,quarter_en_name,image_url,important from t_year_quarter order by year_id ,sequence,len(quarter_id) asc,quarter_id asc"; IssueList=Helper.GetDataSet(conn,strSQL,"t_year_quarter"); if(strYearID==null || strYearID.Equals("") || strIssue==null || strIssue.Equals("")){ strSQL="select quarter_id,year_id,quarter_name,image_url,important from t_year_quarter where index_display=1"; DataSet IndexQuarterDS=Helper.GetDataSet(conn,strSQL,"t_year_quarter"); if(IndexQuarterDS==null || IndexQuarterDS.Tables.Count<=0 || IndexQuarterDS.Tables[0].Rows.Count<=0){ strSQL="select top 1 quarter_id,year_id,quarter_name,image_url,important from t_year_quarter order by year_id,sequence,quarter_id asc"; IndexQuarterDS=Helper.GetDataSet(conn,strSQL,"t_year_quarter"); } if(IndexQuarterDS!=null && IndexQuarterDS.Tables.Count>0 && IndexQuarterDS.Tables[0].Rows.Count>0){ strYearID=IndexQuarterDS.Tables[0].Rows[0]["year_id"].ToString().Trim(); strIssue=IndexQuarterDS.Tables[0].Rows[0]["quarter_id"].ToString().Trim(); strImageURL=IndexQuarterDS.Tables[0].Rows[0]["image_url"].ToString().Trim(); strImportant=IndexQuarterDS.Tables[0].Rows[0]["important"].ToString().Trim(); } }else{ strSQL="select quarter_id,year_id,quarter_name,image_url,important from t_year_quarter where year_id='"+strYearID+"' and quarter_id='"+strIssue+"'"; DataSet IndexQuarterDS=Helper.GetDataSet(conn,strSQL,"t_year_quarter"); if(IndexQuarterDS!=null && IndexQuarterDS.Tables.Count>0 && IndexQuarterDS.Tables[0].Rows.Count>0){ strYearID=IndexQuarterDS.Tables[0].Rows[0]["year_id"].ToString().Trim(); strIssue=IndexQuarterDS.Tables[0].Rows[0]["quarter_id"].ToString().Trim(); strImageURL=IndexQuarterDS.Tables[0].Rows[0]["image_url"].ToString().Trim(); strImportant=IndexQuarterDS.Tables[0].Rows[0]["important"].ToString().Trim(); } } string strQueryArticle="select top 7 file_size,abstract,year_id,quarter_id,book_no,file_no,start_page,end_page,title,en_title,user_real_name,column_id,column_name,column_en_name,pdf_click_num,click_num,pdf_click_num,pin_yin_name from t_publish_article where year_id='"+strYearID+"' and quarter_id='"+strIssue+"' order by column_sequence asc,len(start_page) asc,start_page asc"; Article = Helper.GetDataSet(conn,strQueryArticle,"t_publish_article"); //保存当前目录 strSQL="select * from t_year_quarter where year_id='"+strYearID+"' order by year_id asc,quarter_id asc"; ScrollPic=Helper.GetDataSet(conn,strSQL,"t_year_quarter"); // 文章点击数 string strAllarticleClickNum="select sum(click_num) as abc from t_publish_article"; AllarticleClickNum = Helper.GetDataSet(conn,strAllarticleClickNum,"t_publish_article"); AllClickNums = AllarticleClickNum.Tables[0].Rows[0]["abc"].ToString(); //文章显示部分通用模板 string strArticleTemplate=""; strArticleTemplate=strArticleTemplate+"
"; strArticleTemplate=strArticleTemplate+"[column_name]"; strArticleTemplate=strArticleTemplate+"
"; strArticleTemplate=strArticleTemplate+"[article_list]"; strArticleTemplate=strArticleTemplate+"
"; string strColumnName=""; //前一个栏目名称 string strPreColumnName=""; string strColumnID=""; string strPreColumnID="content"; string strArticleItem="[article_link]"; //某个栏目的文章列表 string strColumnArticleList=""; string strTempArticle=""; string strTempArticleList=""; string strTempArticleItem=""; if(Article!=null && Article.Tables.Count>0 && Article.Tables[0].Rows.Count>0){ for(int i=0;i"; if (strAuthor.Equals("")){ strAuthor=Article.Tables[0].Rows[i]["pin_yin_name"].ToString().Trim(); } string []CnAuthorArray=strAuthor.Split(','); if(CnAuthorArray.Length>3){ string strTempAuthorList=""; for(int k=0;k<3;k++){ if(!strTempAuthorList.Equals("")){ strTempAuthorList=strTempAuthorList+","; } strTempAuthorList=strTempAuthorList+CnAuthorArray[k]; } strTempAuthorList=strTempAuthorList+"."; strAuthor=strTempAuthorList; } strBookNo=Article.Tables[0].Rows[i]["book_no"].ToString().Trim(); strColumnID=Article.Tables[0].Rows[i]["column_id"].ToString().Trim().TrimStart().TrimEnd(); strColumnName=Article.Tables[0].Rows[i]["column_name"].ToString().Trim(); if (strColumnName.Equals("")){ strColumnName=Article.Tables[0].Rows[i]["column_en_name"].ToString().Trim(); } string strStartPage=Article.Tables[0].Rows[i]["start_page"].ToString().Trim(); string strEndPage=Article.Tables[0].Rows[i]["end_page"].ToString().Trim(); string strfilesize=Article.Tables[0].Rows[i]["file_size"].ToString().Trim(); string content_zhaiyao=Article.Tables[0].Rows[i]["abstract"].ToString().Trim(); int intfilesize=0; if (strfilesize==""){ intfilesize=0; }else{ intfilesize = int.Parse(strfilesize); intfilesize=intfilesize/1024; } if(strColumnID.Equals("")){ strColumnID="content"; } if(strColumnName.Equals("")){ //strColumnName=strYearID+"年第"+strIssue+"期文章目录"; strColumnName=""; } //点击全文连接 string strDownPDF=""; if(strYearID==DateTime.Now.Year.ToString()){ strDownPDF="全文("+strPDFClickNum+")"; }else{ strDownPDF="全文("+strPDFClickNum+")"; } string strLink=""; strLink="
"; strLink=strLink+"
  • 作者:"+strAuthor+"
"; strLink=strLink+"
"; //如果没有栏目,则要设定栏目模板 if(i==0){ strPreColumnID=strColumnID; strColumnArticleList=strArticleTemplate.Replace("[column_name]",strColumnName); } if(!strColumnID.Equals(strPreColumnID)){ strAllArticleList=strAllArticleList+strColumnArticleList.Replace("[article_list]",strTempArticleList); strTempArticleList=""; } if(!strPreColumnID.Equals(strColumnID)){ strPreColumnID=strColumnID; strColumnArticleList=strArticleTemplate.Replace("[column_name]",strColumnName); } strTempArticleList=strTempArticleList+strArticleItem.Replace("[article_link]",strLink); if(i==Article.Tables[0].Rows.Count-1){ strAllArticleList=strAllArticleList+strColumnArticleList.Replace("[article_list]",strTempArticleList); } } } conn.Close(); }catch(Exception ee){ Response.Write(ee.Message); return; }finally{ if(conn!=null){ conn.Close(); } } %>
最新动态
<%if(zxdt!=null &&zxdt.Tables.Count>0 &&zxdt.Tables[0].Rows.Count>0){%> <%for(int i=0;i <%if (strURL. Equals("")){%>
" target="_blank"> <%=zxdt.Tables[0].Rows[i]["title"]%><%=strSendTime%>
<%}else{%>
" target="_blank"> <%=zxdt.Tables[0].Rows[i]["title"]%> <%=strSendTime%>
<%}%> <%}%> <%}%>
更多内容
最新目次
<%=strYearID%>年第<%=strIssue%>期
<%=strAllArticleList%>
------------------------------------------------------------------------------------------------------------- //漂浮通知 strSQL="select id,title,url,send_time from t_public_board where category_id='pftz' order by sequence asc,send_time desc"; DataSet pftz=Helper.GetDataSet(WebSiteConn,strSQL,"t_public_board"); ------------------------------------------------------------------------------------------------------------- <%if(pftz!=null && pftz.Tables.Count>0 && pftz.Tables[0].Rows.Count>0){%> <%for(int i=0;i <%if (strURL. Equals("")){%>

漂浮通知

关闭
" target="_blank"><%=strTitle%>
<%}%> <%}%> <%}%> ---------------------------------------------------------------------------------------------------------------