Platform  3.1
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
modexportchoosecols.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  * Save export preferences
9  *
10  * @author Anakeen 2007
11  * @version $Id: modexportchoosecols.php,v 1.2 2008/11/14 12:41:43 eric Exp $
12  * @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
13  * @package FDL
14  * @subpackage GED
15  */
16 /**
17  */
18 
19 include_once ("FDL/Class.Doc.php");
20 include_once ("FDL/Lib.Dir.php");
21 include_once ("GENERIC/generic_util.php");
22 
24 {
25  $dbaccess = $action->GetParam("FREEDOM_DB");
26  $docid = GetHttpVars("id");
27  $cols = GetHttpVars("ch");
28  $clear = (GetHttpVars("clear") == "yes");
29 
30  $doc = new_doc($dbaccess, $docid);
31  if (!$doc->isAlive()) $action->exitError(sprintf(_("family %s not exists") , $docid));
32 
33  if ($cols == "") $scols = array();
34  else $scols = implode(';', $cols);
35 
36  if ($clear) {
37  deleteFamilyParameter($action, $doc->id, "FREEDOM_EXPORTCOLS", $scols);
38  $action->addWarningMsg(_("export preferences has been cleared"));
39  } else {
40  setFamilyParameter($action, $doc->id, "FREEDOM_EXPORTCOLS", $scols);
41  $action->addWarningMsg(_("export preferences are saved"));
42  }
43  redirect($action, "FREEDOM", "EDITEXPORTCHOOSECOLS&id=" . $doc->id, $action->GetParam("CORE_STANDURL"));
44 }
← centre documentaire © anakeen - published under CC License - Dynacase