Platform  3.1
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
modoption.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  * Modify a document
9  *
10  * @author Anakeen 2000
11  * @version $Id: modoption.php,v 1.2 2005/06/28 08:37:46 eric Exp $
12  * @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
13  * @package FDL
14  * @subpackage
15  */
16 /**
17  */
18 
19 include_once ("FDL/modcard.php");
20 
21 include_once ("FDL/Class.DocFam.php");
22 include_once ("FDL/Class.Dir.php");
23 // -----------------------------------
24 function modoption(&$action)
25 {
26  // -----------------------------------
27  // Get all the params
28  $docid = GetHttpVars("id"); // document id
29  $aid = GetHttpVars("aid"); // linked attribute id
30  $dbaccess = $action->GetParam("FREEDOM_DB");
31 
33  if (!$doc->isAlive()) $action->exitError(sprintf(_("modoption: document [%d] is not alive") , $docid));
34 
36 
37  if ($err != "") $action->AddWarningMsg($err);
38  else {
39  $action->lay->set("aid", $aid);
40  $action->lay->set("docid", $docid);
41  $listattr = $doc->GetNormalAttributes();
42  $vo = "";
43  foreach ($listattr as $k => $v) {
44  if ($v->usefor == "O") {
45  $vo.= "[" . $v->id . "|" . $doc->getValue($v->id) . "]";
46  }
47  }
48  $action->lay->set("vo", $vo);
49  $action->lay->set("uuvo", urlencode($vo));
50  }
51 }
52 ?>
← centre documentaire © anakeen - published under CC License - Dynacase