| Code:
|
<script language="JavaScript">todaysdate = new Date();</script>
<a href="javascript:void()" class="genmed" onClick="document.post.topic_calendar_day.value=todaysdate.getDate();document.post.topic_calendar_month.value=todaysdate.getMonth()+1;document.post.topic_calendar_year.value=todaysdate.getFullYear();" />{L_TODAY}</a>
|
| Code:
|
// day list
$s_topic_calendar_day = '<select name="topic_calendar_day">';
for ($i=0; $i <= 31; $i++)
{
$selected = ( intval($day) == $i) ? ' selected="selected"' : '';
$s_topic_calendar_day .= '<option value="' . $i . '"' . $selected . '>' . ( ($i == 0) ? ' -- ' : str_pad($i, 2, '0', STR_PAD_LEFT) ) . '</option>';
}
$s_topic_calendar_day .= '</select>';
// month list
$s_topic_calendar_month = '<select name="topic_calendar_month">';
for ($i=0; $i <= 12; $i++)
{
$selected = ( intval($month) == $i ) ? ' selected="selected"' : '';
$s_topic_calendar_month .= '<option value="' . $i . '"' . $selected . '>' . $months[$i] . '</option>';
}
$s_topic_calendar_month .= '</select>';
// year list
$s_topic_calendar_year = '<select name="topic_calendar_year">';
$selected = empty($year) ? ' selected="selected"' : '';
$s_topic_calendar_year .= '<option value="0"' . $select . '> ---- </option>';
$start_year = ( (intval($year) > 1971 ) && (intval($year) <= date('Y', time())) ) ? intval($year)-1 : date('Y', time())-1;
for ($i = $start_year; $i <= date('Y', time())+10; $i++)
{
$selected = ( intval($year) == $i) ? ' selected="selected"' : '';
$s_topic_calendar_year .= '<option value="' . $i . '"' . $selected . '>' . $i . '</option>';
}
$s_topic_calendar_year .= '</select>';
|
| Code:
|
|
<a href="javascript:void()"
|
| Code:
|
|
<a href="javascript:void(0)"
|