- Nenhum produto foi encontrado nesta categoria.
-
}
$array1 = mysql_fetch_array($res2);
if($array1) {
$tb1 = "$array1[codigo]";
$tb2 = "$array1[codigo_categoria]";
$tb3 = "$array1[codigo_cliente]";
$tb4 = "$array1[sub]";
$tb5 = "$array1[nome]";
$tb5 = htmlspecialchars($tb5);
$tb6 = "$array1[descricao]";
$tb6 = htmlspecialchars($tb6);
if (strlen($tb6) > 100){
$tb6 = substr($tb6,0,100);
$tb6 = $tb6."...";
}
if (strlen($tb5) > 60){
$tb5 = substr($tb5,0,60);
$tb5 = $tb5."...";
}
$tb7 = "$array1[tipo_negocio]";
$tb8 = "$array1[foto_chamada]";
$tb9 = "$array1[valor]";
if(($tb9 == "") || ($tb9 == "0.0000"))
$tb9 = "Consulta";
else
$tb9 = "R$ ".number_format($tb9,2,",",".");
$tb10 = "$array1[vendido]";
$tb11 = "$array1[finalidade]";
$corfinal = "$array1[cor]";
$destaque = "$array1[destaque]";
$datai = "$array1[data]";
$datavendido = "$array1[datavendido]";
$diasnoar = "$array1[dias]";
$vendido = "$array1[vendido]";
//echo "VENDIDO ?? >$vendido
- padding:10px; border-radius: 15px;">
if($tb11 == 1 ) { ?> if($tb10 == 2){ ?> } else { ?>
} else {
$filenamei = "produtos/$tb8";
if (file_exists($filenamei)) {
?> } else { ?>
}}
?>
} ?>
Cod
}
if ($intCont % 3 == 0){ ?>
"; //echo "DIAS NO AR >$diasnoar
"; //echo "DATA VENDIDO >$datavendido
"; //echo "DATA INCLUÍDO>$datai
"; /* ////////////////////////////////DELETA DEPOIS DE 20 DIAS DE FINALIZADO /////////////////////////////////// if($datavendido != "0000-00-00"){ $date_ini = muda($datavendido); $date_end = $hoje; $array_temp = explode("/",$date_ini); $date_inir = $array_temp[2]."/".$array_temp[1]."/".$array_temp[0]; $array_temp = explode("/",$date_end); $date_endr = $array_temp[2]."/".$array_temp[1]."/".$array_temp[0]; $date_inir = strtotime($date_inir); $date_endr = strtotime($date_endr); $date_diff = ($date_endr - $date_inir) / 86400; $diasvencido = floor($date_diff); // SE PASSOU MAIS DE 20 dias e estiver vencido, deleta !! if ($diasvencido > 20 and $vendido == 1) { $res7 = mysql_query("SELECT * from produtos WHERE codigo = '$tb1'",$connection) ; $array7 = mysql_fetch_array($res7); $codigo_produto = "$array7[codigo]"; $fotochamada = "$array7[foto_chamada]"; unlink("produtos/".$fotochamada); $res18 = mysql_query("SELECT * from fotos_anuncios WHERE cod_anuncio = '$codigo_produto'",$connection) ; while ($array18 = mysql_fetch_array($res18)){ $fotointerna = "$array18[foto]"; unlink("produtos/".$fotointerna); mysql_query("DELETE from fotos_anuncios WHERE codigo_produto = '$codigo_produto'",$connection) ; } $res10 = mysql_query("DELETE from produtos WHERE codigo = '$tb1'",$connection) ; } } ////////////////////////////////FIM DELETA DEPOIS DE 20 DIAS FINALIZADO /////////////////////////////////// ////////////////////////////////DELETA DEPOIS DOS DIAS DEFINIDOS NO SISTEMA /////////////////////////////////// $date_ini = muda($datai); $date_end = $hoje; $array_temp = explode("/",$date_ini); $date_inir = $array_temp[2]."/".$array_temp[1]."/".$array_temp[0]; $array_temp = explode("/",$date_end); $date_endr = $array_temp[2]."/".$array_temp[1]."/".$array_temp[0]; $date_inir = strtotime($date_inir); $date_endr = strtotime($date_endr); $date_diff = ($date_endr - $date_inir) / 86400; $diasvencida = floor($date_diff); //echo "DIAS DE INCLUIDO >$diasvencida
"; if ($diasvencida > $diasnoar ) { $res7 = mysql_query("SELECT * from produtos WHERE codigo = '$tb1'",$connection) ; $array7 = mysql_fetch_array($res7); $codigo_produto = "$array7[codigo]"; $fotochamada = "$array7[foto_chamada]"; unlink("produtos/".$fotochamada); $res18 = mysql_query("SELECT * from fotos_anuncios WHERE cod_anuncio = '$codigo_produto'",$connection) ; while ($array18 = mysql_fetch_array($res18)){ $fotointerna = "$array18[foto]"; unlink("produtos/".$fotointerna); mysql_query("DELETE from fotos_anuncios WHERE codigo_produto = '$codigo_produto'",$connection) ; } $res10 = mysql_query("DELETE from produtos WHERE codigo = '$tb1'",$connection) ; } ////////////////////////////////FIM DELETA DEPOIS DOS DIAS DEFINIDOS NO SISTEMA /////////////////////////////////// */ $sql2 = "select * from cliente where codigo = $tb3"; $cad2 = mysql_query($sql2,$connection); $array2 = mysql_fetch_array($cad2); $cb1 = "$array2[nome]"; $cb2 = "$array2[tel_res]"; $cb3 = "$array2[tel_tra]"; $cb4 = "$array2[tel_fax]"; $cb5 = "$array2[tel_cel]"; $cb6 = "$array2[email]"; $cb7 = "$array2[tipo]"; ?>
-
if ($id > 1) {?>
- < } ?> if ($temp >= $maxlnk){ // mostrar 2 antes do item marcado if ($n_paginas > $maxlnk) {$n_maxlnk = $temp + 6; $maxlnk = $n_maxlnk; // mostrar 4 antes do ultimo $n_start = $temp - 6; $lnk_impressos = $n_start;}} while(($lnk_impressos < $n_paginas) and ($lnk_impressos < $maxlnk)) { $lnk_impressos ++; if ($pg_atual == $lnk_impressos){ ?>
- } else { ?>
- } } ?> if ($reg_final < $results_tot) {?>
- > } ?>