/* ** Used by instructor to create a class session of a catalog ** Class: CreateClass ** Author: Yuping Zhu ** Date: 12-01-1999 */ package ascdb.courses; import oracle.html.*; import java.sql.*; import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import ascdb.conf; import ascdb.users.UserValidation; public class CreateClass extends HttpServlet { public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { // Output HTML page header res.setContentType("text/html"); PrintWriter out = res.getWriter(); conf dbconf= new conf(req); String uid = req.getParameter("uid"); String cidStr = req.getParameter("cid"); int cid = (new Integer(cidStr)).intValue(); UserValidation UserV = new UserValidation(); try { // Create an HtmlBody Object HtmlBody bd = new HtmlBody(); // Sets various attributes of HtmlBody bd.setBackgroundColor("#fffff2"); Font f = new Font(Color.olive,"myfont","+5"); int TabRow = UserV.Validation(req); if (TabRow < 5) { out.println("You do not have this privilege!"); out.println(BackMainHome()); return; } HtmlStringBuffer HTMLBuf = new HtmlStringBuffer(); HTMLBuf.appendln(""); HTMLBuf.appendln("
"); HTMLBuf.appendln("