Platform  3.1
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
faddbook_addprefered.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  * Add a Prefered personns
9  *
10  * @author Anakeen 2005
11  * @version $Id: faddbook_addprefered.php,v 1.5 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", -1);
22  if ($cid == - 1) return;
23  $cpref = $action->getParam("FADDBOOK_PREFERED", "");
24  $tc = explode("|", $cpref);
25  $found = false;
26  foreach ($tc as $k => $v) if ($v == $cid) $found = true;
27  if (!$found) {
28  $tc[] = $cid;
29  $stc = implode("|", $tc);
30  $action->parent->param->set("FADDBOOK_PREFERED", $stc, PARAM_USER . $action->user->id, $action->parent->id);
31  }
32  Redirect($action, $action->parent->name, "FADDBOOK_PREFERED");
33 }
34 ?>
← centre documentaire © anakeen - published under CC License - Dynacase