Platform  3.1
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
generic_addcatg.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  * Generated Header (not documented yet)
9  *
10  * @author Anakeen 2000
11  * @version $Id: generic_addcatg.php,v 1.8 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 // $Id: generic_addcatg.php,v 1.8 2005/06/28 08:37:46 eric Exp $
20 // $Source: /home/cvsroot/anakeen/freedom/freedom/Action/Generic/generic_addcatg.php,v $
21 // ---------------------------------------------------------------
22 include_once ("FDL/modcard.php");
23 
24 include_once ("FDL/Class.Dir.php");
25 include_once ("GENERIC/generic_util.php");
26 // -----------------------------------
28 {
29  // -----------------------------------
30  // Get all the params
31  $dirid = GetHttpVars("dirid", getDefFld($action));
32  // $newcatg=GetHttpVars("newcatg");
33  // if ($newcatg == "") $action->exitError(_("the title of the new category cannot be empty"));
34 
35  $dbaccess = $action->GetParam("FREEDOM_DB");
36 
37  $err = modcard($action, $ndocid); // ndocid change if new doc
38  if ($err != "") $action->ExitError($err);
39 
40  if ($dirid > 0) {
41  $fld = new_Doc($dbaccess, $dirid);
42 
43  $doc = new_Doc($dbaccess, $ndocid);
44 
45  $fld->AddFile($doc->id);
46  }
47  redirect($action, "FDL", "FDL_CARD&id=$ndocid");
48 }
49 ?>
← centre documentaire © anakeen - published under CC License - Dynacase