| [ 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 * Struct QFDB Object: print HTML, TITLE and META (charset) Tags in the Document 10 * 11 * @author Everaldo Wanderlei Uavniczak <everaldouav [at] gmail.com> 12 * @since 0.5 13 * @package quickformdb 14 * @see http://www.qfdb.net/ 15 * @link http://w3schools.com/tags/tag_html.asp 16 * @link http://w3schools.com/tags/tag_head.asp 17 * @license BSD License <http://www.qfdb.net/bsd_license.txt> 18 */ 19 20 21 22 class qfdbobj_headhtml { 23 24 static function obj_struct(&$qfdb) 25 { 26 $qfdb->m['object'] = 'headhtml'; // string (fixed) 27 $qfdb->m['status'] = '12345'; // string 28 $qfdb->m['if'] = ''; // string 29 $qfdb->m['alias'] = ''; // string 30 31 $qfdb->m['html_lang'] = ''; // string 32 $qfdb->m['html_xmllang'] = ''; // string 33 $qfdb->m['html_others'] = ''; // string 34 $qfdb->m['head_lang'] = ''; // string 35 $qfdb->m['head_xmllang'] = ''; // string 36 $qfdb->m['head_others'] = ''; // string 37 $qfdb->m['head_charset'] = 'true'; // string 38 39 $qfdb->m['title'] = ''; // string 40 $qfdb->m['title_others'] = ''; // string 41 42 $qfdb->m['object_properties'] = count($qfdb->m) +2; // int 43 } // end obj_struct() 44 45 46 47 static function obj_html(&$qfdb) 48 { 49 $object = '<html xmlns="http://www.w3.org/1999/xhtml"'; 50 if ($qfdb->m['html_lang']) { 51 $object .= ' lang="'.$qfdb->m['html_lang'].'"'; 52 } 53 if ($qfdb->m['html_xmllang']) { 54 $object .= ' xml:lang="'.$qfdb->m['html_xmllang'].'"'; 55 } 56 if ($qfdb->m['html_others']) { 57 $object .= ' '.$qfdb->m['html_others']; 58 } 59 $object .= ">\n<head"; 60 if ($qfdb->m['head_lang']) { 61 $object .= ' lang="'.$qfdb->m['head_lang'].'"'; 62 } 63 if ($qfdb->m['head_xmllang']) { 64 $object .= ' xml:lang="'.$qfdb->m['head_xmllang'].'"'; 65 } 66 if ($qfdb->m['head_others']) { 67 $object .= ' '.$qfdb->m['head_others']; 68 } 69 $object .= ">\n <title"; 70 if ($qfdb->m['title_others']) { 71 $object .= ' '.$qfdb->m['title_others']; 72 } 73 $object .= '>'; 74 if ($qfdb->m['title']) { 75 $object .= $qfdb->m['title']; 76 } elseif ($qfdb->get_pagetitle()) { 77 $object .= $qfdb->get_pagetitle(); 78 } 79 $object .= "</title>\n"; 80 81 if ($qfdb->m['head_charset'] == 'true') { 82 $object .= $qfdb->i()."<meta http-equiv=\"Content-Type\" content=\"text/html; charset=".$qfdb->get_charset()."\" />\n"; 83 } 84 85 $qfdb->add_output('html', $object); 86 } // end obj_html() 87 88 89 90 static function obj_db(&$qfdb) 91 { 92 self::obj_html($qfdb); 93 } // end obj_db() 94 95 96 97 static function obj_debug(&$qfdb) 98 { 99 } // end obj_debug() 100 101 102 103 static function obj_fixed(&$qfdb) 104 { 105 } // end obj_fixed() 106 107 } // 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 |