require_once("../conn.php");
require_once("access.php");
require_once("LeftStyles.php");
require_once("../includes.php");
//get the agent details
$q1 = "select * from yellow_agents where AgentID = '$_GET[id]' ";
$r1 = mysql_query($q1) or die(mysql_error());
$a1 = mysql_fetch_array($r1);
//get the logo
if(!empty($a1[logo]))
{
$AgentLogo = "";
}
$AgentName = $a1[FirstName]." ".$a1[LastName];
if(!empty($a1[address]))
{
$contact .= "$a1[address]
";
}
if(!empty($a1[city]))
{
$csc[] = $a1[city];
}
if(!empty($a1[state]))
{
$csc[] = $a1[state];
}
if(!empty($a1[country]))
{
$csc[] = $a1[country];
}
$csc2 .= implode(", ", $csc);
$contact .= $csc2."
";
if(!empty($a1[phone]))
{
$contacts .= "Phone: $a1[phone]";
}
if(!empty($a1[cellular]))
{
$contacts .= "; Cellular: $a1[cellular]";
}
if(!empty($a1[pager]))
{
$contacts .= "; Pager: $a1[pager]";
}
$email = "Click here to email!";
//get the number of offers
$q2 = "select count(ListingID) from yellow_listings where AgentID = '$a1[AgentID]' ";
$r2 = mysql_query($q2) or die(mysql_error());
$a2 = mysql_fetch_array($r2);
$offers = $a2[0];
if($offers > '0')
{
$offers = $offers." View offers";
}
if(!empty($a1[ResumeImages]))
{
$MyImages = explode("|", $a1[ResumeImages]);
while(list($k,$v) = each($MyImages))
{
$images .= " ";
}
if($_GET[si] >= '0' && $_GET[si] < count($MyImages))
{
$ind = $_GET[si];
$SingleImage = "";
}
}
if(!empty($a1[resume]))
{
$resume = strip_tags($a1[resume]);
$resume = nl2br($resume);
$resume = "
CLASSIFIEDS v2.0
|
=$AgentLogo?> | =$AgentName?> =$contacts?> =$email?> Offers: =$offers?> |
=$resume?> | |
=$images?> | |
=$SingleImage?> |