<script language="JavaScript"> 
<!-- 
//图片按比例缩放 
var flag=false; 
function DrawImage(ImgD){ 
  var image=new Image(); 
  var iwidth = 720;  //定义允许图片宽度 
  var iheight = 700;  //定义允许图片高度 
  image.src=ImgD.src; 
  if(image.width>0 && image.height>0){ 
   flag=true; 
   if(image.width/image.height>= iwidth/iheight){ 
    if(image.width>iwidth){   
    ImgD.width=iwidth; 
    ImgD.height=(image.height*iwidth)/image.width; 
    }else{ 
    ImgD.width=image.width;   
    ImgD.height=image.height; 
    } 
    ImgD.alt=image.width+"×"+image.height; 
    } 
   else{ 
    if(image.height>iheight){   
    ImgD.height=iheight; 
    ImgD.width=(image.width*iheight)/image.height;      
    }else{ 
    ImgD.width=image.width;   
    ImgD.height=image.height; 
    } 
    ImgD.alt=image.width+"×"+image.height; 
    } 
   } 
} 
 
//--> 
</script> 
<?php
global $db;
$sql1="Select * from S_pic where S_ID=$id";
$row1=$db->getrow($sql1);
$rowu=$db->getrow("Select * from s_pic where S_ID<$id and s_user='".$chsh_web_name."' order by S_ID desc");
if($rowu){
$slink=getuserpic($chsh_web_name,$rowu['S_ID']);
}else{
$slink="#";
}
$rowd=$db->getrow("Select * from s_pic where S_ID>$id and s_user='".$chsh_web_name."' order by S_ID asc");
if($rowd){
$xlink=getuserpic($chsh_web_name,$rowd['S_ID']);
}else{
$xlink="#";
}
$picnum=$db -> num_rows($db -> query("select * from s_pic where S_user='".$chsh_web_name."'"));
?>
<table width="756" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>
 
	
	<table border="0" cellpadding="0" cellspacing="0" class="Page-deeptable">
		  	<tr>
<td width="203" class="righttable01"><img src="images/web/dl_01_02.jpg" width="9" height="9" align="absmiddle">
<strong><?php echo $row1["S_User"]?></strong></td>
<td width="551" align="right" class="righttable01">
    <a href="<?php echo $slink?>"><img src="images/web/bott_pageup.gif" width="26" height="26" border="0" align="absmiddle"></a>
共<?php echo $picnum?>张
<a href="<?php echo $xlink?>"><img src="images/web/bott_pagedown.gif" width="26" height="26" border="0" align="absmiddle"></a>
</td>
</tr>
           </td>
        </tr>
        <tr align="left" valign="top"> 
          <td height="150" colspan="2" align="center" class="righttable02">
		
	    <br>
	<a href="<?php echo $row1["S_Url"]?>" target="_blank"><img src="<?php echo $row1["S_Url"]?>" class="line4" border="0" name="theimg"> </a>
   <br>
		 </td>
        </tr>
      </table></td>
  </tr>
</table>
<table width="756" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td height="8"></td>
  </tr>
</table>
<table width="756" border="0" align="center" cellpadding="0" cellspacing="0" class="bottomtable">
  <tr> 
    <td><div align="center">
</div></td>
  </tr>
</table>
