亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? createnewshtml.java

?? java阿里巴巴代碼
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
package com.buildhtml;

import com.saas.sys.log.Logger;
import tools.util.FileIO;
import tools.util.StrReplace;
import tools.util.StringUtil;
import com.saas.biz.attachMgr.Attachinfo;
import com.saas.biz.newsMgr.NewsInfo;
import com.saas.sys.exp.SaasApplicationException;
import com.saas.biz.productclassMgr.Productclass;
import java.util.*;


/**
 * Created by caiwch
 * User: wang
 * Date: 2007-11-13
 * Time: 16:55:15
 */
public class CreateNewsHtml 
{
	  Logger log = new Logger(this);
    FileAndString FileString =new FileAndString();

    public void buildIndex( String rootpath )throws SaasApplicationException
    {
        String str = "";
        String strTemp = "";
        String filepath =  rootpath+ "/" + "news/index.html";
        String templatePath = rootpath +"/" + "templates/news.html";
        String templateStr = FileIO.LoadFile( templatePath );
        
       	log.LOG_INFO( "filepath" + filepath );
       	log.LOG_INFO( "templatePath" + templatePath );
        String []tab = { "{#include:top#}", "{#include:bottom#}"};
				
        str = StrReplace.replace( templateStr,tab[0],FileString.f2s( rootpath + "/top.html" ) );
        str = StrReplace.replace( str,tab[1],FileString.f2s( rootpath + "/footer.html" ) );

       //級別資訊***********************
        log.LOG_INFO("級別資訊");
        String initStr = "<tr><td height=\"22\"><a href=\"{#link#}\" class=\"news\">{#title#}</a> </td><td class=\"zi\">[{#date#}]</td></tr> "+
        					       "<tr><td height=\"1\" class=\"xian\"></td><td class=\"xian\"></td></tr>";
        String []images = { "{#image:1#}","{#image:2#}","{#image:3#}","{#image:4#}","{#image:5#}" };
        strTemp = "";
        NewsInfo news = new NewsInfo();
        ArrayList nwsList = news.genNewsByLevel( 5 );
        if( nwsList != null && nwsList.size() > 0 )
        {
        		for( int i = 0; i < nwsList.size(); i++ )
        		{
        				HashMap nwsmap = ( HashMap )nwsList.get( i );
        				String news_id = nwsmap.get( "news_id" ).toString();
        				String cust_id = nwsmap.get( "cust_id" ).toString();
        				String title = "";
        				String publish_date = "";
        				if( nwsmap.get( "title" ) != null )
        				{
        						title = nwsmap.get( "title" ).toString();
        						if( title.length() > 10 )
        						{
        							title = StringUtil.getLimitLengthString(title,"",22 );
        						}
        				}
        				if( nwsmap.get( "publish_date" ) != null )
        				{
        						publish_date = nwsmap.get( "publish_date" ).toString();
        						if( publish_date.length() > 10 )
        						{
        							publish_date = publish_date.substring( 2, 10 );
        						}
        				}
        			 
    						String file_path = new NewsInfo().getCustAttachPath( news_id, "0");
	     					if( file_path == "" || file_path == null )
	     					{
	     						file_path = "/upload/default.gif";
	     					}
       					str = StrReplace.replace(str,images[i], file_path );
        				strTemp = strTemp + initStr;
      					strTemp = StrReplace.replace( strTemp, "{#link#}", "zixun_list_content.jsp?news_id="+news_id );///////////////////////////////////////////////////////////
     						strTemp = StrReplace.replace( strTemp, "{#title#}", title );
								strTemp = StrReplace.replace( strTemp, "{#date#}", publish_date );	
        		}	
        }
        str = StrReplace.replace( str, "{#Level:Information#}", strTemp );
        
						
				log.LOG_INFO( "今日要聞" );
        initStr = "<div align=center><a href=\"{#href#}\" class=\"ABC\">{#title#}</a></div>{#content#}"; 
        String initStr1 = "<li>[<span class=\"zi\">{#newtype#}</span>]<a href = \"{#href#}\" class=\"news\">{#title#}</a></li>";		
				strTemp = "";
				String strTemp1 = "";
				String strTemp2 = "";
				ArrayList newList = news.genNewsByToday( 9 );
        if( newList != null && newList.size() > 0 )
        {
        		for( int i = 0; i < newList.size(); i++ )
        		{
        				HashMap map = ( HashMap )newList.get( i );
        				String news_id ="";
        				String news_type = "",class_type="";
        				String title = "";
        				String content = "";
        				if( map.get( "news_id" ) != null )
        				{
        						news_id = map.get( "news_id" ).toString();
        				}
        				if( map.get( "title" ) != null )
        				{
        						title = map.get( "title" ).toString();
        						if( title.length() > 10 )
        						{
        							title = StringUtil.getLimitLengthString(title,"",30 );
        						}
        						
        				}
        				if( map.get( "content" ) != null )
        				{
        						content = map.get( "content" ).toString();
        						if( content.length() > 40 )
        							content = StringUtil.getLimitLengthString(content,"",80 ) + "...";
        				}
        				if (map.get("news_type") != null) 
        				{
					        news_type = map.get("news_type").toString();
					        ArrayList list=new Productclass().genUpclassByClassId( news_type );
					        if(list !=null && list.size()>0)
					        {
					          HashMap claMap=(HashMap)list.get(0);
					          if( claMap.get( "class_name" ) != null )
					          {
					            class_type = claMap.get("class_name").toString();
					          }
		       			  }
								}
								if( i == 0 )
								{
										strTemp = strTemp + initStr;
										strTemp = StrReplace.replace( strTemp, "{#href#}", "zixun_list_content.jsp?news_id="+news_id );///////////////////////////////////////////////////////////
       							strTemp = StrReplace.replace( strTemp, "{#title#}", title );
       							strTemp = StrReplace.replace( strTemp, "{#content#}", content );
								}
								else if( i >=1 && i < newList.size() )
								{
									strTemp1 = strTemp1 + initStr1;
									strTemp1 = StrReplace.replace( strTemp1, "{#newtype#}", class_type );
									strTemp1 = StrReplace.replace( strTemp1, "{#href#}", "zixun_list_content.jsp?news_id="+news_id );///////////////////////////////////////////////////////////
       						strTemp1 = StrReplace.replace( strTemp1, "{#title#}", title );
									
								}
        		}
        }
        str = StrReplace.replace( str, "{#Today:title:contnet#}", strTemp ); 
        str = StrReplace.replace( str, "{#today:list#}", strTemp1 );
        		
        		
        //最新資訊		
        log.LOG_INFO( "最新資訊" );		
        initStr = "<li><a href=\"{#href#}\" title=\"{#long:title#}\" class=\"news\">·{#title#}</a> </li>"; 	
        strTemp = "";
        	
        ArrayList newsList = news.genNews();
       // log.LOG_INFO( "" + newsList );
        if( newsList != null && newsList.size() > 0 )
        {
        		for( int i = 0; i < newsList.size(); i++ )
        		{
        				HashMap map = ( HashMap )newsList.get( i );
        				String news_id ="";
        				String title = "";
        				String sub_title = "";
        				if( map.get( "news_id" ) != null )
        				{
        						news_id = map.get( "news_id" ).toString();
        				}
        				if( map.get( "title" ) != null )
        				{
        						title = map.get( "title" ).toString();
        						if( title.length() > 15 )
        						{
        							sub_title = StringUtil.getLimitLengthString(title,"",30 ) + "..";
        						}
        						else
        						{
        							sub_title = title;	
        						}
        						
        				}
								strTemp = strTemp + initStr;
								strTemp = StrReplace.replace( strTemp, "{#href#}", "zixun_list_content.jsp?news_id="+news_id );///////////////////////////////////////////////////////////
     						strTemp = StrReplace.replace( strTemp, "{#title#}", sub_title );
								strTemp = StrReplace.replace( strTemp, "{#long:title#}", title );	
        		}
        }
        str = StrReplace.replace( str, "{#Latest:news#}", strTemp ); 
         
         //顯示方式一的新聞		
        log.LOG_INFO( "顯示方式一的新聞" );			
        String []className = { "{#first:class_name#}", "{#second:class_name#}", "{#third:class_name#}","{#forth:class_name#}","{#five:class_name#}","{#six:class_name#}" };
				String []classtitle1 = { "{#first:picture:name:1#}", "{#second:picture:name:1#}", "{#third:picture:name:1#}", "{#forth:picture:name:1#}", "{#five:picture:name:1#}", "{#six:picture:name:1#}" };
				String []classtitle2 = { "{#first:title:8#}", "{#second:title:8#}", "{#third:title:8#}", "{#forth:title:8#}", "{#five:title:8#}", "{#six:title:8#}" };		
        initStr ="<tr><td width=\"8%\" align=\"center\"><img src=\"/zone_b2b/images/sup_08.gif\" width=\"13\" height=\"13\" /></td>"+
                 "<td width=\"80%\" class=\"bthong\">{#big:title#}</td><td width=\"12%\"><a href=\"{#href#}\"  class=\"zhong\">更多&gt;&gt;</a></td></tr>";
                 
        initStr1 = "<tr><td height=\"101\" align=\"center\"><img src=\"{#src1#}\" width=\"100\" height=\"100\"></td></tr>"+
									"<tr><td><a href=\"{#href1#}\"class=\"bt1\">{#small:title#}</a><br>&nbsp;&nbsp;&nbsp;&nbsp;{#content#}</td></tr>";
        String initStr2 = "<tr><td height=\"24\"><img src=\"/zone_b2b/images/zse.gif\" width=\"5\" height=\"9\" align=\"absmiddle\" /> <a href=\"{#href2#}\">{#title#}</a></td></tr>"+
									 "<tr><td height=\"1\" class=\"xian\"></td></tr>";		
        		
        ArrayList classList = new Productclass().genClassByRsrv_str1( "1", 6 );		
        if( classList != null && classList.size() > 0 )
				{
			  		for( int i = 0; i < classList.size(); i++ )
			  		{  
			  				strTemp ="";
			  				HashMap map = ( HashMap )classList.get( i );
        				String class_id ="";
        				String class_name ="";
        				if( map.get( "class_id" ) != null )
        				{
        					 class_id = map.get( "class_id" ).toString();
        				}
        				
        				if( map.get( "class_name" ) != null )
        				{
        						class_name = map.get( "class_name" ).toString();

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲另类色综合网站| 国产精品一区一区三区| 亚洲国产美女搞黄色| 亚洲另类一区二区| 洋洋av久久久久久久一区| 亚洲免费观看在线观看| 亚洲精品视频一区| 亚洲免费观看高清完整版在线| 最好看的中文字幕久久| 中文字幕一区二区三区在线不卡| 一区二区高清视频在线观看| 一区二区三区精品在线| 一区二区三区在线观看视频| 亚洲国产综合在线| 免费在线观看日韩欧美| 九色|91porny| 国产91精品精华液一区二区三区 | 亚洲欧洲成人av每日更新| 国产精品久久久久久久第一福利| 综合久久久久久| 亚洲精品国久久99热| 午夜激情久久久| 久久99精品久久久久久动态图| 激情文学综合丁香| 成人激情免费电影网址| 色婷婷av一区二区三区软件| 欧美日本视频在线| 精品日韩av一区二区| 国产精品久久久久久久久久免费看| 亚洲欧美偷拍三级| 日本欧美在线观看| 成人性生交大片免费看在线播放| 91麻豆国产香蕉久久精品| 欧美顶级少妇做爰| 国产亚洲人成网站| 亚洲综合成人在线视频| 久久精品噜噜噜成人av农村| 成人黄色电影在线| 555夜色666亚洲国产免| 久久久精品国产免费观看同学| 亚洲欧洲日韩在线| 日本不卡不码高清免费观看| 国产宾馆实践打屁股91| 在线看不卡av| 国产亚洲一二三区| 午夜免费久久看| 成人免费看黄yyy456| 欧美日韩高清一区二区| 国产欧美日韩在线| 舔着乳尖日韩一区| 丁香桃色午夜亚洲一区二区三区| 欧美三级视频在线| 国产女人水真多18毛片18精品视频| 亚洲精品国产品国语在线app| 日本一不卡视频| 色综合久久综合网97色综合| 精品国产乱码久久| 亚洲制服丝袜在线| 成人午夜看片网址| 日韩免费看网站| 伊人婷婷欧美激情| 国产91精品久久久久久久网曝门 | 一区二区三区小说| 国产一区二区三区在线观看免费视频| 色哟哟一区二区三区| 国产丝袜美腿一区二区三区| 男人的天堂久久精品| 色国产精品一区在线观看| 国产欧美精品一区二区色综合 | 日韩中文字幕亚洲一区二区va在线 | 国产女主播在线一区二区| 午夜欧美在线一二页| 97久久超碰精品国产| 久久久亚洲精华液精华液精华液| 亚洲成人综合视频| 91蝌蚪porny| 国产精品伦理在线| 韩国女主播成人在线| 91精品国产丝袜白色高跟鞋| 亚洲乱码一区二区三区在线观看| 成人性生交大片免费| 欧美xxxxxxxx| 久草中文综合在线| 欧美精品丝袜久久久中文字幕| 亚洲免费在线视频一区 二区| 国产精品一区二区三区99| 精品久久久久久久久久久久包黑料 | 一二三区精品视频| 91在线视频网址| 中文字幕第一页久久| 国内外成人在线| 欧美一级二级在线观看| 亚洲成人黄色影院| 欧美性猛片aaaaaaa做受| 一区二区不卡在线播放| 91欧美一区二区| 亚洲啪啪综合av一区二区三区| 国产91精品精华液一区二区三区| 国产亚洲午夜高清国产拍精品 | 色哦色哦哦色天天综合| 一区在线播放视频| 91免费看`日韩一区二区| 中文字幕一区二区三区在线播放| 粉嫩av亚洲一区二区图片| 久久久三级国产网站| 国产一区二区女| 国产亚洲污的网站| 成人永久aaa| 136国产福利精品导航| 99精品在线免费| 亚洲裸体xxx| 欧美在线看片a免费观看| 亚洲国产欧美一区二区三区丁香婷| 欧美日韩亚洲另类| 日本特黄久久久高潮| 日韩久久久久久| 精品一区二区日韩| 国产欧美日韩精品a在线观看| 国产成人av一区二区三区在线| 日产精品久久久久久久性色| 欧美一级欧美一级在线播放| 久久精品国产77777蜜臀| 久久久久久黄色| 成av人片一区二区| 一区二区日韩电影| 91精品国产综合久久久久久久| 国模大尺度一区二区三区| 欧美国产日产图区| 欧洲色大大久久| 久久国产精品99久久人人澡| 国产亚洲精品福利| 在线观看免费一区| 麻豆精品在线观看| 国产精品国模大尺度视频| 欧美性猛交xxxxxxxx| 狠狠色狠狠色综合日日91app| 亚洲国产激情av| 欧美午夜一区二区三区免费大片| 蜜桃av一区二区三区电影| 国产日产欧产精品推荐色 | 亚洲视频小说图片| 这里是久久伊人| 懂色一区二区三区免费观看| 一级做a爱片久久| 欧美精品一区二区高清在线观看| www.欧美精品一二区| 日本伊人午夜精品| 亚洲天堂av一区| 51久久夜色精品国产麻豆| 成人a免费在线看| 日韩精品电影一区亚洲| 日本一区二区三区四区在线视频| 色婷婷综合在线| 久久狠狠亚洲综合| 一区二区欧美在线观看| 久久精品免视看| 欧美日韩国产中文| 成人久久视频在线观看| 日韩国产一区二| 亚洲三级在线免费观看| 精品少妇一区二区三区在线视频| 91丨九色丨蝌蚪丨老版| 国内精品不卡在线| 亚洲国产成人91porn| 中文字幕在线不卡视频| 日韩精品一区二区三区老鸭窝| 色悠久久久久综合欧美99| 国产91综合一区在线观看| 日本欧美一区二区| 一区二区三区av电影 | 成人高清免费观看| 免费日本视频一区| 亚洲国产精品久久人人爱蜜臀| 国产精品毛片a∨一区二区三区| 日韩三级高清在线| 在线观看www91| 99久久精品国产网站| 国产精品亚洲专一区二区三区| 日韩专区欧美专区| 亚洲亚洲人成综合网络| 中文字幕亚洲成人| 国产日韩欧美精品综合| 日韩一区二区在线看| 欧美国产一区二区| 精品国产污网站| 在线成人av网站| 欧美日韩中文字幕精品| 91免费视频大全| 99视频一区二区| youjizz国产精品| 成人激情免费网站| 粉嫩久久99精品久久久久久夜| 精品一区二区三区久久| 蜜桃av一区二区在线观看| 日韩国产一区二| 日韩成人伦理电影在线观看| 午夜精品久久一牛影视| 亚洲成人自拍一区| 亚洲国产精品久久不卡毛片| 亚洲综合激情小说|