<?php

include_once('db.inc.php');


function more_mail($mail){
	$mail=explode("; ", $mail);
	foreach ($mail as $value) {
		$str.= sprintf("<A HREF=\"mailto:%s\">%s</A> ", $value, $value);
	}
	return $str;
}


if(!isset($id)){
	exit();
}



include('header.inc.php');
?>

<img src="images/szaknevsor.gif" width=339 height=27 alt="">
		<table border="0" cellpadding="0" cellspacing="5" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber6">
              <tr>
                <td width="100%">

<?php
printf("
<H5>%s</H5>
<TABLE>", "RÉSZLETES ADATOK");



$mydb = new db();
$stmt="SELECT * FROM kk_tag WHERE id=$id AND jovahagyva='1'";

$result=$mydb->query($stmt);
while($row = mysql_fetch_object($result)){

	printf("<TR valign='top'><TH align=\"left\" style='font-size: 11px; font-family: Tahoma'><B>Név</B></TH><TD valign='top'><B>%s</B></TD></TR>\n", $row->nev);
	printf("<TR valign='top'><TH align=\"left\" style='font-size: 11px; font-family: Tahoma'><B>Cím</B></TH><TD valign='top'>%s %s, %s</TD></TR>\n", $row->irsz, $row->telepules, $row->utca);

	if($row->ext==1){
		printf("<TR valign='top'><TH align=\"left\" style='font-size: 11px; font-family: Tahoma'><B>Telefon</B></TH><TD valign='top'>%s</TD></TR>\n", $row->telefon);

		$fax = $row->fax;
		if ($fax != '') {
			printf("<TR valign='top'><TH align=\"left\" style='font-size: 11px; font-family: Tahoma'><B>Fax</B></TH><TD valign='top'>%s</TD></TR>\n", $fax);
			}

		printf("<TR valign='top'><TH align=\"left\" style='font-size: 11px; font-family: Tahoma'><B>E-mail</B></TH><TD valign='top'>%s</TD></TR>\n", more_mail($row->email));

		$web = $row->web;
		if ($web != '') {
		printf("<TR valign='top'><TH align=\"left\" style='font-size: 11px; font-family: Tahoma'><B>Web</B></TH><TD valign='top'><A HREF=\"%s\" TARGET=\"_blank\">%s</A></TD></TR>\n", $web, $web);
			}
		}

	printf("<TR valign='top'><TH align=\"left\" style='font-size: 11px; font-family: Tahoma'><B>Szolgáltatások</B></TH><TD valign='top'>%s</TD></TR>\n", $row->szolgaltatas);
	printf("<TR valign='top'><TH align=\"left\" style='font-size: 11px; font-family: Tahoma'><B>Specialitások</B></TH><TD valign='top'>%s</TD></TR>\n", $row->specialitas);
	printf("<TR valign='top'><TH align=\"left\" style='font-size: 11px; font-family: Tahoma'><B>Referenciák</B></TH><TD valign='top'>%s</TD></TR>\n", $row->referenciak);

}

printf("</TABLE><BR>");
printf("</td></tr>");
?>
 </td>
              </tr>
            </table><hr noshade color="#C0C0C0" size="1">
<P align="center"><a href="cimtar.php">Vissza a kereséshez</a></p>
<?php
include('footer.inc.php');
?>