Platform  3.1
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
forum_setdefault.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  * Enable/disable forum for documents
9  *
10  * @author Anakeen 2000
11  * @version $Id: forum_setdefault.php,v 1.1 2007/10/16 04:52:09 marc 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/Lib.Dir.php");
20 include_once ("FDL/Class.Doc.php");
21 include_once ("FDL/Class.DocAttr.php");
22 
24 {
25  $dbaccess = $action->GetParam("FREEDOM_DB");
26  $docid = GetHttpVars("id", "");
27  $state = GetHttpVars("st", "N");
28 
29  if ($docid == "") $action->exitError(_("no document reference"));
31  if (!$doc->isAffected()) $action->exitError(sprintf(_("cannot see unknow reference %s") , $docid));
32  if ($doc->doctype != 'C') $action->exitError(_("no document family") . " " . $docid);
33 
34  if ($state == "Y") $doc->forumid = 0;
35  else $doc->forumid = "";
36 
37  $err = $doc->modify(true, array(
38  "forumid"
39  ));
40  if ($err != "") $action->exitError($err);
41 
42  redirect($action, "FDL", "FDL_CARD&sole=Y&props=N&abstract=N&id=" . $docid);
43 }
44 ?>
← centre documentaire © anakeen - published under CC License - Dynacase