Core  3.2
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
editwdoc.php
Go to the documentation of this file.
1 <?php
2 /*
3  * @author Anakeen
4  * @package FDL
5 */
6 /**
7  * Generated Header (not documented yet)
8  *
9  * @author Anakeen
10  * @version $Id: editwdoc.php,v 1.4 2005/06/28 08:37:46 eric Exp $
11  * @package FDL
12  * @subpackage GED
13  */
14 /**
15  */
16 // ---------------------------------------------------------------
17 // $Id: editwdoc.php,v 1.4 2005/06/28 08:37:46 eric Exp $
18 // $Source: /home/cvsroot/anakeen/freedom/freedom/Action/Freedom/editwdoc.php,v $
19 // ---------------------------------------------------------------
20 include_once ("FDL/Lib.Dir.php");
21 
22 function editwdoc(Action & $action)
23 {
24  $dbaccess = $action->dbaccess;
25  $docid = GetHttpVars("id", 0);
26 
28  $action->lay->Set("docid", $doc->id);
29 
30  $action->lay->eSet("doctitle", $doc->getTitle());
31  $sqlfilters = array();
32 
33  $wid = $doc->wid;
34 
35  $chdoc = $doc->GetFromDoc();
36  $sqlfilters[] = "(" . GetSqlCond($chdoc, "wf_famid") . ") OR (wf_famid isnull)";
37  $tclassdoc = internalGetDocCollection($dbaccess, 0, "0", "ALL", $sqlfilters, $action->user->id, "TABLE", "WDOC");
38 
39  $selectclass = array();
40  if (is_array($tclassdoc)) {
41  foreach ($tclassdoc as $k => $pdoc) {
42 
43  $selectclass[$k]["idpdoc"] = $pdoc["id"];
44  $selectclass[$k]["profname"] = $pdoc["title"];
45 
46  $selectclass[$k]["selected"] = ($pdoc["id"] == $wid) ? "selected" : "";
47  }
48  }
49 
50  $action->lay->SetBlockData("SELECTFLD", $selectclass);
51 }
global $action
editwdoc(Action &$action)
Definition: editwdoc.php:22
Set($name, &$parent)
$docid
Definition: cleanFamily.php:13
internalGetDocCollection($dbaccess, $dirid, $start="0", $slice="ALL", $sqlfilters=array(), $userid=1, $qtype="LIST", $fromid="", $distinct=false, $orderby="title", $latest=true, $trash="", &$debug=null, $folderRecursiveLevel=2, $join= '',\SearchDoc &$searchDoc=null)
Definition: Lib.Dir.php:428
new_Doc($dbaccess, $id= '', $latest=false)
GetSqlCond($Table, $column, $integer=false)
$dbaccess
Definition: checkVault.php:17
← centre documentaire © anakeen