Platform  3.1
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
faddbook_delprefered.php
Go to the documentation of this file.
1 <?php
2 /*
3  * @author Anakeen
4  * @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
5  * @package FDL
6 */
7 /**
8  * Delete Prefered persons
9  *
10  * @author Anakeen 2005
11  * @version $Id: faddbook_delprefered.php,v 1.4 2005/11/24 13:48:17 eric Exp $
12  * @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
13  * @package FDL
14  * @subpackage USERCARD
15  */
16 /**
17  */
19 {
20 
21  $cid = GetHttpVars("cid", 0);
22  if ($cid < 0 && $cid != - 2) return;
23  if ($cid == - 2) {
24  $stc = "";
25  } else {
26  $cpref = $action->getParam("FADDBOOK_PREFERED", "");
27  $tc = explode("|", $cpref);
28  $ntc = array();
29  foreach ($tc as $k => $v) if ($v != $cid) $ntc[] = $v;
30  $stc = implode("|", $ntc);
31  }
32  $action->parent->param->set("FADDBOOK_PREFERED", $stc, PARAM_USER . $action->user->id, $action->parent->id);
33  Redirect($action, "USERCARD", "FADDBOOK_PREFERED");
34 }
← centre documentaire © anakeen - published under CC License - Dynacase