projects/genea/out/phpdb/class_event_source.php
1.
<?php
2.
 
3.
/*
4.
        Généalogik
5.
        
6.
        Class for table : event_source.
7.
 
8.
        07/03/2021 10:45
9.
 
10.
        lvardon@laposte.net - 2021
11.
        
12.
        Licence libre
13.
 
14.
        Usage examples :
15.
 
16.
        <?php
17.
 
18.
            include_once("classdir/dbconnect.php);
19.
            include_once("classdir/class_event_source.php);
20.
 
21.
            // Class instance
22.
            $myevent_source = event_source( $db );
23.
 
24.
            // Select all reccords :
25.
            $results = $myevent_source->selectAll();
26.
            foreach($results as $row) {
27.
                print_r($row);
28.
            } 
29.
 
30.
            // Select reccord #12 :
31.
            $id = 12;
32.
            $row = $myevent_source->select($id);
33.
            print_r($row);
34.
 
35.
        ?>
36.
 
37.
*/
38.
class _event_source {
39.
      
40.
    public $db;
41.
    public $lasterror="";
42.
    public $lastInsertId=-1;
43.
    public $count 0;
44.
  
45.
    /*
46.
        Initialise object with dbHanler.
47.
                
48.
    */    
49.
    function __construct$db ) {
50.
        $this->db $db;
51.
    }
52.
 
53.
    /*
54.
        Select one reccord from event_source.
55.
        
56.
        parameters : $id (reccord id).
57.
        return : associative array of reccord.
58.
    */
59.
    function select($id) {
60.
 
61.
        $this->lasterror="";
62.
 
63.
        $sqlSt="
64.
        select       
65.
            a.id as 'a.id',  
66.
            a.event_id as 'a.event_id',
67.
            a.source_id as 'a.source_id',
68.
            a.document_id as 'a.document_id',
69.
            a.datecreated as 'a.datecreated',
70.
 
71.
             b1.id as 'b1.id', 
72.
             b1.name as 'b1.name', 
73.
             b1.description as 'b1.description', 
74.
             b1.private as 'b1.private', 
75.
             b1.date_begin as 'b1.date_begin', 
76.
             b1.date_begin_accurate as 'b1.date_begin_accurate', 
77.
             b1.notesearch as 'b1.notesearch', 
78.
             b1.datecreated as 'b1.datecreated', 
79.
             b1.person_1_id as 'b1.person_1_id', 
80.
             b1.person_2_id as 'b1.person_2_id', 
81.
             b1.person_3_id as 'b1.person_3_id', 
82.
             b1.eventtype_id as 'b1.eventtype_id', 
83.
             b1.place_id as 'b1.place_id', 
84.
             c2.id as 'c2.id', 
85.
             c2.name as 'c2.name', 
86.
             c2.description as 'c2.description', 
87.
             c2.private as 'c2.private', 
88.
             c2.category as 'c2.category', 
89.
             c2.icon as 'c2.icon', 
90.
             c2.sourcetext as 'c2.sourcetext', 
91.
             c2.sourceurl as 'c2.sourceurl', 
92.
             c2.quality as 'c2.quality', 
93.
             c2.page as 'c2.page', 
94.
             c2.citation as 'c2.citation', 
95.
             c2.textdraduction as 'c2.textdraduction', 
96.
             c2.notesearch as 'c2.notesearch', 
97.
             c2.datecreated as 'c2.datecreated', 
98.
             d3.id as 'd3.id', 
99.
             d3.name as 'd3.name', 
100.
             d3.description as 'd3.description', 
101.
             d3.private as 'd3.private', 
102.
             d3.icon as 'd3.icon', 
103.
             d3.url as 'd3.url', 
104.
             d3.cote as 'd3.cote', 
105.
             d3.notesearch as 'd3.notesearch', 
106.
             d3.datecreated as 'd3.datecreated', 
107.
             d3.depot_id as 'd3.depot_id', 
108.
             d3.documenttype_id as 'd3.documenttype_id' 
109.
 
110.
        from event_source a 
111.
             left outer join document d3 on d3.id =  a.document_id 
112.
             left outer join source c2 on c2.id =  a.source_id 
113.
             left outer join event b1 on b1.id =  a.event_id 
114.
 
115.
        where a.id = :id; 
116.
            ";
117.
 
118.
        try {                
119.
 
120.
            $stmt $this->db->prepare($sqlSt);        
121.
            $stmt->bindParam(':id'$idPDO::PARAM_INT);
122.
            $stmt->execute(); 
123.
            $results $stmt->fetchAll(PDO::FETCH_ASSOC);
124.
            return $results;
125.
 
126.
        } catch (Exception $e) {
127.
            $this->lasterror $e->getMessage().' (<b>Id</b> = '.$idkeyname.')';
128.
            return false;
129.
        }
130.
    }
131.
 
132.
    function selectPrev($id) {
133.
 
134.
        $this->lasterror="";
135.
 
136.
        $sqlSt="
137.
        select       
138.
            a.id as 'a.id',  
139.
            a.event_id as 'a.event_id',
140.
            a.source_id as 'a.source_id',
141.
            a.document_id as 'a.document_id',
142.
            a.datecreated as 'a.datecreated',
143.
 
144.
             b1.id as 'b1.id', 
145.
             b1.name as 'b1.name', 
146.
             b1.description as 'b1.description', 
147.
             b1.private as 'b1.private', 
148.
             b1.date_begin as 'b1.date_begin', 
149.
             b1.date_begin_accurate as 'b1.date_begin_accurate', 
150.
             b1.notesearch as 'b1.notesearch', 
151.
             b1.datecreated as 'b1.datecreated', 
152.
             b1.person_1_id as 'b1.person_1_id', 
153.
             b1.person_2_id as 'b1.person_2_id', 
154.
             b1.person_3_id as 'b1.person_3_id', 
155.
             b1.eventtype_id as 'b1.eventtype_id', 
156.
             b1.place_id as 'b1.place_id', 
157.
             c2.id as 'c2.id', 
158.
             c2.name as 'c2.name', 
159.
             c2.description as 'c2.description', 
160.
             c2.private as 'c2.private', 
161.
             c2.category as 'c2.category', 
162.
             c2.icon as 'c2.icon', 
163.
             c2.sourcetext as 'c2.sourcetext', 
164.
             c2.sourceurl as 'c2.sourceurl', 
165.
             c2.quality as 'c2.quality', 
166.
             c2.page as 'c2.page', 
167.
             c2.citation as 'c2.citation', 
168.
             c2.textdraduction as 'c2.textdraduction', 
169.
             c2.notesearch as 'c2.notesearch', 
170.
             c2.datecreated as 'c2.datecreated', 
171.
             d3.id as 'd3.id', 
172.
             d3.name as 'd3.name', 
173.
             d3.description as 'd3.description', 
174.
             d3.private as 'd3.private', 
175.
             d3.icon as 'd3.icon', 
176.
             d3.url as 'd3.url', 
177.
             d3.cote as 'd3.cote', 
178.
             d3.notesearch as 'd3.notesearch', 
179.
             d3.datecreated as 'd3.datecreated', 
180.
             d3.depot_id as 'd3.depot_id', 
181.
             d3.documenttype_id as 'd3.documenttype_id' 
182.
 
183.
        from event_source a 
184.
             left outer join document d3 on d3.id =  a.document_id 
185.
             left outer join source c2 on c2.id =  a.source_id 
186.
             left outer join event b1 on b1.id =  a.event_id 
187.
 
188.
        where a.id =  (SELECT id FROM event_source WHERE id < :id ORDER BY id DESC LIMIT 1) ; 
189.
            ";
190.
 
191.
        try {                
192.
 
193.
            $stmt $this->db->prepare($sqlSt);        
194.
            $stmt->bindParam(':id'$idPDO::PARAM_INT);
195.
            $stmt->execute(); 
196.
            $results $stmt->fetchAll(PDO::FETCH_ASSOC);
197.
            return $results;
198.
 
199.
        } catch (Exception $e) {
200.
            $this->lasterror $e->getMessage().' (<b>Id</b> = '.$idkeyname.')';
201.
            return false;
202.
        }
203.
    }
204.
 
205.
 
206.
    function selectNext($id) {
207.
 
208.
        $this->lasterror="";
209.
 
210.
        $sqlSt="
211.
        select       
212.
            a.id as 'a.id',  
213.
            a.event_id as 'a.event_id',
214.
            a.source_id as 'a.source_id',
215.
            a.document_id as 'a.document_id',
216.
            a.datecreated as 'a.datecreated',
217.
 
218.
             b1.id as 'b1.id', 
219.
             b1.name as 'b1.name', 
220.
             b1.description as 'b1.description', 
221.
             b1.private as 'b1.private', 
222.
             b1.date_begin as 'b1.date_begin', 
223.
             b1.date_begin_accurate as 'b1.date_begin_accurate', 
224.
             b1.notesearch as 'b1.notesearch', 
225.
             b1.datecreated as 'b1.datecreated', 
226.
             b1.person_1_id as 'b1.person_1_id', 
227.
             b1.person_2_id as 'b1.person_2_id', 
228.
             b1.person_3_id as 'b1.person_3_id', 
229.
             b1.eventtype_id as 'b1.eventtype_id', 
230.
             b1.place_id as 'b1.place_id', 
231.
             c2.id as 'c2.id', 
232.
             c2.name as 'c2.name', 
233.
             c2.description as 'c2.description', 
234.
             c2.private as 'c2.private', 
235.
             c2.category as 'c2.category', 
236.
             c2.icon as 'c2.icon', 
237.
             c2.sourcetext as 'c2.sourcetext', 
238.
             c2.sourceurl as 'c2.sourceurl', 
239.
             c2.quality as 'c2.quality', 
240.
             c2.page as 'c2.page', 
241.
             c2.citation as 'c2.citation', 
242.
             c2.textdraduction as 'c2.textdraduction', 
243.
             c2.notesearch as 'c2.notesearch', 
244.
             c2.datecreated as 'c2.datecreated', 
245.
             d3.id as 'd3.id', 
246.
             d3.name as 'd3.name', 
247.
             d3.description as 'd3.description', 
248.
             d3.private as 'd3.private', 
249.
             d3.icon as 'd3.icon', 
250.
             d3.url as 'd3.url', 
251.
             d3.cote as 'd3.cote', 
252.
             d3.notesearch as 'd3.notesearch', 
253.
             d3.datecreated as 'd3.datecreated', 
254.
             d3.depot_id as 'd3.depot_id', 
255.
             d3.documenttype_id as 'd3.documenttype_id' 
256.
 
257.
        from event_source a 
258.
             left outer join document d3 on d3.id =  a.document_id 
259.
             left outer join source c2 on c2.id =  a.source_id 
260.
             left outer join event b1 on b1.id =  a.event_id 
261.
 
262.
        where a.id =  (SELECT id FROM event_source WHERE id > :id ORDER BY id ASC LIMIT 1) ; 
263.
            ";
264.
 
265.
        try {                
266.
 
267.
            $stmt $this->db->prepare($sqlSt);        
268.
            $stmt->bindParam(':id'$idPDO::PARAM_INT);
269.
            $stmt->execute(); 
270.
            $results $stmt->fetchAll(PDO::FETCH_ASSOC);
271.
            return $results;
272.
 
273.
        } catch (Exception $e) {
274.
            $this->lasterror $e->getMessage().' (<b>Id</b> = '.$idkeyname.')';
275.
            return false;
276.
        }
277.
    }
278.
 
279.
    /*
280.
        Select all reccords from event_source  (with default order).
281.
        
282.
        parameters : None
283.
        return : associative array of reccords.
284.
    */
285.
    function selectAll() {
286.
 
287.
        $this->lasterror="";
288.
 
289.
        $sqlSt="
290.
        select       
291.
            a.id as 'a.id',  
292.
            a.event_id as 'a.event_id',
293.
            a.source_id as 'a.source_id',
294.
            a.document_id as 'a.document_id',
295.
            a.datecreated as 'a.datecreated',
296.
 
297.
             b1.id as 'b1.id',
298.
             b1.name as 'b1.name',
299.
             b1.description as 'b1.description',
300.
             b1.private as 'b1.private',
301.
             b1.date_begin as 'b1.date_begin',
302.
             b1.date_begin_accurate as 'b1.date_begin_accurate',
303.
             b1.notesearch as 'b1.notesearch',
304.
             b1.datecreated as 'b1.datecreated',
305.
             b1.person_1_id as 'b1.person_1_id',
306.
             b1.person_2_id as 'b1.person_2_id',
307.
             b1.person_3_id as 'b1.person_3_id',
308.
             b1.eventtype_id as 'b1.eventtype_id',
309.
             b1.place_id as 'b1.place_id',
310.
             c2.id as 'c2.id',
311.
             c2.name as 'c2.name',
312.
             c2.description as 'c2.description',
313.
             c2.private as 'c2.private',
314.
             c2.category as 'c2.category',
315.
             c2.icon as 'c2.icon',
316.
             c2.sourcetext as 'c2.sourcetext',
317.
             c2.sourceurl as 'c2.sourceurl',
318.
             c2.quality as 'c2.quality',
319.
             c2.page as 'c2.page',
320.
             c2.citation as 'c2.citation',
321.
             c2.textdraduction as 'c2.textdraduction',
322.
             c2.notesearch as 'c2.notesearch',
323.
             c2.datecreated as 'c2.datecreated',
324.
             d3.id as 'd3.id',
325.
             d3.name as 'd3.name',
326.
             d3.description as 'd3.description',
327.
             d3.private as 'd3.private',
328.
             d3.icon as 'd3.icon',
329.
             d3.url as 'd3.url',
330.
             d3.cote as 'd3.cote',
331.
             d3.notesearch as 'd3.notesearch',
332.
             d3.datecreated as 'd3.datecreated',
333.
             d3.depot_id as 'd3.depot_id',
334.
             d3.documenttype_id as 'd3.documenttype_id'
335.
 
336.
        from event_source a 
337.
             left outer join document d3 on d3.id =  a.document_id 
338.
             left outer join source c2 on c2.id =  a.source_id 
339.
             left outer join event b1 on b1.id =  a.event_id 
340.
 
341.
        ;    
342.
                ";
343.
 
344.
        try {        
345.
 
346.
            $stmt $this->db->prepare($sqlSt);        
347.
            $stmt->execute(); 
348.
            $results $stmt->fetchAll(PDO::FETCH_ASSOC);           
349.
            return $results;
350.
 
351.
        } catch (Exception $e) {
352.
            $this->lasterror $e->getMessage();
353.
            $this->count 0;
354.
            return false;
355.
        }
356.
    }
357.
 
358.
    /*
359.
        Update event_source 
360.
        
361.
        parameters : $id (reccord id) and fields list values.
362.
        return : True if no error.
363.
    */
364.
    function update$id$event_id,$source_id,$document_id,$datecreated ) {
365.
 
366.
        $this->lasterror="";        
367.
 
368.
        if ($event_id == ''$event_id null;
369.
        if ($source_id == ''$source_id null;
370.
        if ($document_id == ''$document_id null;
371.
        if ($datecreated == ''$datecreated null;
372.
        
373.
 
374.
        if ($this->checkValue( array( 
375.
        $event_id => '',
376.
        $source_id => '',
377.
        $document_id => '',
378.
        $datecreated => ''
379.
 
380.
) ) == false )
381.
        {
382.
            $this->lasterror="Check fields false";        
383.
            return false;
384.
        }
385.
 
386.
        $sqlSt="
387.
        update event_source set
388.
            event_id = :event_id,
389.
            source_id = :source_id,
390.
            document_id = :document_id,
391.
            datecreated = :datecreated
392.
 
393.
        where id = :id; 
394.
            ";
395.
 
396.
        try {        
397.
            
398.
            $stmt $this->db->prepare($sqlSt);
399.
            
400.
            $stmt->bindParam(':id'$idPDO::PARAM_INT);
401.
 
402.
            $stmt->bindParam(':event_id'$event_idPDO::PARAM_INT); 
403.
            $stmt->bindParam(':source_id'$source_idPDO::PARAM_INT); 
404.
            $stmt->bindParam(':document_id'$document_idPDO::PARAM_INT); 
405.
            $stmt->bindParam(':datecreated'$datecreatedPDO::PARAM_STR); 
406.
 
407.
            $stmt->execute();             
408.
            
409.
            if ($stmt->rowCount() == 0) {
410.
                $this->lasterror 'Erreur Sql update '.'  (<b>Id</b> = '.$id.'). <b>Sqlst</b> = ['.$sqlSt.'] values : '."<b>event_id</b> = [$event_id],<b>source_id</b> = [$source_id],<b>document_id</b> = [$document_id],<b>datecreated</b> = [$datecreated]";
411.
                
412.
                return false;
413.
            }   
414.
                     
415.
            return true;
416.
 
417.
        } catch (Exception $e) {            
418.
            $this->lasterror $e->getMessage().' (<b>Id</b> = '.$id.'). <b>Sqlst</b> = ['.$sqlSt.'] values : '."<b>event_id</b> = [$event_id],<b>source_id</b> = [$source_id],<b>document_id</b> = [$document_id],<b>datecreated</b> = [$datecreated]";  
419.
            return false;
420.
        }
421.
 
422.
    }
423.
 
424.
    /*
425.
        Insert new reccord into event_source.
426.
        
427.
        Parameters : fields values list.
428.
        return : True if no error.
429.
    */
430.
    function insert$event_id,$source_id,$document_id,$datecreated ) {
431.
 
432.
        $this->lasterror="";
433.
        $this->lastInsertId = -1;
434.
 
435.
        if ($event_id == ''$event_id null;
436.
        if ($source_id == ''$source_id null;
437.
        if ($document_id == ''$document_id null;
438.
        if ($datecreated == ''$datecreated null;
439.
        
440.
        
441.
        if ($this->checkValue( array( 
442.
        $event_id => '',
443.
        $source_id => '',
444.
        $document_id => '',
445.
        $datecreated => ''
446.
 
447.
) ) == false )
448.
        {
449.
            $this->lasterror="Check fields error";        
450.
            return false;
451.
        }
452.
 
453.
        $sqlSt="
454.
        insert into event_source (
455.
        event_id,
456.
        source_id,
457.
        document_id,
458.
        datecreated
459.
 
460.
            )
461.
        values (
462.
        :event_id, 
463.
        :source_id, 
464.
        :document_id, 
465.
        :datecreated 
466.
 
467.
            );    
468.
            ";
469.
 
470.
        try {        
471.
 
472.
            $stmt $this->db->prepare($sqlSt);               
473.
            
474.
            $stmt->bindParam(':event_id'$event_idPDO::PARAM_INT); 
475.
            $stmt->bindParam(':source_id'$source_idPDO::PARAM_INT); 
476.
            $stmt->bindParam(':document_id'$document_idPDO::PARAM_INT); 
477.
            $stmt->bindParam(':datecreated'$datecreatedPDO::PARAM_STR); 
478.
 
479.
 
480.
            $stmt->execute();     
481.
            $this->lastInsertId $this->db->lastInsertId(); 
482.
            
483.
            if ($stmt->rowCount() == 0) {
484.
                $this->lasterror 'Erreur Sql insert'.'  (<b>Id</b> = '.$id.'). <b>Sqlst</b> = ['.$sqlSt.'] values : '."<b>event_id</b> = [$event_id],<b>source_id</b> = [$source_id],<b>document_id</b> = [$document_id],<b>datecreated</b> = [$datecreated]";
485.
                return false;
486.
            }              
487.
                   
488.
            return true;
489.
 
490.
        } catch (Exception $e) {
491.
             $this->lasterror $e->getMessage().'  (<b>Id</b> = '.$id.'). <b>Sqlst</b> = ['.$sqlSt.'] values : '."<b>event_id</b> = [$event_id],<b>source_id</b> = [$source_id],<b>document_id</b> = [$document_id],<b>datecreated</b> = [$datecreated]";
492.
            return false;
493.
        }
494.
    }
495.
 
496.
    /*
497.
        Delete one reccord from event_source.
498.
        
499.
        parameters : $id (reccord id).
500.
        return : True if no error.
501.
    */
502.
    function delete($id) {
503.
 
504.
        $this->lasterror="";
505.
 
506.
        $sqlSt="
507.
        delete from event_source             
508.
        where id = :id; 
509.
            ";   
510.
     
511.
        try {        
512.
 
513.
            $stmt $this->db->prepare($sqlSt);  
514.
            $stmt->bindParam(':id'$idPDO::PARAM_INT);
515.
            $stmt->execute();        
516.
            
517.
            if ($stmt->rowCount() == 0) {
518.
                $this->lasterror "Erreur Sql delete ".' (<b>Id</b> ='.$id.')';       
519.
                return false;
520.
            }              
521.
 
522.
        } catch (Exception $e) {
523.
            $this->lasterror $e->getMessage().' (<b>Id</b>='.$id.')';
524.
            return false;
525.
        }
526.
        return true;
527.
    }
528.
 
529.
    /*
530.
        Get id min, id max, record count from event_source  
531.
        
532.
        parameters : None
533.
        return : count value or False in case of error
534.
    */
535.
    function getCount() {
536.
        
537.
        $this->lasterror="";
538.
 
539.
        $sqlSt="
540.
        select min(id) as minid, max(id) as maxid, count(*) as count 
541.
        from event_source 
542.
                ";
543.
 
544.
        try {        
545.
 
546.
            $stmt $this->db->prepare($sqlSt);        
547.
            $stmt->execute(); 
548.
            $results $stmt->fetchAll(PDO::FETCH_ASSOC); 
549.
            return $results[0];          
550.
 
551.
        } catch (Exception $e) {
552.
            $this->lasterror $e->getMessage();
553.
            return array( 'minid' => -1'maxid' => -1'count' => -1);
554.
        }
555.
                
556.
        //return $this->count;
557.
        return $results[0];
558.
    }
559.
 
560.
 
561.
 
562.
 
563.
    public $colmeta = [
564.
    'a.id' => array (
565.
        'metades' => "",
566.
        'sortformat' => "{{sortformat}}",
567.
        'listlen' => 4,
568.
        'listlib' => 'a_id',
569.
        'listlink' => 'on',
570.
        'selectlen' => 4,
571.
        'selectlib' => 'a_id',
572.
        'selectlink' => '',
573.
        'selectdisplay' => '',
574.
        'selectdisplaywidth' => '0'
575.
        'selectdisplayheight' => '0'
576.
        'listdisplay' => ''
577.
        'listdisplaywidth' => '0'
578.
        'listdisplayheight' => '0' 
579.
 
580.
        ),
581.
    'a.event_id' => array ( 
582.
        'metades' => "",
583.
        'sortformat' => ""
584.
        'listlen' => 4,
585.
        'listlib' => 'a_event_id' 
586.
        'listlink' => '',
587.
        'selectlen' => 4,
588.
        'selectlib' => 'a_event_id' 
589.
        'selectlink' => '',
590.
        'selectdisplay' => 'text',
591.
        'selectdisplaywidth' => '0'
592.
        'selectdisplayheight' => '0'
593.
        'listdisplay' => 'text',
594.
        'listdisplaywidth' => '0'
595.
        'listdisplayheight' => '0' 
596.
),
597.
    'a.source_id' => array ( 
598.
        'metades' => "",
599.
        'sortformat' => ""
600.
        'listlen' => 4,
601.
        'listlib' => 'a_source_id' 
602.
        'listlink' => '',
603.
        'selectlen' => 4,
604.
        'selectlib' => 'a_source_id' 
605.
        'selectlink' => '',
606.
        'selectdisplay' => 'text',
607.
        'selectdisplaywidth' => '0'
608.
        'selectdisplayheight' => '0'
609.
        'listdisplay' => 'text',
610.
        'listdisplaywidth' => '0'
611.
        'listdisplayheight' => '0' 
612.
),
613.
    'a.document_id' => array ( 
614.
        'metades' => "",
615.
        'sortformat' => ""
616.
        'listlen' => 4,
617.
        'listlib' => 'a_document_id' 
618.
        'listlink' => '',
619.
        'selectlen' => 4,
620.
        'selectlib' => 'a_document_id' 
621.
        'selectlink' => '',
622.
        'selectdisplay' => 'text',
623.
        'selectdisplaywidth' => '0'
624.
        'selectdisplayheight' => '0'
625.
        'listdisplay' => 'text',
626.
        'listdisplaywidth' => '0'
627.
        'listdisplayheight' => '0' 
628.
),
629.
    'a.datecreated' => array ( 
630.
        'metades' => "",
631.
        'sortformat' => "date"
632.
        'listlen' => 4,
633.
        'listlib' => 'a_datecreated' 
634.
        'listlink' => '',
635.
        'selectlen' => 4,
636.
        'selectlib' => 'a_datecreated' 
637.
        'selectlink' => '',
638.
        'selectdisplay' => 'text',
639.
        'selectdisplaywidth' => '0'
640.
        'selectdisplayheight' => '0'
641.
        'listdisplay' => 'text',
642.
        'listdisplaywidth' => '0'
643.
        'listdisplayheight' => '0' 
644.
),
645.
 
646.
     'b1.id' => array (  // Event
647.
        'metades' => "",
648.
        'sortformat' => "",
649.
        'listlen' => 0,
650.
        'listlib' => 'id'
651.
        'listlink' => '' ,
652.
        'selectlen' => 0,
653.
        'selectlib' => 'id'
654.
        'selectlink' => '{{fkselectlink}}',
655.
        'selectdisplay' => 'text',
656.
        'selectdisplaywidth' => '0'
657.
        'selectdisplayheight' => '0'
658.
        'listdisplay' => 'text',
659.
        'listdisplaywidth' => '0'
660.
        'listdisplayheight' => '0' 
661.
), 
662.
     'b1.name' => array (  // Event
663.
        'metades' => "",
664.
        'sortformat' => "",
665.
        'listlen' => 0,
666.
        'listlib' => 'name'
667.
        'listlink' => '' ,
668.
        'selectlen' => 0,
669.
        'selectlib' => 'name'
670.
        'selectlink' => '{{fkselectlink}}',
671.
        'selectdisplay' => 'text',
672.
        'selectdisplaywidth' => '0'
673.
        'selectdisplayheight' => '0'
674.
        'listdisplay' => 'text',
675.
        'listdisplaywidth' => '0'
676.
        'listdisplayheight' => '0' 
677.
), 
678.
     'b1.description' => array (  // Event
679.
        'metades' => "",
680.
        'sortformat' => "",
681.
        'listlen' => 0,
682.
        'listlib' => 'description'
683.
        'listlink' => '' ,
684.
        'selectlen' => 0,
685.
        'selectlib' => 'description'
686.
        'selectlink' => '{{fkselectlink}}',
687.
        'selectdisplay' => 'text',
688.
        'selectdisplaywidth' => '0'
689.
        'selectdisplayheight' => '0'
690.
        'listdisplay' => 'text',
691.
        'listdisplaywidth' => '0'
692.
        'listdisplayheight' => '0' 
693.
), 
694.
     'b1.private' => array (  // Event
695.
        'metades' => "",
696.
        'sortformat' => "",
697.
        'listlen' => 0,
698.
        'listlib' => 'private'
699.
        'listlink' => '' ,
700.
        'selectlen' => 0,
701.
        'selectlib' => 'private'
702.
        'selectlink' => '{{fkselectlink}}',
703.
        'selectdisplay' => 'text',
704.
        'selectdisplaywidth' => '0'
705.
        'selectdisplayheight' => '0'
706.
        'listdisplay' => 'text',
707.
        'listdisplaywidth' => '0'
708.
        'listdisplayheight' => '0' 
709.
), 
710.
     'b1.date_begin' => array (  // Event
711.
        'metades' => "",
712.
        'sortformat' => "date",
713.
        'listlen' => 0,
714.
        'listlib' => 'date_begin'
715.
        'listlink' => '' ,
716.
        'selectlen' => 0,
717.
        'selectlib' => 'date_begin'
718.
        'selectlink' => '{{fkselectlink}}',
719.
        'selectdisplay' => 'text',
720.
        'selectdisplaywidth' => '0'
721.
        'selectdisplayheight' => '0'
722.
        'listdisplay' => 'text',
723.
        'listdisplaywidth' => '0'
724.
        'listdisplayheight' => '0' 
725.
), 
726.
     'b1.date_begin_accurate' => array (  // Event
727.
        'metades' => "",
728.
        'sortformat' => "",
729.
        'listlen' => 0,
730.
        'listlib' => 'date_begin_accurate'
731.
        'listlink' => '' ,
732.
        'selectlen' => 0,
733.
        'selectlib' => 'date_begin_accurate'
734.
        'selectlink' => '{{fkselectlink}}',
735.
        'selectdisplay' => 'text',
736.
        'selectdisplaywidth' => '0'
737.
        'selectdisplayheight' => '0'
738.
        'listdisplay' => 'text',
739.
        'listdisplaywidth' => '0'
740.
        'listdisplayheight' => '0' 
741.
), 
742.
     'b1.notesearch' => array (  // Event
743.
        'metades' => "",
744.
        'sortformat' => "",
745.
        'listlen' => 0,
746.
        'listlib' => 'notesearch'
747.
        'listlink' => '' ,
748.
        'selectlen' => 0,
749.
        'selectlib' => 'notesearch'
750.
        'selectlink' => '{{fkselectlink}}',
751.
        'selectdisplay' => 'text',
752.
        'selectdisplaywidth' => '0'
753.
        'selectdisplayheight' => '0'
754.
        'listdisplay' => 'text',
755.
        'listdisplaywidth' => '0'
756.
        'listdisplayheight' => '0' 
757.
), 
758.
     'b1.datecreated' => array (  // Event
759.
        'metades' => "",
760.
        'sortformat' => "date",
761.
        'listlen' => 0,
762.
        'listlib' => 'datecreated'
763.
        'listlink' => '' ,
764.
        'selectlen' => 0,
765.
        'selectlib' => 'datecreated'
766.
        'selectlink' => '{{fkselectlink}}',
767.
        'selectdisplay' => 'text',
768.
        'selectdisplaywidth' => '0'
769.
        'selectdisplayheight' => '0'
770.
        'listdisplay' => 'text',
771.
        'listdisplaywidth' => '0'
772.
        'listdisplayheight' => '0' 
773.
), 
774.
     'b1.person_1_id' => array (  // Event
775.
        'metades' => "",
776.
        'sortformat' => "",
777.
        'listlen' => 0,
778.
        'listlib' => 'person_1_id'
779.
        'listlink' => '' ,
780.
        'selectlen' => 0,
781.
        'selectlib' => 'person_1_id'
782.
        'selectlink' => '{{fkselectlink}}',
783.
        'selectdisplay' => 'text',
784.
        'selectdisplaywidth' => '0'
785.
        'selectdisplayheight' => '0'
786.
        'listdisplay' => 'text',
787.
        'listdisplaywidth' => '0'
788.
        'listdisplayheight' => '0' 
789.
), 
790.
     'b1.person_2_id' => array (  // Event
791.
        'metades' => "",
792.
        'sortformat' => "",
793.
        'listlen' => 0,
794.
        'listlib' => 'person_2_id'
795.
        'listlink' => '' ,
796.
        'selectlen' => 0,
797.
        'selectlib' => 'person_2_id'
798.
        'selectlink' => '{{fkselectlink}}',
799.
        'selectdisplay' => 'text',
800.
        'selectdisplaywidth' => '0'
801.
        'selectdisplayheight' => '0'
802.
        'listdisplay' => 'text',
803.
        'listdisplaywidth' => '0'
804.
        'listdisplayheight' => '0' 
805.
), 
806.
     'b1.person_3_id' => array (  // Event
807.
        'metades' => "",
808.
        'sortformat' => "",
809.
        'listlen' => 0,
810.
        'listlib' => 'person_3_id'
811.
        'listlink' => '' ,
812.
        'selectlen' => 0,
813.
        'selectlib' => 'person_3_id'
814.
        'selectlink' => '{{fkselectlink}}',
815.
        'selectdisplay' => 'text',
816.
        'selectdisplaywidth' => '0'
817.
        'selectdisplayheight' => '0'
818.
        'listdisplay' => 'text',
819.
        'listdisplaywidth' => '0'
820.
        'listdisplayheight' => '0' 
821.
), 
822.
     'b1.eventtype_id' => array (  // Event
823.
        'metades' => "",
824.
        'sortformat' => "",
825.
        'listlen' => 0,
826.
        'listlib' => 'eventtype_id'
827.
        'listlink' => '' ,
828.
        'selectlen' => 0,
829.
        'selectlib' => 'eventtype_id'
830.
        'selectlink' => '{{fkselectlink}}',
831.
        'selectdisplay' => 'text',
832.
        'selectdisplaywidth' => '0'
833.
        'selectdisplayheight' => '0'
834.
        'listdisplay' => 'text',
835.
        'listdisplaywidth' => '0'
836.
        'listdisplayheight' => '0' 
837.
), 
838.
     'b1.place_id' => array (  // Event
839.
        'metades' => "",
840.
        'sortformat' => "",
841.
        'listlen' => 0,
842.
        'listlib' => 'place_id'
843.
        'listlink' => '' ,
844.
        'selectlen' => 0,
845.
        'selectlib' => 'place_id'
846.
        'selectlink' => '{{fkselectlink}}',
847.
        'selectdisplay' => 'text',
848.
        'selectdisplaywidth' => '0'
849.
        'selectdisplayheight' => '0'
850.
        'listdisplay' => 'text',
851.
        'listdisplaywidth' => '0'
852.
        'listdisplayheight' => '0' 
853.
), 
854.
     'c2.id' => array (  // Source
855.
        'metades' => "",
856.
        'sortformat' => "",
857.
        'listlen' => 0,
858.
        'listlib' => 'id'
859.
        'listlink' => '' ,
860.
        'selectlen' => 0,
861.
        'selectlib' => 'id'
862.
        'selectlink' => '{{fkselectlink}}',
863.
        'selectdisplay' => 'text',
864.
        'selectdisplaywidth' => '0'
865.
        'selectdisplayheight' => '0'
866.
        'listdisplay' => 'text',
867.
        'listdisplaywidth' => '0'
868.
        'listdisplayheight' => '0' 
869.
), 
870.
     'c2.name' => array (  // Source
871.
        'metades' => "",
872.
        'sortformat' => "",
873.
        'listlen' => 0,
874.
        'listlib' => 'name'
875.
        'listlink' => '' ,
876.
        'selectlen' => 0,
877.
        'selectlib' => 'name'
878.
        'selectlink' => '{{fkselectlink}}',
879.
        'selectdisplay' => 'text',
880.
        'selectdisplaywidth' => '0'
881.
        'selectdisplayheight' => '0'
882.
        'listdisplay' => 'text',
883.
        'listdisplaywidth' => '0'
884.
        'listdisplayheight' => '0' 
885.
), 
886.
     'c2.description' => array (  // Source
887.
        'metades' => "",
888.
        'sortformat' => "",
889.
        'listlen' => 0,
890.
        'listlib' => 'description'
891.
        'listlink' => '' ,
892.
        'selectlen' => 0,
893.
        'selectlib' => 'description'
894.
        'selectlink' => '{{fkselectlink}}',
895.
        'selectdisplay' => 'text',
896.
        'selectdisplaywidth' => '0'
897.
        'selectdisplayheight' => '0'
898.
        'listdisplay' => 'text',
899.
        'listdisplaywidth' => '0'
900.
        'listdisplayheight' => '0' 
901.
), 
902.
     'c2.private' => array (  // Source
903.
        'metades' => "",
904.
        'sortformat' => "",
905.
        'listlen' => 0,
906.
        'listlib' => 'private'
907.
        'listlink' => '' ,
908.
        'selectlen' => 0,
909.
        'selectlib' => 'private'
910.
        'selectlink' => '{{fkselectlink}}',
911.
        'selectdisplay' => 'text',
912.
        'selectdisplaywidth' => '0'
913.
        'selectdisplayheight' => '0'
914.
        'listdisplay' => 'text',
915.
        'listdisplaywidth' => '0'
916.
        'listdisplayheight' => '0' 
917.
), 
918.
     'c2.category' => array (  // Source
919.
        'metades' => "",
920.
        'sortformat' => "",
921.
        'listlen' => 0,
922.
        'listlib' => 'category'
923.
        'listlink' => '' ,
924.
        'selectlen' => 0,
925.
        'selectlib' => 'category'
926.
        'selectlink' => '{{fkselectlink}}',
927.
        'selectdisplay' => 'text',
928.
        'selectdisplaywidth' => '0'
929.
        'selectdisplayheight' => '0'
930.
        'listdisplay' => 'text',
931.
        'listdisplaywidth' => '0'
932.
        'listdisplayheight' => '0' 
933.
), 
934.
     'c2.icon' => array (  // Source
935.
        'metades' => "",
936.
        'sortformat' => "",
937.
        'listlen' => 0,
938.
        'listlib' => 'icon'
939.
        'listlink' => '' ,
940.
        'selectlen' => 0,
941.
        'selectlib' => 'icon'
942.
        'selectlink' => '{{fkselectlink}}',
943.
        'selectdisplay' => 'text',
944.
        'selectdisplaywidth' => '0'
945.
        'selectdisplayheight' => '0'
946.
        'listdisplay' => 'text',
947.
        'listdisplaywidth' => '0'
948.
        'listdisplayheight' => '0' 
949.
), 
950.
     'c2.sourcetext' => array (  // Source
951.
        'metades' => "",
952.
        'sortformat' => "",
953.
        'listlen' => 0,
954.
        'listlib' => 'sourcetext'
955.
        'listlink' => '' ,
956.
        'selectlen' => 0,
957.
        'selectlib' => 'sourcetext'
958.
        'selectlink' => '{{fkselectlink}}',
959.
        'selectdisplay' => 'text',
960.
        'selectdisplaywidth' => '0'
961.
        'selectdisplayheight' => '0'
962.
        'listdisplay' => 'text',
963.
        'listdisplaywidth' => '0'
964.
        'listdisplayheight' => '0' 
965.
), 
966.
     'c2.sourceurl' => array (  // Source
967.
        'metades' => "",
968.
        'sortformat' => "",
969.
        'listlen' => 8,
970.
        'listlib' => 'sourceurl'
971.
        'listlink' => '' ,
972.
        'selectlen' => 8,
973.
        'selectlib' => 'sourceurl'
974.
        'selectlink' => '{{fkselectlink}}',
975.
        'selectdisplay' => 'text',
976.
        'selectdisplaywidth' => '0'
977.
        'selectdisplayheight' => '0'
978.
        'listdisplay' => 'text',
979.
        'listdisplaywidth' => '0'
980.
        'listdisplayheight' => '0' 
981.
), 
982.
     'c2.quality' => array (  // Source
983.
        'metades' => "",
984.
        'sortformat' => "",
985.
        'listlen' => 0,
986.
        'listlib' => 'quality'
987.
        'listlink' => '' ,
988.
        'selectlen' => 0,
989.
        'selectlib' => 'quality'
990.
        'selectlink' => '{{fkselectlink}}',
991.
        'selectdisplay' => 'text',
992.
        'selectdisplaywidth' => '0'
993.
        'selectdisplayheight' => '0'
994.
        'listdisplay' => 'text',
995.
        'listdisplaywidth' => '0'
996.
        'listdisplayheight' => '0' 
997.
), 
998.
     'c2.page' => array (  // Source
999.
        'metades' => "",
1000.
        'sortformat' => "",
1001.
        'listlen' => 0,
1002.
        'listlib' => 'page'
1003.
        'listlink' => '' ,
1004.
        'selectlen' => 0,
1005.
        'selectlib' => 'page'
1006.
        'selectlink' => '{{fkselectlink}}',
1007.
        'selectdisplay' => 'text',
1008.
        'selectdisplaywidth' => '0'
1009.
        'selectdisplayheight' => '0'
1010.
        'listdisplay' => 'text',
1011.
        'listdisplaywidth' => '0'
1012.
        'listdisplayheight' => '0' 
1013.
), 
1014.
     'c2.citation' => array (  // Source
1015.
        'metades' => "",
1016.
        'sortformat' => "",
1017.
        'listlen' => 0,
1018.
        'listlib' => 'citation'
1019.
        'listlink' => '' ,
1020.
        'selectlen' => 0,
1021.
        'selectlib' => 'citation'
1022.
        'selectlink' => '{{fkselectlink}}',
1023.
        'selectdisplay' => 'text',
1024.
        'selectdisplaywidth' => '0'
1025.
        'selectdisplayheight' => '0'
1026.
        'listdisplay' => 'text',
1027.
        'listdisplaywidth' => '0'
1028.
        'listdisplayheight' => '0' 
1029.
), 
1030.
     'c2.textdraduction' => array (  // Source
1031.
        'metades' => "",
1032.
        'sortformat' => "",
1033.
        'listlen' => 0,
1034.
        'listlib' => 'textdraduction'
1035.
        'listlink' => '' ,
1036.
        'selectlen' => 0,
1037.
        'selectlib' => 'textdraduction'
1038.
        'selectlink' => '{{fkselectlink}}',
1039.
        'selectdisplay' => 'text',
1040.
        'selectdisplaywidth' => '0'
1041.
        'selectdisplayheight' => '0'
1042.
        'listdisplay' => 'text',
1043.
        'listdisplaywidth' => '0'
1044.
        'listdisplayheight' => '0' 
1045.
), 
1046.
     'c2.notesearch' => array (  // Source
1047.
        'metades' => "",
1048.
        'sortformat' => "",
1049.
        'listlen' => 8,
1050.
        'listlib' => 'notesearch'
1051.
        'listlink' => '' ,
1052.
        'selectlen' => 0,
1053.
        'selectlib' => 'notesearch'
1054.
        'selectlink' => '{{fkselectlink}}',
1055.
        'selectdisplay' => 'text',
1056.
        'selectdisplaywidth' => '0'
1057.
        'selectdisplayheight' => '0'
1058.
        'listdisplay' => 'text',
1059.
        'listdisplaywidth' => '0'
1060.
        'listdisplayheight' => '0' 
1061.
), 
1062.
     'c2.datecreated' => array (  // Source
1063.
        'metades' => "",
1064.
        'sortformat' => "date",
1065.
        'listlen' => 0,
1066.
        'listlib' => 'datecreated'
1067.
        'listlink' => '' ,
1068.
        'selectlen' => 0,
1069.
        'selectlib' => 'datecreated'
1070.
        'selectlink' => '{{fkselectlink}}',
1071.
        'selectdisplay' => 'text',
1072.
        'selectdisplaywidth' => '0'
1073.
        'selectdisplayheight' => '0'
1074.
        'listdisplay' => 'text',
1075.
        'listdisplaywidth' => '0'
1076.
        'listdisplayheight' => '0' 
1077.
), 
1078.
     'd3.id' => array (  // Document
1079.
        'metades' => "",
1080.
        'sortformat' => "",
1081.
        'listlen' => 0,
1082.
        'listlib' => 'id'
1083.
        'listlink' => '' ,
1084.
        'selectlen' => 0,
1085.
        'selectlib' => 'id'
1086.
        'selectlink' => '{{fkselectlink}}',
1087.
        'selectdisplay' => 'text',
1088.
        'selectdisplaywidth' => '0'
1089.
        'selectdisplayheight' => '0'
1090.
        'listdisplay' => 'text',
1091.
        'listdisplaywidth' => '0'
1092.
        'listdisplayheight' => '0' 
1093.
), 
1094.
     'd3.name' => array (  // Document
1095.
        'metades' => "",
1096.
        'sortformat' => "",
1097.
        'listlen' => 0,
1098.
        'listlib' => 'name'
1099.
        'listlink' => '' ,
1100.
        'selectlen' => 0,
1101.
        'selectlib' => 'name'
1102.
        'selectlink' => '{{fkselectlink}}',
1103.
        'selectdisplay' => 'text',
1104.
        'selectdisplaywidth' => '0'
1105.
        'selectdisplayheight' => '0'
1106.
        'listdisplay' => 'text',
1107.
        'listdisplaywidth' => '0'
1108.
        'listdisplayheight' => '0' 
1109.
), 
1110.
     'd3.description' => array (  // Document
1111.
        'metades' => "",
1112.
        'sortformat' => "",
1113.
        'listlen' => 0,
1114.
        'listlib' => 'description'
1115.
        'listlink' => '' ,
1116.
        'selectlen' => 0,
1117.
        'selectlib' => 'description'
1118.
        'selectlink' => '{{fkselectlink}}',
1119.
        'selectdisplay' => 'text',
1120.
        'selectdisplaywidth' => '0'
1121.
        'selectdisplayheight' => '0'
1122.
        'listdisplay' => 'text',
1123.
        'listdisplaywidth' => '0'
1124.
        'listdisplayheight' => '0' 
1125.
), 
1126.
     'd3.private' => array (  // Document
1127.
        'metades' => "",
1128.
        'sortformat' => "",
1129.
        'listlen' => 0,
1130.
        'listlib' => 'private'
1131.
        'listlink' => '' ,
1132.
        'selectlen' => 0,
1133.
        'selectlib' => 'private'
1134.
        'selectlink' => '{{fkselectlink}}',
1135.
        'selectdisplay' => 'text',
1136.
        'selectdisplaywidth' => '0'
1137.
        'selectdisplayheight' => '0'
1138.
        'listdisplay' => 'text',
1139.
        'listdisplaywidth' => '0'
1140.
        'listdisplayheight' => '0' 
1141.
), 
1142.
     'd3.icon' => array (  // Document
1143.
        'metades' => "",
1144.
        'sortformat' => "",
1145.
        'listlen' => 0,
1146.
        'listlib' => 'icon'
1147.
        'listlink' => '' ,
1148.
        'selectlen' => 0,
1149.
        'selectlib' => 'icon'
1150.
        'selectlink' => '{{fkselectlink}}',
1151.
        'selectdisplay' => 'text',
1152.
        'selectdisplaywidth' => '0'
1153.
        'selectdisplayheight' => '0'
1154.
        'listdisplay' => 'text',
1155.
        'listdisplaywidth' => '0'
1156.
        'listdisplayheight' => '0' 
1157.
), 
1158.
     'd3.url' => array (  // Document
1159.
        'metades' => "",
1160.
        'sortformat' => "",
1161.
        'listlen' => 0,
1162.
        'listlib' => 'url'
1163.
        'listlink' => '' ,
1164.
        'selectlen' => 0,
1165.
        'selectlib' => 'url'
1166.
        'selectlink' => '{{fkselectlink}}',
1167.
        'selectdisplay' => 'text',
1168.
        'selectdisplaywidth' => '0'
1169.
        'selectdisplayheight' => '0'
1170.
        'listdisplay' => 'text',
1171.
        'listdisplaywidth' => '0'
1172.
        'listdisplayheight' => '0' 
1173.
), 
1174.
     'd3.cote' => array (  // Document
1175.
        'metades' => "",
1176.
        'sortformat' => "",
1177.
        'listlen' => 0,
1178.
        'listlib' => 'cote'
1179.
        'listlink' => '' ,
1180.
        'selectlen' => 0,
1181.
        'selectlib' => 'cote'
1182.
        'selectlink' => '{{fkselectlink}}',
1183.
        'selectdisplay' => 'text',
1184.
        'selectdisplaywidth' => '0'
1185.
        'selectdisplayheight' => '0'
1186.
        'listdisplay' => 'text',
1187.
        'listdisplaywidth' => '0'
1188.
        'listdisplayheight' => '0' 
1189.
), 
1190.
     'd3.notesearch' => array (  // Document
1191.
        'metades' => "",
1192.
        'sortformat' => "",
1193.
        'listlen' => 0,
1194.
        'listlib' => 'notesearch'
1195.
        'listlink' => '' ,
1196.
        'selectlen' => 0,
1197.
        'selectlib' => 'notesearch'
1198.
        'selectlink' => '{{fkselectlink}}',
1199.
        'selectdisplay' => 'text',
1200.
        'selectdisplaywidth' => '0'
1201.
        'selectdisplayheight' => '0'
1202.
        'listdisplay' => 'text',
1203.
        'listdisplaywidth' => '0'
1204.
        'listdisplayheight' => '0' 
1205.
), 
1206.
     'd3.datecreated' => array (  // Document
1207.
        'metades' => "",
1208.
        'sortformat' => "date",
1209.
        'listlen' => 0,
1210.
        'listlib' => 'datecreated'
1211.
        'listlink' => '' ,
1212.
        'selectlen' => 0,
1213.
        'selectlib' => 'datecreated'
1214.
        'selectlink' => '{{fkselectlink}}',
1215.
        'selectdisplay' => 'text',
1216.
        'selectdisplaywidth' => '0'
1217.
        'selectdisplayheight' => '0'
1218.
        'listdisplay' => 'text',
1219.
        'listdisplaywidth' => '0'
1220.
        'listdisplayheight' => '0' 
1221.
), 
1222.
     'd3.depot_id' => array (  // Document
1223.
        'metades' => "",
1224.
        'sortformat' => "",
1225.
        'listlen' => 0,
1226.
        'listlib' => 'depot_id'
1227.
        'listlink' => '' ,
1228.
        'selectlen' => 0,
1229.
        'selectlib' => 'depot_id'
1230.
        'selectlink' => '{{fkselectlink}}',
1231.
        'selectdisplay' => 'text',
1232.
        'selectdisplaywidth' => '0'
1233.
        'selectdisplayheight' => '0'
1234.
        'listdisplay' => 'text',
1235.
        'listdisplaywidth' => '0'
1236.
        'listdisplayheight' => '0' 
1237.
), 
1238.
     'd3.documenttype_id' => array (  // Document
1239.
        'metades' => "",
1240.
        'sortformat' => "",
1241.
        'listlen' => 0,
1242.
        'listlib' => 'documenttype_id'
1243.
        'listlink' => '' ,
1244.
        'selectlen' => 0,
1245.
        'selectlib' => 'documenttype_id'
1246.
        'selectlink' => '{{fkselectlink}}',
1247.
        'selectdisplay' => 'text',
1248.
        'selectdisplaywidth' => '0'
1249.
        'selectdisplayheight' => '0'
1250.
        'listdisplay' => 'text',
1251.
        'listdisplaywidth' => '0'
1252.
        'listdisplayheight' => '0' 
1253.
1254.
            
1255.
    ];
1256.
 
1257.
    /*
1258.
        Get field property value
1259.
        
1260.
        Parameters : field name and property name.
1261.
        return : value of property.
1262.
    */
1263.
 
1264.
    function getMeta$fieldkey $metakey ) {
1265.
        return $this->colmeta [$fieldkey][$metakey];
1266.
    }
1267.
 
1268.
    /*
1269.
        Get labels for list table header.
1270.
        
1271.
        Parameters : None.
1272.
        return : String.
1273.
    */
1274.
 
1275.
    function getTableHeaderList() {        
1276.
        
1277.
        $labelsStr ='';
1278.
        
1279.
        foreach (  $this->colmeta as $k => $v) {
1280.
            if ( $v['listlen'] > 
1281.
                $labelsStr $labelsStr.'<th title="'.$v['metades'].'" >'.$v['listlib'] .'</th>'."\n";
1282.
        }                
1283.
        return $labelsStr;
1284.
    }
1285.
    
1286.
    function getTableFieldLenList$field ) {        
1287.
        
1288.
        return $this->colmeta[$field]['listlen'];
1289.
    }
1290.
 
1291.
    function getTableFieldLinkList$field ) {        
1292.
        
1293.
        return $this->colmeta[$field]['listlink'];
1294.
    }
1295.
 
1296.
    /*
1297.
        Get labels for select table header.
1298.
        
1299.
        Parameters : None.
1300.
        return : String.
1301.
    */
1302.
 
1303.
    function getTableHeaderSelect() {        
1304.
        
1305.
        $labelsStr ='';
1306.
        
1307.
        foreach (  $this->colmeta as $k => $v) {
1308.
            if ( $v['selectlen'] > 
1309.
                $labelsStr $labelsStr.'<th title="'.$v['metades'].'" >'.$v['selectlib'] .'</th>'."\n";
1310.
        }                
1311.
        return $labelsStr;
1312.
    }
1313.
    
1314.
    function getTableFieldLenSelect$field ) {        
1315.
        
1316.
        return $this->colmeta[$field]['selectlen'];
1317.
    }
1318.
 
1319.
    function getTableFieldLinkSelect$field ) {        
1320.
        
1321.
        return $this->colmeta[$field]['selectlink'];
1322.
    }
1323.
 
1324.
    
1325.
    /*
1326.
        Check user input values for event_source.
1327.
        
1328.
        Parameters : array of fields with regexp  paterns. ex: array( $nom =>'^(?!\s*$).+' , $icone => '')
1329.
        return : False if at last one regexp does not match.
1330.
    */
1331.
    function checkValue$arrayCheck ) {
1332.
 
1333.
        $indexfield=1;
1334.
        foreach ( $arrayCheck as $value => $pattern) {
1335.
 
1336.
            if ($pattern=='') continue;
1337.
 
1338.
            $pattern='/'.$pattern.'/';
1339.
 
1340.
            if (!preg_match($pattern$value)) {
1341.
                $this->lasterror "Erreur champ #".$indexfield'. Valeur:['.$value.']';
1342.
                return false;                
1343.
            }
1344.
 
1345.
            $indexfield+=1;
1346.
 
1347.
        }
1348.
 
1349.
        return true;
1350.
    }
1351.
 
1352.
// end class
1353.
 
1354.
?>
1355.