Core  3.2
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
Class.DocumentUserInterface.php
Go to the documentation of this file.
1 <?php
2 /*
3  * @author Anakeen
4  * @package FDL
5  */
6 
8 {
9  /**
10  * Add/replace a zone for document html footer
11  *
12  * @param string $index index of zone to add/replace
13  * @param string $zone [APP:ZONE] zone reference
14  * @param bool $edit set to true for form view, false for consultation
15  * @throws \Dcp\Db\Exception
16  */
17  static public function addDocumentFooterZone($index, $zone, $edit)
18  {
19  $val = array();
20  $paramName = $edit ? "FOOTER_ZONE_EDIT" : "FOOTER_ZONE_VIEW";
21  simpleQuery(getDbAccess() , sprintf("select val from paramv, application WHERE paramv.appid=application.id and application.name='FDL' and paramv.name='%s'", $paramName) , $val, true, true);
22  $val = json_decode($val, true);
23  $val[$index] = $zone;
24  simpleQuery(getDbAccess() , sprintf("update paramv set val='%s' from application where paramv.appid=application.id and application.name='FDL' and paramv.name='%s'", pg_escape_string(json_encode($val)) , $paramName));
25  }
26 }
static addDocumentFooterZone($index, $zone, $edit)
getDbAccess()
Definition: Lib.Common.php:368
simpleQuery($dbaccess, $query, &$result=array(), $singlecolumn=false, $singleresult=false, $useStrict=null)
Definition: Lib.Common.php:484
← centre documentaire © anakeen