<? 

function get_hname($id)
{
list($name)=mysql_fetch_array(mysql_query("select name from hotspot where id=$id"));
return $name;
}

function display_Wall($hid,$no,$paging)
{
		$query3="select id,uid,body,posted from hotspot_wall  where hotid=$hid order by posted desc";
		$result=mysql_query(dopaging($query3,$no)) or die(mysql_error());
	
		$count=mysql_num_rows($result);
		$i=0;
		if($count==0)
		  {
		   ?>
			<table align="center" cellpadding="0" cellspacing="0">
			<tr>
			<td class="normaltext" ><?=_NONHS_SAID_ANTHNG_YET_?> 
			 <? if($_SESSION['uid']!=''){?>
            <a href="wall_hotspots.php?addwall&hid=<?= $hid ?>" class="smalla1old"><?=_WRT_SOMTH_?></a>
			 <? }
			else{?>
			<a href="wall_hotspots.php?addwall&hid=<?= $hid ?>" class="smalla1old"><?=_WRT_SOMTH_?></a>
			<? }?>
            </td>
			</tr></table>
			<?
		  }
		else
		 {	
		   ?>
<table width="100%" align="center" cellpadding="0" cellspacing="0">
   <?
			if($paging==1)
				  {
					 
				//if(rightpaging())
					//{
					?>
                             
						  <tr>
							  <td><span class="head"><b><?=_DISP_?>
						<? if($_REQUEST['page'])
								  		{
										$page=$_REQUEST['page'];
										$selpage=$page*$no;
										$prevpage=($page-1)*$no;
										echo "".$prevpage+'1'."-".$selpage;
										}
										else
										{
										echo "1-$no " ;
										}
						?>
						
						
						</b></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?= rightpaging(); ?> 
						  </td>
						</tr>  
							  
					<? // }   
					}
					
			?>
  <tr>
    <td><?
			while($row = mysql_fetch_array($result))
			{
				$bid=$row[0];
				$fromid=$row[1];				
				$body=$row[2];
				
				
			  list($year,$mon,$day,$hour,$min,$sec)=split('[- :]',$row['posted']); 	
	         // $today = date("l F dS, Y h:i A",mktime($hour,$min,$sec,$mon,$day,$year));
				$date=date ( "d.m.Y", mktime($hour,$min,$sec,$mon,$day,$year) );
				$time = date ( "g:i A", mktime($hour,$min,$sec,$mon,$day,$year) );
				
				$g=get_fname($fromid);
				$img=get_user_image(get_fieldval(id,image,user,$fromid),60,60);
				?>
				
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="76" align="center" valign="top"><?= $img ?></td>
          <td >
		  
		  <table width="100%" border="0" cellspacing="" cellpadding="0">
              <tr height="20px">
                <td background="template/black.png" style="background-position:top"><span class="normaltextnotbold">&nbsp;&nbsp;<a href="view_profile.php?id=<?=$fromid?>" class="smalla1old"><?= $g ?></a></span>	<span class="normaltextblack"><?=_WROTON_?> <?= $date ?>
				&nbsp;&nbsp;<?=_AT_?> 	<?= $time ?></span>			</td>
              </tr>
              <tr>
                <td>
                   <div style="margin-left:10px; margin-top:5px; margin-bottom:10px" class="normaltextblack"><?= $body ?></div>
				 &nbsp; <a href="wall_hotspots.php?addwall&hid=<?=$hid?>" class="smalla1old"><?=_W_TO_W_?></a>
				  - <a href="compose.php?friend_id=<?=$fromid?>" class="smalla1old"><?=_MESSAGE_?></a>
				  	<? 
					$uid=$_SESSION['id'];
					if($uid==$fromid){?>
				   - <a href="view_hotspots.php?viewid=<?=$hid?>&del=<?=$bid?>" class="smalla1old" onClick="return confirm('<?=_RUSURTO_DELTHS_WAL_?>');"><?=_DE_L_?></a>
				   	<? }?>   
				 
				</td>
              </tr>
            </table>
          
		  
	      </td>
        </tr>
      </table>
<img src="images/line1.gif" width="78%" height="1px" align="right" style="margin-top:5px" /><br>&nbsp;
      <?
			}
			
			?>
    </td>
  </tr>
</table>
<?
			
		}
		
}
?>