0) { ob_start(); include($_SERVER['DOCUMENT_ROOT'].'/templates/trazdel2.html'); $resultdb = ob_get_contents(); ob_end_clean(); } //print_r($dbcont); } else { //--------------------- $res = mysql_query( 'SELECT * FROM `tovar` WHERE `idcat`='.$_GET['cat'].' ORDER BY `model`' ); $countRes = MYSQL_NUMROWS($res); for ($i=0; $i<$countRes;$i++) { //$namecat = getNameCat($db_conn, mysql_result($res,$i,'idcat')); $id = mysql_result($res,$i,'id'); $namet = mysql_result($res,$i,'name'); $model = getNameModel($db_conn, mysql_result($res,$i,'model')); $color = mysql_result($res,$i,'color'); $mater = mysql_result($res,$i,'mater'); $size = mysql_result($res,$i,'size'); $prise = mysql_result($res,$i,'prise'); $PACHFOTOSMALL = mysql_result($res,$i,'PACHFOTOSMALL'); $PACHFOTOBIG = mysql_result($res,$i,'PACHFOTOBIG'); $STRAZI = mysql_result($res,$i,'STRAZI'); $PECHAT = mysql_result($res,$i,'PECHAT'); $dbcont[$id]['name']= $namet; $dbcont[$id]['model']= $model; $dbcont[$id]['color']= $color; $dbcont[$id]['mater']= $mater; $dbcont[$id]['size']= $size; $dbcont[$id]['prise']= $prise; $dbcont[$id]['PACHFOTOSMALL']= $PACHFOTOSMALL; $dbcont[$id]['PACHFOTOBIG']= $PACHFOTOBIG; $dbcont[$id]['STRAZI']= $STRAZI; $dbcont[$id]['PECHAT']= $PECHAT; } //print_r($dbcont); if ($countRes>0) { ob_start(); include($_SERVER['DOCUMENT_ROOT'].'/templates/trazdel.html'); $resultdb = ob_get_contents(); ob_end_clean(); } //---------------------- } mysql_close($db_conn); } else { $name = 'Категории не существует'; } $content = file_get_contents($_SERVER['DOCUMENT_ROOT']."/view/razdel.html"); $content = str_replace('', $name, $content); $content = str_replace('', $resultdb, $content); return include $_SERVER['DOCUMENT_ROOT']."/templates/base.html";