| 832 |
if (file_exists( "$rootpath/$imgPath" )) $img = "<img src='$config->mosConfig_live_site/images/M_images/arrow.png' alt='arrow' />"; |
if (file_exists( "$rootpath/$imgPath" )) $img = "<img src='$config->mosConfig_live_site/images/M_images/arrow.png' alt='arrow' />"; |
| 833 |
else $img = '>'; |
else $img = '>'; |
| 834 |
} |
} |
| 835 |
|
$uri =& mosUriHelper::getInstance(); |
| 836 |
foreach ($this->_names as $i=>$name) { |
foreach ($this->_names as $i=>$name) { |
| 837 |
|
$uri->setUri($this->_urls[$i]); |
| 838 |
if ($i === $last AND count($customs) == 0) $result .= "$name</span>"; |
if ($i === $last AND count($customs) == 0) $result .= "$name</span>"; |
| 839 |
elseif (strstr($this->_urls[$i], 'view')) $result .= ""; |
elseif (strstr($uri->get('task'), 'view')) $result .= ""; |
| 840 |
else { |
else { |
| 841 |
$sefurl = sefRelToAbs($this->_urls[$i]); |
$sefurl = sefRelToAbs($this->_urls[$i]); |
| 842 |
$result .= "<a href='$sefurl' class='pathway'>$name</a>"; |
$result .= "<a href='$sefurl' class='pathway'>$name</a>"; |
| 3650 |
|
|
| 3651 |
} //class ends here |
} //class ends here |
| 3652 |
|
|
|
class mosHtmlHelper { |
|
|
var $_docTypes = array( |
|
|
'xhtml-strict' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">', |
|
|
'xhtml-trans' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">', |
|
|
'xhtml-frame' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">', |
|
|
'xhtml11' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">' |
|
|
); |
|
|
var $_docTypesText = array( |
|
|
'xhtml-strict' => 'XHTML 1.0 Strict', |
|
|
'xhtml-trans' => 'XHTML 1.0 Transitional', |
|
|
'xhtml-frame' => 'XHTML 1.0 Frameset', |
|
|
'xhtml11' => 'XHTML 1.1' |
|
|
); |
|
|
var $doctype = 'xhtml-trans'; |
|
|
|
|
|
/** |
|
|
* Singleton accessor |
|
|
*/ |
|
|
function &getInstance () { |
|
|
static $instance; |
|
|
if (!is_object($instance)) $instance = new mosHtmlHelper(); |
|
|
return $instance; |
|
|
} |
|
|
function __docType($type=null) { |
|
|
static $obj; |
|
|
if (!is_object($obj)) $obj =& mosHtmlHelper::getInstance(); |
|
|
|
|
|
if (array_key_exists($type, $obj->_docTypes)) return $obj->_docTypes[$type]; |
|
|
return $obj->_docTypes[$obj->doctype]; |
|
|
} |
|
|
function renderDocType($type=null) { |
|
|
static $obj; |
|
|
if (!is_object($obj)) $obj =& mosHtmlHelper::getInstance(); |
|
|
|
|
|
echo $obj->__docType($type)."\n"; |
|
|
} |
|
|
function get($var) { |
|
|
static $obj; |
|
|
if (!is_object($obj)) $obj =& mosHtmlHelper::getInstance(); |
|
|
|
|
|
if(isset($obj->$var)) return $obj->$var; |
|
|
return null; |
|
|
} |
|
|
function set($property, $value) { |
|
|
static $obj; |
|
|
if (!is_object($obj)) $obj =& mosHtmlHelper::getInstance(); |
|
|
|
|
|
if($property{0} == '_') return; // dont set private properties |
|
|
if (isset($obj->$property)) $obj->$property = $value; |
|
|
} |
|
|
} // end class mosHtmlHelper |
|
| 3653 |
?> |
?> |