Core  3.2
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
viewarray.php
Go to the documentation of this file.
1 <?php
2 /*
3  * @author Anakeen
4  * @package FDL
5 */
6 /**
7  * Generate Layout to edit array (table)
8  *
9  * @author Anakeen
10  * @version $Id: viewarray.php,v 1.4 2007/09/27 12:23:40 eric Exp $
11  * @package FDL
12  * @subpackage
13  */
14 /**
15  */
16 
17 include_once ("FDL/Class.Doc.php");
18 include_once ("FDL/Class.DocAttr.php");
19 
20 include_once ("FDL/freedom_util.php");
21 include_once ("FDL/editutil.php");
22 // Compute value to be inserted in a specific layout
23 // -----------------------------------
25 {
26  // -----------------------------------
27  // GetAllParameters
28  $docid = GetHttpVars("id", 0);
29  $classid = GetHttpVars("classid");
30  $arrayid = strtolower(GetHttpVars("arrayid"));
31  $vid = GetHttpVars("vid"); // special controlled view
32  $ulink = (GetHttpVars("ulink", '2')); // add url link
33  $target = GetHttpVars("target"); // may be mail
34  // $width=GetHttpVars("width","100%"); // table width
35  // Set the globals elements
36  $dbaccess = $action->dbaccess;
37 
38  if ($docid == 0) $doc = createDoc($dbaccess, $classid);
39  else $doc = new_Doc($dbaccess, $docid);
40 
41  if (($vid != "") && ($doc->cvid > 0)) {
42  // special controlled view
43 
44  /*
45  * @var CVDoc $cvdoc
46  */
47  $cvdoc = new_Doc($dbaccess, $doc->cvid);
48  $tview = $cvdoc->getView($vid);
49  if ($tview) $doc->setMask($tview["CV_MSKID"]);
50  }
51  //$oattr=$doc->getAttribute($arrayid);
52  //$xmlarray=$doc->GetHtmlAttrValue($arrayid,$target,$ulink);
53  $xmlarray = $doc->GetHtmlValue($doc->getAttribute($arrayid) , $doc->getRawValue($arrayid) , $target, $ulink);
54 
55  $action->lay->set("array", $xmlarray);
56 }
global $action
$docid
Definition: cleanFamily.php:13
createDoc($dbaccess, $fromid, $control=true, $defaultvalues=true, $temporary=false)
viewarray(Action &$action)
Definition: viewarray.php:24
new_Doc($dbaccess, $id= '', $latest=false)
$dbaccess
Definition: checkVault.php:17
← centre documentaire © anakeen