대학생활

금주의식단

8 || eregi('[^0-9]', trim($first_day)) || checkdate(substr($first_day, 6, 2), substr($first_day, 4, 2), substr($first_day, 0, 4)) == false) { // 현재 날짜 선택 $temp_day = date("n:j:w"); } else { // 입력된 날짜 선택 $temp_day = date("n:j:w", mktime(0,0,0,substr($first_day, 4, 2), substr($first_day, 6, 2), substr($first_day, 0, 4))); } $day = split(":",$temp_day); if($day[2] == 0){ $diff = -6; }else if($day[2] == 1){ $diff = 0; }else if($day[2] == 2){ $diff = -1; }else if($day[2] == 3){ $diff = -2; }else if($day[2] == 4){ $diff = -3; }else if($day[2] == 5){ $diff = -4; }else if($day[2] == 6){ $diff = -5; } // 전달된 날짜가 없으면 현재 주간에 월요일 선택 if(strlen(trim($first_day)) <> 8 || eregi('[^0-9]', trim($first_day)) || checkdate(substr($first_day, 6, 2), substr($first_day, 4, 2), substr($first_day, 0, 4)) == false) { $first_day = date("Ymd", mktime(0,0,0,date("m"), date("d") + $diff, date("Y"))); } else { $first_day = date("Ymd", mktime(0,0,0,substr($first_day, 4, 2), substr($first_day, 6, 2) + $diff, substr($first_day, 0, 4))); } $week_char = array("(월)","(화)","(수)","(목)","(금)","(토)"); for($d = 0 ; $d < 6 ; $d++){ //$week[$d] = date("m", mktime(0,0,0,date("m"), date("d") + $d + $diff, date("Y")))."/".date("d", mktime(0,0,0,date("m"), date("d") + $d + $diff, date("Y"))).$week_char[$d]; $week[$d] = date("m", mktime(0,0,0,substr($first_day, 4, 2), substr($first_day, 6, 2) + $d, substr($first_day, 0, 4)))."/".date("d", mktime(0,0,0,substr($first_day, 4, 2), substr($first_day, 6, 2) + $d, substr($first_day, 0, 4))).$week_char[$d]; } $SQL="select * from food where f_date = '$first_day' order by f_date "; $result=mysql_query($SQL, $dbconn); $row = mysql_fetch_array($result); $food_1 = (!$row[f_1]) ? " " : "".nl2br($row[f_1]).""; $food_2 = (!$row[f_2]) ? " " : "".nl2br($row[f_2]).""; $food_3 = (!$row[f_3]) ? " " : "".nl2br($row[f_3]).""; $food_4 = (!$row[f_4]) ? " " : "".nl2br($row[f_4]).""; $food_5 = (!$row[f_5]) ? " " : "".nl2br($row[f_5]).""; $food_6 = (!$row[f_6]) ? " " : "".nl2br($row[f_6]).""; $food_7 = (!$row[f_7]) ? " " : "".nl2br($row[f_7]).""; $food_8 = (!$row[f_8]) ? " " : "".nl2br($row[f_8]).""; $food_9 = (!$row[f_9]) ? " " : "".nl2br($row[f_9]).""; $food_10= (!$row[f_10]) ? " " : "".nl2br($row[f_10]).""; $food_11= (!$row[f_11]) ? " " : "".nl2br($row[f_11]).""; $food_12= (!$row[f_12]) ? " " : "".nl2br($row[f_12]).""; $food_13= (!$row[f_13]) ? " " : "".nl2br($row[f_13]).""; $food_14= (!$row[f_14]) ? " " : "".nl2br($row[f_14]).""; $food_15= (!$row[f_15]) ? " " : "".nl2br($row[f_15]).""; $food_16= (!$row[f_16]) ? " " : "".nl2br($row[f_16]).""; $food_17= (!$row[f_17]) ? " " : "".nl2br($row[f_17]).""; $food_18= (!$row[f_18]) ? " " : "".nl2br($row[f_18]).""; $food_19= (!$row[f_19]) ? " " : "".nl2br($row[f_19]).""; $food_20= (!$row[f_20]) ? " " : "".nl2br($row[f_20]).""; $food_21= (!$row[f_21]) ? " " : "".nl2br($row[f_21]).""; $food_22= (!$row[f_22]) ? " " : "".nl2br($row[f_22]).""; $food_23= (!$row[f_23]) ? " " : "".nl2br($row[f_23]).""; $food_24= (!$row[f_24]) ? " " : "".nl2br($row[f_24]).""; $food_25= (!$row[f_25]) ? " " : "".nl2br($row[f_25]).""; $food_26= (!$row[f_26]) ? " " : "".nl2br($row[f_26]).""; $food_27= (!$row[f_27]) ? " " : "".nl2br($row[f_27]).""; $food_28= (!$row[f_28]) ? " " : "".nl2br($row[f_28]).""; $food_29= (!$row[f_29]) ? " " : "".nl2br($row[f_29]).""; $food_30= (!$row[f_30]) ? " " : "".nl2br($row[f_30]).""; $food_31= (!$row[f_31]) ? " " : "".nl2br($row[f_31]).""; $food_32= (!$row[f_32]) ? " " : "".nl2br($row[f_32]).""; $food_33= (!$row[f_33]) ? " " : "".nl2br($row[f_33]).""; $food_34= (!$row[f_34]) ? " " : "".nl2br($row[f_34]).""; $food_35= (!$row[f_35]) ? " " : "".nl2br($row[f_35]).""; $food_36= (!$row[f_36]) ? " " : "".nl2br($row[f_36]).""; $food_37= (!$row[f_37]) ? " " : "".nl2br($row[f_37]).""; $food_38= (!$row[f_38]) ? " " : "".nl2br($row[f_38]).""; $food_39= (!$row[f_39]) ? " " : "".nl2br($row[f_39]).""; $food_40= (!$row[f_40]) ? " " : "".nl2br($row[f_40]).""; $food_41= (!$row[f_41]) ? " " : "".nl2br($row[f_41]).""; $food_42= (!$row[f_42]) ? " " : "".nl2br($row[f_42]).""; $food_43= (!$row[f_43]) ? " " : "".nl2br($row[f_43]).""; $food_44= (!$row[f_44]) ? " " : "".nl2br($row[f_44]).""; $food_45= (!$row[f_45]) ? " " : "".nl2br($row[f_45]).""; $food_46= (!$row[f_46]) ? " " : "".nl2br($row[f_46]).""; $food_47= (!$row[f_47]) ? " " : "".nl2br($row[f_47]).""; $food_48= (!$row[f_48]) ? " " : "".nl2br($row[f_48]).""; $food .="

학생식당

조식 [한식]
$week[0]
$food_1
$week[1]
$food_2
$week[2]
$food_3
$week[3]
$food_4
$week[4]
$food_5
$week[5]
$food_6
중식 [한식]
$week[0]
$food_7
$week[1]
$food_8
$week[2]
$food_9
$week[3]
$food_10
$week[4]
$food_11
$week[5]
$food_12
중식 [양식]
$week[0]
$food_13
$week[1]
$food_14
$week[2]
$food_15
$week[3]
$food_16
$week[4]
$food_17
$week[5]
$food_18
중식 [간편식]
$week[0]
$food_19
$week[1]
$food_20
$week[2]
$food_21
$week[3]
$food_22
$week[4]
$food_23
$week[5]
$food_24
석식 [한식]
$week[0]
$food_43
$week[1]
$food_44
$week[2]
$food_45
$week[3]
$food_46
$week[4]
$food_47
$week[5]
$food_48

교직원식당 메뉴

중식 [한식]
$week[0]
$food_37
$week[1]
$food_38
$week[2]
$food_39
$week[3]
$food_40
$week[4]
$food_41
$week[5]
$food_42
"; echo $food; mysql_close($dbconn); ?>
담당부서
학생복지위원회042-520-5295
최종수정일
2021. 10. 18.