<?
$pars = $_GET;
$file = fopen("admin/webconfig/makehtml.txt","r");
$makehtml = fgetss($file);
fclose($file);

if ($makehtml == 1)
{
	if (file_exists(realpath("EMS_Content".$pars["id"].$pars["bid"].$pars["sid"].$pars["tid"].$pars["fid"].".html")))
	{
		header("Location:"."EMS_Content".$pars["id"].$pars["bid"].$pars["sid"].$pars["tid"].$pars["fid"].".html");
		exit();
	}

}
?>
<?php include_once "EMS_Top.php";?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><table width="960" border="0" align="center" bgcolor="#FFFFFF" style="padding-top:10px; padding-bottom:10px;">
      <tr>
        <td width="21%" valign="top" style="padding-left:5px;"><?php include_once("EMS_Left.php");?></td>
        <td width="79%" valign="top"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" style="border:1px solid #a1d0ec;">
          <tr>
            <td><table width="100%" border="0" cellpadding="0" cellspacing="0" background="images/appimages/news_bg.jpg">
              <tr>
                <td width="4%" height="34" style="padding-left:20px; font-size:12px; font-weight:bold; color:#43a6df"><img src="images/appimages/home.jpg" width="19" height="17" /></td>
                <td width="11%" align="left" style="padding-left:5px; font-size:12px; font-weight:bold; color:#43a6df"><?php echo Sublm($pars,0);?></td>
                <td width="85%" align="right" style=" padding-right:20px; font-size:12px;color:#43a6df">您的位置：
                  <?php Sublm($pars["bid"],1); ?>
                  <?php Sublm($pars["sid"],1); ?>
                  <?php Sublm($pars["tid"],1); ?>
                  <?php Sublm($pars["fid"],1); ?></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td><?php 
	$con_query = mysql_query("select * from `web_content` where bid=".$pars["bid"]." and sid=".$pars["sid"]." and tid=".$pars["tid"]." and fid=".$pars["fid"]);
	while ($con_rs = mysql_fetch_array($con_query))
	 {
		 if ($con_rs["state"] == 1) 
		 {	
			if ($con_rs["showpic"] == 0)
			{
	?>
              <table width="90%" border="0" align="center">
                <tr>
                  <td style="line-height:25px; font-size:12px;"><?php echo $con_rs["content"]; ?></td>
                </tr>
              </table>
              <?php
			}
		
		    elseif ($con_rs["showpic"] == 1)
		    {
			 ?>
              <table width="90%" border="0" align="center">
                <tr>
                  <td style="line-height:25px; font-size:12px;"><?php
			   if ($con_rs["pic"] == "/")
				{
			  ?>
						  <img src="images/null.gif" style="float:left; padding-top:10px; padding-right:8px;" width="100" height="100" />
						  <?php
				}
				else 
				{
			  $size = GetPicSize($con_rs["pic"]);
			  ?>
                    <img src="<?php echo $con_rs["pic"]; ?>" style="float:left; padding-top:10px; padding-right:8px;" width="<?php echo $size[0];?>" height="<?php echo $size[1];?>" />
                    <?php
				  }
		?>
                    <?php echo $con_rs["content"]; ?></td>
                </tr>
              </table>
              <?php
			 
		    }
			else
			{
				?>
                  <table width="90%" border="0" align="center">
                <tr>
                  <td style="line-height:25px; font-size:12px;"><?php
			   if ($con_rs["pic"] == "/")
				{
			  ?>
						  <img src="images/null.gif" style="float:left; padding-top:10px; padding-right:8px;" width="100" height="100" />
						  <?php
				}
				else 
				{
			  $size = GetPicSize($con_rs["pic"]);
			  ?>
                    <img src="<?php echo $con_rs["pic"]; ?>" style="float:left; padding-top:10px; padding-right:8px;" width="<?php echo $size[0];?>" height="<?php echo $size[1];?>" />
                    <?php
				  }
		?>
                    <?php echo $con_rs["content"]; ?></td>
                </tr>
              </table>
                <?php
			}
			
		 }
		
	 }
	 mysql_free_result($con_query);
	?></td>
          </tr>
        </table></td>
      </tr>
    </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td>&nbsp;</td>
        </tr>
    </table></td>
  </tr>
</table>
<?php include_once "EMS_Bottom.php";?>