"; if ($item>0 and $item<1000) { $resultado = mysql_db_query("scp", "select producte, stock, id from scp_articles where id='$item' AND actiu='si'"); if ($reg = mysql_fetch_object($resultado)) { if ($cantidad>$hoy){ //echo $cantidad; //Fecha valida en val $fechas = mysql_db_query("scp", "select * from scp_demanats where scp_demanats.codart='$item' AND $cantidad>=scp_demanats.data_i and $cantidad<=scp_demanats.data_f"); if($cantidad<99991212 and !($reg = mysql_fetch_object($fechas))){ if ($itemsEnCesta[$item]>=$hoy and $itemsEnCesta[$item]<99991212){ $fechas = mysql_db_query("scp", "select * from scp_demanats where scp_demanats.codart='$item' AND $itemsEnCesta[$item]scp_demanats.data_i"); if(!($reg = mysql_fetch_object($fechas))){ if($itemsEnCesta[$item]<$cantidad) $itemsEnCesta[$item]=$itemsEnCesta[$item].$cantidad; else $itemsEnCesta[$item]=0; /*else $itemsEnCesta[$item]=$itemsEnCesta[$item].$cantidad;*/ }else $itemsEnCesta[$item]=0; }else if ($controli==0) $itemsEnCesta[$item]=$cantidad; }else{ echo "

A. Fecha NO VALIDA

\n"; $itemsEnCesta[$item]=0; } //echo" (".$itemsEnCesta[$item].") "; }else if($cantidad==-1) $itemsEnCesta[$item]=0; else if ($cantidad>0) echo "

B. Fecha NO VALIDA

\n"; //echo ""; } } if ($controli==0) $controli=$item; else $controli=0; } ?>

Material corporatiu

$v){ if ($v>2011010120110101) { $resultado = mysql_db_query("scp", "select * from scp_articles where id='$k' AND actiu='si' order by producte ASC "); $reg = mysql_fetch_object($resultado); if ($iniciotabla==0) { echo"

Pas 2: Validació productes seleccionats\n"; echo "\n"; $iniciotabla=1;} echo ""; } else{ if($v>0) echo "

A. Fecha NO VALIDA

\n

En el producto: $k"; } } if ($iniciotabla==1){ echo "

"; echo "
ProducteDatesAcció
id."','".$reg->id."','220','400')\">\"info\"".$reg->producte."".substr($v,6,2)."/".substr($v,4,2)."/".substr($v,0,4)." - ".substr($v,14,2)."/".substr($v,12,2)."/".substr($v,8,4).""; echo "id."=-1&".SID."\">Eliminar
TOTAL:". $pt."\"Comprar\"


"; } } echo "
"; echo "

Pas 1: Selecció dels productes\n"; $resultado = mysql_db_query("scp", "select * from scp_articles where scp_articles.actiu='si' and scp_articles.stock>0 order by scp_articles.producte ASC "); while ($reg = mysql_fetch_object($resultado)) { echo "\n"; $precion=1*1;//quitar echo "\n"; } echo "
ProducteData recollidaData tornada
$reg->nombre
id."','".$reg->id."','320','500')\">\"info\"".$reg->producte."id."&producte=".$reg->producte."','".$reg->id."','320','500')\">\"info\"id."\" value=\""; /*if ($itemsEnCesta[$reg->id]>0) { echo $itemsEnCesta[$reg->id]; }*/ echo""; echo "\" size=\"11\" maxlength=\"10\" id=\"f_date".$reg->id."\">id."f\" value=\"\" size=\"11\" maxlength=\"10\" id=\"f_date_f".$reg->id."\">
\n

\n

"; ?>