Last update: 31.03.2008 | © 2024 Julian von Mendel | Datenschutz
<?php
/* xml_extension class
* (C) 2006 Julian von Mendel (http://derjulian.net)
* License: LGPL
*/
class xml_if implements xml_widget
{
public $node;
public $xml ;
function __construct($node, $xml)
{
$this->node = $node;
$this->xml = $xml ;
}
public static function dtd()
{
return <<<DTD
DTD;
}
public function output($returntype = "xhtml")
{
$parse = $this->xml->attributes($this->node, array("name", "type", "equal", "unequal"));
extract($parse["attributes_array"]);
$data = $this->xml->getDataItem("option");
if (!isset($data[$type][$name]))
$var = "";
else
$var = $data[$type][$name];
if (($equal != "" && $var != $equal) || ($unequal != "" && $var == $unequal))
return False;
$parse = $this->xml->parseNode($this->node, True);
return $parse["content_string"];
}
}
?>
© 2009 Julian von Mendel (http://derjulian.net) | Datum: 09.09.2024