Металлорежущий инструмент

'; 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.'

'; if ($id == 1156){echo 'Фрезы отрезные';}else if ($id == 1110){echo 'Полотно ножовочное машинное';} else {echo $row[0];} echo '



'; $string = strpos($id,"-"); if ($string > 1) { $page=substr($id,$string+1); $id=substr($id,0,$string); } $query = "select * from `magazin_tula` where `parent`= $id && `product`=1"; $result = mysqli_QUERY($db,$query); $total_rows = mysqli_num_rows($result); if ($total_rows == 0) { $query = "select * from magazin_tula where `parent`='$id'"; $result = mysqli_QUERY($db,$query); while($row = mysqli_fetch_row($result)) { echo ''.$row[2].'
'; } } else { $query = "select * from magazin_tula where `parent`='$id'"; $result = mysqli_QUERY($db,$query); //ttt $total_rows = mysqli_num_rows($result); if ($total_rows <= 50) { $query = "select * from magazin_tula where `parent`='$id'"; } else { if (!isset($page)){$n=0;} else {$n = $page*50-50;} $query = "select * from magazin_tula where `parent`='$id' LIMIT $n,50"; } $result = mysqli_QUERY($db,$query); echo '
'; echo ' '; echo ''; echo ''; $k=1; while($row = mysqli_fetch_row($result)) { if ($row[5] != 0 || $row[6] != 0) { if ($row[5] == 0){$c_sklad = $row[6];}else {$c_sklad = $row[5];} if ($k%2 == 0) {$bgcol="#426a8e";} else {$bgcol="#507da5";} $k++; echo ''; print "'; } } echo ''; echo ''; echo ''; echo '
НаименованиеЦена НаличиеКол-во
'; $ff = $_SERVER["DOCUMENT_ROOT"]."/img/foto/".$row[1].".jpg"; if (file_exists($ff)) { echo '
'; } else $ff1 = $_SERVER["DOCUMENT_ROOT"]."/img/foto/".$row[0].".jpg"; if (file_exists($ff1)) { echo '
'; } if ($id == 1156) { $b = substr($row[2],0,12); $w_rep = "Фреза отрезная"; $ss = "#".$b."#"; $rep = preg_replace($ss,$w_rep,$row[2]); echo $rep; } else if ($id == 1168) { $b = substr($row[2],0,11); $w_rep = "Фреза шпоночная"; $ss = "#".$b."#"; $rep = preg_replace($ss,$w_rep,$row[2]); echo $rep; } else if ($id == 1110) { $b = substr($row[2],0,18); $w_rep = "Полотно ножовочное машинное"; $ss = "#".$b."#"; $rep = preg_replace($ss,$w_rep,$row[2]); echo $rep; } else {echo $row[2];} $ff = $_SERVER["DOCUMENT_ROOT"]."/img/foto/".$row[1].".jpg"; if (file_exists($ff)) { echo '
'; } else $ff1 = $_SERVER["DOCUMENT_ROOT"]."/img/foto/".$row[0].".jpg"; if (file_exists($ff1)) { echo '
'; } echo '
-'.$c_sklad.'"; print "
".$row[3]."
"; echo '
Просмотр корзины
'; $n = intval($total_rows/50); for ($i=1;$i<=$n;$i++) { if ($i == 1) { echo ''.$i.' '; } else { echo ''.$i.' '; } } echo '
'; } } } include ($_SERVER['DOCUMENT_ROOT']."/scripts/content.php");