| [ 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 * Graphic QFDB Object: Print Form Title 9 * 10 * @author Everaldo Wanderlei Uavniczak <everaldouav [at] gmail.com> 11 * @since 0.1 12 * @package quickformdb 13 * @see http://www.qfdb.net/ 14 * @link http://w3schools.com/tags/tag_hn.asp 15 * @license BSD License <http://www.qfdb.net/bsd_license.txt> 16 * @todo Implement warning if don't exists text_1, text_3 and text_all 17 */ 18 19 20 class qfdbobj_title { 21 22 static function obj_struct(&$qfdb) 23 { 24 $qfdb->m['object'] = 'title'; // string (fixed) 25 $qfdb->m['status'] = '13'; // string 26 $qfdb->m['if'] = ''; // string 27 $qfdb->m['alias'] = ''; // string 28 29 $qfdb->m['level'] = '0'; // int 30 $qfdb->m['text_1'] = ''; // string 31 $qfdb->m['text_3'] = ''; // string 32 $qfdb->m['text_all'] = ''; // string 33 34 $qfdb->m['others'] = ''; // string 35 36 $qfdb->m['id'] = ''; // string 37 $qfdb->m['style'] = ''; // string 38 $qfdb->m['class'] = $qfdb->get_css_value('qfdb_title'); // string 39 $qfdb->m['title'] = ''; // string 40 41 $qfdb->m['object_properties'] = count($qfdb->m) +2; // int 42 } // end func 43 44 45 static function obj_html(&$qfdb) 46 { 47 // attributes 48 $others = ''; 49 if ($qfdb->m['style']) { 50 $others .= 'style="'.$qfdb->m['style'].'"'; 51 } 52 if ($qfdb->m['class']) { 53 $others .= ' class="'.$qfdb->m['class'].'"'; 54 } 55 if ($qfdb->m['title']) { 56 $others .= ' title="'.$qfdb->m['title'].'"'; 57 } 58 if ($qfdb->m['id']) { 59 $others .= ' id="'.$qfdb->m['id'].'"'; 60 } 61 $others .= $qfdb->m['others']; 62 63 // text 64 if ($qfdb->get_status() == 1 && $qfdb->m['text_1']) { 65 $text = $qfdb->m['text_1']; 66 } elseif ($qfdb->get_status() == 3 && $qfdb->m['text_3']) { 67 $text = $qfdb->m['text_3']; 68 } else { 69 $text = $qfdb->m['text_all']; 70 } 71 72 $qfdb->m['level'] = intval($qfdb->m['level']); 73 if ($qfdb->m['level'] > 0 && $qfdb->m['level'] <7) { 74 $text = "<h{$qfdb->m['level']}>$text</h{$qfdb->m['level']}>"; 75 } 76 77 $qfdb->add_output('html', qfdb_themes::themes_container_one_cell( array('label'=>$text, 'others'=>$others) )); 78 } // end func 79 80 81 static function obj_db(&$qfdb) 82 { 83 self::obj_html($qfdb); 84 } // end func 85 86 87 88 static function obj_debug(&$qfdb) 89 { 90 } // end func 91 92 93 94 static function obj_fixed(&$qfdb) 95 { 96 $qfdb->fix_others(); 97 } // end func 98 99 } // 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 |