<link rel="stylesheet" type="text/css" href="convert.css">
<body leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="411" id="AutoNumber1">
<tr>
<td width="409">
<?php
$intYear = $HTTP_POST_VARS['txtyear'];
$intMonth = $HTTP_POST_VARS['txtmonth'];
$intDay = $HTTP_POST_VARS['txtday'];
$txtmode = $HTTP_POST_VARS['txtmode'];
if($txtmode == "NptoEn")
{
$title = "Nepali to English Date Converter";
$strSQL = "select from NepaliDate where nYear = $intYear and nMonth = $intMonth and nDay = $intDay";
}
if($txtmode == "EntoNp")
{
$title = "English to Nepali Date Converter";
$strSQL = "select from NepaliDate where eYear = $intYear and eMonth = $intMonth and eDay = $intDay";
}
if (!$conn = new COM("ADODB.Connection"))
//Get rows
{
exit ("<h1>Error!</h1>");
}
$strConn = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" . realpath("NepaliDate.mdb");
$conn->open($strConn, "admin", "nepalnepal"); //username & password
// $strSQL = "SELECT * FROM name"; //autos = tablename
$rs = $conn->execute($strSQL);
if (!$rs->EOF)
{
//Get all field information out of the table
$eYear = $rs->Fields(0);
$eMonth = $rs->Fields(1);
$eDay = $rs->Fields(2);
$nYear = $rs->Fields(3);
$nMonth = $rs->Fields(4);
$nDay = $rs->Fields(5);
$DayofWeek = $rs->Fields(6);
//We are gonna make strings of the objects.
$eYear = $eYear->value;
$eMonth = $eMonth->value;
$eDay = $eDay->value;
$nYear = $nYear->value;
$nMonth = $nMonth->value;
$nDay = $nDay->value;
$DayofWeek = $DayofWeek->value;
//Parse errors from the information (U
//We got all record information out!
//Example of usage:
if ($DayofWeek == 1)
$txtWeekDay = "Sunday ";
if ($DayofWeek == 2)
$txtWeekDay = "Monday ";
if ($DayofWeek == 3)
$txtWeekDay = "Tuesday ";
if ($DayofWeek == 4)
$txtWeekDay = "Wednewday ";
if ($DayofWeek == 5)
$txtWeekDay = "Thursday ";
if ($DayofWeek == 6)
$txtWeekDay = "Friday ";
if ($DayofWeek == 7)
$txtWeekDay = "Saturday ";
?>
<center>
<p style="margin-top: 0; margin-bottom: 0"><font size="4" face="Verdana, Arial, Helvetica, sans-serif"><strong><? print("$title") ?></strong></font></p>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="402" id="AutoNumber5" height="52">
<tr>
<td width="203" align="center" bgcolor="#0099CC" height="26"><b>
<font size="2">English Date</font></b></td>
<td width="196" align="center" bgcolor="#0099CC" height="26"><b>
<font size="2">Nepali Date</font></b></td>
</tr>
<tr>
<td width="203" align="center" class="date" height="25">
<?php
if ($eMonth == 1) $txteMonth = "January ";
if ($eMonth == 2) $txteMonth = "February ";
if ($eMonth == 3) $txteMonth = "March ";
if ($eMonth == 4) $txteMonth = "April ";
if ($eMonth == 5) $txteMonth = "May ";
if ($eMonth == 6) $txteMonth = "June ";
if ($eMonth == 7) $txteMonth = "July ";
if ($eMonth == 8) $txteMonth = "August ";
if ($eMonth == 9) $txteMonth = "September ";
if ($eMonth == 10) $txteMonth = "October ";
if ($eMonth == 11) $txteMonth = "November ";
if ($eMonth == 12) $txteMonth = "December ";
print ("$eYear $txteMonth $eDay ")?></td>
<td width="196" align="center" class="date" height="25">
<?
if ($nMonth == 1) $txtnMonth = "Baisakh ";
if ($nMonth == 2) $txtnMonth = "Jesth ";
if ($nMonth == 3) $txtnMonth = "Ashad ";
if ($nMonth == 4) $txtnMonth = "Srawan ";
if ($nMonth == 5) $txtnMonth = "Bhadra ";
if ($nMonth == 6) $txtnMonth = "Aswin ";
if ($nMonth == 7) $txtnMonth = "Kartik ";
if ($nMonth == 8) $txtnMonth = "Mansir ";
if ($nMonth == 9) $txtnMonth = "Poush ";
if ($nMonth == 10) $txtnMonth = "Magh ";
if ($nMonth == 11) $txtnMonth = "Falgun ";
if ($nMonth == 12) $txtmMonth = "Chaitra ";
print ("$nYear $txtnMonth $nDay ")?></td>
</tr>
</table>
</center>
</div>
<p style="margin-top: 0; margin-bottom: 0" align="center">
<font size="2" >Week Day :<b> <? print("$txtWeekDay") ?></b></font></p>
<?
}
else
{
?>
<p align="center" style="margin-top: 0; margin-bottom: 0"><font color="#FFFFFF"><b>Oops, sorry<br>
We are updating our database for this date<br>
Please check this site later.</b></font></p>
<p align="center" style="margin-top: 0; margin-bottom: 0"><font size="2">
<a href="mailto:info@teensnepal.com?subject=Nepali Date Update" style="text-decoration: none">
<font color="#FFFFFF">write us</font></a></font></p>
<?
}
$rs->Close();
$conn->Close();
$rs=null;
$conn=null;
?>
</td>
</tr>
</table>QUOTE]
how can i resolve the problem ?