<%@ page import="java.sql.Date" %> <%@ page import="java.util.Calendar" %> <%@ page import="java.util.Vector" %> <%@ page import="java.text.SimpleDateFormat" %> <%@ page import="metadata.beans.*" %> <%@ page import="utility.*" %> <%@ page import="com.aha.util.DepartmentUtility" %> <%@ include file="/include/inc-meta.html"%> <%@ include file="/scripts/common.js"%> <%@ include file="/scripts/javascript.js"%> <% MetadataDB mdb = new MetadataDB(MetadataDB.ARTICLE); String dcrPath = request.getParameter("dcrpath"); //out.println(dcrPath); //Following is the temporary fix to replace quote in dcrpath with two single quot //This should be handle by a function and should be applied to all jsp. //Start Temp Code StringBuffer sBuf = new StringBuffer(); int k = 0; int j = 0; if(dcrPath.indexOf('\'') > 0){ while(true){ k = dcrPath.indexOf('\'', j); if(k >= 0){ sBuf.append(dcrPath.substring(j, k)); sBuf.append("''"); } else { sBuf.append(dcrPath.substring(j, dcrPath.length())); break; } j = k+1; if(j >= dcrPath.length()) break; } dcrPath = sBuf.toString(); } //End Temp Code String domain = request.getParameter("domain"); Vector articleEle = mdb.loadArticleBeans(dcrPath, domain); int i=0; Article article = (Article)articleEle.elementAt(i++); Vector mainPara1 = (Vector)articleEle.elementAt(i++); Vector subPara1 = (Vector)articleEle.elementAt(i++); Vector image1 = (Vector)articleEle.elementAt(i++); Vector mainPara2 = (Vector)articleEle.elementAt(i++); Vector subPara2 = (Vector)articleEle.elementAt(i++); Vector image2 = (Vector)articleEle.elementAt(i++); Vector mainPara3 = (Vector)articleEle.elementAt(i++); Vector subPara3 = (Vector)articleEle.elementAt(i++); Vector image3 = (Vector)articleEle.elementAt(i++); Vector downloadInfo = (Vector)articleEle.elementAt(i++); Vector contactInfo = (Vector)articleEle.elementAt(i++); if(article == null){ out.println("

There are no article to display

"); return; } String []deptHead = DepartmentUtility.getDepartment(article.getHeadLine()); String headline = deptHead[1]; %>
<%@ include file="/inc-ahanews/channels/search-widget.htm"%>
<%@ include file="/include/inc-top.html"%>
<%@ include file="/include/inc-left-nav.html"%>
Send To a Friend

<%=headline%>

<%=headline%>
<% Date dt = article.getStartDate(); String newstartdate = ""; SimpleDateFormat sdf = new SimpleDateFormat("MMMMMMMMM dd, yyyy"); SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd"); String startdate = ""; if(dt != null) { startdate = sdf.format(dt); newstartdate = sdf2.format(dt); } %>
<%=startdate%>
<% String byLine = article.getByLine(); byLine = (byLine == null || byLine.trim().equals(""))?"":("By "+byLine); %>

<%=article.getSubHeading().toString()%>

<% for(i=0; i
<%=mainPara.getHeading()%>
<%=mainPara.getText().toString()%>

<% } for(i=0; i

<%=subPara.getHeading()%>
<%=subPara.getText().toString()%>

<% } for(i=0; i

<%=mainPara.getHeading()%>
<%=mainPara.getText().toString()%>

<% } for(i=0; i

<%=subPara.getHeading()%>
<%=subPara.getText().toString()%>

<% } for(i=0; i <%=downInfo.getDownloadableFileName()%>

<%=downInfo.getFileDescription()%>

<% } for(i=0; i

<%=mainPara.getHeading()%>
<%=mainPara.getText().toString()%>

<% } for(i=0; i

<%=subPara.getHeading()%>
<%=subPara.getText().toString()%>

<% } //End the subtext part %> <%=article.getSource()%>

<%=article.getAuthorBio().toString()%>

<%@ include file="/include/inc-right-ad.html"%>
<%@ include file="/include/inc-foot.html"%>