|
<%
try
{
Vector loginResult=null;
String username="",pwd="",btn="",strUserName="",strPwd="",strName="",strStat="",strEmail="";
username = (request.getParameter("txtun")==null)?"":request.getParameter("txtun").trim();
pwd = (request.getParameter("txtpw")==null)?"":request.getParameter("txtpw").trim();
btn=(request.getParameter("login")==null)?"N":request.getParameter("login");
if(!btn.equals("N"))
{
loginResult=logbean.loginSteering(username,pwd,usrSession);
if(!loginResult.isEmpty())
{
Hashtable h1 = (Hashtable)loginResult.get(0);
strUserName=(String)h1.get("usr_Name");
strPwd=(String)h1.get("pass_Word");
strName=(String)h1.get("user_Name");
strStat=(String)h1.get("user_Status");
strEmail=(String)h1.get("user_Email");
}
else
{
loginResult=logbean.loginResources(username,pwd,usrSession);
if(!loginResult.isEmpty())
{
Hashtable h1 = (Hashtable)loginResult.get(0);
strUserName=(String)h1.get("usr_Name");
strPwd=(String)h1.get("pass_Word");
strName=(String)h1.get("user_Name");
strStat=(String)h1.get("user_Status");
strEmail=(String)h1.get("user_Email");
}
else
{
logbean.setIncorrect_pwd("Invalid");
response.sendRedirect("forum.jsp");
return;
}
}
session.putValue("userName", strUserName);
session.putValue("Pwd", strPwd);
session.putValue("Stat", strStat);
session.putValue("uName", strName);
session.putValue("uEmail", strEmail);
response.sendRedirect("forum.jsp");
return;
}
}catch(Exception ex){System.out.println("Exp-login :"+ex);}
%>
|
|
|
|
|
| |
| Home | Discussion Forum |
| Discussion Forum |
|
<%
try
{
fb.setURL(URL);fb.setUSERNAME(USERNAME);fb.setPASSWORD(PASSWORD);
String sessid=session.getId();
Vector viewResult=fb.ViewQuestions();
if (viewResult.size()>0)
{
%>
| |
|
|
| |
<% String email="",qn="",cdate="",sub="",name="",cnt="";
int qnid=0,i=0,j;
for(i=0;i<10;i++)
{
Hashtable h1 = (Hashtable)viewResult.get(i);
email=(String)h1.get("Email");
qnid=Integer.parseInt((String)h1.get("Qnid"));
qn=(String)h1.get("Qn");
sub=(String)h1.get("Sub");
cdate=(String)h1.get("Cdate");
name=(String)h1.get("Name");
cnt=(String)h1.get("Count");
%>
| <%=i+1%> |
<%=sub%>
By <%=name%> (<%=email%>)
Dated <%=cdate%> <%if(!(cnt.equals("0"))){%> Replies: <%=cnt%> <%}%>
|
View Post |
<%}%>
|
|
| |
|
|
|
| MORE► |
|
|
| |
|