<%response.Buffer ="True" %>

<!--#include virtual="/commonfiles/databasefunctions.asp"-->
<!--InterManagement Manpower Services Limited
    Developer Name  Abdul Raoof P.I (raoof_ipr@yahoo.co.in)
    Developed by DIFFIE-ADAMEK Solutions Inc.-->
<html>
<head>

<script language="JavaScript">

function  restvalues()
{
adminlog.reset();

}

 function check()
{
	if (document.f1.username.value =="")
	{
		window.alert("You missed  Name ");
		document.f1.username.focus();
		return false;
	}
	 
	 if (document.f1.password.value =="")
	{
		window.alert("You missed Password");
		document.f1.password.focus();
		return false;
	}
	
	return true;

}
</script>
</head>

<body>
<% 
on error resume next 

dim connTemp, mySql, rsTemp,msg
msg=""
' checking username and password

if request.form("Login")<>""  then
	pUsername = replace(trim(request.form("username"))," ","")
	pPassword = replace(trim(request.form("password"))," ","")
	if pPassword <> "" and pUsername <> "" then
		on error resume next 
		mySQL="SELECT empId,Username,password,Tperiod,changedate FROM employers where Username='" &pUsername& "' and password='"&pPassword&"'"
		call getFromDatabase(mySQL, rstemp) 
		if rstemp.eof then  
			msg="Check your user name and password"
		else
		     Session("eUsername")=pUsername
		     Session("UserID")=rstemp("empId")
             pTperiod    = rstemp("Tperiod")
             pChangedate = rstemp("changedate")
             if pTperiod = "1" then
        '     response.write "Long time User"
			 call closeDb()   
		     response.redirect "/databank/resume.asp"
		    response.end
		     elseif pTperiod = "2" then
            strDate=Date
             pDateDiff= DateDiff("d",pChangedate,strDate)
              if pDateDiff >=0 then 
               if pDateDiff <= 15 then
                 'response.write pChangedate&" - "&strDate
                 'response.write "<br>15 days User"&pDateDiff
                 call closeDb()   
		         response.redirect "/databank/resume.asp"
                 response.end
               else
                 msg="Your 15 days validity period over, If you interested to renew the account, Please contact with <b>InterManagement<b>. "
               end if  
               else 
                msg="Please Check you System Date and correct it"
               end if 
		     end if 		    		   
		   
		end if   
	else 
	  msg="Enter Username and Password"
	end if	
end if
%>

		
        
        <form name=f1 action="data.asp" method=post onSubmit="return check()">

<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center" style="background-color:#10213b; height:35px; color:#fff; font-weight:bold; line-height:30px; ">Login and Search Resumes</td>
    </tr>
  <tr>
    <td align="center" style="background-color:#716f70; padding:15px 0px 15px 0px;" >
    
<table width="60%" border="0" cellspacing="3" cellpadding="3">
      <tr>
        <td width="32%" style="color:#fff;">User Name :</td>
        <td width="68%"><input name="username" type="text"  size="25" /></td>
      </tr>
      <tr>
        <td style="color:#fff;">Password :</td>
        <td><input name="password" type="text" size="25" /></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td style="padding-left:40px;"><input type="Submit" name="Login" value="Login" class="login-button" /></td>
      </tr>
    </table></td>
    </tr>
  <tr>
    <td align="center" style="background-color:#10213b; height:20px; color:#fff;">Registration Free for InterManagement  clients. if not registered Click here to <a href="http://intermanagement.com/register.asp" target="_blank" style="color:#fff; text-decoration:underline;">Register</a></td>
    </tr>
</table>
</form>	
</body>
</html>	
