$useragent = $_SERVER['HTTP_USER_AGENT']; // testa browser if (preg_match('|MSIE ([0-9].[0-9]{1,2})|',$useragent,$matched)) { $browser_version=$matched[1]; $br=0; } else {$br=1;} @$codtip = $_GET['codtip']; @$codmar = $_GET['codmar']; if (@$codtip != '') { if($br=='0'){ $sql9= "SELECT * from produtos where codtip = '$codtip' order by titulo asc, codpro desc LIMIT $inicio,$maximo "; } else { $sql9= "SELECT * from produtos where codtip = '$codtip' order by titulo asc, codpro desc"; } $sqlx="select * from tipos where codtip='$codtip'";//para mostrar o titulo do tipo $resx= mysqli_query($db,$sqlx); $linhax=mysqli_fetch_array($resx); $mm=$linhax['tipo']; $msg_titulo=$mm; $msg_aviso=""; } else { if (@$codmar != '') { if($br=='0'){ $sql9= "SELECT * from produtos where codmar = '$codmar' order by titulo asc, codpro desc LIMIT $inicio,$maximo "; } else { $sql9= "SELECT * from produtos where codmar = '$codmar' order by titulo asc, codpro desc"; } $sqlx="select * from marcas where codmar='$codmar'";//para mostrar o titulo do tipo $resx= mysqli_query($db,$sqlx); $linhax=mysqli_fetch_array($resx); $mm=$linhax['marca']; $msg_titulo=$mm; $msg_aviso=""; } else { if($br=='0'){ $sql9= "SELECT * from produtos order by titulo asc, codpro desc LIMIT $inicio,$maximo "; } else { $sql9= "SELECT * from produtos order by titulo asc, codpro desc"; } $msg_titulo="Todos Produtos"; $msg_aviso=""; } } $res9 = mysqli_query($db,$sql9); ?>
Cod: print $linha9['codigo'];?> |