FURAX69 80
| Posté : 01-06-2009 17:09
La question est de savoir comment est renseignée la variable/champs $topic, parce qu'en voyant le code d'ajout de marquetapage, je ne comprends pas... HELP !
function marquetapage_add($uri, $topic, $action) {
global $cookie, $NPDS_Prefix, $nuke_url;
if (($action=="ad_tapage") and ($cookie[0])) {
$drname=dirname($uri);
if ($drname==".") {
$uri=$nuke_url."/".$uri ;
} elseif($drname=="/") {
$uri=$nuke_url.$uri;
} else {
$uri=$nuke_url.str_repl ace("/".basename($nuke_url),"",$uri);
}
@mysql_query("INSERT INTO ".$NPDS_Prefix."marquetapage (uid, uri, topic) VALUES ('$cookie[0]', '$uri', '$topic')");
header("location: $uri");
}
if (($action=="sp_tapage") and ($cookie[0])) {
$result = mysql_query("select uri from ".$NPDS_Prefix."marquetapage where uid='$cookie[0]' and uri='$uri'");
if (mysql_num_rows($result) > 0) {
@mysql_query("DELETE FROM ".$NPDS_Prefix."marquetapage WHERE uid='$cookie[0]' and uri='$uri'");
header("location: $uri");
}
}
}
|