All pastes #74001 Raw Edit

Unnamed

public php v1 · immutable
#74001 ·published 2006-06-28 15:12 UTC
rendered paste body
private function parseInputs ($element) // Parse inputs including textarea	{		if (!isset ($this->EIcontent))			$this->EIContent = $this-> DOM-> getElementsByTagName('input');		$elements = $this->EIContent;		$element_count = 0;		$Last_select = NULL;		foreach ($elements as $node)		{			$name = $node-> getAttribute('name') ? $node-> getAttribute('name') : NULL;			$id = $node-> getAttribute('id');			$value = $node-> getAttribute('value');			$parent = $node-> parentNode -> getAttribute('name'); // Parent node			$type = $node-> getAttribute('type') ? $node-> getAttribute('type') : "text";			echo "new form input $type and name is $name son of $parent<br>";			if ( (strtolower($type) == $element) && ($parent) )			{				if ( ($parentID = $this-> parentGetIDByName ('Form', $parent)) != -1 )				{					if ($parentID != $Last_select)						$element_count = 0;							$this-> _Content [$parentID]['elements'][$element][$element_count]['name'] = $name;					$this-> _Content [$parentID]['elements'][$element][$element_count]['id'] = $id;					$this-> _Content [$parentID]['elements'][$element][$element_count]['value'] = $value;					$element_count++;					$Last_select = $parentID;				}			}		}		return true;	}