<?

include("mb_fn2.php");

function ad_details()
{
global $cat_fields, $photos_count, $html_header, $html_footer, $id,
$ct, $categories, $ad_second_width, $left_width_sp, $exp_period, $privacy_mail,
$schallusrads;

$row=get_ad_details($id);
$row=check_row($row);

if ($schallusrads=='yes')
{
$useradsnum=getuseradsnum($row['email']);
if ($useradsnum > 1)
{
$all_ads_user="
<font FACE='ARIAL, HELVETICA' COLOR='BLACK' size='-1'>
<li><a href='mbind.php?md=browse&idemail=".$row['idnum']."' target='all".$row['idnum']."'>
<b>Browse all membership accounts created by this user</b></a> ( $useradsnum Ads )
</li>
</font>
";
}
}

$time1=$row['time'];
$date_posted=get_date($time1); 
$timeexp=$row['exptime'];
$date_expr=get_date($timeexp); 
 
if ($row['homeurl']=="--")
{$homepage_info="not available";}
else{
$homepage_info="<a href='".$row['homeurl']."'>".$row['homeurl']."</a>";
}

$idnum=$row['idnum'];

$sdtpcol="#ffffff";
$sdtpcol1="#ffcccc";
$ad_sec_rt=$ad_second_width-$left_width_sp-1;

$repltitle="<title>".$row['title'].".  ";
$html_header=ereg_replace('<title>', $repltitle, $html_header);
echo $html_header;
echo "
<center>
<table width='$ad_second_width' bgcolor='#dddddd' border=0 cellspacing=1 cellpadding=0><tr>
  <td valign='top'>
<TABLE WIDTH='100%'  border=0 BGCOLOR='#ffffff' cellspacing='1' cellpadding='10' > 
<tr>
<TD  VALIGN=TOP>
<font FACE='ARIAL, HELVETICA' COLOR='BLACK'> <font size=-1>
<a href='mbind.php'>Top:</a> 
 
</font> 
<table width='100%' border=0 cellspacing=3 cellpadding=3>
<tr>
<td bgcolor='#eeeeee'>
<font FACE='ARIAL, HELVETICA' color='#000088' size=+1>
&nbsp;&nbsp; <b>".$row['login']."</b></font>
</td>
</tr>
</table>
<table width='100%'  bgcolor='#ffffff' cellspacing=5 cellpadding=5>
<tr><td>
<font size=-1>
<font color='#007700' >&nbsp;&nbsp;ID# : </font><font color='#aa0000'>
$idnum
</font>; 
&nbsp;
<font color='#007700' >  Posted: </font> <font color='#aa0000' >
 $date_posted </font>;
<font color='#007700' > Expire date: </font> <font color='#aa0000' >
 $date_expr </font>;
&nbsp;
 
 
<table width='100%'  border=0 bordercolor='#ffffff' cellspacing=3 cellpadding=0>
";


foreach ( $cat_fields as $key => $value )
{
if (ereg('2', $cat_fields[$key][1]))
{
echo "
<tr><td colspan='2' height='1' bgcolor='$sdtpcol1'><spacer type='block' height='1' width='1'></td></tr>
<tr><td bgcolor='$sdtpcol' width='25%'>
<font FACE='ARIAL, HELVETICA' COLOR='#000088' size='-1'>
&nbsp; ".$cat_fields[$key][0].":</font>
</td><td bgcolor='$sdtpcol' width='75%'>
<font FACE='ARIAL, HELVETICA' COLOR='BLACK' size='-1'>
 ".$row[$key]." &nbsp; </td></tr>
 
";
}

}

echo "
<tr><td colspan='2' height='1' bgcolor='$sdtpcol1'><spacer type='block' height='1' width='1'></td></tr>
</table>
<p>
<font FACE='ARIAL, HELVETICA' COLOR='BLACK' size='-1'>
<ul>
<li>Contact e-mail: <a href='mailto:".$row['email']."'>".$row['email']."</a></li>
<li>Home Page: $homepage_info</li> 
</ul>
<p>
 
<p>
</b></font>

<font FACE='ARIAL, HELVETICA' COLOR='BLACK' size='-1'>
 
<p>
$all_ads_user

</td></tr></table> 
<p>
 

<font FACE='ARIAL, HELVETICA' COLOR='BLACK' size='-2'>
<b>Press Ctrl+D to bookmark this page</b>
</font>
</td></tr></table>
</td></tr></table>
</center> 
";

echo $html_footer;
exit;
}

?>
