<?
$tempMonth = "";
$tempDay = "";
if ( $CASE == "RECENT" ) $start_year = "";
if ( $start_year == "" )
{
$initYear = date("Y"); $initMonth = date("m"); $initDay = date("d");
$RECENT_TEMP = mktime(0,0,0, $initMonth, $initDay - 3, $initYear);
$RECENT_TEMP = date("Ymd",$RECENT_TEMP);
$initYear = substr($RECENT_TEMP, 0, 4 );
$initMonth = substr($RECENT_TEMP, 4, 2 );
$initDay = substr($RECENT_TEMP, 6, 2 );
$start_year = intVal($initYear);
$start_month = intVal($initMonth);
$start_day = intVal($initDay);
}
if ( $start_month < 10) $start_month = "0" . $start_month;
if ( $start_day < 10) $start_day = "0" . $start_day;
$tempMonth = $start_month;
$tempDay = $start_day;
$START_DATE = $start_year . $tempMonth . $tempDay;
if ( $end_year == "" ) {
$end_year = intVal(date("Y")); $end_month = intVal(date("m")); $end_day = intVal(date("d"));
}
if ( $end_month < 10) $end_month = "0" . $end_month;
if ( $end_day < 10) $end_day = "0" . $end_day;
$tempI = $end_month; $tempI = $end_day;
$END_DATE = $end_year . $end_month . $end_day;
if ( $CASE == "TODAY" ) {
$START_DATE = $END_DATE;
$start_year = $end_year;
$start_month = $end_month;
$start_day = $end_day;
}
?>
<style>
input[type=text], select {
width: 90%;
height:30px;
padding: 3px 3px;
margin: 6px 0;
display: inline-block;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
background-color: white;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
</style>
<?
$sSelectYearStyle = "width:50px;";
$sSelectMonthStyle = "width:30px;";
$sSelectDayStyle = "width:30px;";
?>
<select style="margin-left:15px;<?echo $sSelectYearStyle;?>" name = "start_year" size = 1>
<?
$nStart = 2018; $nEnd = date("Y") + 2;
for ( $m = $nStart; $m <= $nEnd; $m++ )
{
?><option value = "<?echo $m;?>" <?if ( $m == $start_year ) { echo " selected "; }?> > <?echo $m;?></option><?
}
?>
</select>년
<select style="<?echo $sSelectMonthStyle;?>" name = "start_month" size = 1>
<?
for ( $i = 1; $i <=12; $i++ )
{
if ( $i < 10 ) { $tempI = "0" . $i; } else { $tempI = $i; }
?><option <?if ( $tempI == $start_month ) { echo " selected "; }?> value = "<?echo $i;?>"> <?echo $tempI;?></option><?
}
?>
</select>월
<select style="<?echo $sSelectDayStyle;?>" name = "start_day" size = 1>
<?
for ( $i = 1; $i <=31; $i++ )
{
if ( $i < 10 ) { $tempI = "0" . $i; } else { $tempI = $i; }
?><option <?if ( $tempI == $start_day ) { echo " selected "; }?> value = "<?echo $i;?>"> <?echo $tempI;?></option><?
}
?>
</select>일~<select style="<?echo $sSelectYearStyle;?>" name = "end_year" size = 1>
<?
$nStart = 2018; $nEnd = date("Y");
for ( $i = $nStart; $i <= $nEnd; $i++ )
?>
<option value = "<?echo $i;?>" <?if ( $i == $end_year ) { echo " selected "; }?> ><?echo $i;?></option>
</select>년
<select style="<?echo $sSelectMonthStyle;?>" name = "end_month" size = 1>
<?
for ( $i = 1; $i <=12; $i++ )
{
if ( $i < 10 ) { $tempI = "0" . $i; } else { $tempI = $i; }
?><option <?if ( $tempI == $end_month ) { echo " selected "; }?> value = "<?echo $i;?>"><?echo $tempI;?></option><?
}
?>
</select>월
<select style="<?echo $sSelectDayStyle;?>" name = "end_day" size = 1>
<?
for ( $i = 1; $i <=31; $i++ )
{
if ( $i < 10 ) { $tempI = "0" . $i; } else { $tempI = $i; }
?><option <?if ( $tempI == $end_day ) { echo " selected "; }?> value = "<?echo $i;?>"><?echo $tempI;?></option><?
}
?>
</select>일
댓글 영역