| [ Index ] |
PHP Cross Reference of Quick Form DataBase |
[Summary view] [Print] [Text view]
1 <?php 2 if (!defined('QFDB_SECURITY')) { 3 die("You can't access this file directly..."); 4 } 5 6 7 8 /** 9 * Graphic QFDB Object: print content HTML in one container with one or two cells 10 * 11 * @author Everaldo Wanderlei Uavniczak <everaldouav [at] gmail.com> 12 * @since 0.4 13 * @package quickformdb 14 * @see http://www.qfdb.net/ 15 * @license BSD License <http://www.qfdb.net/bsd_license.txt> 16 * @todo verify if has defined attributes that never will be used ('display'='one_cell' with 'left_others', ...) 17 * @todo verify if help='true' and JS is allowed, if not, add a critical error 18 */ 19 20 21 class qfdbobj_container { 22 23 static function obj_struct(&$qfdb) 24 { 25 $qfdb->m['object'] = 'container'; 26 $qfdb->m['status'] = '12345'; 27 $qfdb->m['if'] = ''; 28 $qfdb->m['alias'] = ''; 29 30 $qfdb->m['content'] = ''; 31 32 $qfdb->m['required'] = 'false'; 33 $qfdb->m['required_str'] = '*'; 34 $qfdb->m['required_class'] = $qfdb->get_css_value('qfdb_tpl_required'); 35 $qfdb->m['required_others'] = ''; 36 37 $qfdb->m['help'] = ''; 38 $qfdb->m['help_str'] = '[?]'; 39 $qfdb->m['help_class'] = $qfdb->get_css_value('qfdb_tpl_help'); 40 $qfdb->m['help_others'] = ''; 41 42 $qfdb->m['label'] = ''; 43 $qfdb->m['label_class'] = $qfdb->get_css_value('qfdb_tpl_label'); 44 $qfdb->m['label_others'] = ''; 45 46 $qfdb->m['display'] = 'two_cells'; 47 48 $qfdb->m['colspan_class'] = $qfdb->get_css_value('qfdb_tpl_colspan'); 49 $qfdb->m['colspan_others'] = ''; 50 51 $qfdb->m['left_class'] = $qfdb->get_css_value('qfdb_tpl_left'); 52 $qfdb->m['left_others'] = ''; 53 $qfdb->m['right_class'] = $qfdb->get_css_value('qfdb_tpl_right'); 54 $qfdb->m['right_others'] = ''; 55 56 $qfdb->m['object_properties'] = count($qfdb->m) +2; 57 } // end func 58 59 60 static function obj_html(&$qfdb) 61 { 62 $label = qfdb_themes::themes_label($qfdb->m); 63 64 if ($qfdb->m['display'] == 'only_object') { 65 $qfdb->add_output('html', $qfdb->m['content']); 66 } elseif ($qfdb->m['display'] == 'one_cell') { 67 $qfdb->add_output('html', qfdb_themes::themes_container_one_cell( array( 68 'content'=>$qfdb->m['content'], 69 'others'=>$qfdb->m['colspan_others'], 70 'class'=>$qfdb->m['colspan_class'], 71 'label'=>$label 72 ) )); 73 } else { 74 $qfdb->add_output('html', qfdb_themes::themes_container_two_cells( array( 75 'label'=>$label, 76 'label_others'=>$qfdb->m['left_others'], 77 'label_class'=>$qfdb->m['left_class'], 78 'content'=>$qfdb->m['content'], 79 'content_others'=>$qfdb->m['right_others'], 80 'content_class'=>$qfdb->m['right_class'], 81 'required'=>$qfdb->m['required'], 82 'required_str'=>$qfdb->m['required_str'], 83 'required_others'=>$qfdb->m['required_others'], 84 'required_class'=>$qfdb->m['required_class'], 85 'help'=>$qfdb->m['help'], 86 'help_str'=>$qfdb->m['help_str'], 87 'help_others'=>$qfdb->m['help_others'], 88 'help_class'=>$qfdb->m['help_class'] 89 ) )); 90 } 91 } // end func 92 93 94 static function obj_db(&$qfdb) 95 { 96 self::obj_html($qfdb); 97 } // end func 98 99 100 static function obj_debug(&$qfdb) 101 { 102 } // end func 103 104 105 106 static function obj_fixed(&$qfdb) 107 { 108 $qfdb->fix_display_3(); 109 $qfdb->fix_required(); 110 } // end func 111 112 } // end class
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Fri Nov 14 17:48:13 2008 | Cross-referenced by PHPXref 0.7 |