<%@page pageEncoding="UTF-8"%> <%@ page import="openv.base.*" %> <% String columnId = Util.getParamStr(request.getParameter("colId")); if(columnId.equals("")){ columnId = "1"; } String channelId = Util.getParamStr(request.getParameter("channelId")); if(channelId.equals("")){ channelId = "1"; } String proName = Util.getParamStr(request.getParameter("proName")); proName = new String(proName.getBytes("iso8859-1"),"UTF-8"); OpenvSource ds = null; try{ ds = OpenvSourceManager.getOpenvSource(OpenvEnv.SYS_DATASOURCE_NAME,OpenvEnv.SYS_DATASOURCE_TYPE); ds.setAutoCommit(false); String sql = "select pro_newcolid from virn_programme where col_id="+columnId+" and chan_id="+channelId; long pro_newcolid = 0; ds.executeQuery(sql); OpenvResult theOpenvResult=ds.getOpenvResult(); while(theOpenvResult.next()){ pro_newcolid = Util.strToLong(theOpenvResult.getString("pro_newcolid")); if(pro_newcolid != 0) break; } theOpenvResult.close(); response.sendRedirect("http://tv.openv.com/col_"+pro_newcolid+".html"); }catch(Exception e){ System.out.println(e.toString()); }finally{ if(ds != null){ ds.close(); } } %>