<?php
include('db.inc.php');
include('header.inc.php');
?>
<table border="0" cellpadding="10" cellspacing="10" width="100%">
                            <tr>
                                <td width="100%">
                                <p class="vezercikkcim">Kulcsszavas keresés a szaknévsorban</p>
<?php
if(isset($round)){

	$other=addslashes($_POST["other"]);

	$mydb = new db();

	$stmt="SELECT * FROM kk_tag WHERE jovahagyva='1' AND (nev LIKE '%$other%' OR referenciak LIKE '%$other%' OR szolgaltatas LIKE '%$other%' OR specialitas LIKE '%$other%' OR irsz LIKE '%$other%' OR telepules LIKE '%$other%' OR utca LIKE '%$other%' OR telefon LIKE '%$other%' OR fax LIKE '%$other%' OR web LIKE '%$other%' OR email LIKE '%$other%') ORDER BY nev ASC";

	$result=$mydb->query($stmt);


	$feltetel="";

	if($other==""){
		$feltetel.="Kulcsszó: bármi";
	}else{
		$feltetel.="Kulcsszó: " . $other;
	}

	printf("<H5>%s</H5>%s<BR>", "A KERESÉS EREDMÉNYE", $feltetel);

	$darab=mysql_num_rows($result);

	if($darab==0){
		printf("A keresés nem hozott eredményt.");
	} else {
		printf("Találatok száma: %s.", $darab);
		printf("
		<TABLE CELLSPACING='10'>
		<TR>");
		printf("<td><B>Cégnév</B></td>\n");
		printf("<td><B>Adatlap megtekintése</B></td></TR>\n");

		while($row = mysql_fetch_object($result)){

			printf("<TR><TD valign='top'>%s</TD><TD valign='top' align='center'><A HREF=\"/szaknevsor/%s\">Részletek &raquo;</a></TD></TR>", $row->nev, $row->url);
		}
		printf("</TABLE><BR>");
	}

} else {
/*
	printf("
	<H5>%s</H5>
	<TABLE style='font-size: 11px; font-family: Tahoma' STYLE='background: #FFFFFF;'>", "KERESÉS");

	printf("
	<FORM ACTION=\"$PHP_SELF\" METHOD=\"POST\">
	<TR><TH style='font-size: 11px; font-family: Tahoma' align=\"left\"><B>Kulcsszavak</B></TH><TD><INPUT TYPE=\"text\" NAME=\"other\" SIZE=\"40\"></TD></TR>
	<TR><TH align=\"left\">&nbsp;</TH><TD><INPUT TYPE=\"hidden\" NAME=\"round\" VALUE=\"1\">
	<INPUT TYPE=\"submit\" VALUE=\"Mehet\"></TD></TR>
	</FORM>
	</TABLE>
	");
*/

}

//include('lezar.inc.php');
//include('edenkert.inc.php');?>
 </td>
              </tr>
            </table>

<?php
include('footer.inc.php');
?>
