Platform  3.1
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
freedom_preview.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: freedom_preview.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 GED
15  */
16 /**
17  */
18 // ---------------------------------------------------------------
19 // $Id: freedom_preview.php,v 1.8 2005/06/28 08:37:46 eric Exp $
20 // $Source: /home/cvsroot/anakeen/freedom/freedom/Action/Freedom/freedom_preview.php,v $
21 // ---------------------------------------------------------------
22 include_once ("FDL/duplicate.php");
23 include_once ("FDL/modcard.php");
24 // -----------------------------------
25 // -----------------------------------
27 {
28  // -----------------------------------
29  $docid = GetHttpVars("id", 0);
30  $classid = GetHttpVars("classid", 0);
31 
32  $dbaccess = $action->GetParam("FREEDOM_DB");
33 
34  if ($docid > 0) {
36 
37  $action->lay->Set("TITLE", $doc->title);
38  $ndoc = duplicate($action, 0, $docid, true); // temporary document
39  $ndoc->modify();
40  } else {
41  // new doc
42  $ndoc = createDoc($dbaccess, $classid);
43  if (!$ndoc) $action->exitError(sprintf(_("no privilege to create this kind (%d) of document") , $classid));
44 
45  $ndoc->doctype = 'T';
46  $err = $ndoc->Add();
47  if ($err != "") $action->ExitError($err);
48  }
49  SetHttpVar("id", $ndoc->id);
50  $err = modcard($action, $ndocid); // ndocid change if new doc
51  $tdoc = new_Doc($dbaccess, $ndocid);
52  $tdoc->modify();
53  //if ($err != "") $action-> ExitError($err);
54 
55 }
56 ?>
← centre documentaire © anakeen - published under CC License - Dynacase