Platform  3.1
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  * @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
5  * @package FDL
6 */
7 /**
8  * Generate Layout to edit array (table)
9  *
10  * @author Anakeen 2005
11  * @version $Id: viewarray.php,v 1.4 2007/09/27 12:23:40 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 include_once ("FDL/Class.Doc.php");
20 include_once ("FDL/Class.DocAttr.php");
21 
22 include_once ("FDL/freedom_util.php");
23 include_once ("FDL/editutil.php");
24 // Compute value to be inserted in a specific layout
25 // -----------------------------------
26 function viewarray(&$action)
27 {
28  // -----------------------------------
29  // GetAllParameters
30  $docid = GetHttpVars("id", 0);
31  $classid = GetHttpVars("classid");
32  $arrayid = strtolower(GetHttpVars("arrayid"));
33  $vid = GetHttpVars("vid"); // special controlled view
34  $ulink = (GetHttpVars("ulink", '2')); // add url link
35  $target = GetHttpVars("target"); // may be mail
36  // $width=GetHttpVars("width","100%"); // table width
37  // Set the globals elements
38  $dbaccess = $action->GetParam("FREEDOM_DB");
39 
40  if ($docid == 0) $doc = createDoc($dbaccess, $classid);
41  else $doc = new_Doc($dbaccess, $docid);
42 
43  if (($vid != "") && ($doc->cvid > 0)) {
44  // special controlled view
45  $cvdoc = new_Doc($dbaccess, $doc->cvid);
46  $tview = $cvdoc->getView($vid);
47  if ($tview) $doc->setMask($tview["CV_MSKID"]);
48  }
49  //$oattr=$doc->getAttribute($arrayid);
50  //$xmlarray=$doc->GetHtmlAttrValue($arrayid,$target,$ulink);
51  $xmlarray = $doc->GetHtmlValue($doc->getAttribute($arrayid) , $doc->getValue($arrayid) , $target, $ulink);
52 
53  $action->lay->set("array", $xmlarray);
54 }
55 ?>
← centre documentaire © anakeen - published under CC License - Dynacase