Tuesday 31 January 2006 5:46:43 am
THX for your replys.
I have tried these 3 methods. each time I have this msg: Call to undefined function: clearcache() I use 3.5 version.
I use this function in a full-view template. I have a button with this code:
<form action={"desinscription/"|ezurl} method='get'>
<input type='hidden' name='test' value="{$node.node_id}" />
<input type='hidden' name='test2' value="{$node.object.id}" />
<input type='submit' class="button forum-account-edit" name='submit' onClick='return confirm("Attention. Vous Perdrez tous vos credits!!.")' value='Supprimer'>
</form>
in the desinscription template I have this:
<h1>Annulation d'une Annonce </h1>
<p>{suprfunction() }</p>
that call for this function (in extension/myextension/autoloads/mysrtingoperators.php
function suprfunction()
{
$test=$_GET['test'];
$test2=$_GET['test2'];
include_once( "kernel/classes/ezcontentobjecttreenode.php" );
include_once( "kernel/classes/ezcontentobject.php" );
eZContentObjectTreeNode::remove( $test );
eZContentObject::purge( $test2 );
return "votre annonce a bien été supprimmée..";
}
|