Hi everyone,
I am facing a problem in my project .I am sure you'll will find a way out.I am working on a project leave management .now i am really confused as to how to go ahead.I am working with jsp and ms-access .Here the scenario is i have two types of user ,1- normal user who login and apply leaves, 2-approver who approves the leave as well as apply for leave.how can we differentiate between them.both of them should be forwarded to the same page after validation ,along with this the approver should include an extra button in the page which is only used by the approver and the normal users should not be given access to this button.how can i do this .Pls help me out with some suggestions.
thanks in advance.
shijunair
-2
Junior Poster in Training
Recommended Answers
Jump to Postif you are using directory services to differentiate users it will help you. or identify the approver by his ip address.
Jump to PostJust add extra column to your table to declare user groups
Jump to PostWhy did you use numeric value that is not affiliated with group description. You should always use meaningful names simple "user" and "approver" will do it nicely. As for the query this is up to you as we do not know what you are about to do.
Jump to PostOK, here is query I come up with.
SELECT if(count(emp_id)=TRUE,'true','false') FROM TABLE_NAME where emp_approver="approver" and uid=LOGIN_EMP_ID;
the result of the query is BOOLEAN true or false
Simpler version would beSELECT count(emp_id) FROM TABLE_NAME where emp_approver="approver" and uid=LOGIN_EMP_ID;
the output is numeric value zero …
Jump to PostLOGIN_EMP_ID is the emp_id on login submitted on login process, which you retrive from the login page compare with database for authentication and see what that person in the system in order to provided with appropriate user view
All 20 Replies
schattigengel
0
Newbie Poster
shijunair
-2
Junior Poster in Training
peter_budo
2,532
Code tags enforcer
Team Colleague
Featured Poster
shijunair
-2
Junior Poster in Training
shijunair
-2
Junior Poster in Training
peter_budo
2,532
Code tags enforcer
Team Colleague
Featured Poster
shijunair
-2
Junior Poster in Training
peter_budo
2,532
Code tags enforcer
Team Colleague
Featured Poster
shijunair
-2
Junior Poster in Training
peter_budo
2,532
Code tags enforcer
Team Colleague
Featured Poster
shijunair
-2
Junior Poster in Training
peter_budo
2,532
Code tags enforcer
Team Colleague
Featured Poster
shijunair
-2
Junior Poster in Training
peter_budo
2,532
Code tags enforcer
Team Colleague
Featured Poster
shijunair
-2
Junior Poster in Training
peter_budo
2,532
Code tags enforcer
Team Colleague
Featured Poster
shijunair
-2
Junior Poster in Training
peter_budo
2,532
Code tags enforcer
Team Colleague
Featured Poster
shijunair
-2
Junior Poster in Training
peter_budo
2,532
Code tags enforcer
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.