Location: PHPKode > projects > MySQL-XML > docs/element.inc.source.html
<HTML>
<HEAD><TITLE>PHPXref : /element.inc source</TITLE></HEAD>
<BODY BGCOLOR="#EEEEE0" TEXT="#330505" LINK="#801800" VLINK="#300540" ALINK="#FFFFFF">
<TABLE BORDER=0 WIDTH=100%>
	<TR BGCOLOR="553333"><TD ALIGN="RIGHT">
		<FONT SIZE=+2 COLOR="#FFFFFF"><I>PHPXref Example</I></FONT>
	</TD></TR>
</TABLE>
<BR><BR>


<!-- Generated by PHPXref 0.2 at Wed Oct 30 08:50:37 2002 -->
<!-- PHPXref (c) 2000,2001 Gareth Watts - hide@address.com -->
<!-- http://phpxref.sourceforge.net/ -->

<SCRIPT LANGUAGE="JavaScript">
<!--
ext='.html';
relbase='';
function jump() {
    if (document.search.funcname.value.length) {
		funcname=document.search.funcname.value.replace(/[()]/g,'');
		funcname=document.search.funcname.value.toLowerCase();
        window.location=relbase+'_functions/'+escape(escape(funcname))+ext;
	}
    if (document.search.varname.value.length) {
		varname=document.search.varname.value.replace(/[$]/g,'');
        window.location=relbase+'_variables/'+escape(escape(varname))+ext;
	}
    if (document.search.tablename.value.length) {
		tablename=document.search.tablename.value.toLowerCase();
        window.location=relbase+'_tables/'+escape(escape(tablename))+ext;
	}
    return false;
}

document.writeln('<TABLE ALIGN="RIGHT" BORDER=0>');
document.writeln('<TR BGCOLOR="#000000"><TD>');
document.writeln('<CENTER><FONT SIZE=-1 COLOR="#EEEEEE"><B>Lookup</B></FONT></CENTER>');
document.writeln('</TD></TR>');

document.writeln('<TR BGCOLOR="#DDDDD0"><TD ALIGN="RIGHT">');
document.writeln('<FONT SIZE=-1>');
document.writeln('<FORM NAME="search" onSubmit=\'return jump()\'>');
document.writeln('<A HREF="_functions/index.html">Function</A>: ');
document.writeln('<INPUT TYPE="TEXT" SIZE=10 VALUE="" NAME="funcname" onChange=\'jump()\'><BR>');
document.writeln('<A HREF="_variables/index.html">Variable</A>: ');
document.writeln('<INPUT TYPE="TEXT" SIZE=10 VALUE="" NAME="varname" onChange=\'jump()\'><BR>');
document.writeln('<A HREF="_tables/index.html">Table</A>: ');
document.writeln('<INPUT TYPE="TEXT" SIZE=10 VALUE="" NAME="tablename" onChange=\'jump()\'><BR>');
document.writeln('</FORM>');
document.writeln('</FONT>');
document.writeln('</TD></TR></TABLE>');
// -->
</SCRIPT>
<FONT FACE="Clean" SIZE=-2>
<A HREF="./index.html">/</A> -> <A HREF="element.inc.html">element.inc</A><BR><P>
<A NAME="l1"><FONT SIZE=-2 COLOR="#555555">1</FONT>&nbsp;</A> &lt;?<BR>
<A NAME="l2"><FONT SIZE=-2 COLOR="#555555">2</FONT>&nbsp;</A> class ELEMENT {<BR>
<A NAME="l3"><FONT SIZE=-2 COLOR="#555555">3</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** element <A HREF="_functions/name.html">name</A>(type) <BR>
<A NAME="l4"><FONT SIZE=-2 COLOR="#555555">4</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*	@var name<BR>
<A NAME="l5"><FONT SIZE=-2 COLOR="#555555">5</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/<BR>
<A NAME="l6"><FONT SIZE=-2 COLOR="#555555">6</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var <A HREF="_variables/name.html">$name</A>;<BR>
<A NAME="l7"><FONT SIZE=-2 COLOR="#555555">7</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** id used for internal purposes */<BR>
<A NAME="l8"><FONT SIZE=-2 COLOR="#555555">8</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var <A HREF="_variables/id.html">$id</A>;<BR>
<A NAME="l9"><FONT SIZE=-2 COLOR="#555555">9</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** array of elements under encapsulated<BR>
<A NAME="l10"><FONT SIZE=-2 COLOR="#555555">10</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;with-in this element id only*/<BR>
<A NAME="l11"><FONT SIZE=-2 COLOR="#555555">11</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var <A HREF="_variables/children.html">$children</A> = <A HREF="_functions/array.html">array</A>();<BR>
<A NAME="l12"><FONT SIZE=-2 COLOR="#555555">12</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** array of attributes */<BR>
<A NAME="l13"><FONT SIZE=-2 COLOR="#555555">13</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var <A HREF="_variables/attributes.html">$attributes</A> = <A HREF="_functions/array.html">array</A>();<BR>
<A NAME="l14"><FONT SIZE=-2 COLOR="#555555">14</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** cdata */<BR>
<A NAME="l15"><FONT SIZE=-2 COLOR="#555555">15</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var <A HREF="_variables/cdata.html">$cdata</A>;<BR>
<A NAME="l16"><FONT SIZE=-2 COLOR="#555555">16</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** parents id number */<BR>
<A NAME="l17"><FONT SIZE=-2 COLOR="#555555">17</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var <A HREF="_variables/parent.html">$parent</A>;<BR>
<A NAME="l18"><FONT SIZE=-2 COLOR="#555555">18</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** document */<BR>
<A NAME="l19"><FONT SIZE=-2 COLOR="#555555">19</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var <A HREF="_variables/document.html">$document</A>;<BR>
<A NAME="l20"><FONT SIZE=-2 COLOR="#555555">20</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** boolean value indicating if<BR>
<A NAME="l21"><FONT SIZE=-2 COLOR="#555555">21</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this is a root node or not */<BR>
<A NAME="l22"><FONT SIZE=-2 COLOR="#555555">22</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var <A HREF="_variables/isroot.html">$isroot</A>;<BR>
<A NAME="l23"><FONT SIZE=-2 COLOR="#555555">23</FONT>&nbsp;</A> <BR>
<A NAME="l24"><FONT SIZE=-2 COLOR="#555555">24</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** return the xml data of elements *<BR>
<A NAME="l25"><FONT SIZE=-2 COLOR="#555555">25</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* that have an attribute of <A HREF="_variables/name.html">$name</A> with *<BR>
<A NAME="l26"><FONT SIZE=-2 COLOR="#555555">26</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* value similar to <A HREF="_variables/value.html">$value</A> this is outdated */<BR>
<A NAME="l27"><FONT SIZE=-2 COLOR="#555555">27</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function <A HREF="_functions/search_attribute_get_xml.html">search_attribute_get_XML</A>(<A HREF="_variables/name.html">$name</A>, <A HREF="_variables/value.html">$value</A>, <A HREF="_variables/recursive.html">$recursive</A> = false) {<BR>
<A NAME="l28"><FONT SIZE=-2 COLOR="#555555">28</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/ids.html">$ids</A> = <A HREF="_functions/array.html">array</A>();<BR>
<A NAME="l29"><FONT SIZE=-2 COLOR="#555555">29</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/data.html">$data</A> = &quot;&quot;;<BR>
<A NAME="l30"><FONT SIZE=-2 COLOR="#555555">30</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/query.html">$query</A> = &quot;SELECT ATTRIBUTES.ELEMENT FROM ATTRIBUTES, PARENTCHILD<BR>
<A NAME="l31"><FONT SIZE=-2 COLOR="#555555">31</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WHERE ATTRIBUTES.NAME = '<A HREF="_variables/name.html">$name</A>' AND<BR>
<A NAME="l32"><FONT SIZE=-2 COLOR="#555555">32</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ATTRIBUTES.VALUE LIKE '%<A HREF="_variables/value.html">$value</A>%' AND<BR>
<A NAME="l33"><FONT SIZE=-2 COLOR="#555555">33</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ATTRIBUTES.ELEMENT = PARENTCHILD.CHILD AND<BR>
<A NAME="l34"><FONT SIZE=-2 COLOR="#555555">34</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PARENTCHILD.PARENT = <A HREF="_variables/this.html">$this</A>-&gt;id&quot;;<BR>
<A NAME="l35"><FONT SIZE=-2 COLOR="#555555">35</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/results.html">$results</A> = <A HREF="_functions/mysql_query.html">mysql_query</A>(<A HREF="_variables/query.html">$query</A>);<BR>
<A NAME="l36"><FONT SIZE=-2 COLOR="#555555">36</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/tmp.html">$tmp</A> = new <A HREF="_functions/element.html">ELEMENT</A>();<BR>
<A NAME="l37"><FONT SIZE=-2 COLOR="#555555">37</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/for.html">for</A>(<A HREF="_variables/i.html">$i</A> = 0; <A HREF="_variables/i.html">$i</A> &lt; <A HREF="_functions/mysql_num_rows.html">mysql_num_rows</A>(<A HREF="_variables/results.html">$results</A>); <A HREF="_variables/i.html">$i</A>++) {<BR>
<A NAME="l38"><FONT SIZE=-2 COLOR="#555555">38</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/row.html">$row</A> = <A HREF="_functions/mysql_fetch_row.html">mysql_fetch_row</A>(<A HREF="_variables/results.html">$results</A>);<BR>
<A NAME="l39"><FONT SIZE=-2 COLOR="#555555">39</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/tmp.html">$tmp</A>-&gt;<A HREF="_functions/become.html">become</A>(<A HREF="_variables/row.html">$row</A>[0]);<BR>
<A NAME="l40"><FONT SIZE=-2 COLOR="#555555">40</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/data.html">$data</A> .= <A HREF="_variables/tmp.html">$tmp</A>-&gt;<A HREF="_functions/getxml.html">getXML</A>();<BR>
<A NAME="l41"><FONT SIZE=-2 COLOR="#555555">41</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l42"><FONT SIZE=-2 COLOR="#555555">42</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
<A NAME="l43"><FONT SIZE=-2 COLOR="#555555">43</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// if recursive then do children (recursivly of course)<BR>
<A NAME="l44"><FONT SIZE=-2 COLOR="#555555">44</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/if.html">if</A>(<A HREF="_variables/recursive.html">$recursive</A> != false) {<BR>
<A NAME="l45"><FONT SIZE=-2 COLOR="#555555">45</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/foreach.html">foreach</A>(<A HREF="_variables/this.html">$this</A>-&gt;children as <A HREF="_variables/i.html">$i</A>) {<BR>
<A NAME="l46"><FONT SIZE=-2 COLOR="#555555">46</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/tmp.html">$tmp</A>-&gt;<A HREF="_functions/become.html">become</A>(<A HREF="_variables/i.html">$i</A>);<BR>
<A NAME="l47"><FONT SIZE=-2 COLOR="#555555">47</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/data.html">$data</A> .= <A HREF="_variables/tmp.html">$tmp</A>-&gt;<A HREF="_functions/search_attribute_get_xml.html">search_attribute_get_XML</A>(<A HREF="_variables/name.html">$name</A>, <A HREF="_variables/value.html">$value</A>, true);<BR>
<A NAME="l48"><FONT SIZE=-2 COLOR="#555555">48</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l49"><FONT SIZE=-2 COLOR="#555555">49</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l50"><FONT SIZE=-2 COLOR="#555555">50</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// return data<BR>
<A NAME="l51"><FONT SIZE=-2 COLOR="#555555">51</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return <A HREF="_variables/data.html">$data</A>;<BR>
<A NAME="l52"><FONT SIZE=-2 COLOR="#555555">52</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l53"><FONT SIZE=-2 COLOR="#555555">53</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
<A NAME="l54"><FONT SIZE=-2 COLOR="#555555">54</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function <A HREF="_functions/internal_addresultstoarray.html">internal_addresultstoarray</A>(<A HREF="_variables/results.html">$results</A>, &amp;<A HREF="_variables/array.html">$array</A>) {<BR>
<A NAME="l55"><FONT SIZE=-2 COLOR="#555555">55</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/for.html">for</A>(<A HREF="_variables/i.html">$i</A>=0; <A HREF="_variables/i.html">$i</A> &lt; <A HREF="_functions/mysql_num_rows.html">mysql_num_rows</A>(<A HREF="_variables/results.html">$results</A>); <A HREF="_variables/i.html">$i</A>++) {<BR>
<A NAME="l56"><FONT SIZE=-2 COLOR="#555555">56</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/row.html">$row</A> = <A HREF="_functions/mysql_fetch_row.html">mysql_fetch_row</A>(<A HREF="_variables/results.html">$results</A>);<BR>
<A NAME="l57"><FONT SIZE=-2 COLOR="#555555">57</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/array_push.html">array_push</A>(<A HREF="_variables/array.html">$array</A>, <A HREF="_variables/row.html">$row</A>[0]);<BR>
<A NAME="l58"><FONT SIZE=-2 COLOR="#555555">58</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l59"><FONT SIZE=-2 COLOR="#555555">59</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}	<BR>
<A NAME="l60"><FONT SIZE=-2 COLOR="#555555">60</FONT>&nbsp;</A> <BR>
<A NAME="l61"><FONT SIZE=-2 COLOR="#555555">61</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function <A HREF="_functions/search_attribute_with_depth_get_xml.html">search_attribute_with_depth_get_XML</A>(<A HREF="_variables/name.html">$name</A>, <A HREF="_variables/value.html">$value</A>, <A HREF="_variables/depth.html">$depth</A>) {<BR>
<A NAME="l62"><FONT SIZE=-2 COLOR="#555555">62</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/buf.html">$buf</A> = <A HREF="_functions/array.html">array</A>();<BR>
<A NAME="l63"><FONT SIZE=-2 COLOR="#555555">63</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/tmp.html">$tmp</A> = <A HREF="_functions/array.html">array</A>();<BR>
<A NAME="l64"><FONT SIZE=-2 COLOR="#555555">64</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/children.html">$children</A> = <A HREF="_functions/array.html">array</A>();<BR>
<A NAME="l65"><FONT SIZE=-2 COLOR="#555555">65</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/children.html">$children</A> = null;<BR>
<A NAME="l66"><FONT SIZE=-2 COLOR="#555555">66</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// do first search looking for top-level children<BR>
<A NAME="l67"><FONT SIZE=-2 COLOR="#555555">67</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/query.html">$query</A> = &quot;SELECT ATTRIBUTES.ELEMENT FROM ATTRIBUTES, PARENTCHILD<BR>
<A NAME="l68"><FONT SIZE=-2 COLOR="#555555">68</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WHERE ATTRIBUTES.NAME= '<A HREF="_variables/name.html">$name</A>' AND<BR>
<A NAME="l69"><FONT SIZE=-2 COLOR="#555555">69</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ATTRIBUTES.VALUE LIKE '%<A HREF="_variables/value.html">$value</A>%' AND<BR>
<A NAME="l70"><FONT SIZE=-2 COLOR="#555555">70</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ATTRIBUTES.ELEMENT = PARENTCHILD.CHILD AND<BR>
<A NAME="l71"><FONT SIZE=-2 COLOR="#555555">71</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PARENTCHILD.PARENT = <A HREF="_variables/this.html">$this</A>-&gt;id&quot;;<BR>
<A NAME="l72"><FONT SIZE=-2 COLOR="#555555">72</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/results.html">$results</A> = <A HREF="_functions/mysql_query.html">mysql_query</A>(<A HREF="_variables/query.html">$query</A>);<BR>
<A NAME="l73"><FONT SIZE=-2 COLOR="#555555">73</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/array_results.html">$array_results</A> = <A HREF="_functions/array.html">array</A>();<BR>
<A NAME="l74"><FONT SIZE=-2 COLOR="#555555">74</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/for.html">for</A>(<A HREF="_variables/i.html">$i</A>=0; <A HREF="_variables/i.html">$i</A> &lt; <A HREF="_functions/mysql_num_rows.html">mysql_num_rows</A>(<A HREF="_variables/results.html">$results</A>); <A HREF="_variables/i.html">$i</A>++) {<BR>
<A NAME="l75"><FONT SIZE=-2 COLOR="#555555">75</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/row.html">$row</A> = <A HREF="_functions/mysql_fetch_row.html">mysql_fetch_row</A>(<A HREF="_variables/results.html">$results</A>);<BR>
<A NAME="l76"><FONT SIZE=-2 COLOR="#555555">76</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/array_push.html">array_push</A>(<A HREF="_variables/array_results.html">$array_results</A>, <A HREF="_variables/row.html">$row</A>[0]);<BR>
<A NAME="l77"><FONT SIZE=-2 COLOR="#555555">77</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l78"><FONT SIZE=-2 COLOR="#555555">78</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
<A NAME="l79"><FONT SIZE=-2 COLOR="#555555">79</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// get list of all children up to depth<BR>
<A NAME="l80"><FONT SIZE=-2 COLOR="#555555">80</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/if.html">if</A>(<A HREF="_variables/depth.html">$depth</A> &gt; 0) <A HREF="_variables/buf.html">$buf</A> = <A HREF="_variables/children.html">$children</A> = <A HREF="_variables/this.html">$this</A>-&gt;children;<BR>
<A NAME="l81"><FONT SIZE=-2 COLOR="#555555">81</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/if.html">if</A>(<A HREF="_variables/depth.html">$depth</A> &gt; 1) {<BR>
<A NAME="l82"><FONT SIZE=-2 COLOR="#555555">82</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/for.html">for</A>(<A HREF="_variables/i.html">$i</A> = 1; <A HREF="_variables/i.html">$i</A> &lt; <A HREF="_variables/depth.html">$depth</A>; <A HREF="_variables/i.html">$i</A>++) {<BR>
<A NAME="l83"><FONT SIZE=-2 COLOR="#555555">83</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// get children of <A HREF="_variables/buf.html">$buf</A><BR>
<A NAME="l84"><FONT SIZE=-2 COLOR="#555555">84</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/query2.html">$query2</A> = &quot;SELECT CHILD FROM PARENTCHILD WHERE<BR>
<A NAME="l85"><FONT SIZE=-2 COLOR="#555555">85</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PARENT = <A HREF="_variables/buf.html">$buf</A>[0]&quot;;<BR>
<A NAME="l86"><FONT SIZE=-2 COLOR="#555555">86</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/for.html">for</A>(<A HREF="_variables/i.html">$i</A> = 1; <A HREF="_variables/i.html">$i</A> &lt; <A HREF="_functions/count.html">count</A>(<A HREF="_variables/buf.html">$buf</A>); <A HREF="_variables/i.html">$i</A>++) {<BR>
<A NAME="l87"><FONT SIZE=-2 COLOR="#555555">87</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/query2.html">$query2</A> .= &quot; OR PARENT = &quot; . <A HREF="_variables/buf.html">$buf</A>[<A HREF="_variables/i.html">$i</A>];<BR>
<A NAME="l88"><FONT SIZE=-2 COLOR="#555555">88</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l89"><FONT SIZE=-2 COLOR="#555555">89</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/results.html">$results</A> = <A HREF="_functions/mysql_query.html">mysql_query</A>(<A HREF="_variables/query2.html">$query2</A>);<BR>
<A NAME="l90"><FONT SIZE=-2 COLOR="#555555">90</FONT>&nbsp;</A> <BR>
<A NAME="l91"><FONT SIZE=-2 COLOR="#555555">91</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// add results to children and remake buf[]<BR>
<A NAME="l92"><FONT SIZE=-2 COLOR="#555555">92</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/buf.html">$buf</A> = null;<BR>
<A NAME="l93"><FONT SIZE=-2 COLOR="#555555">93</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/buf.html">$buf</A> = <A HREF="_functions/array.html">array</A>();<BR>
<A NAME="l94"><FONT SIZE=-2 COLOR="#555555">94</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/for.html">for</A>(<A HREF="_variables/i.html">$i</A>=0; <A HREF="_variables/i.html">$i</A> &lt; <A HREF="_functions/mysql_num_rows.html">mysql_num_rows</A>(<A HREF="_variables/results.html">$results</A>); <A HREF="_variables/i.html">$i</A>++) {<BR>
<A NAME="l95"><FONT SIZE=-2 COLOR="#555555">95</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/row.html">$row</A> = <A HREF="_functions/mysql_fetch_row.html">mysql_fetch_row</A>(<A HREF="_variables/results.html">$results</A>);<BR>
<A NAME="l96"><FONT SIZE=-2 COLOR="#555555">96</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/array_push.html">array_push</A>(<A HREF="_variables/buf.html">$buf</A>, <A HREF="_variables/row.html">$row</A>[0]);<BR>
<A NAME="l97"><FONT SIZE=-2 COLOR="#555555">97</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l98"><FONT SIZE=-2 COLOR="#555555">98</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/foreach.html">foreach</A>(<A HREF="_variables/buf.html">$buf</A> as <A HREF="_variables/cur.html">$cur</A>) <A HREF="_functions/array_push.html">array_push</A>(<A HREF="_variables/children.html">$children</A>, <A HREF="_variables/cur.html">$cur</A>);<BR>
<A NAME="l99"><FONT SIZE=-2 COLOR="#555555">99</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l100"><FONT SIZE=-2 COLOR="#555555">100</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l101"><FONT SIZE=-2 COLOR="#555555">101</FONT>&nbsp;</A> <BR>
<A NAME="l102"><FONT SIZE=-2 COLOR="#555555">102</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// query for elements against entire list of children<BR>
<A NAME="l103"><FONT SIZE=-2 COLOR="#555555">103</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/if.html">if</A>(<A HREF="_variables/children.html">$children</A> != null) {<BR>
<A NAME="l104"><FONT SIZE=-2 COLOR="#555555">104</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/query.html">$query</A> = &quot;SELECT ATTRIBUTES.ELEMENT FROM ATTRIBUTES, PARENTCHILD<BR>
<A NAME="l105"><FONT SIZE=-2 COLOR="#555555">105</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WHERE ATTRIBUTES.NAME = '<A HREF="_variables/name.html">$name</A>' AND<BR>
<A NAME="l106"><FONT SIZE=-2 COLOR="#555555">106</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ATTRIBUTES.VALUE LIKE '%<A HREF="_variables/value.html">$value</A>%' AND<BR>
<A NAME="l107"><FONT SIZE=-2 COLOR="#555555">107</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ATTRIBUTES.ELEMENT = PARENTCHILD.CHILD<BR>
<A NAME="l108"><FONT SIZE=-2 COLOR="#555555">108</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AND PARENTCHILD.PARENT = &quot; . <A HREF="_variables/children.html">$children</A>[0];<BR>
<A NAME="l109"><FONT SIZE=-2 COLOR="#555555">109</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/for.html">for</A>(<A HREF="_variables/i.html">$i</A> = 1; <A HREF="_variables/i.html">$i</A> &lt; <A HREF="_functions/count.html">count</A>(<A HREF="_variables/children.html">$children</A>); <A HREF="_variables/i.html">$i</A>++)<BR>
<A NAME="l110"><FONT SIZE=-2 COLOR="#555555">110</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/query.html">$query</A> .= &quot; OR ATTRIBUTES.NAME = '<A HREF="_variables/name.html">$name</A>' AND<BR>
<A NAME="l111"><FONT SIZE=-2 COLOR="#555555">111</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ATTRIBUTES.VALUE LIKE '%<A HREF="_variables/value.html">$value</A>%' AND<BR>
<A NAME="l112"><FONT SIZE=-2 COLOR="#555555">112</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ATTRIBUTES.ELEMENT = PARENTCHILD.CHILD<BR>
<A NAME="l113"><FONT SIZE=-2 COLOR="#555555">113</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AND PARENTCHILD.PARENT = &quot; . <A HREF="_variables/children.html">$children</A>[<A HREF="_variables/i.html">$i</A>];<BR>
<A NAME="l114"><FONT SIZE=-2 COLOR="#555555">114</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/results.html">$results</A> = <A HREF="_functions/mysql_query.html">mysql_query</A>(<A HREF="_variables/query.html">$query</A>);<BR>
<A NAME="l115"><FONT SIZE=-2 COLOR="#555555">115</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/for.html">for</A>(<A HREF="_variables/i.html">$i</A>=0; <A HREF="_variables/i.html">$i</A> &lt; <A HREF="_functions/mysql_num_rows.html">mysql_num_rows</A>(<A HREF="_variables/results.html">$results</A>); <A HREF="_variables/i.html">$i</A>++) {<BR>
<A NAME="l116"><FONT SIZE=-2 COLOR="#555555">116</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/row.html">$row</A> = <A HREF="_functions/mysql_fetch_row.html">mysql_fetch_row</A>(<A HREF="_variables/results.html">$results</A>);<BR>
<A NAME="l117"><FONT SIZE=-2 COLOR="#555555">117</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/array_push.html">array_push</A>(<A HREF="_variables/array_results.html">$array_results</A>, <A HREF="_variables/row.html">$row</A>[0]);<BR>
<A NAME="l118"><FONT SIZE=-2 COLOR="#555555">118</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l119"><FONT SIZE=-2 COLOR="#555555">119</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l120"><FONT SIZE=-2 COLOR="#555555">120</FONT>&nbsp;</A> <BR>
<A NAME="l121"><FONT SIZE=-2 COLOR="#555555">121</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// get XML<BR>
<A NAME="l122"><FONT SIZE=-2 COLOR="#555555">122</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/data.html">$data</A> = &quot;&quot;;<BR>
<A NAME="l123"><FONT SIZE=-2 COLOR="#555555">123</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/foreach.html">foreach</A>(<A HREF="_variables/array_results.html">$array_results</A> as <A HREF="_variables/cur.html">$cur</A>) {<BR>
<A NAME="l124"><FONT SIZE=-2 COLOR="#555555">124</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/tmp.html">$tmp</A> = new <A HREF="_functions/element.html">ELEMENT</A>();<BR>
<A NAME="l125"><FONT SIZE=-2 COLOR="#555555">125</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/tmp.html">$tmp</A>-&gt;<A HREF="_functions/become.html">become</A>(<A HREF="_variables/cur.html">$cur</A>);<BR>
<A NAME="l126"><FONT SIZE=-2 COLOR="#555555">126</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/data.html">$data</A> .= <A HREF="_variables/tmp.html">$tmp</A>-&gt;<A HREF="_functions/getxml.html">getXML</A>();	<BR>
<A NAME="l127"><FONT SIZE=-2 COLOR="#555555">127</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l128"><FONT SIZE=-2 COLOR="#555555">128</FONT>&nbsp;</A> <BR>
<A NAME="l129"><FONT SIZE=-2 COLOR="#555555">129</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// return<BR>
<A NAME="l130"><FONT SIZE=-2 COLOR="#555555">130</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return <A HREF="_variables/data.html">$data</A>;<BR>
<A NAME="l131"><FONT SIZE=-2 COLOR="#555555">131</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l132"><FONT SIZE=-2 COLOR="#555555">132</FONT>&nbsp;</A> <BR>
<A NAME="l133"><FONT SIZE=-2 COLOR="#555555">133</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** become the element with id <A HREF="_variables/id.html">$id</A> */<BR>
<A NAME="l134"><FONT SIZE=-2 COLOR="#555555">134</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function <A HREF="_functions/become.html">become</A>(<A HREF="_variables/id.html">$id</A>) {<BR>
<A NAME="l135"><FONT SIZE=-2 COLOR="#555555">135</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/this.html">$this</A>-&gt;id = <A HREF="_variables/id.html">$id</A>;<BR>
<A NAME="l136"><FONT SIZE=-2 COLOR="#555555">136</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** get info from table ELEMENTS */<BR>
<A NAME="l137"><FONT SIZE=-2 COLOR="#555555">137</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/query.html">$query</A> = &quot;SELECT * FROM ELEMENTS<BR>
<A NAME="l138"><FONT SIZE=-2 COLOR="#555555">138</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WHERE ID = <A HREF="_variables/this.html">$this</A>-&gt;id&quot;;<BR>
<A NAME="l139"><FONT SIZE=-2 COLOR="#555555">139</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/results.html">$results</A> = <A HREF="_functions/mysql_query.html">mysql_query</A>(<A HREF="_variables/query.html">$query</A>);<BR>
<A NAME="l140"><FONT SIZE=-2 COLOR="#555555">140</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/results.html">$results</A> = <A HREF="_functions/mysql_fetch_array.html">mysql_fetch_array</A>(<A HREF="_variables/results.html">$results</A>);<BR>
<A NAME="l141"><FONT SIZE=-2 COLOR="#555555">141</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/this.html">$this</A>-&gt;name = <A HREF="_functions/strtolower.html">strtolower</A>(<A HREF="_variables/results.html">$results</A>[&quot;ETYPE&quot;]);<BR>
<A NAME="l142"><FONT SIZE=-2 COLOR="#555555">142</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/this.html">$this</A>-&gt;cdata = <A HREF="_variables/results.html">$results</A>[&quot;CDATA&quot;];<BR>
<A NAME="l143"><FONT SIZE=-2 COLOR="#555555">143</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/this.html">$this</A>-&gt;document = <A HREF="_variables/results.html">$results</A>[&quot;DOCUMENT&quot;];<BR>
<A NAME="l144"><FONT SIZE=-2 COLOR="#555555">144</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** get parent id number */<BR>
<A NAME="l145"><FONT SIZE=-2 COLOR="#555555">145</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/query.html">$query</A> = &quot;SELECT PARENT FROM PARENTCHILD<BR>
<A NAME="l146"><FONT SIZE=-2 COLOR="#555555">146</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WHERE CHILD = <A HREF="_variables/this.html">$this</A>-&gt;id&quot;;<BR>
<A NAME="l147"><FONT SIZE=-2 COLOR="#555555">147</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/results.html">$results</A> = <A HREF="_functions/mysql_query.html">mysql_query</A>(<A HREF="_variables/query.html">$query</A>);<BR>
<A NAME="l148"><FONT SIZE=-2 COLOR="#555555">148</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/results.html">$results</A> = <A HREF="_functions/mysql_fetch_array.html">mysql_fetch_array</A>(<A HREF="_variables/results.html">$results</A>);<BR>
<A NAME="l149"><FONT SIZE=-2 COLOR="#555555">149</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/this.html">$this</A>-&gt;parent = <A HREF="_variables/results.html">$results</A>[&quot;PARENT&quot;];<BR>
<A NAME="l150"><FONT SIZE=-2 COLOR="#555555">150</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
<A NAME="l151"><FONT SIZE=-2 COLOR="#555555">151</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** get the attributes */<BR>
<A NAME="l152"><FONT SIZE=-2 COLOR="#555555">152</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/query.html">$query</A> = &quot;SELECT NAME, ID, VALUE FROM ATTRIBUTES<BR>
<A NAME="l153"><FONT SIZE=-2 COLOR="#555555">153</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WHERE ELEMENT = <A HREF="_variables/this.html">$this</A>-&gt;id&quot;;<BR>
<A NAME="l154"><FONT SIZE=-2 COLOR="#555555">154</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/results.html">$results</A> = <A HREF="_functions/mysql_query.html">mysql_query</A>(<A HREF="_variables/query.html">$query</A>);<BR>
<A NAME="l155"><FONT SIZE=-2 COLOR="#555555">155</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/nrows.html">$nrows</A> = <A HREF="_functions/mysql_num_rows.html">mysql_num_rows</A>(<A HREF="_variables/results.html">$results</A>);<BR>
<A NAME="l156"><FONT SIZE=-2 COLOR="#555555">156</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/for.html">for</A>(<A HREF="_variables/i.html">$i</A> = 0; <A HREF="_variables/i.html">$i</A> &lt; <A HREF="_variables/nrows.html">$nrows</A>; <A HREF="_variables/i.html">$i</A>++) {<BR>
<A NAME="l157"><FONT SIZE=-2 COLOR="#555555">157</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/row.html">$row</A> = <A HREF="_functions/mysql_fetch_array.html">mysql_fetch_array</A>(<A HREF="_variables/results.html">$results</A>);<BR>
<A NAME="l158"><FONT SIZE=-2 COLOR="#555555">158</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/tmp.html">$tmp</A> = new <A HREF="_functions/attribute.html">ATTRIBUTE</A>();<BR>
<A NAME="l159"><FONT SIZE=-2 COLOR="#555555">159</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/tmp.html">$tmp</A>-&gt;name = <A HREF="_functions/strtolower.html">strtolower</A>(<A HREF="_variables/row.html">$row</A>[&quot;NAME&quot;]);<BR>
<A NAME="l160"><FONT SIZE=-2 COLOR="#555555">160</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/tmp.html">$tmp</A>-&gt;value = <A HREF="_variables/row.html">$row</A>[&quot;VALUE&quot;];<BR>
<A NAME="l161"><FONT SIZE=-2 COLOR="#555555">161</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/tmp.html">$tmp</A>-&gt;id = <A HREF="_variables/row.html">$row</A>[&quot;ID&quot;];<BR>
<A NAME="l162"><FONT SIZE=-2 COLOR="#555555">162</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/tmp.html">$tmp</A>-&gt;element = <A HREF="_variables/this.html">$this</A>-&gt;id;<BR>
<A NAME="l163"><FONT SIZE=-2 COLOR="#555555">163</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/array_push.html">array_push</A>(<A HREF="_variables/this.html">$this</A>-&gt;attributes, <A HREF="_variables/tmp.html">$tmp</A>);<BR>
<A NAME="l164"><FONT SIZE=-2 COLOR="#555555">164</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l165"><FONT SIZE=-2 COLOR="#555555">165</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** get the list of children id's */<BR>
<A NAME="l166"><FONT SIZE=-2 COLOR="#555555">166</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/query.html">$query</A> = &quot;SELECT CHILD FROM PARENTCHILD<BR>
<A NAME="l167"><FONT SIZE=-2 COLOR="#555555">167</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WHERE PARENT = <A HREF="_variables/this.html">$this</A>-&gt;id&quot;;<BR>
<A NAME="l168"><FONT SIZE=-2 COLOR="#555555">168</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/results.html">$results</A> = <A HREF="_functions/mysql_query.html">mysql_query</A>(<A HREF="_variables/query.html">$query</A>);<BR>
<A NAME="l169"><FONT SIZE=-2 COLOR="#555555">169</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/nrows.html">$nrows</A> = <A HREF="_functions/mysql_num_rows.html">mysql_num_rows</A>(<A HREF="_variables/results.html">$results</A>);<BR>
<A NAME="l170"><FONT SIZE=-2 COLOR="#555555">170</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/for.html">for</A>(<A HREF="_variables/i.html">$i</A> = 0; <A HREF="_variables/i.html">$i</A> &lt; <A HREF="_variables/nrows.html">$nrows</A>; <A HREF="_variables/i.html">$i</A>++) {<BR>
<A NAME="l171"><FONT SIZE=-2 COLOR="#555555">171</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/row.html">$row</A> = <A HREF="_functions/mysql_fetch_array.html">mysql_fetch_array</A>(<A HREF="_variables/results.html">$results</A>);<BR>
<A NAME="l172"><FONT SIZE=-2 COLOR="#555555">172</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/tmp.html">$tmp</A> = <A HREF="_variables/row.html">$row</A>[&quot;CHILD&quot;];<BR>
<A NAME="l173"><FONT SIZE=-2 COLOR="#555555">173</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/array_push.html">array_push</A>(<A HREF="_variables/this.html">$this</A>-&gt;children, <A HREF="_variables/tmp.html">$tmp</A>);<BR>
<A NAME="l174"><FONT SIZE=-2 COLOR="#555555">174</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l175"><FONT SIZE=-2 COLOR="#555555">175</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l176"><FONT SIZE=-2 COLOR="#555555">176</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** get element XML data with element_id<BR>
<A NAME="l177"><FONT SIZE=-2 COLOR="#555555">177</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* and parent_id as an attribute */<BR>
<A NAME="l178"><FONT SIZE=-2 COLOR="#555555">178</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function <A HREF="_functions/getxml.html">getXML</A>(<A HREF="_variables/recursive.html">$recursive</A> = false) {<BR>
<A NAME="l179"><FONT SIZE=-2 COLOR="#555555">179</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/data.html">$data</A> = null;<BR>
<A NAME="l180"><FONT SIZE=-2 COLOR="#555555">180</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** display starting tag with attributes */<BR>
<A NAME="l181"><FONT SIZE=-2 COLOR="#555555">181</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/data.html">$data</A> = &quot;&lt;<A HREF="_variables/this.html">$this</A>-&gt;name elementid=\&quot;<A HREF="_variables/this.html">$this</A>-&gt;id\&quot; &quot;;<BR>
<A NAME="l182"><FONT SIZE=-2 COLOR="#555555">182</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/if.html">if</A>(<A HREF="_variables/this.html">$this</A>-&gt;parent)<BR>
<A NAME="l183"><FONT SIZE=-2 COLOR="#555555">183</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/data.html">$data</A> .= &quot;parent_id=\&quot;<A HREF="_variables/this.html">$this</A>-&gt;parent\&quot; &quot;;<BR>
<A NAME="l184"><FONT SIZE=-2 COLOR="#555555">184</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/foreach.html">foreach</A>(<A HREF="_variables/this.html">$this</A>-&gt;attributes as <A HREF="_variables/i.html">$i</A>) {<BR>
<A NAME="l185"><FONT SIZE=-2 COLOR="#555555">185</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/data.html">$data</A> .= &quot;<A HREF="_variables/i.html">$i</A>-&gt;name=\&quot;<A HREF="_variables/i.html">$i</A>-&gt;value\&quot; &quot;;<BR>
<A NAME="l186"><FONT SIZE=-2 COLOR="#555555">186</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l187"><FONT SIZE=-2 COLOR="#555555">187</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/data.html">$data</A> .= &quot;&gt;\n&quot;;<BR>
<A NAME="l188"><FONT SIZE=-2 COLOR="#555555">188</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** display cdata */<BR>
<A NAME="l189"><FONT SIZE=-2 COLOR="#555555">189</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/if.html">if</A>(<A HREF="_variables/this.html">$this</A>-&gt;cdata)<BR>
<A NAME="l190"><FONT SIZE=-2 COLOR="#555555">190</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/data.html">$data</A> .= <A HREF="_variables/this.html">$this</A>-&gt;cdata . &quot;\n&quot;;<BR>
<A NAME="l191"><FONT SIZE=-2 COLOR="#555555">191</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** display child elements */<BR>
<A NAME="l192"><FONT SIZE=-2 COLOR="#555555">192</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/foreach.html">foreach</A>(<A HREF="_variables/this.html">$this</A>-&gt;children as <A HREF="_variables/i.html">$i</A>) {<BR>
<A NAME="l193"><FONT SIZE=-2 COLOR="#555555">193</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/tmp.html">$tmp</A> = new <A HREF="_functions/element.html">ELEMENT</A>();<BR>
<A NAME="l194"><FONT SIZE=-2 COLOR="#555555">194</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/tmp.html">$tmp</A>-&gt;<A HREF="_functions/become.html">become</A>(<A HREF="_variables/i.html">$i</A>);<BR>
<A NAME="l195"><FONT SIZE=-2 COLOR="#555555">195</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/if.html">if</A>(<A HREF="_variables/recursive.html">$recursive</A> == false &amp;&amp; <A HREF="_variables/tmp.html">$tmp</A>-&gt;id != 0 &amp;&amp; <A HREF="_variables/tmp.html">$tmp</A>-&gt;id != null) <A HREF="_variables/data.html">$data</A> .= <A HREF="_variables/tmp.html">$tmp</A>-&gt;<A HREF="_functions/getxmlwithoutchildren.html">getXMLWithoutChildren</A>();<BR>
<A NAME="l196"><FONT SIZE=-2 COLOR="#555555">196</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else <A HREF="_variables/data.html">$data</A> .= <A HREF="_variables/tmp.html">$tmp</A>-&gt;<A HREF="_functions/getxml.html">getXML</A>(true);<BR>
<A NAME="l197"><FONT SIZE=-2 COLOR="#555555">197</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l198"><FONT SIZE=-2 COLOR="#555555">198</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** display finishing tag */<BR>
<A NAME="l199"><FONT SIZE=-2 COLOR="#555555">199</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/data.html">$data</A> .= &quot;&lt;/<A HREF="_variables/this.html">$this</A>-&gt;name &gt;\n&quot;;<BR>
<A NAME="l200"><FONT SIZE=-2 COLOR="#555555">200</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
<A NAME="l201"><FONT SIZE=-2 COLOR="#555555">201</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** return the XML */<BR>
<A NAME="l202"><FONT SIZE=-2 COLOR="#555555">202</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return <A HREF="_variables/data.html">$data</A>;<BR>
<A NAME="l203"><FONT SIZE=-2 COLOR="#555555">203</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l204"><FONT SIZE=-2 COLOR="#555555">204</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
<A NAME="l205"><FONT SIZE=-2 COLOR="#555555">205</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** update the element this deals only with<BR>
<A NAME="l206"><FONT SIZE=-2 COLOR="#555555">206</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the ELEMENTS and ATTRIBUTES tables */<BR>
<A NAME="l207"><FONT SIZE=-2 COLOR="#555555">207</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function <A HREF="_functions/update.html">update</A>() {<BR>
<A NAME="l208"><FONT SIZE=-2 COLOR="#555555">208</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** update ELEMENTS table */<BR>
<A NAME="l209"><FONT SIZE=-2 COLOR="#555555">209</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/query.html">$query</A> = &quot;UPDATE ELEMENTS SET<BR>
<A NAME="l210"><FONT SIZE=-2 COLOR="#555555">210</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ETYPE = '<A HREF="_variables/this.html">$this</A>-&gt;name',<BR>
<A NAME="l211"><FONT SIZE=-2 COLOR="#555555">211</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CDATA = '<A HREF="_variables/this.html">$this</A>-&gt;cdata'<BR>
<A NAME="l212"><FONT SIZE=-2 COLOR="#555555">212</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WHERE ID = <A HREF="_variables/this.html">$this</A>-&gt;id&quot;;<BR>
<A NAME="l213"><FONT SIZE=-2 COLOR="#555555">213</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/results.html">$results</A> = <A HREF="_functions/mysql_query.html">mysql_query</A>(<A HREF="_variables/query.html">$query</A>);<BR>
<A NAME="l214"><FONT SIZE=-2 COLOR="#555555">214</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
<A NAME="l215"><FONT SIZE=-2 COLOR="#555555">215</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** update ATTRIBUTES table */<BR>
<A NAME="l216"><FONT SIZE=-2 COLOR="#555555">216</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/foreach.html">foreach</A>(<A HREF="_variables/this.html">$this</A>-&gt;attributes as <A HREF="_variables/i.html">$i</A>) {<BR>
<A NAME="l217"><FONT SIZE=-2 COLOR="#555555">217</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/if.html">if</A>(<A HREF="_functions/isset.html">isset</A>(<A HREF="_variables/i.html">$i</A>-&gt;id) &amp;&amp; <A HREF="_variables/i.html">$i</A>-&gt;id != null) <A HREF="_variables/i.html">$i</A>-&gt;<A HREF="_functions/update.html">update</A>();<BR>
<A NAME="l218"><FONT SIZE=-2 COLOR="#555555">218</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else <A HREF="_variables/i.html">$i</A>-&gt;<A HREF="_functions/add.html">add</A>();<BR>
<A NAME="l219"><FONT SIZE=-2 COLOR="#555555">219</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l220"><FONT SIZE=-2 COLOR="#555555">220</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l221"><FONT SIZE=-2 COLOR="#555555">221</FONT>&nbsp;</A> <BR>
<A NAME="l222"><FONT SIZE=-2 COLOR="#555555">222</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** add child element */<BR>
<A NAME="l223"><FONT SIZE=-2 COLOR="#555555">223</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function <A HREF="_functions/addchild.html">addCHILD</A>(&amp;<A HREF="_variables/child.html">$child</A>) {<BR>
<A NAME="l224"><FONT SIZE=-2 COLOR="#555555">224</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/if.html">if</A>(!<A HREF="_variables/this.html">$this</A>-&gt;id) <A HREF="_variables/this.html">$this</A>-&gt;<A HREF="_functions/add.html">add</A>();<BR>
<A NAME="l225"><FONT SIZE=-2 COLOR="#555555">225</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/tmp.html">$tmp</A> = new <A HREF="_functions/element.html">ELEMENT</A>();<BR>
<A NAME="l226"><FONT SIZE=-2 COLOR="#555555">226</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/tmp.html">$tmp</A> =&amp; <A HREF="_variables/child.html">$child</A>;<BR>
<A NAME="l227"><FONT SIZE=-2 COLOR="#555555">227</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/tmp.html">$tmp</A>-&gt;parent = <A HREF="_variables/this.html">$this</A>-&gt;id;<BR>
<A NAME="l228"><FONT SIZE=-2 COLOR="#555555">228</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/tmp.html">$tmp</A>-&gt;document = <A HREF="_variables/this.html">$this</A>-&gt;document;<BR>
<A NAME="l229"><FONT SIZE=-2 COLOR="#555555">229</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/tmp.html">$tmp</A>-&gt;<A HREF="_functions/add.html">add</A>();<BR>
<A NAME="l230"><FONT SIZE=-2 COLOR="#555555">230</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/array_push.html">array_push</A>(<A HREF="_variables/this.html">$this</A>-&gt;children, <A HREF="_variables/tmp.html">$tmp</A>-&gt;id);<BR>
<A NAME="l231"><FONT SIZE=-2 COLOR="#555555">231</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l232"><FONT SIZE=-2 COLOR="#555555">232</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
<A NAME="l233"><FONT SIZE=-2 COLOR="#555555">233</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function <A HREF="_functions/getparent.html">getPARENT</A>() {<BR>
<A NAME="l234"><FONT SIZE=-2 COLOR="#555555">234</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/tmp.html">$tmp</A> = new <A HREF="_functions/element.html">ELEMENT</A>();<BR>
<A NAME="l235"><FONT SIZE=-2 COLOR="#555555">235</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/tmp.html">$tmp</A>-&gt;<A HREF="_functions/become.html">become</A>(<A HREF="_variables/this.html">$this</A>-&gt;id);<BR>
<A NAME="l236"><FONT SIZE=-2 COLOR="#555555">236</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return <A HREF="_variables/tmp.html">$tmp</A>;<BR>
<A NAME="l237"><FONT SIZE=-2 COLOR="#555555">237</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l238"><FONT SIZE=-2 COLOR="#555555">238</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
<A NAME="l239"><FONT SIZE=-2 COLOR="#555555">239</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function <A HREF="_functions/addattribute.html">addATTRIBUTE</A>(<A HREF="_variables/attribute.html">$attribute</A>) {<BR>
<A NAME="l240"><FONT SIZE=-2 COLOR="#555555">240</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/tmp.html">$tmp</A> = new <A HREF="_functions/attribute.html">ATTRIBUTE</A>();<BR>
<A NAME="l241"><FONT SIZE=-2 COLOR="#555555">241</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/tmp.html">$tmp</A> = <A HREF="_variables/attribute.html">$attribute</A>;<BR>
<A NAME="l242"><FONT SIZE=-2 COLOR="#555555">242</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/tmp.html">$tmp</A>-&gt;element = <A HREF="_variables/this.html">$this</A>-&gt;id;<BR>
<A NAME="l243"><FONT SIZE=-2 COLOR="#555555">243</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/array_push.html">array_push</A>(<A HREF="_variables/this.html">$this</A>-&gt;attributes, <A HREF="_variables/tmp.html">$tmp</A>);<BR>
<A NAME="l244"><FONT SIZE=-2 COLOR="#555555">244</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l245"><FONT SIZE=-2 COLOR="#555555">245</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
<A NAME="l246"><FONT SIZE=-2 COLOR="#555555">246</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function <A HREF="_functions/delete.html">delete</A>() {<BR>
<A NAME="l247"><FONT SIZE=-2 COLOR="#555555">247</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** delete from ATTRIBUTES table */<BR>
<A NAME="l248"><FONT SIZE=-2 COLOR="#555555">248</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/query.html">$query</A> = &quot;DELETE FROM ATTRIBUTES WHERE<BR>
<A NAME="l249"><FONT SIZE=-2 COLOR="#555555">249</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ELEMENT = <A HREF="_variables/this.html">$this</A>-&gt;id&quot;;<BR>
<A NAME="l250"><FONT SIZE=-2 COLOR="#555555">250</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/results.html">$results</A> = <A HREF="_functions/mysql_query.html">mysql_query</A>(<A HREF="_variables/query.html">$query</A>);<BR>
<A NAME="l251"><FONT SIZE=-2 COLOR="#555555">251</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** delete children */<BR>
<A NAME="l252"><FONT SIZE=-2 COLOR="#555555">252</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/tmp.html">$tmp</A> = new <A HREF="_functions/element.html">ELEMENT</A>();<BR>
<A NAME="l253"><FONT SIZE=-2 COLOR="#555555">253</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foreach (<A HREF="_variables/this.html">$this</A>-&gt;children as <A HREF="_variables/i.html">$i</A>) {<BR>
<A NAME="l254"><FONT SIZE=-2 COLOR="#555555">254</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/tmp.html">$tmp</A>-&gt;<A HREF="_functions/become.html">become</A>(<A HREF="_variables/i.html">$i</A>);<BR>
<A NAME="l255"><FONT SIZE=-2 COLOR="#555555">255</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/tmp.html">$tmp</A>-&gt;<A HREF="_functions/delete.html">delete</A>();<BR>
<A NAME="l256"><FONT SIZE=-2 COLOR="#555555">256</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l257"><FONT SIZE=-2 COLOR="#555555">257</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** delete from PARENTCHILD table */<BR>
<A NAME="l258"><FONT SIZE=-2 COLOR="#555555">258</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/query.html">$query</A> = &quot;DELETE FROM PARENTCHILD WHERE<BR>
<A NAME="l259"><FONT SIZE=-2 COLOR="#555555">259</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CHILD = <A HREF="_variables/this.html">$this</A>-&gt;id&quot;;<BR>
<A NAME="l260"><FONT SIZE=-2 COLOR="#555555">260</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/results.html">$results</A> = <A HREF="_functions/mysql_query.html">mysql_query</A>(<A HREF="_variables/query.html">$query</A>);<BR>
<A NAME="l261"><FONT SIZE=-2 COLOR="#555555">261</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** delete from ELEMENTS table */<BR>
<A NAME="l262"><FONT SIZE=-2 COLOR="#555555">262</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/query.html">$query</A> = &quot;DELETE FROM ELEMENTS WHERE<BR>
<A NAME="l263"><FONT SIZE=-2 COLOR="#555555">263</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ID = <A HREF="_variables/this.html">$this</A>-&gt;id&quot;;<BR>
<A NAME="l264"><FONT SIZE=-2 COLOR="#555555">264</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/results.html">$results</A> = <A HREF="_functions/mysql_query.html">mysql_query</A>(<A HREF="_variables/query.html">$query</A>);<BR>
<A NAME="l265"><FONT SIZE=-2 COLOR="#555555">265</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** delete from DOCUMENTS table if it <BR>
<A NAME="l266"><FONT SIZE=-2 COLOR="#555555">266</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;is a root node i may decide not to do this*/<BR>
<A NAME="l267"><FONT SIZE=-2 COLOR="#555555">267</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l268"><FONT SIZE=-2 COLOR="#555555">268</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
<A NAME="l269"><FONT SIZE=-2 COLOR="#555555">269</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function <A HREF="_functions/add.html">add</A>() {<BR>
<A NAME="l270"><FONT SIZE=-2 COLOR="#555555">270</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** globalize the db connection */<BR>
<A NAME="l271"><FONT SIZE=-2 COLOR="#555555">271</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;global <A HREF="_variables/db.html">$db</A>;<BR>
<A NAME="l272"><FONT SIZE=-2 COLOR="#555555">272</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/this.html">$this</A>-&gt;name = <A HREF="_functions/strtolower.html">strtolower</A>(<A HREF="_variables/this.html">$this</A>-&gt;name);<BR>
<A NAME="l273"><FONT SIZE=-2 COLOR="#555555">273</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** add <A HREF="_functions/etype.html">ETYPE</A>(name), document and cdata */<BR>
<A NAME="l274"><FONT SIZE=-2 COLOR="#555555">274</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/query.html">$query</A> = &quot;INSERT INTO ELEMENTS SET<BR>
<A NAME="l275"><FONT SIZE=-2 COLOR="#555555">275</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ETYPE = '<A HREF="_variables/this.html">$this</A>-&gt;name',<BR>
<A NAME="l276"><FONT SIZE=-2 COLOR="#555555">276</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CDATA = '<A HREF="_variables/this.html">$this</A>-&gt;cdata',<BR>
<A NAME="l277"><FONT SIZE=-2 COLOR="#555555">277</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DOCUMENT = <A HREF="_variables/this.html">$this</A>-&gt;document&quot;;<BR>
<A NAME="l278"><FONT SIZE=-2 COLOR="#555555">278</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/results.html">$results</A> = <A HREF="_functions/mysql_query.html">mysql_query</A>(<A HREF="_variables/query.html">$query</A>);<BR>
<A NAME="l279"><FONT SIZE=-2 COLOR="#555555">279</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
<A NAME="l280"><FONT SIZE=-2 COLOR="#555555">280</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** set the id */<BR>
<A NAME="l281"><FONT SIZE=-2 COLOR="#555555">281</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/this.html">$this</A>-&gt;id = <A HREF="_functions/mysql_insert_id.html">mysql_insert_id</A>(<A HREF="_variables/db.html">$db</A>);<BR>
<A NAME="l282"><FONT SIZE=-2 COLOR="#555555">282</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
<A NAME="l283"><FONT SIZE=-2 COLOR="#555555">283</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** add the attributes */<BR>
<A NAME="l284"><FONT SIZE=-2 COLOR="#555555">284</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/if.html">if</A>(<A HREF="_variables/this.html">$this</A>-&gt;attributes)<BR>
<A NAME="l285"><FONT SIZE=-2 COLOR="#555555">285</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foreach (<A HREF="_variables/this.html">$this</A>-&gt;attributes as <A HREF="_variables/i.html">$i</A>) {<BR>
<A NAME="l286"><FONT SIZE=-2 COLOR="#555555">286</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/i.html">$i</A>-&gt;element = <A HREF="_variables/this.html">$this</A>-&gt;id;<BR>
<A NAME="l287"><FONT SIZE=-2 COLOR="#555555">287</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/i.html">$i</A>-&gt;<A HREF="_functions/add.html">add</A>();<BR>
<A NAME="l288"><FONT SIZE=-2 COLOR="#555555">288</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l289"><FONT SIZE=-2 COLOR="#555555">289</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
<A NAME="l290"><FONT SIZE=-2 COLOR="#555555">290</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** add the PARENTCHILD relationship<BR>
<A NAME="l291"><FONT SIZE=-2 COLOR="#555555">291</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;entry */<BR>
<A NAME="l292"><FONT SIZE=-2 COLOR="#555555">292</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/query.html">$query</A> = &quot;INSERT INTO PARENTCHILD SET<BR>
<A NAME="l293"><FONT SIZE=-2 COLOR="#555555">293</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PARENT = <A HREF="_variables/this.html">$this</A>-&gt;parent,<BR>
<A NAME="l294"><FONT SIZE=-2 COLOR="#555555">294</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CHILD = <A HREF="_variables/this.html">$this</A>-&gt;id&quot;;<BR>
<A NAME="l295"><FONT SIZE=-2 COLOR="#555555">295</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/results.html">$results</A> = <A HREF="_functions/mysql_query.html">mysql_query</A>(<A HREF="_variables/query.html">$query</A>);<BR>
<A NAME="l296"><FONT SIZE=-2 COLOR="#555555">296</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/if.html">if</A>(!<A HREF="_variables/results.html">$results</A>) {<BR>
<A NAME="l297"><FONT SIZE=-2 COLOR="#555555">297</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/query.html">$query</A> = &quot;INSERT INTO PARENTCHILD SET<BR>
<A NAME="l298"><FONT SIZE=-2 COLOR="#555555">298</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CHILD = <A HREF="_variables/this.html">$this</A>-&gt;id&quot;;<BR>
<A NAME="l299"><FONT SIZE=-2 COLOR="#555555">299</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/results.html">$results</A> = <A HREF="_functions/mysql_query.html">mysql_query</A>(<A HREF="_variables/query.html">$query</A>);<BR>
<A NAME="l300"><FONT SIZE=-2 COLOR="#555555">300</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l301"><FONT SIZE=-2 COLOR="#555555">301</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// clean up db<BR>
<A NAME="l302"><FONT SIZE=-2 COLOR="#555555">302</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/query.html">$query</A> = &quot;DELETE FROM PARENTCHILD WHERE CHILD = 0&quot;;<BR>
<A NAME="l303"><FONT SIZE=-2 COLOR="#555555">303</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/mysql_query.html">mysql_query</A>(<A HREF="_variables/query.html">$query</A>);<BR>
<A NAME="l304"><FONT SIZE=-2 COLOR="#555555">304</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l305"><FONT SIZE=-2 COLOR="#555555">305</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
<A NAME="l306"><FONT SIZE=-2 COLOR="#555555">306</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** returns xml of children meeting the right reqs */<BR>
<A NAME="l307"><FONT SIZE=-2 COLOR="#555555">307</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function <A HREF="_functions/findchildxml.html">findCHILDXML</A>(<A HREF="_variables/element_type.html">$element_type</A>, <A HREF="_variables/attributes.html">$attributes</A> = null) {<BR>
<A NAME="l308"><FONT SIZE=-2 COLOR="#555555">308</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/tmp.html">$tmp</A> = <A HREF="_variables/this.html">$this</A>-&gt;<A HREF="_functions/findchildid.html">findCHILDID</A>(<A HREF="_variables/element_type.html">$element_type</A>, <A HREF="_variables/attributes.html">$attributes</A>);<BR>
<A NAME="l309"><FONT SIZE=-2 COLOR="#555555">309</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/rvalue.html">$rvalue</A> = null;<BR>
<A NAME="l310"><FONT SIZE=-2 COLOR="#555555">310</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/if.html">if</A>(<A HREF="_variables/tmp.html">$tmp</A>) {<BR>
<A NAME="l311"><FONT SIZE=-2 COLOR="#555555">311</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/i.html">$i</A> = new <A HREF="_functions/element.html">ELEMENT</A>();<BR>
<A NAME="l312"><FONT SIZE=-2 COLOR="#555555">312</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/foreach.html">foreach</A>(<A HREF="_variables/tmp.html">$tmp</A> as <A HREF="_variables/int.html">$int</A>) {<BR>
<A NAME="l313"><FONT SIZE=-2 COLOR="#555555">313</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/i.html">$i</A>-&gt;<A HREF="_functions/become.html">become</A>(<A HREF="_variables/int.html">$int</A>);<BR>
<A NAME="l314"><FONT SIZE=-2 COLOR="#555555">314</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/rvalue.html">$rvalue</A> .= <A HREF="_variables/i.html">$i</A>-&gt;<A HREF="_functions/getxml.html">getXML</A>();<BR>
<A NAME="l315"><FONT SIZE=-2 COLOR="#555555">315</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l316"><FONT SIZE=-2 COLOR="#555555">316</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l317"><FONT SIZE=-2 COLOR="#555555">317</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return <A HREF="_variables/rvalue.html">$rvalue</A>;<BR>
<A NAME="l318"><FONT SIZE=-2 COLOR="#555555">318</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l319"><FONT SIZE=-2 COLOR="#555555">319</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
<A NAME="l320"><FONT SIZE=-2 COLOR="#555555">320</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** returns xml of sub-elements of<BR>
<A NAME="l321"><FONT SIZE=-2 COLOR="#555555">321</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* type <A HREF="_variables/name.html">$name</A> only */<BR>
<A NAME="l322"><FONT SIZE=-2 COLOR="#555555">322</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function <A HREF="_functions/getsubelementsbytype.html">getSubElementsByType</A>(<A HREF="_variables/name.html">$name</A>) {<BR>
<A NAME="l323"><FONT SIZE=-2 COLOR="#555555">323</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// perform recursivly<BR>
<A NAME="l324"><FONT SIZE=-2 COLOR="#555555">324</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/tmp.html">$tmp</A> = new <A HREF="_functions/element.html">ELEMENT</A>();<BR>
<A NAME="l325"><FONT SIZE=-2 COLOR="#555555">325</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foreach (<A HREF="_variables/this.html">$this</A>-&gt;children as <A HREF="_variables/child.html">$child</A>) {<BR>
<A NAME="l326"><FONT SIZE=-2 COLOR="#555555">326</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/tmp.html">$tmp</A>-&gt;<A HREF="_functions/become.html">become</A>(<A HREF="_variables/child.html">$child</A>);<BR>
<A NAME="l327"><FONT SIZE=-2 COLOR="#555555">327</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/tmp.html">$tmp</A>-&gt;<A HREF="_functions/getsubelementsbytype.html">getSubElementsByType</A>(<A HREF="_variables/name.html">$name</A>);<BR>
<A NAME="l328"><FONT SIZE=-2 COLOR="#555555">328</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/if.html">if</A>(<A HREF="_variables/tmp.html">$tmp</A>-&gt;name == <A HREF="_variables/name.html">$name</A>) {<BR>
<A NAME="l329"><FONT SIZE=-2 COLOR="#555555">329</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/tmp.html">$tmp</A>-&gt;<A HREF="_functions/getxmlwithoutchildren.html">getXMLWithoutChildren</A>();<BR>
<A NAME="l330"><FONT SIZE=-2 COLOR="#555555">330</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l331"><FONT SIZE=-2 COLOR="#555555">331</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l332"><FONT SIZE=-2 COLOR="#555555">332</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l333"><FONT SIZE=-2 COLOR="#555555">333</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
<A NAME="l334"><FONT SIZE=-2 COLOR="#555555">334</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** get XML tag without children */<BR>
<A NAME="l335"><FONT SIZE=-2 COLOR="#555555">335</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function <A HREF="_functions/getxmlwithoutchildren.html">getXMLWithoutChildren</A>() {<BR>
<A NAME="l336"><FONT SIZE=-2 COLOR="#555555">336</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/tmp.html">$tmp</A> = new <A HREF="_functions/attribute.html">ATTRIBUTE</A>();<BR>
<A NAME="l337"><FONT SIZE=-2 COLOR="#555555">337</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/data.html">$data</A> = &quot;&lt;&quot; . <A HREF="_variables/this.html">$this</A>-&gt;name . &quot; &quot;;<BR>
<A NAME="l338"><FONT SIZE=-2 COLOR="#555555">338</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/data.html">$data</A> .= &quot;elementid=\&quot;<A HREF="_variables/this.html">$this</A>-&gt;id\&quot; &quot;;<BR>
<A NAME="l339"><FONT SIZE=-2 COLOR="#555555">339</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/data.html">$data</A> .= &quot;parent_id=\&quot;&quot;.<A HREF="_variables/this.html">$this</A>-&gt;parent.&quot;\&quot; &quot;;<BR>
<A NAME="l340"><FONT SIZE=-2 COLOR="#555555">340</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/foreach.html">foreach</A>(<A HREF="_variables/this.html">$this</A>-&gt;attributes as <A HREF="_variables/att.html">$att</A>) {<BR>
<A NAME="l341"><FONT SIZE=-2 COLOR="#555555">341</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/tmp.html">$tmp</A> =&amp; <A HREF="_variables/att.html">$att</A>;<BR>
<A NAME="l342"><FONT SIZE=-2 COLOR="#555555">342</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/data.html">$data</A> .= <A HREF="_variables/tmp.html">$tmp</A>-&gt;name . &quot;=\&quot;&quot;;<BR>
<A NAME="l343"><FONT SIZE=-2 COLOR="#555555">343</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/data.html">$data</A> .= <A HREF="_variables/tmp.html">$tmp</A>-&gt;value . &quot;\&quot; &quot;;<BR>
<A NAME="l344"><FONT SIZE=-2 COLOR="#555555">344</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l345"><FONT SIZE=-2 COLOR="#555555">345</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/data.html">$data</A> .= &quot;&gt;\n&quot;;<BR>
<A NAME="l346"><FONT SIZE=-2 COLOR="#555555">346</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/data.html">$data</A> .= <A HREF="_variables/this.html">$this</A>-&gt;cdata . &quot;\n&quot;;<BR>
<A NAME="l347"><FONT SIZE=-2 COLOR="#555555">347</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/data.html">$data</A> .= &quot;&lt;/<A HREF="_variables/this.html">$this</A>-&gt;name &gt;&quot;;<BR>
<A NAME="l348"><FONT SIZE=-2 COLOR="#555555">348</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return <A HREF="_variables/data.html">$data</A>;<BR>
<A NAME="l349"><FONT SIZE=-2 COLOR="#555555">349</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l350"><FONT SIZE=-2 COLOR="#555555">350</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
<A NAME="l351"><FONT SIZE=-2 COLOR="#555555">351</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** returns an array of  ID's for<BR>
<A NAME="l352"><FONT SIZE=-2 COLOR="#555555">352</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; elements of type <A HREF="_variables/element_type.html">$element_type</A> with<BR>
<A NAME="l353"><FONT SIZE=-2 COLOR="#555555">353</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* attributes similar to the array<BR>
<A NAME="l354"><FONT SIZE=-2 COLOR="#555555">354</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <A HREF="_variables/attributes.html">$attributes</A> */<BR>
<A NAME="l355"><FONT SIZE=-2 COLOR="#555555">355</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function <A HREF="_functions/findchildid.html">findCHILDID</A>(<A HREF="_variables/element_type.html">$element_type</A>, <A HREF="_variables/attributes.html">$attributes</A> = null) {<BR>
<A NAME="l356"><FONT SIZE=-2 COLOR="#555555">356</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/query.html">$query</A> = &quot;SELECT ELEMENTS.ID FROM ELEMENTS, ATTRIBUTES <BR>
<A NAME="l357"><FONT SIZE=-2 COLOR="#555555">357</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WHERE ELEMENTS.ETYPE = '<A HREF="_variables/element_type.html">$element_type</A>' &quot;;<BR>
<A NAME="l358"><FONT SIZE=-2 COLOR="#555555">358</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/if.html">if</A>(<A HREF="_functions/count.html">count</A>(<A HREF="_variables/attributes.html">$attributes</A>) &gt; 0) {<BR>
<A NAME="l359"><FONT SIZE=-2 COLOR="#555555">359</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/tmp.html">$tmp</A> = <A HREF="_functions/array_pop.html">array_pop</A>(<A HREF="_variables/attributes.html">$attributes</A>);<BR>
<A NAME="l360"><FONT SIZE=-2 COLOR="#555555">360</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/query.html">$query</A> .= &quot;AND ATTRIBUTES.ELEMENT = ELEMENTS.ID<BR>
<A NAME="l361"><FONT SIZE=-2 COLOR="#555555">361</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AND ATTRIBUTES.VALUE = '<A HREF="_variables/tmp.html">$tmp</A>-&gt;value'<BR>
<A NAME="l362"><FONT SIZE=-2 COLOR="#555555">362</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AND ATTRIBUTES.NAME = '<A HREF="_variables/tmp.html">$tmp</A>-&gt;name' &quot;;<BR>
<A NAME="l363"><FONT SIZE=-2 COLOR="#555555">363</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l364"><FONT SIZE=-2 COLOR="#555555">364</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/if.html">if</A>(<A HREF="_functions/count.html">count</A>(<A HREF="_variables/attributes.html">$attributes</A>) &gt; 0) {<BR>
<A NAME="l365"><FONT SIZE=-2 COLOR="#555555">365</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/foreach.html">foreach</A>(<A HREF="_variables/attributes.html">$attributes</A> as <A HREF="_variables/tmp.html">$tmp</A>) {<BR>
<A NAME="l366"><FONT SIZE=-2 COLOR="#555555">366</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/query.html">$query</A> .= &quot;OR ELEMENTS.TYPE = '<A HREF="_variables/element_type.html">$element_type</A>'<BR>
<A NAME="l367"><FONT SIZE=-2 COLOR="#555555">367</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AND ATTRIBUTES.ELEMENT = ELEMENTS.ID<BR>
<A NAME="l368"><FONT SIZE=-2 COLOR="#555555">368</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AND ATTRIBUTES.VALUE = '<A HREF="_variables/tmp.html">$tmp</A>-&gt;value'<BR>
<A NAME="l369"><FONT SIZE=-2 COLOR="#555555">369</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AND ATTRIBUTES.NAME = '<A HREF="_variables/tmp.html">$tmp</A>-&gt;name' &quot;;<BR>
<A NAME="l370"><FONT SIZE=-2 COLOR="#555555">370</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l371"><FONT SIZE=-2 COLOR="#555555">371</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l372"><FONT SIZE=-2 COLOR="#555555">372</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/results.html">$results</A> = <A HREF="_functions/mysql_query.html">mysql_query</A>(<A HREF="_variables/query.html">$query</A>);<BR>
<A NAME="l373"><FONT SIZE=-2 COLOR="#555555">373</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/tmp.html">$tmp</A> = null;<BR>
<A NAME="l374"><FONT SIZE=-2 COLOR="#555555">374</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/tmp.html">$tmp</A> = <A HREF="_functions/array.html">array</A>();<BR>
<A NAME="l375"><FONT SIZE=-2 COLOR="#555555">375</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/nrows.html">$nrows</A> = <A HREF="_functions/mysql_num_rows.html">mysql_num_rows</A>(<A HREF="_variables/results.html">$results</A>);<BR>
<A NAME="l376"><FONT SIZE=-2 COLOR="#555555">376</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/for.html">for</A>(<A HREF="_variables/i.html">$i</A> = 0; <A HREF="_variables/i.html">$i</A> &lt; <A HREF="_variables/nrows.html">$nrows</A>; <A HREF="_variables/i.html">$i</A>++) {<BR>
<A NAME="l377"><FONT SIZE=-2 COLOR="#555555">377</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/row.html">$row</A> = <A HREF="_functions/mysql_fetch_row.html">mysql_fetch_row</A>(<A HREF="_variables/results.html">$results</A>);<BR>
<A NAME="l378"><FONT SIZE=-2 COLOR="#555555">378</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/array_push.html">array_push</A>(<A HREF="_variables/tmp.html">$tmp</A>, <A HREF="_variables/row.html">$row</A>[0]);<BR>
<A NAME="l379"><FONT SIZE=-2 COLOR="#555555">379</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l380"><FONT SIZE=-2 COLOR="#555555">380</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/tmp.html">$tmp</A> = <A HREF="_functions/array_unique.html">array_unique</A>(<A HREF="_variables/tmp.html">$tmp</A>);<BR>
<A NAME="l381"><FONT SIZE=-2 COLOR="#555555">381</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return <A HREF="_variables/tmp.html">$tmp</A>;<BR>
<A NAME="l382"><FONT SIZE=-2 COLOR="#555555">382</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l383"><FONT SIZE=-2 COLOR="#555555">383</FONT>&nbsp;</A> }<BR>
<A NAME="l384"><FONT SIZE=-2 COLOR="#555555">384</FONT>&nbsp;</A> ?&gt;<BR>
</FONT>
<BR><HR>
<TABLE WIDTH=100%>
	<TR><TD>Generated: Wed Oct 30 08:50:37 2002</TD>
	<TD ALIGN="RIGHT"><I>Generated by <A HREF="http://phpxref.sourceforge.net/">PHPXref 0.2</A></I></TD>
	</TR>
</TABLE>
</BODY></HTML>
Return current item: MySQL-XML