sachi vasishta

sachi vasishta

  • NA
  • 252
  • 0

setting number of days for general users

May 15 2009 1:05 AM

Hi,

I have a login form(form1 in my case) which asks for username and password. In my application I have access for two types of users namely general user and administrator. (for general user login the username and password are user and user and for administrator it is admin and admin). When I login as admin and admin it opens a new form(form4 in my case) for administrator. In this form I have a menu item called "set days for password". When administrator clicks on this menu item it opens a another form which contains a txtbox called set days.This field is meant for setting no of days  by the administrator and that value is stored in the db. for instance I am assuming the admin will  set the value 100 (100 days) .
                   Now when I login as user and user a new form will open(form2 in my case) ,when this form is opened another form should appear saying "your password will expire in 100 days" for the very first day of user login and after that the user clicks the ok button and it will disappear. On the next day(second day) when the user logs in then the same form should display saying "your password will expire in 99 days". similarly for the third day it should display saying "your password will expire in 98 days" and so on. On the hundreth day when the user tries to login a the same form should appear saying "your password has been expired". When the user clicks ok then a new form should come which contains 3 textboxes namely Old password:, New password:, Confirm password: when the user fills all these values and clicks ok then it should open form2(users default form).
Can anyone help me to accomplish this with code.

thanks