function vyvodtit($kw)
{
$id = $_SERVER['QUERY_STRING'];
$db = mysqli_connect("172.18.0.1", "micron", "Gf66EtSN6L2Cvbm9", "micron");
$query2 = "SET character_set_results = utf8";
$result2 = mysqli_query($db, $query2);
if ($id == "id")
{
echo 'ООО ПКФ "ИТО - Туламаш": интернет магазин';
}
else
{
$query = "select `name`,`parent` from `magazin_tula` where `code`='$id'";
$result = mysqli_QUERY($db,$query);
$row = mysqli_fetch_row($result);
$query1 = "select `name`,`parent` from `magazin_tula` where `code`='$row[1]'";
$result1 = mysqli_QUERY($db,$query1);
$row1 = mysqli_fetch_row($result1);
$query2 = "select `name` from `magazin_tula` where `code`='$row1[1]'";
$result2 = mysqli_QUERY($db,$query2);
$row2 = mysqli_fetch_row($result2);
if (isset($row2[0])){$k=" / ";} else {$k="";}
if (isset($row1[0])){$m=" / ";} else {$m="";}
if ($kw != "keyw"){echo 'ООО ПКФ "ИТО - Туламаш": ';}if ($id == 1156){echo 'Фрезы отрезные';}else if ($id == 1110){echo 'Полотно ножовочное машинное';}else {echo $row[0];}
}
}
function vyvodtit1()
{
$id = $_SERVER['QUERY_STRING'];
$db = mysqli_connect("172.18.0.1", "micron", "Gf66EtSN6L2Cvbm9", "micron");
$query2 = "SET character_set_results = utf8";
$result2 = mysqli_query($db, $query2);
if ($id == 1140)
{
echo 'сверло ц х сверло ц/х';
}
else
if ($id == 1156)
{
echo 'фреза отрезная фрезы отрезные';
}
else
if ($id == 1110)
{
echo 'полотно ножовочное полотно машинное';
}
else
{
$k = "keyw";
echo vyvodtit($k);
}
}
function vyvod()
{
$id = $_SERVER['QUERY_STRING'];
$db = mysqli_connect("172.18.0.1", "micron", "Gf66EtSN6L2Cvbm9", "micron");
$query2 = "SET character_set_results = utf8";
$result2 = mysqli_query($db, $query2);
if ($id == "id")
{
/*
$query = "select * from magazin_tula where `code`='7' || `code`='22' || `code`='6' || `code`='8'";
$result = mysqli_QUERY($db,$query);
while($row = mysqli_fetch_row($result))
{
*/
echo 'Металлорежущий инструмент
';
echo 'Калибры
';
echo 'Измерительный инструмент
';
echo 'Слесарно-монтажный инструмент
';
/*
}
*/
}
else
{
$query = "select `name`,`parent` from `magazin_tula` where `code`='$id'";
$result = mysqli_QUERY($db,$query);
$row = mysqli_fetch_row($result);
$query1 = "select `name`,`parent` from `magazin_tula` where `code`='$row[1]'";
$result1 = mysqli_QUERY($db,$query1);
$row1 = mysqli_fetch_row($result1);
$query2 = "select `name` from `magazin_tula` where `code`='$row1[1]'";
$result2 = mysqli_QUERY($db,$query2);
$row2 = mysqli_fetch_row($result2);
if (isset($row2[0])){$k=" / ";} else {$k="";}
if (isset($row1[0])){$m=" / ";} else {$m="";}
echo ''.$row2[0].''.$k.''.$row1[0].''.$m.'