Hi all,
Please kindly help me to modify my code to capture and display the system date and also the pull down menu options for the date(From date and To date).
<%@ LANGUAGE="VBSCRIPT" %>
<% pageTitle = "check Enquiry Form " %>
<!--#include file="isadmin.inc"-->
<%
if isAdmin then
' mToday = Date()
mToday = Date(mToday)
mWeekDay = weekday(mToday)
if mWeekday = 2 then 'Monday
mYesterday = mToday - 2
else
mYesterday = mToday - 1
end if
p_Fromday = mid(trim(mYesterday),4,2)
p_Frommonth = mid(trim(mYesterday),1,2)
p_Fromyear = mid(trim(mYesterday),7,5)
p_Today = mid(trim(mToday),4,2)
p_Tomonth = mid(trim(mToday),1,2)
p_Toyear = mid(trim(mToday),7,5)
mDayDesc=""
if mWeekDay = 1 then
mDayDesc="SUN"
end if
if mWeekDay = 2 then
mDayDesc = "MON"
end if
if mWeekDay = 3 then
mDayDesc = "TUE"
end if
if mWeekDay = 4 then
mDayDesc = "WED"
end if
if mWeekDay = 5 then
mDayDesc = "THU"
end if
if mWeekDay = 6 then
mDayDesc = "FRI"
end if
if mWeekDay = 7 then
mDayDesc = "SAT"
end if
%>
<html>
<head></head>
<body onload="navBarInit()" bgcolor="#99CCFF" text="#000000">
<center>
<p> </p>
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="83">
<tr>
<td width="100%" height="83">
<p align="center"><b><font size="5">Database Enquiry</font></b></p>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#99CCFF" width="100%" id="AutoNumber1" height="1" bgcolor="#9CCFFF">
<tr>
<td width="14%" height="1"> </td>
<td width="86%" height="1"> Today is : <%=mDayDesc%> <%=p_ToDay%>/<%=p_ToMonth%>/<%=p_ToYear%> </td>
</tr>
</table>
<p>
</td>
</tr>
</table>
<form method="POST" action="admin_chk_enquiry_action.asp">
<table border="0" width="695" cellspacing="0" cellpadding="0" height="99" bgcolor="#FFFFFF">
<tr>
<td width="19" bgcolor="#99CCFF" height="35"> </td>
<td width="148" bgcolor="#99CCFF" height="35"><font size="4">Date </font><font size="3">(dd/mm/yyyy)</font></td>
<td width="550" bgcolor="#99CCFF" height="35">From:<select size="1" name="frday">
<option selected value=<%=p_Fromday%>><%=p_Fromday%></option>
<option>01</option>
<option>02</option>
<option>03</option>
<option>04</option>
<option>05</option>
<option>06</option>
<option>07</option>
<option>08</option>
<option>09</option>
<option>10</option>
<option>11</option>
<option>12</option>
<option>13</option>
<option>14</option>
<option>15</option>
<option>16</option>
<option>17</option>
<option>18</option>
<option>19</option>
<option>20</option>
<option>21</option>
<option>22</option>
<option>23</option>
<option>24</option>
<option>25</option>
<option>26</option>
<option>27</option>
<option>28</option>
<option>29</option>
<option>30</option>
<option>31</option>
</select> / <select size="1" name="frmonth">
<option selected value=<%=p_FromMonth%>><%=p_FromMonth%></option>
<option value="01">01</option>
<option value="02">02</option>
<option value="03">03</option>
<option value="04">04</option>
<option value="05">05</option>
<option value="06">06</option>
<option value="07">07</option>
<option value="08">08</option>
<option value="09">09</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
</select> / <input type="text" value=<%=p_FromYear%> name="fryear" size="5"> To:
<select size="1" name="today">
<option selected value=<%=p_ToDay%>><%=p_ToDay%></option>
<option>01</option>
<option>02</option>
<option>03</option>
<option>04</option>
<option>05</option>
<option>06</option>
<option>07</option>
<option>08</option>
<option>09</option>
<option>10</option>
<option>11</option>
<option>12</option>
<option>13</option>
<option>14</option>
<option>15</option>
<option>16</option>
<option>17</option>
<option>18</option>
<option>19</option>
<option>20</option>
<option>21</option>
<option>22</option>
<option>23</option>
<option>24</option>
<option>25</option>
<option>26</option>
<option>27</option>
<option>28</option>
<option>29</option>
<option>30</option>
<option>31</option>
</select> / <select size="1" name="tomonth">
<option selected value=<%=p_ToMonth%>><%=p_ToMonth%></option>
<option value="01">01</option>
<option value="02">02</option>
<option value="03">03</option>
<option value="04">04</option>
<option value="05">05</option>
<option value="06">06</option>
<option value="07">07</option>
<option value="08">08</option>
<option value="09">09</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
</select> / <input type="text" value=<%=p_ToYear%> name="toyear" size="5"></td>
</tr>
<tr>
<td width="19" bgcolor="#99CCFF" height="35"> </td>
<td width="148" bgcolor="#99CCFF" height="35"><b>Filter Option</b></td>
<td width="550" bgcolor="#99CCFF" height="35"> <select size="1" name="Filter">
<option selected value="A">All</option>
<option value="N">New</option>
<option value="R">Replied</option>
</select></td>
</tr>
<tr>
<td width="19" bgcolor="#99CCFF" height="15"><font size="4"> </font></td>
<td width="148" bgcolor="#99CCFF" height="15"> </td>
<td width="550" bgcolor="#99CCFF" height="15"><input type="submit" value="Submit Query"></td>
</tr>
</table>
</center>
<%
else
Response.Write "You do not have right to access the report."
end if
%>
</body>
</html>