<?
session_start();
include("opendb.php");
?>
<!DOCTYPE html>
<html>
<head>

<meta charset="UTF-8">
<link rel="stylesheet" href="css/style_force.css">
<script src="cal/jquery-1.9.1.js"></script>
<script src="cal/jquery-ui1.js"></script>
<link rel="stylesheet" href="cal/jquery-ui.css" />
<script>
$(function() {
    //alert(document.f1.yrvl.value);
     $( "#datepicker" ).datepicker("destroy");
     var fyr=document.getElementById('fin_yr').value;
     var splv=fyr.explode("-");
     var syr=splv[0];
     var eyr='20'.concat(splv[1]);
     var syr1='-04-01';
     var eyr1='-03-31';
     var stfnyr=syr.concat(syr1);
     var efnyr=eyr.concat(eyr1);
     $("#datepicker").datepicker({minDate: stfnyr, maxDate: efnyr});
    $("#fin_yr").change(function () {
        $( "#datepicker" ).datepicker("destroy");
        var end = this.value;
        var res = end.explode("-");
        var styr=res[0];
        var endyr='20'.concat(res[1]);
        var str1='-04-01';
        var str2='-03-31';
        var strtdt=styr.concat(str1);
        var enddt=endyr.concat(str2);
        $("#datepicker").datepicker({minDate: strtdt, maxDate: enddt});
    });
});
</script>
<script type="text/javascript">
window.onload = function(){
new JsDatePick({
  useMode:2,
  target:"inputField",
  dateFormat:"%Y-%m-%d"
});
};
</script>
<style>input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px white inset !important;
}


select option {
  margin: 40px;
  background: rgba(31, 14, 73, 0.8);
  
  color: #fff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
}
select:focus {
  border-radius: 0px;
  border-color: red;
  background: #fff;
  outline: none;
}

.select-wrap {
  position: relative;
}

.select-wrap:focus-within select {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10
}

option:hover {
  background-color: var(--selectHoverCol);
  color: #fff;
}

option:checked {
  box-shadow: 0 0 1em 100px var(--selectedCol) inset;
}
</style>
<script>
var x = navigator;
if(x.appCodeName!='Mozilla')
{
 alert('Invalid Browser, Use only Mozilla');
 document.location='blank.html'
}
function valid()
{
 if(document.f.branchcde.selectedIndex<=0)
  { alert('Invalid Branch'); return false;}

 if(document.f.uname.value.length<=0)
  { alert('Invalid Username'); return false;}
 if(document.f.pswd.value.length<=0)
  { alert('Invalid Password'); return false;}

}
</script>
<title>PSN AUTOMOTIVE MARKETING PVT LTD</title>

</head>

<body onLoad=document.f.branchcde.focus()>
<div class="wrapper">
	<div class="container">
		<h2>PSN AUTOMOTIVE MARKETING PVT LTD</h2>
<form name='f' action='login.php' method='post' onSubmit="return valid()" class="form">

    <select name='fin_yr' id="fin_yr">
        <option value="2024-25">2024-25</option>

<?
/*
$mstart = "2016";
$ctr=0;
$myear = date('Y',time());
$mmonth = date('m',time());
if($mmonth >= 1 && $mmonth <= 3)
{
    $myear = $myear - 1;
    print $myear."sssss";
}
for ($ctr=$mstart;$ctr<$myear+1;$ctr++)
{
    $mend_year = substr($ctr,-2)+1;
    print  'psn_forcedb'.substr($ctr,-2).$mend_year;
    $mdb = 'psn_forcedb'.substr($ctr,-2).$mend_year;
    if($db=mysqli_select_db("$mdb"))
    {
    ?>
        <option value="<? echo $ctr.'-'.$mend_year ?>"<? if($myear==$ctr) echo 'selected="selected"';?>><? echo $ctr.'-'.$mend_year ?></option>
    <?
    }
}*/
?>
</select>
<input type="text" id="datepicker" name="login_date" value="<?echo date('Y-m-d');?>" readonly/>
<select name='branchcde' id="brch">
<option>-select-</option>
<?

$re=mysqli_query($db,"select brcode,brname from branch order by brname")or die(mysqli_error());
while($row=mysqli_fetch_array($re))
{
 print "<option value='$row[brcode]'>$row[brname]</option>";
 }
?>
</select>
    
    <input type="text" value="" placeholder="Username" id="username" name='uname'/>
    <input type="password" value="" placeholder="Password" id="password" name='pswd'/>
    <button type=submit>Submit</button>
 
</div>
<!--<div class="card alt"><img src='images/EX40-sml.jpg' width='200px' height='150px'></div>-->

		</form>
		<div align="center"><font color='#000'>This software is maintained by  <a style="color: cyan;" href='http://www.psninfotech.com' target='x'>Psn Infotech</a></font></div>
	</div>
		
	<ul class="bg-bubbles">
		<li></li>
		<li></li>
		<li></li>
		<li></li>
		<li></li>
		<li></li>
		<li></li>
		<li></li>
		<li></li>
		<li></li>
	</ul>

</div>

  <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>

    <script src="js/index_force.js"></script>

</body>
</html>

<span id="siteseal"><script async type="text/javascript" src="https://seal.godaddy.com/getSeal?sealID=pt09kTSsmN26mOf3ww81WLfFQZIDHjiKavAicLEgLJLtbOevdsVfokXsSABU"></script></span>