error_reporting(0);
require "admin/config.php";
if (isset($_GET['l'])){
$f=(int)$_GET['l'];
$sql="select * from licencias where id=$f";
$result = mysql_query($sql,$SQLid);
$row = mysql_fetch_array($result);
$fami=$row['nombre'];
$fondo=$row['foto2'];
}else{
$f=(int)$_GET['f'];
$sql="select * from familia where id=$f";
$result = mysql_query($sql,$SQLid);
$row = mysql_fetch_array($result);
$fami=$row['nombre'];
$fondo=$row['foto2'];
}
if (isset($_GET['b']))
{
$fami="Resultados para
".$_GET['q']."";
$fondo="../images/titditoys.jpg";
}
?>
if (isset($_GET['b']))
{
$q=$_GET['q'];
$sql="select * from productos where publica=0 and titulo like '%$q%' OR precios like '%$q%' OR subtitulo like '%$q%' OR codigo like '%$q%' or descripcion like '%$q%' order by orden asc";
}else{
if (isset($_GET['l'])){
$f=(int)$_GET['l'];
$sql="select * from productos where publica=0 and licencia=$f and publica=0 order by cast(codigo as unsigned) asc ";
}else{
$sql="select * from productos where publica=0 and familia like '$fami' and publica=0 order by cast(codigo as unsigned) asc";
}
}
$result = mysql_query($sql,$SQLid);
while ($row = mysql_fetch_array($result))
{
if ($row['foto']=="")
{
$fo="logo.png";
$fo="timthumb.php?src=images/logo.png&h=480&w=480&zc=1";
}else{
$fo="timthumb.php?src=admin/".$row['foto']."&h=480&w=480&zc=1";
}
?>
Art.
}?>