<?
$sql="Select * from tbl_site_setting";
$rs_category = mysql_query($sql);
$edit_home_banner = mysql_result($rs_category,0,str_home_banner);
$edit_home_content = mysql_result($rs_category,0,str_home_content);
$edit_home_product_model_number = mysql_result($rs_category,0,str_home_product_model_number);
if($edit_home_product_model_number!=""){
$sql_home = "select * from tbl_product where str_product_model_no = '$edit_home_product_model_number'";
$rs_home = mysql_query($sql_home);
if(mysql_num_rows($rs_home)>0){
$product_id = mysql_result($rs_home,0,int_product_id);
$link_new = "pro_detail.php?pro_id=".$product_id;
}else{
$link_new = "#";
}
}else{
$sql_home = "select * from tbl_product where str_product_model_no = '$edit_home_product_model_number'";
$rs_home = mysql_query($sql_home);
}
?>
<tr>
<td valign="bottom"><a href="<?=$link_new?>"><img src="images/tnusa_EuroDesigned_txt.gif" border="0" width="420" height="16"></a></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="1">
<tr>
<td height="1" bgcolor="#666666"><img src="images/blank.gif" width="1" height="1"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<table width="100%" height="116" border="0" cellpadding="15" cellspacing="2">
<tr>
<td class="detail-text">
<? if(edit_home_content!=""){?>
<div align="justify">
<?=$edit_home_content?>
</div>
<?}else{?>
<div align="justify">TimeNetUSA.com is
committed to providing our customers with the absolute latest
in fashion design innovation, superior customer service, deep
inventories and the newest laser decorating technology.
</div>
<?}?>
</td>
</tr>
</table>
</td>
<td width="2" background="images/dot_horzvert.gif"><img src="images/blank.gif" width="2" height="1"></td>
<td width="280" align="center" valign="bottom">
<?if($edit_home_banner!=""){?>
<img src="images/uploaded_images/category/<?=$edit_home_banner?>" width="241" height="162">
<?}else{?>
<img src="images/secondary_feature.jpg" width="241" height="162">
<?}?>
<?
if(mysql_num_rows($rs_home)>0){
?>
<br><a href="<?=$link_new?>"><font face="Arial" size="1" color="Red">Click to view this product</font></a>
<?
}
?>
</td>
</tr>
<tr background="images/dot_horzvert.gif">
<td height="2" colspan="3"><img src="images/blank.gif" width="1" height="2"></td>
</tr>
</table>
$sql="Select * from tbl_site_setting";
$rs_category = mysql_query($sql);
$edit_home_banner = mysql_result($rs_category,0,str_home_banner);
$edit_home_content = mysql_result($rs_category,0,str_home_content);
$edit_home_product_model_number = mysql_result($rs_category,0,str_home_product_model_number);
if($edit_home_product_model_number!=""){
$sql_home = "select * from tbl_product where str_product_model_no = '$edit_home_product_model_number'";
$rs_home = mysql_query($sql_home);
if(mysql_num_rows($rs_home)>0){
$product_id = mysql_result($rs_home,0,int_product_id);
$link_new = "pro_detail.php?pro_id=".$product_id;
}else{
$link_new = "#";
}
}else{
$sql_home = "select * from tbl_product where str_product_model_no = '$edit_home_product_model_number'";
$rs_home = mysql_query($sql_home);
}
?>
<tr>
<td valign="bottom"><a href="<?=$link_new?>"><img src="images/tnusa_EuroDesigned_txt.gif" border="0" width="420" height="16"></a></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="1">
<tr>
<td height="1" bgcolor="#666666"><img src="images/blank.gif" width="1" height="1"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<table width="100%" height="116" border="0" cellpadding="15" cellspacing="2">
<tr>
<td class="detail-text">
<? if(edit_home_content!=""){?>
<div align="justify">
<?=$edit_home_content?>
</div>
<?}else{?>
<div align="justify">TimeNetUSA.com is
committed to providing our customers with the absolute latest
in fashion design innovation, superior customer service, deep
inventories and the newest laser decorating technology.
</div>
<?}?>
</td>
</tr>
</table>
</td>
<td width="2" background="images/dot_horzvert.gif"><img src="images/blank.gif" width="2" height="1"></td>
<td width="280" align="center" valign="bottom">
<?if($edit_home_banner!=""){?>
<img src="images/uploaded_images/category/<?=$edit_home_banner?>" width="241" height="162">
<?}else{?>
<img src="images/secondary_feature.jpg" width="241" height="162">
<?}?>
<?
if(mysql_num_rows($rs_home)>0){
?>
<br><a href="<?=$link_new?>"><font face="Arial" size="1" color="Red">Click to view this product</font></a>
<?
}
?>
</td>
</tr>
<tr background="images/dot_horzvert.gif">
<td height="2" colspan="3"><img src="images/blank.gif" width="1" height="2"></td>
</tr>
</table>
$sql="Select * from tbl_site_setting";
$rs_category = mysql_query($sql);
$edit_home_banner = mysql_result($rs_category,0,str_home_banner);
$edit_home_content = mysql_result($rs_category,0,str_home_content);
$edit_home_product_model_number = mysql_result($rs_category,0,str_home_product_model_number);if($edit_home_product_model_number!=""){
$sql_home = "select * from tbl_product where str_product_model_no = '$edit_home_product_model_number'";
$rs_home = mysql_query($sql_home);
if(mysql_num_rows($rs_home)>0){
$product_id = mysql_result($rs_home,0,int_product_id);
$link_new = "pro_detail.php?pro_id=".$product_id;
}else{
$link_new = "#";
}
}else{
$sql_home = "select * from tbl_product where str_product_model_no = '$edit_home_product_model_number'";
$rs_home = mysql_query($sql_home);
}
?>======================================================================================================================
<%
set rs=conn.execute("Select * from tbl_site_setting")
edit_home_banner = rs("str_home_banner")
edit_home_content = rs("str_home_content")
edit_home_product_model_number = rs("str_home_product_model_number")if edit_home_product_model_number<>"" then
set rs=conn.execute("select * from tbl_product where str_product_model_no = '"&edit_home_product_model_number&"'")
if not rs.eof then
product_id = rs("int_product_id")
link_new = "pro_detail.php?pro_id="&product_id
else
link_new="#"
end if
set rs_home = conn.execute("select * from tbl_product where str_product_model_no = '"&edit_home_product_model_number&"'")
%>
我觉得你的逻辑有点问题
我没调试哈
大概应该没啥问题最后缺少一个end if