묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
★ asp 에서 쓰던 if문인데요 php에서 어떻게 바꿔야하나요..?
2005.07.08 15:16
아래와 같이 asp로 짠 if문 인데요...
php에서 같은 기능을 사용하려고 합니다.
어떤식으로 바꿔야하나요?
알려주시면 정말 감사하겠습니다^^;
(긴 소스중에 일부 발췌한것입니다.)
<table border="0" cellpadding="0" cellspacing="0" >
<%If Request("Over_01") <> "" Then%>
<tr>
<td onClick="menuclick(sub1);" style="cursor:hand;"><img src="../../images/left_menu_01_up.gif" width="200" height="50"></td>
</tr>
<%Else%>
<tr>
<td onClick="menuclick(sub1);" style="cursor:hand;"><img src="../../images/left_menu_01.gif" width="200" height="50"></td>
</tr>
<%End If%>
<tr>
<td id="sub1" style="display:none;">
<table width="177" border="0" cellspacing="0" cellpadding="0">
<%If Request("Over_01") = "001" Then%>
<tr>
<td><a href="../Int_Index.asp?over_01=001" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('left43','','../../images/left_menu_01_01_up.gif',1)"><img name="left43" border="0" src="../../images/left_menu_01_01_up.gif" width="177" height="24"></a></td>
</tr>
<%Else%>
<tr>
<td><a href="../Int_Index.asp?over_01=001" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('left4','','../../images/left_menu_01_01_up.gif',1)"><img name="left4" border="0" src="../../images/left_menu_01_01.gif" width="177" height="24"></a></td>
</tr>
<%End If%>
<%If Request("Over_01") = "002" Then%>
<tr>
<td><a href="../CyberPR/Cp_List.asp?over_01=002" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('left','','../../images/left_menu_01_02_up.gif',1)"><img name="left" border="0" src="../../images/left_menu_01_02_up.gif" width="177" height="18"></a></td>
</tr>
<%Else%>
<tr>
<td><a href="../CyberPR/Cp_List.asp?over_01=002" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('left','','../../images/left_menu_01_02_up.gif',1)"><img name="left" border="0" src="../../images/left_menu_01_02.gif" width="177" height="18"></a></td>
</tr>
<%End If%>
<%If Request("Over_01") = "003" Then%>
<tr>
<td><a href="../Management/Mg_Budget.asp?over_01=003" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('left1','','../../images/left_menu_01_03_up.gif',1)"><img name="left1" border="0" src="../../images/left_menu_01_03_up.gif" width="177" height="18"></a></td>
</tr>
<%Else%>
<tr>
<td><a href="../Management/Mg_Budget.asp?over_01=003" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('left1','','../../images/left_menu_01_03_up.gif',1)"><img name="left1" border="0" src="../../images/left_menu_01_03.gif" width="177" height="18"></a></td>
</tr>
<%End If%>
<%If Request("Over_01") = "004" Then%>
<tr>
<td><a href="../Sup_Group/Kist_univ.asp?over_01=004" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('left2','','../../images/left_menu_01_04_up.gif',1)"><img name="left2" border="0" src="../../images/left_menu_01_04_up.gif" width="177" height="18"></a></td>
</tr>
<%Else%>
<tr>
<td><a href="../Sup_Group/Kist_univ.asp?over_01=004" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('left2','','+ '+ '../../images/left_menu_01_04_up.gif',1)"><img name="left2" border="0" src="../../images/left_menu_01_04.gif" width="177" height="18"></a></td>
</tr>
<%End If%>
<%If Request("Over_01") = "005" Then%>
<tr>
<td><a href="../Inter_cooperation/Inter_Cooper.asp?over_01=005" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('left3','','../../images/left_menu_01_05_up.gif',1)"><img name="left3" border="0" src="../../images/left_menu_01_05_up.gif" width="177" height="18"></a></td>
</tr>
<%Else%>
<tr>
<td><a href="../Inter_cooperation/Inter_Cooper.asp?over_01=005" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('left3','','../../images/left_menu_01_05_up.gif',1)"><img name="left3" border="0" src="../../images/left_menu_01_05.gif" width="177" height="18"></a></td>
</tr>
<%End If%>
</table>
php에서 같은 기능을 사용하려고 합니다.
어떤식으로 바꿔야하나요?
알려주시면 정말 감사하겠습니다^^;
(긴 소스중에 일부 발췌한것입니다.)
<table border="0" cellpadding="0" cellspacing="0" >
<%If Request("Over_01") <> "" Then%>
<tr>
<td onClick="menuclick(sub1);" style="cursor:hand;"><img src="../../images/left_menu_01_up.gif" width="200" height="50"></td>
</tr>
<%Else%>
<tr>
<td onClick="menuclick(sub1);" style="cursor:hand;"><img src="../../images/left_menu_01.gif" width="200" height="50"></td>
</tr>
<%End If%>
<tr>
<td id="sub1" style="display:none;">
<table width="177" border="0" cellspacing="0" cellpadding="0">
<%If Request("Over_01") = "001" Then%>
<tr>
<td><a href="../Int_Index.asp?over_01=001" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('left43','','../../images/left_menu_01_01_up.gif',1)"><img name="left43" border="0" src="../../images/left_menu_01_01_up.gif" width="177" height="24"></a></td>
</tr>
<%Else%>
<tr>
<td><a href="../Int_Index.asp?over_01=001" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('left4','','../../images/left_menu_01_01_up.gif',1)"><img name="left4" border="0" src="../../images/left_menu_01_01.gif" width="177" height="24"></a></td>
</tr>
<%End If%>
<%If Request("Over_01") = "002" Then%>
<tr>
<td><a href="../CyberPR/Cp_List.asp?over_01=002" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('left','','../../images/left_menu_01_02_up.gif',1)"><img name="left" border="0" src="../../images/left_menu_01_02_up.gif" width="177" height="18"></a></td>
</tr>
<%Else%>
<tr>
<td><a href="../CyberPR/Cp_List.asp?over_01=002" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('left','','../../images/left_menu_01_02_up.gif',1)"><img name="left" border="0" src="../../images/left_menu_01_02.gif" width="177" height="18"></a></td>
</tr>
<%End If%>
<%If Request("Over_01") = "003" Then%>
<tr>
<td><a href="../Management/Mg_Budget.asp?over_01=003" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('left1','','../../images/left_menu_01_03_up.gif',1)"><img name="left1" border="0" src="../../images/left_menu_01_03_up.gif" width="177" height="18"></a></td>
</tr>
<%Else%>
<tr>
<td><a href="../Management/Mg_Budget.asp?over_01=003" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('left1','','../../images/left_menu_01_03_up.gif',1)"><img name="left1" border="0" src="../../images/left_menu_01_03.gif" width="177" height="18"></a></td>
</tr>
<%End If%>
<%If Request("Over_01") = "004" Then%>
<tr>
<td><a href="../Sup_Group/Kist_univ.asp?over_01=004" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('left2','','../../images/left_menu_01_04_up.gif',1)"><img name="left2" border="0" src="../../images/left_menu_01_04_up.gif" width="177" height="18"></a></td>
</tr>
<%Else%>
<tr>
<td><a href="../Sup_Group/Kist_univ.asp?over_01=004" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('left2','','+ '+ '../../images/left_menu_01_04_up.gif',1)"><img name="left2" border="0" src="../../images/left_menu_01_04.gif" width="177" height="18"></a></td>
</tr>
<%End If%>
<%If Request("Over_01") = "005" Then%>
<tr>
<td><a href="../Inter_cooperation/Inter_Cooper.asp?over_01=005" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('left3','','../../images/left_menu_01_05_up.gif',1)"><img name="left3" border="0" src="../../images/left_menu_01_05_up.gif" width="177" height="18"></a></td>
</tr>
<%Else%>
<tr>
<td><a href="../Inter_cooperation/Inter_Cooper.asp?over_01=005" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('left3','','../../images/left_menu_01_05_up.gif',1)"><img name="left3" border="0" src="../../images/left_menu_01_05.gif" width="177" height="18"></a></td>
</tr>
<%End If%>
</table>
<%If Request("Over_01") = "001" Then%> = <?php if(!strcmp($Over_01, "001")) { ?>
<%If Request("Over_01") = "002" Then%> = <?php if(!strcmp($Over_01, "002")) { ?>
<%If Request("Over_01") = "003" Then%> = <?php if(!strcmp($Over_01, "003")) { ?>
<%If Request("Over_01") = "004" Then%> = <?php if(!strcmp($Over_01, "004")) { ?>
<%If Request("Over_01") = "005" Then%> = <?php if(!strcmp($Over_01, "005")) { ?>
<%Else%> = <?php } else { ?>
<%End If%> =<?php } ?>