AYUDA PORFA

EVA23
20 de Enero del 2004
Hola tengo un problema con mi carrito de compra, y es que cuando intento borrar el ultimo producto de la cesta el dinero si se resta pero el producto sigue en la lista,, yo no se mucho de php esto lo sake de una aplicacion prefabricada os dejo el codigo del archibo ke creo ke necesitais..
si kereis comprobar el fallo lo podeis acer aqui
'' http://latincards.serveftp.com/ '' O TB AKY

''http://usuarios.lycos.es/netdeejay/ ''


coo.php
---------------------------------------------
<link rel=stylesheet href="inc/css.css">
<script src="inc/script.js"></script>

<body bgcolor=white scroll=auto style="border: 0 black sold;">



<table width="100%" height="90%" border="0">
<tr>
<td align="center" valign="middle">

<table width="50%" border="0" bgcolor=#C9580D cellspacing=1 cellpadding=10>
<tr>
<td align="center" valign="middle" bgcolor=#FFE9DA>
<img src="img/icon.gif" alt="Espere .....estamos transfiriendo...."><font size=2><b>HotHardware</b></font><br>
<font face="Arial" size="1" color="gray">....Espere .....estamos transfiriendo.........<br>

<script>
<!--
function run(url) {
setTimeout("top.location.replace('" + url + "');",3000);
}

var today = new Date();
var expiry = new Date(today.getTime() + 28 * 24 * 60 * 60 * 1000);

function setcoo(name, value, url) { // use: setCookie("name", value);
if (value != null && value != "")
document.cookie=name + "=" + escape(value) + "; expires=" + expiry.toGMTString();
run(url);
document.write("Pulse <a href=""+url+""><font size=2><b>aqui</b></font></a> si no quiere esperar ...<br>");
}

-->
</script>

</td>
</tr>
</table>

</td>
</tr>
</table>

<?
include "cfunc.php";


//CONSTANT
$cookiename1="mws_vote";
$cookiename2="mws_auth";
$cookiename3="mws_cart";
$cookiename4="mws_orderform";
$cookielifetime=36000;

//Get config
$cf=file("cf.php");
//Format vars
for($i=1;$i<sizeof($cf);$i++) $cf[$i]=str_replace("n","",$cf[$i]);
$realau=$cf[1];$realap=$cf[2];$realaemail=$cf[3];$

oncell=$cf[4];$maxinpage=$cf[5];
$realurl=$cf[6];$donvi=$cf[7];

//------------------------------------------------------------------------
if($act=='addcart'){
$maxid=0;
$cookievalue=$HTTP_COOKIE_VARS["mws_cart"];
$file=file("$itemsdb");
$s=sizeof($file);
$ss=sizeof($cards);
for($i=0;$i<$ss;$i++){
$ma=explode(";",$cards[$i]);
if($ma[1]!=0){
//Get Card infos
for($j=0;$j<$s;$j++){
$ta=explode("|",$file[$j]);
if($ta[0]==$ma[0]){
$cardid=$ma[0];
$loaicard=$ta[1];
$dongia=$ta[2];
$gia=$ta[3];
$soluong=$ma[1];
}
}
//Get MAX id
$its=explode("^",$HTTP_COOKIE_VARS["mws_cart"]);
for($j=0;$j<=sizeof($its);$j++){
$ma=explode("|",$its[$j]);
if($ma[0]>$maxid) $maxid=$ma[0];
}
$maxid++;
$cookievalue.=" $maxid|$loaicard|$dongia|$gia|$soluong|$cardid|$op

t1|$opt2|^";
}
}
echo "n<script>setcoo('$cookiename3','$cookievalue','index.php?act=viewcart');</script>n";
}
//------------------------------------------------------------------------
if($act=='delitem' && $id){
$its=explode("^",$HTTP_COOKIE_VARS["mws_cart"]);
for($i=0;$i<sizeof($its)-1;$i++){
$det=explode("|",$its[$i]);
if($id==$det[0]){
$cookievalue=str_replace($its[$i]."^","",$HTTP_COOKIE_VARS["mws_cart"]);
}
}
echo "n<script>setcoo('$cookiename3','$cookievalue','index.php?act=viewcart');</script>n";
}
//------------------------------------------------------------------------
if($act=='update' && $id){
$its=explode("^",$HTTP_COOKIE_VARS["mws_cart"]);
for($i=0;$i<sizeof($its)-1;$i++){
$det=explode("|",$its[$i]);
if($id==$det[0]){
$tmps=" $det[0]|$det[1]|$det[2]|$det[3]|$sl|$det[5]|$det[6

]|$det[7]|";
$cookievalue=str_replace($its[$i],$tmps,$HTTP_COOK

IE_VARS["mws_cart"]);
}
}
echo "n<script>setcoo('$cookiename3','$cookievalue','index.php?act=viewcart');</script>n";
}
//------------------------------------------------------------------------
if($act=='resetcart'){
echo "n<script>setcoo('$cookiename3','reseted','index.php?act=viewcart');</script>n";
}
if($act=='login'){
if($logpass=="" && !$logpass) {
echo "n<script>run('admin.php?mess=wrongpass');</script>n";
}
if($logpass!="" && coding($logpass)==$realap){
echo "n<script>setcoo('$cookiename2','".coding($logpass)."','admin.php');</script>n";
}
else {
echo "n<script>run('admin.php?mess=wrongpass');</script>n";
}
}
if($act=='logout'){
echo "n<script>setcoo('$cookiename2','admin_outed','admin.php');</script>n";
}
if($act=='saveform'){
$ma=" $uname|$uemail|$uadd_a|$uadd_b|$uadd_c|$uadd_d|$ua

dd_e|$utel|$paymentinfo|$card_number|$amex_code|$c

ard_name|$ucomm";
echo "n<script>setcoo('$cookiename4','$ma','index.php?act=ok&saved=1&ttmode=$ttmode&uname=$uname&uemail=$uemail&uadd_a=$uadd_a&uadd_b=$uadd_b&uadd_c=$uadd_c&uadd_d=$uadd_d&uadd_e=$uadd_e&utel=$utel&paymentinfo=$paymentinfo&card_type=$card_type&card_number=$card_number&amex_code=$amex_code&card_month=$card_month&card_year=$card_year&card_name=$card_name&ucomm=$ucomm');</script>n";
}
if($act=='delform'){
echo "n<script>setcoo('$cookiename4','form_deleted','index.php?act=confirm');</script>n";
}
if($act=='newlang' && $langff){
$ma=langs_array();
$found=false;
for($i=0;$i<sizeof($ma);$i++){
if($langff==$ma[$i]) $found=true;
}
if($found) echo "n<script>setcoo('mws_lang','$langff','$HTTP_REFERER');</script>n";
else echo "n<script>setcoo('mws_lang','default','$HTTP_REFERER');</script>n";
}
?>
-------------------------------------------------------------------

SALUDOS