<%
String sql = "SELECT * FROM about WHERE title='thecompany';";
con.executeQuery( sql );
con.next();
String body = con.getString( "body" );
//body = body.replaceAll( "/images", "/images" );
%>
|
|
<%
sql = "SELECT * FROM about WHERE title='theman';";
con.executeQuery( sql );
con.next();
body = con.getString( "body" );
//body = body.replaceAll( "/images", "/jsp/images" );
%>
|
|
|
<%
sql = "SELECT * FROM whats_new LIMIT 0, 3;";
con.executeQuery( sql );
while( con.next() ){
String whatsnewid = con.getString( "whatsnewid" );
String headline = con.getString( "headline" );
if( headline.equals( "na" ) || headline == null )
headline = "";
else headline += " ";
headline = headline.replaceAll( "\\\\", "" );
headline = headline.replaceAll( "'", "\\'" );
body = con.getString( "body" );
body.replaceAll( "\\w'", "\\'" );
body.replaceAll( ";|\\s'", ";\\'" );
body = body.replaceAll( "\\n", "" );
body = body.replaceAll( "\\r", "" );
java.sql.Date dateposted = con.getDate( "dateposted" );
DateFormat formatter = DateFormat.getDateInstance( DateFormat.SHORT );
String datestr = formatter.format( dateposted );
%>
|
|
<%
}/*END WHILE*/
%>
|
<%
String root = this.getServletContext().getRealPath( "/images/shows" );
Hashtable catagories = new Hashtable();
sql = "SELECT * FROM shows WHERE showstatus='inthecan';";
con.executeQuery( sql );
while( con.next() ){
Show show = new Show();
show.setShowid( con.getString( "showid" ) );
show.setTitle( con.getString( "title" ) );
show.setDistributor( con.getString( "distributor" ) );
show.setDesc( con.getString( "description" ) );
Catagory catagory = new Catagory( con.getString( "catagoryid" ) );
show.setCatagory( catagory );
Vector shows = (Vector)catagories.get( catagory.getCatagoryid() );
if( shows == null )
shows = new Vector();
shows.add( show );
catagories.put( catagory.getCatagoryid(), shows );
}
Enumeration keys = catagories.keys();
while( keys.hasMoreElements() ){
String catagoryid = (String)keys.nextElement();
Catagory catagory = new Catagory( catagoryid );
Vector entries = (Vector)catagories.get( catagoryid );
%>
| <%=catagory.getCatagory()%> |
<%
for( int i=0; i
<%
if( new java.io.File( root + "/" + show.getShowid() + ".jpg" ).exists() ){
%>
|
<%
}
%>
<%=show.getTitle()%>
|
|
<%
}
%>
|
<%
}
%>
|
|
<%
}catch( Exception e ){
PrintWriter o = new PrintWriter( out );
e.printStackTrace( o );
}finally{
con.close();
}
%>
|