Location: PHPKode > projects > Simple Web Account Manager > swam-1.0beta2/phpdoc/__filesource/fsource_swam__HTML.class.inc.html
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>File Source for HTML.class.inc</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
						<h1>Source for file HTML.class.inc</h1>
<p>Documentation is available at <a href="../swam/_HTML.class.inc.html">HTML.class.inc</a></p>
<div class="src-code">
<div class="src-code"><ol><li><div class="src-line"><a name="a1"></a><span class="src-php">&lt;?php</span></div></li>
<li><div class="src-line"><a name="a2"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a3"></a><span class="src-comm">/*</span></div></li>
<li><div class="src-line"><a name="a4"></a><span class="src-comm">*&nbsp;SWAM&nbsp;(Simple&nbsp;Web&nbsp;Account&nbsp;Manager)&nbsp;is&nbsp;a&nbsp;personal&nbsp;finance&nbsp;manager</span></div></li>
<li><div class="src-line"><a name="a5"></a><span class="src-comm">*&nbsp;written&nbsp;in&nbsp;PHP.</span></div></li>
<li><div class="src-line"><a name="a6"></a><span class="src-comm">*&nbsp;Copyright&nbsp;(C)&nbsp;2004-2009&nbsp;Mathieu&nbsp;Peltier.</span></div></li>
<li><div class="src-line"><a name="a7"></a><span class="src-comm">*&nbsp;Contact:&nbsp;mpeltier&nbsp;at&nbsp;users.sourceforge.net</span></div></li>
<li><div class="src-line"><a name="a8"></a><span class="src-comm">*</span></div></li>
<li><div class="src-line"><a name="a9"></a><span class="src-comm">*&nbsp;This&nbsp;program&nbsp;is&nbsp;free&nbsp;software:&nbsp;you&nbsp;can&nbsp;redistribute&nbsp;it&nbsp;and/or&nbsp;modify</span></div></li>
<li><div class="src-line"><a name="a10"></a><span class="src-comm">*&nbsp;it&nbsp;under&nbsp;the&nbsp;terms&nbsp;of&nbsp;the&nbsp;GNU&nbsp;General&nbsp;Public&nbsp;License&nbsp;as&nbsp;published&nbsp;by</span></div></li>
<li><div class="src-line"><a name="a11"></a><span class="src-comm">*&nbsp;the&nbsp;Free&nbsp;Software&nbsp;Foundation,&nbsp;either&nbsp;version&nbsp;3&nbsp;of&nbsp;the&nbsp;License,&nbsp;or</span></div></li>
<li><div class="src-line"><a name="a12"></a><span class="src-comm">*&nbsp;(at&nbsp;your&nbsp;option)&nbsp;any&nbsp;later&nbsp;version.</span></div></li>
<li><div class="src-line"><a name="a13"></a><span class="src-comm">*</span></div></li>
<li><div class="src-line"><a name="a14"></a><span class="src-comm">*&nbsp;This&nbsp;program&nbsp;is&nbsp;distributed&nbsp;in&nbsp;the&nbsp;hope&nbsp;that&nbsp;it&nbsp;will&nbsp;be&nbsp;useful,&nbsp;but</span></div></li>
<li><div class="src-line"><a name="a15"></a><span class="src-comm">*&nbsp;WITHOUT&nbsp;ANY&nbsp;WARRANTY;&nbsp;without&nbsp;even&nbsp;the&nbsp;implied&nbsp;warranty&nbsp;of</span></div></li>
<li><div class="src-line"><a name="a16"></a><span class="src-comm">*&nbsp;MERCHANTABILITY&nbsp;or&nbsp;FITNESS&nbsp;FOR&nbsp;A&nbsp;PARTICULAR&nbsp;PURPOSE.&nbsp;See&nbsp;the&nbsp;GNU</span></div></li>
<li><div class="src-line"><a name="a17"></a><span class="src-comm">*&nbsp;General&nbsp;Public&nbsp;License&nbsp;for&nbsp;more&nbsp;details.</span></div></li>
<li><div class="src-line"><a name="a18"></a><span class="src-comm">*</span></div></li>
<li><div class="src-line"><a name="a19"></a><span class="src-comm">*&nbsp;You&nbsp;should&nbsp;have&nbsp;received&nbsp;a&nbsp;copy&nbsp;of&nbsp;the&nbsp;GNU&nbsp;General&nbsp;Public&nbsp;License</span></div></li>
<li><div class="src-line"><a name="a20"></a><span class="src-comm">*&nbsp;along&nbsp;with&nbsp;this&nbsp;program.&nbsp;If&nbsp;not,&nbsp;see&nbsp;&lt;http://www.gnu.org/licenses/&gt;.</span></div></li>
<li><div class="src-line"><a name="a21"></a><span class="src-comm">*</span></div></li>
<li><div class="src-line"><a name="a22"></a><span class="src-comm">*&nbsp;Initial&nbsp;developer(s):&nbsp;Mathieu&nbsp;Peltier.</span></div></li>
<li><div class="src-line"><a name="a23"></a><span class="src-comm">*&nbsp;Contributor(s):</span></div></li>
<li><div class="src-line"><a name="a24"></a><span class="src-comm">*/</span></div></li>
<li><div class="src-line"><a name="a25"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a26"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a27"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@package</span><span class="src-doc">&nbsp;swam</span></div></li>
<li><div class="src-line"><a name="a28"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@author</span><span class="src-doc">&nbsp;Mathieu&nbsp;Peltier&nbsp;&lt;hide@address.com&gt;</span></div></li>
<li><div class="src-line"><a name="a29"></a><span class="src-doc">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a30"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a31"></a><span class="src-inc">require_once</span><span class="src-sym">(</span><span class="src-str">'pre.inc'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a32"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a33"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a34"></a><span class="src-doc">&nbsp;*&nbsp;Utilitary&nbsp;HTML&nbsp;methods.</span></div></li>
<li><div class="src-line"><a name="a35"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a36"></a><span class="src-doc">&nbsp;*&nbsp;Security&nbsp;note:&nbsp;all&nbsp;functions&nbsp;displaying&nbsp;user&nbsp;input&nbsp;are&nbsp;using</span></div></li>
<li><div class="src-line"><a name="a37"></a><span class="src-doc">&nbsp;*&nbsp;htmlspecialchars()&nbsp;function&nbsp;to&nbsp;encode&nbsp;the&nbsp;potentially&nbsp;compromized</span></div></li>
<li><div class="src-line"><a name="a38"></a><span class="src-doc">&nbsp;*&nbsp;parameters&nbsp;(see&nbsp;Utils::encode()&nbsp;and&nbsp;Utils::safe_sprintf()</span></div></li>
<li><div class="src-line"><a name="a39"></a><span class="src-doc">&nbsp;*&nbsp;function).&nbsp;Error&nbsp;messages&nbsp;may&nbsp;contain&nbsp;HTML&nbsp;code,&nbsp;so&nbsp;the&nbsp;error</span></div></li>
<li><div class="src-line"><a name="a40"></a><span class="src-doc">&nbsp;*&nbsp;messages&nbsp;are&nbsp;not&nbsp;encoded&nbsp;in&nbsp;the&nbsp;exception&nbsp;handler&nbsp;function&nbsp;but&nbsp;when</span></div></li>
<li><div class="src-line"><a name="a41"></a><span class="src-doc">&nbsp;*&nbsp;each&nbsp;exception&nbsp;is&nbsp;created.</span></div></li>
<li><div class="src-line"><a name="a42"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a43"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@package</span><span class="src-doc">&nbsp;swam</span></div></li>
<li><div class="src-line"><a name="a44"></a><span class="src-doc">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a45"></a><span class="src-key">class&nbsp;</span><a href="../swam/HTML.html">HTML</a>&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a46"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a47"></a>&nbsp;&nbsp;<span class="src-key">const&nbsp;</span><span class="src-id">INDENTATION_SPACES&nbsp;</span>=&nbsp;<span class="src-str">'&nbsp;&nbsp;'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a48"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a49"></a>&nbsp;&nbsp;<span class="src-doc">/**&nbsp;Number&nbsp;of&nbsp;spaces&nbsp;for&nbsp;identation.&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a50"></a>&nbsp;&nbsp;<span class="src-key">private&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-var">$indentation_level&nbsp;</span>=&nbsp;<span class="src-num">0</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a51"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a52"></a>&nbsp;&nbsp;<span class="src-doc">/**&nbsp;Indicates&nbsp;if&nbsp;the&nbsp;current&nbsp;line&nbsp;is&nbsp;already&nbsp;indented.&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a53"></a>&nbsp;&nbsp;<span class="src-key">private&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-var">$idented_line&nbsp;</span>=&nbsp;<span class="src-id">true</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a54"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a55"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a56"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Indicates&nbsp;if&nbsp;the&nbsp;HTML&nbsp;header&nbsp;has&nbsp;been&nbsp;printed&nbsp;(in&nbsp;order&nbsp;to&nbsp;avoid</span></div></li>
<li><div class="src-line"><a name="a57"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;to&nbsp;print&nbsp;it&nbsp;twice&nbsp;within&nbsp;error&nbsp;handler).</span></div></li>
<li><div class="src-line"><a name="a58"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a59"></a>&nbsp;&nbsp;<span class="src-key">private&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-var">$header_printed&nbsp;</span>=&nbsp;<span class="src-id">false</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a60"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a61"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a62"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Prints&nbsp;required&nbsp;spaces&nbsp;so&nbsp;that&nbsp;the&nbsp;current&nbsp;line&nbsp;is&nbsp;well&nbsp;indented</span></div></li>
<li><div class="src-line"><a name="a63"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;if&nbsp;SWAM_IDENT_HTML&nbsp;is&nbsp;set&nbsp;to&nbsp;true&nbsp;or&nbsp;during&nbsp;installation&nbsp;process.</span></div></li>
<li><div class="src-line"><a name="a64"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a65"></a>&nbsp;&nbsp;<span class="src-key">private&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><span class="src-id">indent</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a66"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">((</span><a href="http://www.php.net/defined">defined</a><span class="src-sym">(</span><span class="src-str">'SWAM_INSTALL_MODE'</span><span class="src-sym">)&nbsp;</span>||&nbsp;<span class="src-id"><a href="../swam/_config.inc.html#defineSWAM_IDENT_HTML">SWAM_IDENT_HTML</a></span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<span class="src-sym">!&nbsp;</span><span class="src-id">self</span><span class="src-sym">::</span><span class="src-var">$idented_line</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a67"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">for&nbsp;</span><span class="src-sym">(</span><span class="src-var">$i&nbsp;</span>=&nbsp;<span class="src-num">0</span><span class="src-sym">;&nbsp;</span><span class="src-var">$i&nbsp;</span>&lt;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-var">$indentation_level</span><span class="src-sym">;&nbsp;</span><span class="src-var">$i</span>++<span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a68"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print<span class="src-sym">(</span><span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">INDENTATION_SPACES</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a69"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a70"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-var">$idented_line&nbsp;</span>=&nbsp;<span class="src-id">true</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a71"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a72"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a73"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a74"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a75"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Forces&nbsp;a&nbsp;return&nbsp;carriage&nbsp;if&nbsp;SWAM_IDENT_HTML&nbsp;is&nbsp;set&nbsp;to&nbsp;true</span></div></li>
<li><div class="src-line"><a name="a76"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;or&nbsp;during&nbsp;installation&nbsp;process.</span></div></li>
<li><div class="src-line"><a name="a77"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a78"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/HTML.html#methodgoto_next_line">goto_next_line</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a79"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><a href="http://www.php.net/defined">defined</a><span class="src-sym">(</span><span class="src-str">'SWAM_INSTALL_MODE'</span><span class="src-sym">)&nbsp;</span>||&nbsp;<span class="src-id"><a href="../swam/_config.inc.html#defineSWAM_IDENT_HTML">SWAM_IDENT_HTML</a></span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a80"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print<span class="src-sym">(</span><span class="src-id">PHP_EOL</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a81"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-var">$idented_line&nbsp;</span>=&nbsp;<span class="src-id">false</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a82"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a83"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a84"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a85"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a86"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Returns&nbsp;the&nbsp;string&nbsp;'attribute1=&quot;value1&quot;&nbsp;...&nbsp;attributei=&quot;valuei&quot;</span></div></li>
<li><div class="src-line"><a name="a87"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;...&nbsp;attributen=&quot;valuen&quot;'&nbsp;from&nbsp;the&nbsp;given&nbsp;associative</span></div></li>
<li><div class="src-line"><a name="a88"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;array.&nbsp;'optional'&nbsp;attribute&nbsp;is&nbsp;excluded&nbsp;(only&nbsp;HTML&nbsp;attributes&nbsp;are</span></div></li>
<li><div class="src-line"><a name="a89"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;taken&nbsp;into&nbsp;account).</span></div></li>
<li><div class="src-line"><a name="a90"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a91"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">array&nbsp;</span><span class="src-doc-var">$attributes&nbsp;</span><span class="src-doc">associative&nbsp;array&nbsp;containing&nbsp;an</span></div></li>
<li><div class="src-line"><a name="a92"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;attribute&nbsp;list.</span></div></li>
<li><div class="src-line"><a name="a93"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a94"></a>&nbsp;&nbsp;<span class="src-key">private&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><span class="src-id">compute_attributes</span><span class="src-sym">(</span><span class="src-var">$attributes</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a95"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$attributes</span><span class="src-sym">)&nbsp;</span>||&nbsp;<span class="src-sym">(</span><a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$attributes</span><span class="src-sym">)&nbsp;</span>==&nbsp;<span class="src-num">0</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a96"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-str">''</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a97"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a98"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$res&nbsp;</span>=&nbsp;<span class="src-str">''</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a99"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">while&nbsp;</span><span class="src-sym">(</span>list<span class="src-sym">(</span><span class="src-var">$key</span><span class="src-sym">,&nbsp;</span><span class="src-var">$val</span><span class="src-sym">)&nbsp;</span>=&nbsp;<a href="http://www.php.net/each">each</a><span class="src-sym">(</span><span class="src-var">$attributes</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a100"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$key&nbsp;</span>!=&nbsp;<span class="src-str">'optional'</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a101"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$res&nbsp;</span>.=&nbsp;<span class="src-str">'&nbsp;'&nbsp;</span>.&nbsp;<span class="src-var">$key&nbsp;</span>.&nbsp;<span class="src-str">&quot;</span><span class="src-str">=\&quot;<span class="src-var">$val</span>\&quot;</span><span class="src-str">&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a102"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a103"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a104"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$res</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a105"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a106"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a107"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a108"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Prints&nbsp;the&nbsp;start&nbsp;tag&nbsp;of&nbsp;an&nbsp;HTML&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a109"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a110"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$element&nbsp;</span><span class="src-doc">name&nbsp;of&nbsp;the&nbsp;element&nbsp;(eg:&nbsp;table).</span></div></li>
<li><div class="src-line"><a name="a111"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">array&nbsp;</span><span class="src-doc-var">$attributes&nbsp;</span><span class="src-doc">optional&nbsp;associative&nbsp;array&nbsp;containing</span></div></li>
<li><div class="src-line"><a name="a112"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;other&nbsp;attributes&nbsp;of&nbsp;the&nbsp;element&nbsp;(eg:&nbsp;class).</span></div></li>
<li><div class="src-line"><a name="a113"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a114"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/HTML.html#methodbegin_element">begin_element</a><span class="src-sym">(</span><span class="src-var">$element</span><span class="src-sym">,&nbsp;</span><span class="src-var">$attributes&nbsp;</span>=&nbsp;<span class="src-id">null</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a115"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$computed_attributes&nbsp;</span>=&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">compute_attributes</span><span class="src-sym">(</span><span class="src-var">$attributes</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a116"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">indent</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a117"></a>&nbsp;&nbsp;&nbsp;&nbsp;print<span class="src-sym">(</span><span class="src-str">&quot;</span><span class="src-str">&lt;<span class="src-var">$element$computed_attributes</span>&gt;</span><span class="src-str">&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a118"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">goto_next_line</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a119"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-var">$indentation_level</span>++<span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a120"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a121"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a122"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a123"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Prints&nbsp;the&nbsp;end&nbsp;tag&nbsp;of&nbsp;an&nbsp;HTML&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a124"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a125"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$element&nbsp;</span><span class="src-doc">name&nbsp;of&nbsp;the&nbsp;element&nbsp;(eg:&nbsp;table).</span></div></li>
<li><div class="src-line"><a name="a126"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a127"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/HTML.html#methodend_element">end_element</a><span class="src-sym">(</span><span class="src-var">$element</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a128"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-id">self</span><span class="src-sym">::</span><span class="src-var">$idented_line&nbsp;</span>==&nbsp;<span class="src-id">true</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a129"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">goto_next_line</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a130"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a131"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-var">$indentation_level</span>--<span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a132"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">indent</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a133"></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/printf">printf</a><span class="src-sym">(</span><span class="src-str">&quot;</span><span class="src-str">&lt;/<span class="src-var">$element</span>&gt;</span><span class="src-str">&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a134"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">goto_next_line</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a135"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a136"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a137"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a138"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Prints&nbsp;an&nbsp;HTML&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a139"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a140"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$element&nbsp;</span><span class="src-doc">name&nbsp;of&nbsp;the&nbsp;element&nbsp;(eg:&nbsp;table).</span></div></li>
<li><div class="src-line"><a name="a141"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$body&nbsp;</span><span class="src-doc">content&nbsp;of&nbsp;the&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a142"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">array&nbsp;</span><span class="src-doc-var">$attributes&nbsp;</span><span class="src-doc">optional&nbsp;associative&nbsp;array&nbsp;containing</span></div></li>
<li><div class="src-line"><a name="a143"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;other&nbsp;attributes&nbsp;of&nbsp;the&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a144"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$prefix&nbsp;</span><span class="src-doc">optional&nbsp;prefix.</span></div></li>
<li><div class="src-line"><a name="a145"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$suffix&nbsp;</span><span class="src-doc">optional&nbsp;suffix.</span></div></li>
<li><div class="src-line"><a name="a146"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a147"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/HTML.html#methodprint_element">print_element</a><span class="src-sym">(</span><span class="src-var">$element</span><span class="src-sym">,&nbsp;</span><span class="src-var">$body&nbsp;</span>=&nbsp;<span class="src-id">null</span><span class="src-sym">,&nbsp;</span><span class="src-var">$attributes&nbsp;</span>=&nbsp;<span class="src-id">null</span><span class="src-sym">,&nbsp;</span><span class="src-var">$prefix&nbsp;</span>=&nbsp;<span class="src-str">''</span><span class="src-sym">,&nbsp;</span><span class="src-var">$suffix&nbsp;</span>=&nbsp;<span class="src-str">''</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a148"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$computed_attributes&nbsp;</span>=&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">compute_attributes</span><span class="src-sym">(</span><span class="src-var">$attributes</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a149"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">indent</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a150"></a>&nbsp;&nbsp;&nbsp;&nbsp;print<span class="src-sym">(</span><span class="src-var">$prefix</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a151"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$element&nbsp;</span>!=&nbsp;<span class="src-str">'script'&nbsp;</span>&amp;&amp;&nbsp;<span class="src-var">$element&nbsp;</span>!=&nbsp;<span class="src-str">'textarea'&nbsp;</span>&amp;&amp;&nbsp;<span class="src-var">$body&nbsp;</span>==&nbsp;<span class="src-id">null</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a152"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print<span class="src-sym">(</span><span class="src-str">&quot;</span><span class="src-str">&lt;<span class="src-var">$element$computed_attributes</span>&nbsp;/&gt;</span><span class="src-str">&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a153"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a154"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print<span class="src-sym">(</span><span class="src-str">&quot;</span><span class="src-str">&lt;<span class="src-var">$element$computed_attributes</span>&gt;<span class="src-var">$body</span>&lt;/<span class="src-var">$element</span>&gt;</span><span class="src-str">&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a155"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a156"></a>&nbsp;&nbsp;&nbsp;&nbsp;print<span class="src-sym">(</span><span class="src-var">$suffix</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a157"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">goto_next_line</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a158"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a159"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a160"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a161"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Prints&nbsp;the&nbsp;given&nbsp;string.</span></div></li>
<li><div class="src-line"><a name="a162"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a163"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$text&nbsp;</span><span class="src-doc">text&nbsp;to&nbsp;print.</span></div></li>
<li><div class="src-line"><a name="a164"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a165"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/HTML.html#methodprint_text">print_text</a><span class="src-sym">(</span><span class="src-var">$text</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a166"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">indent</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a167"></a>&nbsp;&nbsp;&nbsp;&nbsp;print<span class="src-sym">(</span><span class="src-var">$text</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a168"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">goto_next_line</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a169"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a170"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a171"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a172"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Prints&nbsp;an&nbsp;image.&nbsp;Following&nbsp;base&nbsp;URL&nbsp;is&nbsp;used&nbsp;in&nbsp;all&nbsp;SWAM&nbsp;HTML&nbsp;page:</span></div></li>
<li><div class="src-line"><a name="a173"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;http(s)://&lt;SERVER_NAME&gt;/&lt;SWAM_ROOT_PATH&gt;/</span></div></li>
<li><div class="src-line"><a name="a174"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a175"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$src&nbsp;</span><span class="src-doc">relative&nbsp;path&nbsp;to&nbsp;the&nbsp;image&nbsp;(eg:</span></div></li>
<li><div class="src-line"><a name="a176"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;media/images/image.gif&nbsp;if&nbsp;the&nbsp;image&nbsp;can&nbsp;be&nbsp;found&nbsp;at:</span></div></li>
<li><div class="src-line"><a name="a177"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;http://domain.org/swam/media/images/image.gif)</span></div></li>
<li><div class="src-line"><a name="a178"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">int&nbsp;</span><span class="src-doc-var">$width&nbsp;</span><span class="src-doc">width&nbsp;of&nbsp;the&nbsp;image.</span></div></li>
<li><div class="src-line"><a name="a179"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">int&nbsp;</span><span class="src-doc-var">$height&nbsp;</span><span class="src-doc">height&nbsp;of&nbsp;the&nbsp;image.</span></div></li>
<li><div class="src-line"><a name="a180"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$alt&nbsp;</span><span class="src-doc">alternative&nbsp;text&nbsp;to&nbsp;use&nbsp;for&nbsp;text&nbsp;only&nbsp;browser.</span></div></li>
<li><div class="src-line"><a name="a181"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$link&nbsp;</span><span class="src-doc">optional&nbsp;link.</span></div></li>
<li><div class="src-line"><a name="a182"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">array&nbsp;</span><span class="src-doc-var">$attributes&nbsp;</span><span class="src-doc">optional&nbsp;associative&nbsp;array&nbsp;containing</span></div></li>
<li><div class="src-line"><a name="a183"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;other&nbsp;attributes&nbsp;of&nbsp;the&nbsp;image.</span></div></li>
<li><div class="src-line"><a name="a184"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a185"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/HTML.html#methodprint_img">print_img</a><span class="src-sym">(</span><span class="src-var">$src</span><span class="src-sym">,&nbsp;</span><span class="src-var">$width</span><span class="src-sym">,&nbsp;</span><span class="src-var">$height</span><span class="src-sym">,&nbsp;</span><span class="src-var">$alt</span><span class="src-sym">,&nbsp;</span><span class="src-var">$link&nbsp;</span>=&nbsp;<span class="src-id">null</span><span class="src-sym">,&nbsp;</span><span class="src-var">$attributes&nbsp;</span>=&nbsp;<span class="src-id">null</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a186"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$link</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a187"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;no&nbsp;identation&nbsp;between&nbsp;a&nbsp;and&nbsp;img&nbsp;elements&nbsp;because&nbsp;it&nbsp;may&nbsp;cause</span></div></li>
<li><div class="src-line"><a name="a188"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;bad&nbsp;effect&nbsp;with&nbsp;some&nbsp;browser&nbsp;(eg:&nbsp;konqueror)</span></div></li>
<li><div class="src-line"><a name="a189"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$prefix&nbsp;</span>=&nbsp;<span class="src-str">'&lt;a&nbsp;href=&quot;'&nbsp;</span>.&nbsp;<span class="src-var">$link&nbsp;</span>.&nbsp;<span class="src-str">'&quot;&gt;'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a190"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$suffix&nbsp;</span>=&nbsp;<span class="src-str">'&lt;/a&gt;'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a191"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a192"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$prefix&nbsp;</span>=&nbsp;<span class="src-str">''</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a193"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$suffix&nbsp;</span>=&nbsp;<span class="src-str">''</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a194"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a195"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$attr&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'src'&nbsp;</span>=&gt;&nbsp;<span class="src-var">$src</span><span class="src-sym">,&nbsp;</span><span class="src-str">'width'&nbsp;</span>=&gt;&nbsp;<span class="src-var">$width</span><span class="src-sym">,&nbsp;</span><span class="src-str">'height'&nbsp;</span>=&gt;&nbsp;<span class="src-var">$height</span><span class="src-sym">,&nbsp;</span><span class="src-str">'alt'&nbsp;</span>=&gt;&nbsp;<span class="src-var">$alt</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a196"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$attributes&nbsp;</span>!=&nbsp;<span class="src-id">null</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a197"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$attr&nbsp;</span>=&nbsp;<a href="http://www.php.net/array_merge">array_merge</a><span class="src-sym">(</span><span class="src-var">$attr</span><span class="src-sym">,&nbsp;</span><span class="src-var">$attributes</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a198"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a199"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a200"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'img'</span><span class="src-sym">,&nbsp;</span><span class="src-id">null</span><span class="src-sym">,&nbsp;</span><span class="src-var">$attr</span><span class="src-sym">,&nbsp;</span><span class="src-var">$prefix</span><span class="src-sym">,&nbsp;</span><span class="src-var">$suffix</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a201"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a202"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a203"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a204"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Prints&nbsp;the&nbsp;beginning&nbsp;of&nbsp;a&nbsp;form.</span></div></li>
<li><div class="src-line"><a name="a205"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a206"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$method&nbsp;</span><span class="src-doc">method&nbsp;to&nbsp;use&nbsp;(either&nbsp;post&nbsp;or&nbsp;get).</span></div></li>
<li><div class="src-line"><a name="a207"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$action&nbsp;</span><span class="src-doc">action&nbsp;script.</span></div></li>
<li><div class="src-line"><a name="a208"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">array&nbsp;</span><span class="src-doc-var">$attributes&nbsp;</span><span class="src-doc">optional&nbsp;associative&nbsp;array&nbsp;containing</span></div></li>
<li><div class="src-line"><a name="a209"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;other&nbsp;attributes&nbsp;of&nbsp;the&nbsp;form&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a210"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a211"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/HTML.html#methodbegin_form">begin_form</a><span class="src-sym">(</span><span class="src-var">$method</span><span class="src-sym">,&nbsp;</span><span class="src-var">$action</span><span class="src-sym">,&nbsp;</span><span class="src-var">$attributes&nbsp;</span>=&nbsp;<span class="src-id">null</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a212"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$method&nbsp;</span>!=&nbsp;<span class="src-str">'post'&nbsp;</span><span class="src-key">and&nbsp;</span><span class="src-var">$method&nbsp;</span>!=&nbsp;<span class="src-str">'get'</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a213"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../swam/IllegalArgumentException.html">IllegalArgumentException</a></span><span class="src-sym">(</span><span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodsafe_sprintf">safe_sprintf</a><span class="src-sym">(</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Invalid&nbsp;form&nbsp;action&nbsp;method:&nbsp;%s.'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$method</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a214"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a215"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$attributes</span><span class="src-sym">[</span><span class="src-str">'method'</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$method</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a216"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$attributes</span><span class="src-sym">[</span><span class="src-str">'action'</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$action</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a217"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a218"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_element</span><span class="src-sym">(</span><span class="src-str">'form'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$attributes</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a219"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_element</span><span class="src-sym">(</span><span class="src-str">'fieldset'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a220"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a221"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a222"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a223"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Prints&nbsp;the&nbsp;end&nbsp;of&nbsp;a&nbsp;form.</span></div></li>
<li><div class="src-line"><a name="a224"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a225"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/HTML.html#methodend_form">end_form</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a226"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_element</span><span class="src-sym">(</span><span class="src-str">'fieldset'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a227"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_element</span><span class="src-sym">(</span><span class="src-str">'form'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a228"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a229"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a230"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a231"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Prints&nbsp;the&nbsp;caption&nbsp;for&nbsp;the&nbsp;required&nbsp;fields.</span></div></li>
<li><div class="src-line"><a name="a232"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a233"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/HTML.html#methodprint_required_field_caption">print_required_field_caption</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a234"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'p'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Fields&nbsp;marked&nbsp;with&nbsp;an&nbsp;asterisk&nbsp;are&nbsp;required.'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a235"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a236"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a237"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a238"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Prints&nbsp;an&nbsp;hidden&nbsp;input&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a239"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a240"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$name&nbsp;</span><span class="src-doc">name&nbsp;of&nbsp;the&nbsp;hidden&nbsp;variable.</span></div></li>
<li><div class="src-line"><a name="a241"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$value&nbsp;</span><span class="src-doc">value&nbsp;of&nbsp;the&nbsp;hidden&nbsp;variable.</span></div></li>
<li><div class="src-line"><a name="a242"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a243"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/HTML.html#methodprint_hidden_input">print_hidden_input</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">,&nbsp;</span><span class="src-var">$value</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a244"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$encoded_value&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodencode">encode</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a245"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'input'</span><span class="src-sym">,&nbsp;</span><span class="src-id">null</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'type'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'hidden'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'name'&nbsp;</span>=&gt;&nbsp;<span class="src-var">$name</span><span class="src-sym">,&nbsp;</span><span class="src-str">'value'&nbsp;</span>=&gt;&nbsp;<span class="src-var">$encoded_value</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a246"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a247"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a248"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a249"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Prints&nbsp;a&nbsp;submit&nbsp;button.</span></div></li>
<li><div class="src-line"><a name="a250"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a251"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$name&nbsp;</span><span class="src-doc">name&nbsp;of&nbsp;the&nbsp;button.</span></div></li>
<li><div class="src-line"><a name="a252"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$value&nbsp;</span><span class="src-doc">caption&nbsp;of&nbsp;the&nbsp;button.</span></div></li>
<li><div class="src-line"><a name="a253"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a254"></a>&nbsp;&nbsp;<span class="src-key">private&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><span class="src-id">print_button</span><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">,&nbsp;</span><span class="src-var">$value</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a255"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$attributes&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'type'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'submit'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'name'&nbsp;</span>=&gt;&nbsp;<span class="src-var">$name</span><span class="src-sym">,&nbsp;</span><span class="src-str">'value'&nbsp;</span>=&gt;&nbsp;<span class="src-var">$value</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a256"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'input'</span><span class="src-sym">,&nbsp;</span><span class="src-id">null</span><span class="src-sym">,&nbsp;</span><span class="src-var">$attributes</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a257"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a258"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a259"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a260"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a261"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Prints&nbsp;an&nbsp;arbitrary&nbsp;number&nbsp;of&nbsp;HTML&nbsp;buttons&nbsp;using</span></div></li>
<li><div class="src-line"><a name="a262"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;self::print_button()&nbsp;function.&nbsp;This&nbsp;function&nbsp;takes&nbsp;variables</span></div></li>
<li><div class="src-line"><a name="a263"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;number&nbsp;of&nbsp;arguments.&nbsp;Each&nbsp;argument&nbsp;is&nbsp;expected&nbsp;to&nbsp;be&nbsp;an</span></div></li>
<li><div class="src-line"><a name="a264"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;associative&nbsp;array&nbsp;containing&nbsp;2&nbsp;values:&nbsp;name&nbsp;and&nbsp;value&nbsp;of&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a265"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;button.</span></div></li>
<li><div class="src-line"><a name="a266"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a267"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/HTML.html#methodprint_buttons">print_buttons</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a268"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_element</span><span class="src-sym">(</span><span class="src-str">'div'</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'style'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'text-align:&nbsp;center'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'class'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'form'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a269"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$num_args&nbsp;</span>=&nbsp;<a href="http://www.php.net/func_num_args">func_num_args</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a270"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">for&nbsp;</span><span class="src-sym">(</span><span class="src-var">$arg&nbsp;</span>=&nbsp;<span class="src-num">0</span><span class="src-sym">;&nbsp;</span><span class="src-var">$arg&nbsp;</span>&lt;&nbsp;<span class="src-var">$num_args</span><span class="src-sym">;&nbsp;</span><span class="src-var">$arg</span>++<span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a271"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$button&nbsp;</span>=&nbsp;<a href="http://www.php.net/func_get_arg">func_get_arg</a><span class="src-sym">(</span><span class="src-var">$arg</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a272"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!&nbsp;</span><a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$button</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a273"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../swam/IllegalArgumentException.html">IllegalArgumentException</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a274"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a275"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_button</span><span class="src-sym">(</span><span class="src-var">$button</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">,&nbsp;</span><span class="src-var">$button</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a276"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a277"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_element</span><span class="src-sym">(</span><span class="src-str">'div'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a278"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a279"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a280"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a281"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Prints&nbsp;a&nbsp;text&nbsp;input&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a282"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a283"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$name&nbsp;</span><span class="src-doc">name&nbsp;of&nbsp;the&nbsp;input&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a284"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$label&nbsp;</span><span class="src-doc">label&nbsp;of&nbsp;the&nbsp;input&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a285"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$value&nbsp;</span><span class="src-doc">default&nbsp;value&nbsp;of&nbsp;the&nbsp;input&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a286"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">array&nbsp;</span><span class="src-doc-var">$attributes&nbsp;</span><span class="src-doc">optional&nbsp;associative&nbsp;array&nbsp;containing</span></div></li>
<li><div class="src-line"><a name="a287"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;other&nbsp;attributes&nbsp;of&nbsp;the&nbsp;input&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a288"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a289"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/HTML.html#methodprint_text_input">print_text_input</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">,&nbsp;</span><span class="src-var">$label</span><span class="src-sym">,&nbsp;</span><span class="src-var">$value</span><span class="src-sym">,&nbsp;</span><span class="src-var">$attributes&nbsp;</span>=&nbsp;<span class="src-id">null</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a290"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_input</span><span class="src-sym">(</span><span class="src-str">'text'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$name</span><span class="src-sym">,&nbsp;</span><span class="src-var">$label</span><span class="src-sym">,&nbsp;</span><span class="src-var">$value</span><span class="src-sym">,&nbsp;</span><span class="src-var">$attributes</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a291"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a292"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a293"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a294"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Prints&nbsp;a&nbsp;text&nbsp;input&nbsp;element&nbsp;of&nbsp;containing&nbsp;password.</span></div></li>
<li><div class="src-line"><a name="a295"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a296"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$name&nbsp;</span><span class="src-doc">name&nbsp;of&nbsp;the&nbsp;input&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a297"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$label&nbsp;</span><span class="src-doc">label&nbsp;of&nbsp;the&nbsp;input&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a298"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$value&nbsp;</span><span class="src-doc">default&nbsp;value&nbsp;of&nbsp;the&nbsp;input&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a299"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">array&nbsp;</span><span class="src-doc-var">$attributes&nbsp;</span><span class="src-doc">optional&nbsp;associative&nbsp;array&nbsp;containing</span></div></li>
<li><div class="src-line"><a name="a300"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;other&nbsp;attributes&nbsp;of&nbsp;the&nbsp;input&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a301"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a302"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/HTML.html#methodprint_password_input">print_password_input</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">,&nbsp;</span><span class="src-var">$label</span><span class="src-sym">,&nbsp;</span><span class="src-var">$value</span><span class="src-sym">,&nbsp;</span><span class="src-var">$attributes&nbsp;</span>=&nbsp;<span class="src-id">null</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a303"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_input</span><span class="src-sym">(</span><span class="src-str">'password'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$name</span><span class="src-sym">,&nbsp;</span><span class="src-var">$label</span><span class="src-sym">,&nbsp;</span><span class="src-var">$value</span><span class="src-sym">,&nbsp;</span><span class="src-var">$attributes</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a304"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a305"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a306"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a307"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Prints&nbsp;an&nbsp;input&nbsp;element.&nbsp;Unless&nbsp;the&nbsp;element&nbsp;is&nbsp;marked&nbsp;as&nbsp;optional</span></div></li>
<li><div class="src-line"><a name="a308"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;thanks&nbsp;to&nbsp;the&nbsp;optional&nbsp;attribute&nbsp;('optional'&nbsp;=&gt;&nbsp;true),&nbsp;an&nbsp;icon</span></div></li>
<li><div class="src-line"><a name="a309"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;is&nbsp;printed&nbsp;after&nbsp;the&nbsp;input&nbsp;element&nbsp;indicating&nbsp;that&nbsp;its&nbsp;value&nbsp;is</span></div></li>
<li><div class="src-line"><a name="a310"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;mandatory.</span></div></li>
<li><div class="src-line"><a name="a311"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a312"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$type&nbsp;</span><span class="src-doc">type&nbsp;of&nbsp;the&nbsp;input&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a313"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$name&nbsp;</span><span class="src-doc">name&nbsp;of&nbsp;the&nbsp;input&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a314"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$label&nbsp;</span><span class="src-doc">label&nbsp;of&nbsp;the&nbsp;input&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a315"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$value&nbsp;</span><span class="src-doc">default&nbsp;value&nbsp;of&nbsp;the&nbsp;input&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a316"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">array&nbsp;</span><span class="src-doc-var">$attributes&nbsp;</span><span class="src-doc">optional&nbsp;associative&nbsp;array&nbsp;containing</span></div></li>
<li><div class="src-line"><a name="a317"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;other&nbsp;attributes&nbsp;of&nbsp;the&nbsp;input&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a318"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a319"></a>&nbsp;&nbsp;<span class="src-key">private&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><span class="src-id">print_input</span><span class="src-sym">(</span><span class="src-var">$type</span><span class="src-sym">,&nbsp;</span><span class="src-var">$name</span><span class="src-sym">,&nbsp;</span><span class="src-var">$label</span><span class="src-sym">,&nbsp;</span><span class="src-var">$value</span><span class="src-sym">,&nbsp;</span><span class="src-var">$attributes&nbsp;</span>=&nbsp;<span class="src-id">null</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a320"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_element</span><span class="src-sym">(</span><span class="src-str">'div'</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'class'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'form'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a321"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$label</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a322"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'label'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$label</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'for'&nbsp;</span>=&gt;&nbsp;<span class="src-var">$name</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a323"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a324"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$attributes</span><span class="src-sym">[</span><span class="src-str">'type'</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$type</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a325"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$attributes</span><span class="src-sym">[</span><span class="src-str">'id'</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$name</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a326"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$attributes</span><span class="src-sym">[</span><span class="src-str">'name'</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$name</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a327"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$attributes</span><span class="src-sym">[</span><span class="src-str">'value'</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodencode">encode</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a328"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'input'</span><span class="src-sym">,&nbsp;</span><span class="src-id">null</span><span class="src-sym">,&nbsp;</span><span class="src-var">$attributes</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a329"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!&nbsp;</span><span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$attributes</span><span class="src-sym">,&nbsp;</span><span class="src-str">'optional'</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a330"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../swam/Icon.html">Icon</a></span><span class="src-sym">::</span><span class="src-var">$REQUIRED_FIELD_ICON</span><span class="src-sym">-&gt;</span><span class="src-id">print_img</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a331"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a332"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_element</span><span class="src-sym">(</span><span class="src-str">'div'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a333"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a334"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a335"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a336"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Prints&nbsp;an&nbsp;hidden&nbsp;text&nbsp;input&nbsp;and&nbsp;a&nbsp;JavaScript&nbsp;calendar&nbsp;allowing&nbsp;to</span></div></li>
<li><div class="src-line"><a name="a337"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;choose&nbsp;a&nbsp;date.</span></div></li>
<li><div class="src-line"><a name="a338"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a339"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$date&nbsp;</span><span class="src-doc">default&nbsp;date&nbsp;in&nbsp;YYYY-MM-DD&nbsp;format.</span></div></li>
<li><div class="src-line"><a name="a340"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a341"></a>&nbsp;&nbsp;<span class="src-key">private&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><span class="src-id">print_input_date</span><span class="src-sym">(</span><span class="src-var">$date</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a342"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'label'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Date:'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a343"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_hidden_input</span><span class="src-sym">(</span><span class="src-str">'date'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$date</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a344"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_element</span><span class="src-sym">(</span><span class="src-str">'table'</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'class'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'calendarContainer'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a345"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_element</span><span class="src-sym">(</span><span class="src-str">'tr'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a346"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_element</span><span class="src-sym">(</span><span class="src-str">'td'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a347"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$tab&nbsp;</span>=&nbsp;<a href="http://www.php.net/explode">explode</a><span class="src-sym">(</span><span class="src-str">'-'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$date</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a348"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_element</span><span class="src-sym">(</span><span class="src-str">'div'</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'id'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'calendar'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a349"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$code&nbsp;</span>=&nbsp;<a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">'document.write(get_calendar(%u,&nbsp;%u,&nbsp;%u));'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$tab</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]&nbsp;</span>-&nbsp;<span class="src-num">1</span><span class="src-sym">,&nbsp;</span><span class="src-var">$tab</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">,&nbsp;</span><span class="src-var">$tab</span><span class="src-sym">[</span><span class="src-num">2</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a350"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_javascript</span><span class="src-sym">(</span><span class="src-var">$code</span><span class="src-sym">,&nbsp;</span><span class="src-str">'&lt;p&nbsp;class=&quot;information&quot;&gt;'&nbsp;</span>.&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Please&nbsp;enable&nbsp;JavaScript&nbsp;to&nbsp;display&nbsp;date&nbsp;input&nbsp;field.'</span><span class="src-sym">)&nbsp;</span>.&nbsp;<span class="src-str">'&lt;/p&gt;'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a351"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_element</span><span class="src-sym">(</span><span class="src-str">'div'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a352"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_element</span><span class="src-sym">(</span><span class="src-str">'td'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a353"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_element</span><span class="src-sym">(</span><span class="src-str">'td'</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'style'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'padding-left:&nbsp;8px'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a354"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../swam/Icon.html">Icon</a></span><span class="src-sym">::</span><span class="src-var">$REQUIRED_FIELD_ICON</span><span class="src-sym">-&gt;</span><span class="src-id">print_img</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a355"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_element</span><span class="src-sym">(</span><span class="src-str">'td'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a356"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_element</span><span class="src-sym">(</span><span class="src-str">'tr'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a357"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_element</span><span class="src-sym">(</span><span class="src-str">'table'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a358"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a359"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a360"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a361"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Prints&nbsp;a&nbsp;textarea&nbsp;input&nbsp;element.&nbsp;Unless&nbsp;the&nbsp;element&nbsp;is&nbsp;marked&nbsp;as</span></div></li>
<li><div class="src-line"><a name="a362"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;optional&nbsp;thanks&nbsp;to&nbsp;the&nbsp;optional&nbsp;attribute&nbsp;('optional'&nbsp;=&gt;&nbsp;true),</span></div></li>
<li><div class="src-line"><a name="a363"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;an&nbsp;icon&nbsp;is&nbsp;printed&nbsp;after&nbsp;the&nbsp;input&nbsp;element&nbsp;indicating&nbsp;that&nbsp;its</span></div></li>
<li><div class="src-line"><a name="a364"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;value&nbsp;is&nbsp;mandatory.</span></div></li>
<li><div class="src-line"><a name="a365"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a366"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$name&nbsp;</span><span class="src-doc">name&nbsp;of&nbsp;the&nbsp;textarea&nbsp;input&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a367"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$label&nbsp;</span><span class="src-doc">label&nbsp;of&nbsp;the&nbsp;textarea&nbsp;input&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a368"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$value&nbsp;</span><span class="src-doc">default&nbsp;value&nbsp;of&nbsp;the&nbsp;textarea&nbsp;input&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a369"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">integer&nbsp;</span><span class="src-doc-var">$cols&nbsp;</span><span class="src-doc">number&nbsp;of&nbsp;columns&nbsp;of&nbsp;the&nbsp;textarea&nbsp;input&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a370"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">integer&nbsp;</span><span class="src-doc-var">$rows&nbsp;</span><span class="src-doc">number&nbsp;of&nbsp;rows&nbsp;of&nbsp;the&nbsp;textarea&nbsp;input&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a371"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">array&nbsp;</span><span class="src-doc-var">$attributes&nbsp;</span><span class="src-doc">optional&nbsp;associative&nbsp;array&nbsp;containing</span></div></li>
<li><div class="src-line"><a name="a372"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;other&nbsp;attributes&nbsp;of&nbsp;the&nbsp;textarea&nbsp;input&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a373"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a374"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/HTML.html#methodprint_textarea">print_textarea</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">,&nbsp;</span><span class="src-var">$label</span><span class="src-sym">,&nbsp;</span><span class="src-var">$value</span><span class="src-sym">,&nbsp;</span><span class="src-var">$cols</span><span class="src-sym">,&nbsp;</span><span class="src-var">$rows</span><span class="src-sym">,&nbsp;</span><span class="src-var">$attributes&nbsp;</span>=&nbsp;<span class="src-id">null</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a375"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_element</span><span class="src-sym">(</span><span class="src-str">'div'</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'class'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'form'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a376"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$label</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a377"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'label'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$label</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'for'&nbsp;</span>=&gt;&nbsp;<span class="src-var">$name</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a378"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a379"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$attributes</span><span class="src-sym">[</span><span class="src-str">'id'</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$name</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a380"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$attributes</span><span class="src-sym">[</span><span class="src-str">'name'</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$name</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a381"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$attributes</span><span class="src-sym">[</span><span class="src-str">'cols'</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$cols</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a382"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$attributes</span><span class="src-sym">[</span><span class="src-str">'rows'</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$rows</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a383"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$encoded_value&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodencode">encode</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a384"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'textarea'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$encoded_value</span><span class="src-sym">,&nbsp;</span><span class="src-var">$attributes</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a385"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!&nbsp;</span><span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$attributes</span><span class="src-sym">,&nbsp;</span><span class="src-str">'optional'</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a386"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../swam/Icon.html">Icon</a></span><span class="src-sym">::</span><span class="src-var">$REQUIRED_FIELD_ICON</span><span class="src-sym">-&gt;</span><span class="src-id">print_img</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a387"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a388"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_element</span><span class="src-sym">(</span><span class="src-str">'div'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a389"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a390"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a391"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a392"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Prints&nbsp;a&nbsp;checkbox&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a393"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a394"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$name&nbsp;</span><span class="src-doc">name&nbsp;of&nbsp;the&nbsp;checkbox&nbsp;input&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a395"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$value&nbsp;</span><span class="src-doc">default&nbsp;selected&nbsp;value&nbsp;of&nbsp;the&nbsp;checkbox&nbsp;input&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a396"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">array&nbsp;</span><span class="src-doc-var">$attributes&nbsp;</span><span class="src-doc">optional&nbsp;associative&nbsp;array&nbsp;containing</span></div></li>
<li><div class="src-line"><a name="a397"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;other&nbsp;attributes&nbsp;of&nbsp;the&nbsp;checkbox&nbsp;input&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a398"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a399"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/HTML.html#methodprint_checkbox">print_checkbox</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">,&nbsp;</span><span class="src-var">$value</span><span class="src-sym">,&nbsp;</span><span class="src-var">$attributes&nbsp;</span>=&nbsp;<span class="src-id">null</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a400"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_element</span><span class="src-sym">(</span><span class="src-str">'div'</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'class'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'form'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a401"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$attributes</span><span class="src-sym">[</span><span class="src-str">'type'</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-str">'checkbox'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a402"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$attributes</span><span class="src-sym">[</span><span class="src-str">'name'</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$name</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a403"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$attributes</span><span class="src-sym">[</span><span class="src-str">'value'</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodencode">encode</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a404"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'input'</span><span class="src-sym">,&nbsp;</span><span class="src-id">null</span><span class="src-sym">,&nbsp;</span><span class="src-var">$attributes</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a405"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!&nbsp;</span><span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$attributes</span><span class="src-sym">,&nbsp;</span><span class="src-str">'optional'</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a406"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../swam/Icon.html">Icon</a></span><span class="src-sym">::</span><span class="src-var">$REQUIRED_FIELD_ICON</span><span class="src-sym">-&gt;</span><span class="src-id">print_img</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a407"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a408"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_element</span><span class="src-sym">(</span><span class="src-str">'div'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a409"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a410"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a411"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a412"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Prints&nbsp;a&nbsp;combobox&nbsp;input&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a413"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a414"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$name&nbsp;</span><span class="src-doc">name&nbsp;of&nbsp;the&nbsp;combobox&nbsp;input&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a415"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$label&nbsp;</span><span class="src-doc">label&nbsp;of&nbsp;the&nbsp;combobox&nbsp;input&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a416"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$legend&nbsp;</span><span class="src-doc">legend&nbsp;of&nbsp;the&nbsp;combobox&nbsp;input&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a417"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$selected_key&nbsp;</span><span class="src-doc">key&nbsp;identifying&nbsp;the&nbsp;default&nbsp;selected</span></div></li>
<li><div class="src-line"><a name="a418"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;value&nbsp;of&nbsp;the&nbsp;combobox.</span></div></li>
<li><div class="src-line"><a name="a419"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">array&nbsp;</span><span class="src-doc-var">$values&nbsp;</span><span class="src-doc">associative&nbsp;array&nbsp;('key'&nbsp;=&gt;&nbsp;&lt;value&gt;')</span></div></li>
<li><div class="src-line"><a name="a420"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;defines&nbsp;the&nbsp;elements&nbsp;of&nbsp;the&nbsp;combobox.</span></div></li>
<li><div class="src-line"><a name="a421"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">boolean&nbsp;</span><span class="src-doc-var">$include_key&nbsp;</span><span class="src-doc">optional&nbsp;boolean&nbsp;indicating&nbsp;if&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a422"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;key&nbsp;must&nbsp;be&nbsp;displayed.</span></div></li>
<li><div class="src-line"><a name="a423"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">array&nbsp;</span><span class="src-doc-var">$attributes&nbsp;</span><span class="src-doc">optional&nbsp;associative&nbsp;array&nbsp;containing</span></div></li>
<li><div class="src-line"><a name="a424"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;other&nbsp;attributes&nbsp;of&nbsp;the&nbsp;combobox&nbsp;input&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a425"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a426"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/HTML.html#methodprint_select">print_select</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">,&nbsp;</span><span class="src-var">$label</span><span class="src-sym">,&nbsp;</span><span class="src-var">$legend</span><span class="src-sym">,&nbsp;</span><span class="src-var">$selected_key</span><span class="src-sym">,&nbsp;</span><span class="src-var">$values</span><span class="src-sym">,&nbsp;</span><span class="src-var">$include_key&nbsp;</span>=&nbsp;<span class="src-id">false</span><span class="src-sym">,&nbsp;</span><span class="src-var">$attributes&nbsp;</span>=&nbsp;<span class="src-id">null</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a427"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_element</span><span class="src-sym">(</span><span class="src-str">'div'</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'class'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'form'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a428"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$label</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a429"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'label'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$label</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'for'&nbsp;</span>=&gt;&nbsp;<span class="src-var">$name</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a430"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a431"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$attributes</span><span class="src-sym">[</span><span class="src-str">'id'</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$name</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a432"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$attributes</span><span class="src-sym">[</span><span class="src-str">'name'</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$name</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a433"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_element</span><span class="src-sym">(</span><span class="src-str">'select'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$attributes</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a434"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$legend</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a435"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'option'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$legend</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'value'&nbsp;</span>=&gt;&nbsp;<span class="src-str">''</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a436"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a437"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">while&nbsp;</span><span class="src-sym">(</span>list<span class="src-sym">(</span><span class="src-var">$key</span><span class="src-sym">,&nbsp;</span><span class="src-var">$value</span><span class="src-sym">)&nbsp;</span>=&nbsp;<a href="http://www.php.net/each">each</a><span class="src-sym">(</span><span class="src-var">$values</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a438"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$include_key&nbsp;</span>==&nbsp;<span class="src-id">true</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a439"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$value&nbsp;</span>.=&nbsp;<span class="src-str">&quot;</span><span class="src-str">&nbsp;(<span class="src-var">$key</span>)</span><span class="src-str">&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a440"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a441"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$attributes&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'value'&nbsp;</span>=&gt;&nbsp;<span class="src-var">$key</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a442"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$key&nbsp;</span>==&nbsp;<span class="src-var">$selected_key</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a443"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$attributes</span><span class="src-sym">[</span><span class="src-str">'selected'</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-str">'selected'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a444"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a445"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$encoded_value&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodencode">encode</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a446"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'option'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$encoded_value</span><span class="src-sym">,&nbsp;</span><span class="src-var">$attributes</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a447"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a448"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_element</span><span class="src-sym">(</span><span class="src-str">'select'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a449"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a450"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!&nbsp;</span><span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$attributes</span><span class="src-sym">,&nbsp;</span><span class="src-str">'optional'</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a451"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../swam/Icon.html">Icon</a></span><span class="src-sym">::</span><span class="src-var">$REQUIRED_FIELD_ICON</span><span class="src-sym">-&gt;</span><span class="src-id">print_img</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a452"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a453"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_element</span><span class="src-sym">(</span><span class="src-str">'div'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a454"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a455"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a456"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a457"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Prints&nbsp;the&nbsp;SWAM&nbsp;menu.</span></div></li>
<li><div class="src-line"><a name="a458"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a459"></a>&nbsp;&nbsp;<span class="src-key">private&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><span class="src-id">print_menu</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a460"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_element</span><span class="src-sym">(</span><span class="src-str">'div'</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'id'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'menu'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a461"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a462"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_element</span><span class="src-sym">(</span><span class="src-str">'div'</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'class'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'roundcontent'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a463"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_element</span><span class="src-sym">(</span><span class="src-str">'div'</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'class'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'roundtop'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a464"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_img</span><span class="src-sym">(</span><span class="src-str">'media/images/corners/tl.gif'</span><span class="src-sym">,&nbsp;</span><span class="src-num">15</span><span class="src-sym">,&nbsp;</span><span class="src-num">15</span><span class="src-sym">,&nbsp;</span><span class="src-str">''</span><span class="src-sym">,&nbsp;</span><span class="src-id">null</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'class'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'corner'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'style'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'display:&nbsp;none'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a465"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_element</span><span class="src-sym">(</span><span class="src-str">'div'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a466"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a467"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$user&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/User.html">User</a></span><span class="src-sym">::</span><a href="../swam/User.html#methodget_logged_in_user">get_logged_in_user</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a468"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/is_null">is_null</a><span class="src-sym">(</span><span class="src-var">$user</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a469"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'p'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'&lt;i&gt;'&nbsp;</span>.&nbsp;<a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Welcome&nbsp;%s!'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodencode">encode</a><span class="src-sym">(</span><span class="src-var">$user</span><span class="src-sym">-&gt;</span><span class="src-id">get_first_name</span><span class="src-sym">(</span><span class="src-sym">)))&nbsp;</span>.&nbsp;<span class="src-str">'&lt;/i&gt;'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a470"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a471"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a472"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Get&nbsp;path</span></div></li>
<li><div class="src-line"><a name="a473"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$uri_array&nbsp;</span>=&nbsp;<a href="http://www.php.net/parse_url">parse_url</a><span class="src-sym">(</span><span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">get_protocol_in_use</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span>.&nbsp;<span class="src-var">$_SERVER</span><span class="src-sym">[</span><span class="src-str">'HTTP_HOST'</span><span class="src-sym">]&nbsp;</span>.&nbsp;<span class="src-var">$_SERVER</span><span class="src-sym">[</span><span class="src-str">'PHP_SELF'</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a474"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$path&nbsp;</span>=&nbsp;<span class="src-var">$uri_array</span><span class="src-sym">[</span><span class="src-str">'path'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a475"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$path&nbsp;</span>=&nbsp;<a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$path</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-id"><a href="../swam/_config.inc.html#defineSWAM_ROOT_PATH">SWAM_ROOT_PATH</a></span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$path</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a476"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a477"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;SWAM&nbsp;menu</span></div></li>
<li><div class="src-line"><a name="a478"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_element</span><span class="src-sym">(</span><span class="src-str">'p'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a479"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'strong'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'SWAM'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a480"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'br'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a481"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$class&nbsp;</span>=&nbsp;<span class="src-sym">(</span><span class="src-var">$path&nbsp;</span>==&nbsp;<span class="src-str">'/index.php'</span><span class="src-sym">)&nbsp;</span>?&nbsp;<span class="src-str">'selectedMenu'&nbsp;</span>:&nbsp;<span class="src-str">'menu'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a482"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'a'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Home&nbsp;Page'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'href'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'index.php'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'class'&nbsp;</span>=&gt;&nbsp;<span class="src-var">$class</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a483"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'br'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a484"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$class&nbsp;</span>=&nbsp;<span class="src-sym">(</span><span class="src-var">$path&nbsp;</span>==&nbsp;<span class="src-str">'/icons.php'</span><span class="src-sym">)&nbsp;</span>?&nbsp;<span class="src-str">'selectedMenu'&nbsp;</span>:&nbsp;<span class="src-str">'menu'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a485"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'a'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Icon&nbsp;Legend'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'href'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'icons.php'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'class'&nbsp;</span>=&gt;&nbsp;<span class="src-var">$class</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a486"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'br'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a487"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$class&nbsp;</span>=&nbsp;<span class="src-sym">(</span><span class="src-var">$path&nbsp;</span>==&nbsp;<span class="src-str">'/about.php'</span><span class="src-sym">)&nbsp;</span>?&nbsp;<span class="src-str">'selectedMenu'&nbsp;</span>:&nbsp;<span class="src-str">'menu'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a488"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'a'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'About&nbsp;SWAM'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'href'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'about.php'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'class'&nbsp;</span>=&gt;&nbsp;<span class="src-var">$class</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a489"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_element</span><span class="src-sym">(</span><span class="src-str">'p'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a490"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a491"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;My&nbsp;SWAM&nbsp;menu</span></div></li>
<li><div class="src-line"><a name="a492"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_element</span><span class="src-sym">(</span><span class="src-str">'p'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a493"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'strong'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'My&nbsp;SWAM'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a494"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'br'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a495"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><a href="http://www.php.net/is_null">is_null</a><span class="src-sym">(</span><span class="src-var">$user</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a496"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$class&nbsp;</span>=&nbsp;<span class="src-sym">((</span><span class="src-var">$path&nbsp;</span>==&nbsp;<span class="src-str">'/my/signIn.php'</span><span class="src-sym">)&nbsp;</span>||&nbsp;<span class="src-sym">(</span><span class="src-var">$path&nbsp;</span>==&nbsp;<span class="src-str">'/my/registration/changePassword.php'</span><span class="src-sym">)&nbsp;</span>||&nbsp;<span class="src-sym">(</span><span class="src-var">$path&nbsp;</span>==&nbsp;<span class="src-str">'/my/registration/retrievePassword.php'</span><span class="src-sym">))&nbsp;</span>?&nbsp;<span class="src-str">'selectedMenu'&nbsp;</span>:&nbsp;<span class="src-str">'menu'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a497"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'a'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Sign&nbsp;In'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'href'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'my/signIn.php'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'class'&nbsp;</span>=&gt;&nbsp;<span class="src-var">$class</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a498"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'br'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a499"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-id"><a href="../swam/_config.inc.html#defineSWAM_ALLOW_NEW_REGISTRATION">SWAM_ALLOW_NEW_REGISTRATION</a>&nbsp;</span>==&nbsp;<span class="src-id">true</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a500"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$class&nbsp;</span>=&nbsp;<span class="src-sym">((</span><span class="src-var">$path&nbsp;</span>==&nbsp;<span class="src-str">'/my/registration/create.php'</span><span class="src-sym">)&nbsp;</span>||&nbsp;<span class="src-sym">(</span><span class="src-var">$path&nbsp;</span>==&nbsp;<span class="src-str">'/my/registration/confirm.php'</span><span class="src-sym">))&nbsp;</span>?&nbsp;<span class="src-str">'selectedMenu'&nbsp;</span>:&nbsp;<span class="src-str">'menu'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a501"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'a'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Register'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'href'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'my/registration/create.php'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'class'&nbsp;</span>=&gt;&nbsp;<span class="src-var">$class</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a502"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a503"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a504"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$class&nbsp;</span>=&nbsp;<span class="src-sym">((</span><span class="src-var">$path&nbsp;</span>==&nbsp;<span class="src-str">'/my/accounts/print.php'</span><span class="src-sym">)&nbsp;</span>||</div></li>
<li><div class="src-line"><a name="a505"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">(</span><span class="src-var">$path&nbsp;</span>==&nbsp;<span class="src-str">'/my/accounts/create.php'</span><span class="src-sym">)&nbsp;</span>||</div></li>
<li><div class="src-line"><a name="a506"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">(</span><span class="src-var">$path&nbsp;</span>==&nbsp;<span class="src-str">'/my/accounts/edit.php'</span><span class="src-sym">)&nbsp;</span>||</div></li>
<li><div class="src-line"><a name="a507"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">(</span><span class="src-var">$path&nbsp;</span>==&nbsp;<span class="src-str">'/my/transactions/create.php'</span><span class="src-sym">)&nbsp;</span>||</div></li>
<li><div class="src-line"><a name="a508"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">(</span><span class="src-var">$path&nbsp;</span>==&nbsp;<span class="src-str">'/my/transactions/edit.php'</span><span class="src-sym">)&nbsp;</span>||</div></li>
<li><div class="src-line"><a name="a509"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">(</span><span class="src-var">$path&nbsp;</span>==&nbsp;<span class="src-str">'/my/transactions/print.php'</span><span class="src-sym">)&nbsp;</span>||</div></li>
<li><div class="src-line"><a name="a510"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">(</span><span class="src-var">$path&nbsp;</span>==&nbsp;<span class="src-str">'/my/transactions/validate.php'</span><span class="src-sym">)&nbsp;</span>||</div></li>
<li><div class="src-line"><a name="a511"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">(</span><span class="src-var">$path&nbsp;</span>==&nbsp;<span class="src-str">'/my/transactions/transfer.php'</span><span class="src-sym">))&nbsp;</span>?&nbsp;<span class="src-str">'selectedMenu'&nbsp;</span>:&nbsp;<span class="src-str">'menu'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a512"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'a'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'My&nbsp;Accounts'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'href'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'my/accounts/print.php'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'class'&nbsp;</span>=&gt;&nbsp;<span class="src-var">$class</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a513"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'br'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a514"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$class&nbsp;</span>=&nbsp;<span class="src-sym">((</span><span class="src-var">$path&nbsp;</span>==&nbsp;<span class="src-str">'/my/transactions/templates/print.php'</span><span class="src-sym">)&nbsp;</span>||</div></li>
<li><div class="src-line"><a name="a515"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">(</span><span class="src-var">$path&nbsp;</span>==&nbsp;<span class="src-str">'/my/transactions/templates/create.php'</span><span class="src-sym">)&nbsp;</span>||</div></li>
<li><div class="src-line"><a name="a516"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">(</span><span class="src-var">$path&nbsp;</span>==&nbsp;<span class="src-str">'/my/transactions/templates/edit.php'</span><span class="src-sym">)&nbsp;</span>||</div></li>
<li><div class="src-line"><a name="a517"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">(</span><span class="src-var">$path&nbsp;</span>==&nbsp;<span class="src-str">'/my/transactions/templates/apply.php'</span><span class="src-sym">))&nbsp;</span>?&nbsp;<span class="src-str">'selectedMenu'&nbsp;</span>:&nbsp;<span class="src-str">'menu'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a518"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'a'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'My&nbsp;Templates'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'href'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'my/transactions/templates/print.php'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'class'&nbsp;</span>=&gt;&nbsp;<span class="src-var">$class</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a519"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'br'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a520"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$class&nbsp;</span>=&nbsp;<span class="src-sym">(</span><span class="src-var">$path&nbsp;</span>==&nbsp;<span class="src-str">'/my/registration/edit.php'</span><span class="src-sym">)&nbsp;</span>?&nbsp;<span class="src-str">'selectedMenu'&nbsp;</span>:&nbsp;<span class="src-str">'menu'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a521"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'a'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Edit&nbsp;Profile'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'href'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'my/registration/edit.php'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'class'&nbsp;</span>=&gt;&nbsp;<span class="src-var">$class</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a522"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'br'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a523"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$class&nbsp;</span>=&nbsp;<span class="src-sym">(</span><span class="src-var">$path&nbsp;</span>==&nbsp;<span class="src-str">'/my/signOut.php'</span><span class="src-sym">)&nbsp;</span>?&nbsp;<span class="src-str">'selectedMenu'&nbsp;</span>:&nbsp;<span class="src-str">'menu'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a524"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'a'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Sign&nbsp;Out'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'href'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'my/signOut.php'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'class'&nbsp;</span>=&gt;&nbsp;<span class="src-var">$class</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a525"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a526"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_element</span><span class="src-sym">(</span><span class="src-str">'p'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a527"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a528"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_element</span><span class="src-sym">(</span><span class="src-str">'div'</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'class'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'roundbottom'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a529"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_img</span><span class="src-sym">(</span><span class="src-str">'media/images/corners/bl.gif'</span><span class="src-sym">,&nbsp;</span><span class="src-num">15</span><span class="src-sym">,&nbsp;</span><span class="src-num">15</span><span class="src-sym">,&nbsp;</span><span class="src-str">''</span><span class="src-sym">,&nbsp;</span><span class="src-id">null</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'class'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'corner'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'style'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'display:&nbsp;none'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a530"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_element</span><span class="src-sym">(</span><span class="src-str">'div'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a531"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_element</span><span class="src-sym">(</span><span class="src-str">'div'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a532"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a533"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Logos</span></div></li>
<li><div class="src-line"><a name="a534"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_element</span><span class="src-sym">(</span><span class="src-str">'p'</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'style'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'margin-top:&nbsp;20px;&nbsp;text-align:&nbsp;center'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a535"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_img</span><span class="src-sym">(</span><span class="src-str">'media/images/logos/sourceforge.png'</span><span class="src-sym">,&nbsp;</span><span class="src-num">88</span><span class="src-sym">,&nbsp;</span><span class="src-num">31</span><span class="src-sym">,&nbsp;</span><span class="src-str">'SourceForge.net'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'http://sourceforge.net/'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a536"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_img</span><span class="src-sym">(</span><span class="src-str">'media/images/logos/linuxlinks.gif'</span><span class="src-sym">,&nbsp;</span><span class="src-num">86</span><span class="src-sym">,&nbsp;</span><span class="src-num">28</span><span class="src-sym">,&nbsp;</span><span class="src-str">'Linux&nbsp;Links'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'http://www.linuxlinks.com/'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a537"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_element</span><span class="src-sym">(</span><span class="src-str">'p'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a538"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a539"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_element</span><span class="src-sym">(</span><span class="src-str">'div'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a540"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a541"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a542"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/HTML.html#methodprint_javascript">print_javascript</a><span class="src-sym">(</span><span class="src-var">$code</span><span class="src-sym">,&nbsp;</span><span class="src-var">$noscript</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a543"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_element</span><span class="src-sym">(</span><span class="src-str">'script'</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'type'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'text/javascript'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a544"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_text</span><span class="src-sym">(</span><span class="src-str">&quot;&lt;!--&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a545"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_text</span><span class="src-sym">(</span><span class="src-var">$code</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a546"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_text</span><span class="src-sym">(</span><span class="src-str">&quot;--&gt;&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a547"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_element</span><span class="src-sym">(</span><span class="src-str">'script'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a548"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_element</span><span class="src-sym">(</span><span class="src-str">'object'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a549"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_element</span><span class="src-sym">(</span><span class="src-str">'noscript'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a550"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_text</span><span class="src-sym">(</span><span class="src-var">$noscript</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a551"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_element</span><span class="src-sym">(</span><span class="src-str">'noscript'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a552"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_element</span><span class="src-sym">(</span><span class="src-str">'object'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a553"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a554"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a555"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a556"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Prints&nbsp;the&nbsp;header&nbsp;of&nbsp;all&nbsp;SWAM&nbsp;pages.</span></div></li>
<li><div class="src-line"><a name="a557"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a558"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;TODO:&nbsp;add&nbsp;favicon.ico</span></div></li>
<li><div class="src-line"><a name="a559"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;link&nbsp;type=&quot;image/x-icon&quot;&nbsp;href=&quot;media/favicon.ico&quot;&nbsp;rel=&quot;icon&quot;&nbsp;/&gt;</span></div></li>
<li><div class="src-line"><a name="a560"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;link&nbsp;type=&quot;image/x-icon&quot;&nbsp;href=&quot;media/favicon.ico&quot;&nbsp;rel=&quot;shortcut&nbsp;icon&quot;&nbsp;/&gt;</span></div></li>
<li><div class="src-line"><a name="a561"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a562"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$title&nbsp;</span><span class="src-doc">page&nbsp;title.</span></div></li>
<li><div class="src-line"><a name="a563"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">array&nbsp;</span><span class="src-doc-var">$page_path&nbsp;</span><span class="src-doc">optional&nbsp;associative&nbsp;array&nbsp;defining&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a564"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;path&nbsp;to&nbsp;the&nbsp;page&nbsp;to&nbsp;print&nbsp;(&lt;href&gt;&nbsp;=&gt;&nbsp;&lt;page&gt;).</span></div></li>
<li><div class="src-line"><a name="a565"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a566"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/HTML.html#methodprint_header">print_header</a><span class="src-sym">(</span><span class="src-var">$title</span><span class="src-sym">,&nbsp;</span><span class="src-var">$page_path&nbsp;</span>=&nbsp;<span class="src-id">null</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a567"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Prevent&nbsp;to&nbsp;print&nbsp;header&nbsp;twice&nbsp;when&nbsp;an&nbsp;error&nbsp;is&nbsp;catched</span></div></li>
<li><div class="src-line"><a name="a568"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-id">self</span><span class="src-sym">::</span><span class="src-var">$header_printed</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a569"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a570"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a571"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_text</span><span class="src-sym">(</span><span class="src-str">'&lt;?xml&nbsp;version=&quot;1.0&quot;&nbsp;encoding=&quot;'&nbsp;</span>.&nbsp;<span class="src-id"><a href="../swam/_constants.inc.html#defineSWAM_CHARSET">SWAM_CHARSET</a>&nbsp;</span>.&nbsp;<span class="src-str">'&quot;?&gt;'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a572"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_text</span><span class="src-sym">(</span><span class="src-str">'&lt;!DOCTYPE&nbsp;html&nbsp;PUBLIC&nbsp;&quot;-//W3C//DTD&nbsp;XHTML&nbsp;1.0&nbsp;Strict//EN&quot;&nbsp;&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a573"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$language&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_language">get_language</a><span class="src-sym">(</span><span class="src-id"><a href="../swam/_config.inc.html#defineSWAM_LOCALE">SWAM_LOCALE</a></span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a574"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_element</span><span class="src-sym">(</span><span class="src-str">'html'</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'xmlns'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'http://www.w3.org/1999/xhtml'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'lang'&nbsp;</span>=&gt;&nbsp;<span class="src-var">$language</span><span class="src-sym">,&nbsp;</span><span class="src-str">'xml:lang'&nbsp;</span>=&gt;&nbsp;<span class="src-var">$language</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a575"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_text</span><span class="src-sym">(</span><span class="src-str">'&lt;?xml-stylesheet&nbsp;href=&quot;media/css/default.css&quot;&nbsp;type=&quot;text/css&quot;?&gt;'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a576"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_element</span><span class="src-sym">(</span><span class="src-str">'head'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a577"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'title'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'SWAM&nbsp;-&nbsp;'&nbsp;</span>.&nbsp;<span class="src-var">$title</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a578"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'meta'</span><span class="src-sym">,&nbsp;</span><span class="src-id">null</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'http-equiv'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'Content-Type'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'content'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'text/html;&nbsp;charset='&nbsp;</span>.&nbsp;<span class="src-id"><a href="../swam/_constants.inc.html#defineSWAM_CHARSET">SWAM_CHARSET</a></span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a579"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'meta'</span><span class="src-sym">,&nbsp;</span><span class="src-id">null</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'name'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'Description'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'content'&nbsp;</span>=&gt;&nbsp;<span class="src-id"><a href="../swam/_constants.inc.html#defineSWAM_META_DESCRIPTION">SWAM_META_DESCRIPTION</a></span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a580"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'meta'</span><span class="src-sym">,&nbsp;</span><span class="src-id">null</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'name'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'Keywords'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'content'&nbsp;</span>=&gt;&nbsp;<span class="src-id"><a href="../swam/_constants.inc.html#defineSWAM_META_KEYWORDS">SWAM_META_KEYWORDS</a></span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a581"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'meta'</span><span class="src-sym">,&nbsp;</span><span class="src-id">null</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'name'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'Robots'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'content'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'index,&nbsp;follow'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a582"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'base'</span><span class="src-sym">,&nbsp;</span><span class="src-id">null</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'href'&nbsp;</span>=&gt;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">get_protocol_in_use</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span>.&nbsp;<span class="src-var">$_SERVER</span><span class="src-sym">[</span><span class="src-str">'SERVER_NAME'</span><span class="src-sym">]&nbsp;</span>.&nbsp;<span class="src-id"><a href="../swam/_config.inc.html#defineSWAM_ROOT_PATH">SWAM_ROOT_PATH</a>&nbsp;</span>.&nbsp;<span class="src-str">'/'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a583"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'link'</span><span class="src-sym">,&nbsp;</span><span class="src-id">null</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'rel'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'stylesheet'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'href'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'media/css/default.css'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a584"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'script'</span><span class="src-sym">,&nbsp;</span><span class="src-str">''</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'type'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'text/javascript'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'src'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'media/js/utils.js'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a585"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_element</span><span class="src-sym">(</span><span class="src-str">'head'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a586"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a587"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_element</span><span class="src-sym">(</span><span class="src-str">'body'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a588"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../swam/Icon.html">Icon</a></span><span class="src-sym">::</span><a href="../swam/Icon.html#methodprint_tooltips">print_tooltips</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a589"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a590"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_element</span><span class="src-sym">(</span><span class="src-str">'div'</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'id'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'page'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a591"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a592"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_element</span><span class="src-sym">(</span><span class="src-str">'div'</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'id'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'top'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a593"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'h1'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'&lt;span&nbsp;class=&quot;logo&quot;&gt;S&lt;/span&gt;imple&nbsp;&lt;span&nbsp;class=&quot;logo&quot;&gt;W&lt;/span&gt;eb&nbsp;&lt;span&nbsp;class=&quot;logo&quot;&gt;A&lt;/span&gt;ccount&nbsp;&lt;span&nbsp;class=&quot;logo&quot;&gt;M&lt;/span&gt;anager'</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'class'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'logo'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a594"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_element</span><span class="src-sym">(</span><span class="src-str">'div'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a595"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a596"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_menu</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a597"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a598"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_element</span><span class="src-sym">(</span><span class="src-str">'div'</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'id'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'content'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a599"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_element</span><span class="src-sym">(</span><span class="src-str">'div'</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'class'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'roundcontent'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a600"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_element</span><span class="src-sym">(</span><span class="src-str">'div'</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'class'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'roundtop'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a601"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_img</span><span class="src-sym">(</span><span class="src-str">'media/images/corners/tl.gif'</span><span class="src-sym">,&nbsp;</span><span class="src-num">15</span><span class="src-sym">,&nbsp;</span><span class="src-num">15</span><span class="src-sym">,&nbsp;</span><span class="src-str">''</span><span class="src-sym">,&nbsp;</span><span class="src-id">null</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'class'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'corner'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'style'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'display:&nbsp;none'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a602"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_element</span><span class="src-sym">(</span><span class="src-str">'div'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a603"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a604"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$page_path&nbsp;</span>!=&nbsp;<span class="src-id">null</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a605"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_page_path</span><span class="src-sym">(</span><span class="src-var">$page_path</span><span class="src-sym">,&nbsp;</span><span class="src-var">$title</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a606"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a607"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'h2'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$title</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a608"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a609"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-var">$header_printed&nbsp;</span>=&nbsp;<span class="src-id">true</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a610"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a611"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a612"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a613"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Prints&nbsp;the&nbsp;footer&nbsp;of&nbsp;all&nbsp;SWAM&nbsp;pages.</span></div></li>
<li><div class="src-line"><a name="a614"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a615"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/HTML.html#methodprint_footer">print_footer</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a616"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_element</span><span class="src-sym">(</span><span class="src-str">'div'</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'class'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'roundbottom'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a617"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_img</span><span class="src-sym">(</span><span class="src-str">'media/images/corners/bl.gif'</span><span class="src-sym">,&nbsp;</span><span class="src-num">15</span><span class="src-sym">,&nbsp;</span><span class="src-num">15</span><span class="src-sym">,&nbsp;</span><span class="src-str">''</span><span class="src-sym">,&nbsp;</span><span class="src-id">null</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'class'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'corner'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'style'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'display:&nbsp;none'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a618"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_element</span><span class="src-sym">(</span><span class="src-str">'div'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a619"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_element</span><span class="src-sym">(</span><span class="src-str">'div'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a620"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a621"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_element</span><span class="src-sym">(</span><span class="src-str">'div'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a622"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_element</span><span class="src-sym">(</span><span class="src-str">'div'</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'id'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'bottom'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a623"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-id"><a href="../swam/_config.inc.html#defineSWAM_WEBMASTER_MAILTO_JAVASCRIPT">SWAM_WEBMASTER_MAILTO_JAVASCRIPT</a>&nbsp;</span>==&nbsp;<span class="src-str">'true'</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a624"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_javascript</span><span class="src-sym">(</span><span class="src-id"><a href="../swam/_config.inc.html#defineSWAM_WEBMASTER_MAILTO">SWAM_WEBMASTER_MAILTO</a></span><span class="src-sym">,&nbsp;</span><span class="src-str">'&lt;p&nbsp;class=&quot;information&quot;&gt;'&nbsp;</span>.&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Please&nbsp;enable&nbsp;JavaScript&nbsp;to&nbsp;display&nbsp;the&nbsp;email&nbsp;of&nbsp;the&nbsp;webmaster.'</span><span class="src-sym">)&nbsp;</span>.&nbsp;<span class="src-str">'&lt;/p&gt;'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a625"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a626"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_text</span><span class="src-sym">(</span><span class="src-id"><a href="../swam/_config.inc.html#defineSWAM_WEBMASTER_MAILTO">SWAM_WEBMASTER_MAILTO</a></span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a627"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a628"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_text</span><span class="src-sym">(</span><span class="src-str">'&nbsp;|&nbsp;'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a629"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_text</span><span class="src-sym">(</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Powered&nbsp;by&nbsp;'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a630"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'a'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'SWAM&nbsp;'&nbsp;</span>.&nbsp;<span class="src-id"><a href="../swam/_constants.inc.html#defineSWAM_VERSION">SWAM_VERSION</a></span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'href'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'about.php'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a631"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_text</span><span class="src-sym">(</span><span class="src-str">'&nbsp;|&nbsp;'&nbsp;</span>.&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Generated&nbsp;at&nbsp;'</span><span class="src-sym">)&nbsp;</span>.&nbsp;<a href="http://www.php.net/date">date</a><span class="src-sym">(</span><span class="src-id">DATE_ISO8601</span><span class="src-sym">)&nbsp;</span>.&nbsp;<span class="src-str">'&nbsp;|&nbsp;'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a632"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'a'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'XHTML'</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'href'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'http://validator.w3.org/check/referer'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'title'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Validate&nbsp;this&nbsp;page&nbsp;as&nbsp;XHTML&nbsp;1.0&nbsp;Strict'</span><span class="src-sym">)))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a633"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_text</span><span class="src-sym">(</span><span class="src-str">'&nbsp;|&nbsp;'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a634"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'a'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'CSS'</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'href'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'http://jigsaw.w3.org/css-validator/check/referer?warning=no&amp;amp;profile=css2'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'title'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Validate&nbsp;the&nbsp;CSS&nbsp;used&nbsp;on&nbsp;this&nbsp;page'</span><span class="src-sym">)))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a635"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_element</span><span class="src-sym">(</span><span class="src-str">'div'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a636"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a637"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_element</span><span class="src-sym">(</span><span class="src-str">'div'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a638"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_element</span><span class="src-sym">(</span><span class="src-str">'body'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a639"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_element</span><span class="src-sym">(</span><span class="src-str">'html'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a640"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a641"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a642"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a643"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Prints&nbsp;the&nbsp;path&nbsp;to&nbsp;the&nbsp;current&nbsp;page.</span></div></li>
<li><div class="src-line"><a name="a644"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a645"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">array&nbsp;</span><span class="src-doc-var">$page_path&nbsp;</span><span class="src-doc">optional&nbsp;associative&nbsp;array&nbsp;defining&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a646"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;path&nbsp;to&nbsp;the&nbsp;page&nbsp;to&nbsp;print&nbsp;(&lt;href&gt;&nbsp;=&gt;&nbsp;&lt;page&gt;).</span></div></li>
<li><div class="src-line"><a name="a647"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$current_page&nbsp;</span><span class="src-doc">current&nbsp;page.</span></div></li>
<li><div class="src-line"><a name="a648"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a649"></a>&nbsp;&nbsp;<span class="src-key">private&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><span class="src-id">print_page_path</span><span class="src-sym">(</span><span class="src-var">$pages</span><span class="src-sym">,&nbsp;</span><span class="src-var">$current_page</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a650"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_element</span><span class="src-sym">(</span><span class="src-str">'p'</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'class'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'small'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a651"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">while&nbsp;</span><span class="src-sym">(</span>list<span class="src-sym">(</span><span class="src-var">$href</span><span class="src-sym">,&nbsp;</span><span class="src-var">$page</span><span class="src-sym">)&nbsp;</span>=&nbsp;<a href="http://www.php.net/each">each</a><span class="src-sym">(</span><span class="src-var">$pages</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a652"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_text</span><span class="src-sym">(</span><span class="src-str">'[&nbsp;&lt;a&nbsp;href=&quot;'&nbsp;</span>.&nbsp;<span class="src-var">$href&nbsp;</span>.&nbsp;<span class="src-str">'&quot;&gt;'&nbsp;</span>.&nbsp;<span class="src-var">$page&nbsp;</span>.&nbsp;<span class="src-str">'&lt;/a&gt;&nbsp;]&nbsp;-&gt;&nbsp;'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a653"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a654"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_text</span><span class="src-sym">(</span><span class="src-str">'[&nbsp;'&nbsp;</span>.&nbsp;<span class="src-var">$current_page&nbsp;</span>.&nbsp;<span class="src-str">'&nbsp;]'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a655"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_element</span><span class="src-sym">(</span><span class="src-str">'p'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a656"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a657"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a658"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a659"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Prints&nbsp;an&nbsp;error&nbsp;message.</span></div></li>
<li><div class="src-line"><a name="a660"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a661"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$message&nbsp;</span><span class="src-doc">error&nbsp;message.</span></div></li>
<li><div class="src-line"><a name="a662"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a663"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/HTML.html#methodprint_error">print_error</a><span class="src-sym">(</span><span class="src-var">$message</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a664"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$message</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a665"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'p'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$message</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'class'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'error'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a666"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a667"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a668"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a669"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a670"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Prints&nbsp;an&nbsp;information&nbsp;message.</span></div></li>
<li><div class="src-line"><a name="a671"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a672"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$message&nbsp;</span><span class="src-doc">error&nbsp;message.</span></div></li>
<li><div class="src-line"><a name="a673"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a674"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/HTML.html#methodprint_information_message">print_information_message</a><span class="src-sym">(</span><span class="src-var">$message</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a675"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$message</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a676"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'p'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$message</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'class'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'information'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a677"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a678"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a679"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a680"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a681"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Prints&nbsp;HTML&nbsp;header&nbsp;in&nbsp;order&nbsp;to&nbsp;perform&nbsp;a&nbsp;redirection&nbsp;to&nbsp;the&nbsp;given&nbsp;URI.</span></div></li>
<li><div class="src-line"><a name="a682"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a683"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$uri&nbsp;</span><span class="src-doc">URI&nbsp;(without&nbsp;SWAM_ROOT_PATH&nbsp;prefix).</span></div></li>
<li><div class="src-line"><a name="a684"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a685"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/HTML.html#methodredirect">redirect</a><span class="src-sym">(</span><span class="src-var">$uri</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a686"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$url_redirection&nbsp;</span>=&nbsp;<span class="src-str">'Location:&nbsp;'&nbsp;</span>.&nbsp;<span class="src-id"><a href="../swam/_config.inc.html#defineSWAM_ROOT_PATH">SWAM_ROOT_PATH</a>&nbsp;</span>.&nbsp;<span class="src-str">'/'&nbsp;</span>.&nbsp;<span class="src-var">$uri</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a687"></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/header">header</a><span class="src-sym">(</span><span class="src-var">$url_redirection</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a688"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a689"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a690"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a691"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Prints&nbsp;a&nbsp;combobox&nbsp;input&nbsp;element&nbsp;including&nbsp;all&nbsp;given&nbsp;accounts.</span></div></li>
<li><div class="src-line"><a name="a692"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a693"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$name&nbsp;</span><span class="src-doc">name&nbsp;of&nbsp;the&nbsp;combobox&nbsp;input&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a694"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc">label&nbsp;of&nbsp;the&nbsp;combobox&nbsp;input&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a695"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">array&nbsp;</span><span class="src-doc-var">$accounts&nbsp;</span><span class="src-doc">the&nbsp;accounts&nbsp;to&nbsp;display.</span></div></li>
<li><div class="src-line"><a name="a696"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$target&nbsp;</span><span class="src-doc">the&nbsp;target&nbsp;script&nbsp;to&nbsp;be&nbsp;executed&nbsp;when&nbsp;user</span></div></li>
<li><div class="src-line"><a name="a697"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;selects&nbsp;an&nbsp;element&nbsp;in&nbsp;the&nbsp;combobox.&nbsp;The&nbsp;target&nbsp;URL&nbsp;is&nbsp;built&nbsp;as&nbsp;follow:</span></div></li>
<li><div class="src-line"><a name="a698"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;SWAM_ROOT_PATH/$target?account_id=&lt;id&gt;.</span></div></li>
<li><div class="src-line"><a name="a699"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">integer&nbsp;</span><span class="src-doc-var">$selected_account_id&nbsp;</span><span class="src-doc">optional&nbsp;id&nbsp;of&nbsp;the&nbsp;selected</span></div></li>
<li><div class="src-line"><a name="a700"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;account.</span></div></li>
<li><div class="src-line"><a name="a701"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">array&nbsp;</span><span class="src-doc-var">$attributes&nbsp;</span><span class="src-doc">optional&nbsp;associative&nbsp;array&nbsp;containing</span></div></li>
<li><div class="src-line"><a name="a702"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;other&nbsp;attributes&nbsp;of&nbsp;the&nbsp;combobox&nbsp;input&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a703"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">boolean&nbsp;</span><span class="src-doc">print_edit_button&nbsp;optional&nbsp;boolean&nbsp;indicating&nbsp;if</span></div></li>
<li><div class="src-line"><a name="a704"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;an&nbsp;edit&nbsp;account&nbsp;button&nbsp;must&nbsp;be&nbsp;displayed&nbsp;after&nbsp;the&nbsp;combobox.</span></div></li>
<li><div class="src-line"><a name="a705"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">boolean&nbsp;</span><span class="src-doc">print_legend&nbsp;optional&nbsp;boolean&nbsp;indicating&nbsp;if&nbsp;a</span></div></li>
<li><div class="src-line"><a name="a706"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;legend&nbsp;must&nbsp;be&nbsp;displayed&nbsp;as&nbsp;first&nbsp;element&nbsp;of&nbsp;the&nbsp;combobox.</span></div></li>
<li><div class="src-line"><a name="a707"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a708"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/HTML.html#methodprint_account_combobox">print_account_combobox</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">,&nbsp;</span><span class="src-var">$label</span><span class="src-sym">,&nbsp;</span><span class="src-var">$accounts</span><span class="src-sym">,&nbsp;</span><span class="src-var">$target</span><span class="src-sym">,&nbsp;</span><span class="src-var">$selected_account_id&nbsp;</span>=&nbsp;<span class="src-id">null</span><span class="src-sym">,&nbsp;</span><span class="src-var">$attributes&nbsp;</span>=&nbsp;<span class="src-id">null</span><span class="src-sym">,&nbsp;</span><span class="src-var">$print_edit_button&nbsp;</span>=&nbsp;<span class="src-id">false</span><span class="src-sym">,&nbsp;</span><span class="src-var">$print_legend&nbsp;</span>=&nbsp;<span class="src-id">true</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a709"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_element</span><span class="src-sym">(</span><span class="src-str">'div'</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'class'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'form'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a710"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'label'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$label</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'for'&nbsp;</span>=&gt;&nbsp;<span class="src-var">$name</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a711"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$attributes</span><span class="src-sym">[</span><span class="src-str">'id'</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$name</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a712"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$attributes</span><span class="src-sym">[</span><span class="src-str">'name'</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$name</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a713"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$attributes</span><span class="src-sym">[</span><span class="src-str">'size'</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-num">1</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a714"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_element</span><span class="src-sym">(</span><span class="src-str">'select'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$attributes</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a715"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$print_legend</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a716"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'option'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Please&nbsp;select&nbsp;an&nbsp;account'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'value'&nbsp;</span>=&gt;&nbsp;<span class="src-str">''</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a717"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a718"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">foreach&nbsp;</span><span class="src-sym">(</span><span class="src-var">$accounts&nbsp;</span><span class="src-key">as&nbsp;</span><span class="src-var">$account</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a719"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$selected&nbsp;</span>=&nbsp;<span class="src-sym">(</span><span class="src-var">$account</span><span class="src-sym">-&gt;</span><span class="src-id">get_id</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span>==&nbsp;<span class="src-var">$selected_account_id</span><span class="src-sym">)&nbsp;</span>?&nbsp;<span class="src-str">'&nbsp;selected=&quot;selected&quot;'&nbsp;</span>:&nbsp;<span class="src-str">''</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a720"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$target</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a721"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_text</span><span class="src-sym">(</span><a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">'&lt;option&nbsp;value=&quot;%s&quot;%s&gt;%s&lt;/option&gt;'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$account</span><span class="src-sym">-&gt;</span><span class="src-id">get_id</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$selected</span><span class="src-sym">,&nbsp;</span><span class="src-var">$account</span><span class="src-sym">-&gt;</span><span class="src-id">get_name</span><span class="src-sym">(</span><span class="src-sym">)))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a722"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a723"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_text</span><span class="src-sym">(</span><a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">'&lt;option&nbsp;value=&quot;%s/%s?account_id=%s&quot;%s&gt;%s&lt;/option&gt;'</span><span class="src-sym">,&nbsp;</span><span class="src-id"><a href="../swam/_config.inc.html#defineSWAM_ROOT_PATH">SWAM_ROOT_PATH</a></span><span class="src-sym">,&nbsp;</span><span class="src-var">$target</span><span class="src-sym">,&nbsp;</span><span class="src-var">$account</span><span class="src-sym">-&gt;</span><span class="src-id">get_id</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$selected</span><span class="src-sym">,&nbsp;</span><span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodencode">encode</a><span class="src-sym">(</span><span class="src-var">$account</span><span class="src-sym">-&gt;</span><span class="src-id">get_name</span><span class="src-sym">(</span><span class="src-sym">))))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a724"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a725"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a726"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_element</span><span class="src-sym">(</span><span class="src-str">'select'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a727"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!&nbsp;</span><span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$attributes</span><span class="src-sym">,&nbsp;</span><span class="src-str">'optional'</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a728"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../swam/Icon.html">Icon</a></span><span class="src-sym">::</span><span class="src-var">$REQUIRED_FIELD_ICON</span><span class="src-sym">-&gt;</span><span class="src-id">print_img</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a729"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a730"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a731"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$print_edit_button</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a732"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">Icon</span><span class="src-sym">::</span><span class="src-var">$EDIT_ACCOUNT_ICON</span><span class="src-sym">-&gt;</span><span class="src-id">print_img</span><span class="src-sym">(</span><span class="src-str">'my/accounts/edit.php?account_id='&nbsp;</span>.&nbsp;<span class="src-var">$selected_account_id</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a733"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a734"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_element</span><span class="src-sym">(</span><span class="src-str">'div'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a735"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a736"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a737"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a738"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Prints&nbsp;a&nbsp;form&nbsp;for&nbsp;adding/editing&nbsp;transaction.</span></div></li>
<li><div class="src-line"><a name="a739"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a740"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">array&nbsp;</span><span class="src-doc-var">$accounts&nbsp;</span><span class="src-doc">the&nbsp;account&nbsp;list&nbsp;of&nbsp;the&nbsp;current&nbsp;user</span></div></li>
<li><div class="src-line"><a name="a741"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;(array&nbsp;of&nbsp;Account&nbsp;objects).</span></div></li>
<li><div class="src-line"><a name="a742"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">array&nbsp;</span><span class="src-doc-var">$data&nbsp;</span><span class="src-doc">associative&nbsp;array&nbsp;containing&nbsp;the&nbsp;transaction</span></div></li>
<li><div class="src-line"><a name="a743"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;data&nbsp;('transaction_id',&nbsp;'transaction_template_id',&nbsp;'account',</span></div></li>
<li><div class="src-line"><a name="a744"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;'name',&nbsp;'amount',&nbsp;'is_debit',&nbsp;'mean_of_payment_code',&nbsp;'comment',</span></div></li>
<li><div class="src-line"><a name="a745"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;'is_valid')&nbsp;when&nbsp;the&nbsp;transaction&nbsp;is&nbsp;edited.</span></div></li>
<li><div class="src-line"><a name="a746"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a747"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/HTML.html#methodprint_transaction_form">print_transaction_form</a><span class="src-sym">(</span><span class="src-var">$accounts</span><span class="src-sym">,&nbsp;</span><span class="src-var">$data</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a748"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$transaction_id&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'transaction_id'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a749"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$transaction_template_id&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'transaction_template_id'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a750"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$account&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_object">get_object</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'account'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a751"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$account_id&nbsp;</span>=&nbsp;<span class="src-sym">(</span><span class="src-var">$account</span><span class="src-sym">)&nbsp;</span>?&nbsp;<span class="src-var">$account</span><span class="src-sym">-&gt;</span><span class="src-id">get_id</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span>:&nbsp;<span class="src-id">null</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a752"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$name&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'name'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a753"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$locale_amount&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'locale_amount'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a754"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$locale_amount</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a755"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$amount&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'amount'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a756"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$locale_amount&nbsp;</span>=&nbsp;<span class="src-sym">(</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$amount</span><span class="src-sym">))&nbsp;</span>?&nbsp;<span class="src-str">''&nbsp;</span>:&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodmoney_format">money_format</a><span class="src-sym">(</span><span class="src-var">$amount</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a757"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a758"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$is_debit&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'is_debit'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a759"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$mean_of_payment_code&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'mean_of_payment_code'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a760"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$date&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'date'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a761"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$comment&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'comment'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a762"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$is_valid&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'is_valid'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a763"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a764"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_form</span><span class="src-sym">(</span><span class="src-str">'post'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$_SERVER</span><span class="src-sym">[</span><span class="src-str">'PHP_SELF'</span><span class="src-sym">]</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'id'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'transactionForm'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a765"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_hidden_input</span><span class="src-sym">(</span><span class="src-str">'transaction_id'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$transaction_id</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a766"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_hidden_input</span><span class="src-sym">(</span><span class="src-str">'transaction_template_id'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$transaction_template_id</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a767"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_account_combobox</span><span class="src-sym">(</span><span class="src-str">'account_id'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Account:'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$accounts</span><span class="src-sym">,&nbsp;</span><span class="src-id">null</span><span class="src-sym">,&nbsp;</span><span class="src-var">$account_id</span><span class="src-sym">,&nbsp;</span><span class="src-id">null</span><span class="src-sym">,&nbsp;</span><span class="src-id">false</span><span class="src-sym">,&nbsp;</span><span class="src-sym">(</span><span class="src-var">$account&nbsp;</span>==&nbsp;<span class="src-id">null</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a768"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_text_input</span><span class="src-sym">(</span><span class="src-str">'name'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Name:'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$name</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'size'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'30'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'maxlength'&nbsp;</span>=&gt;&nbsp;<span class="src-id"><a href="../swam/Transaction.html">Transaction</a></span><span class="src-sym">::</span><span class="src-id">NAME_MAX_LENGTH</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a769"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_text_input</span><span class="src-sym">(</span><span class="src-str">'locale_amount'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Amount:'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$locale_amount</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'size'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'10'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'maxlength'&nbsp;</span>=&gt;&nbsp;<span class="src-id"><a href="../swam/Transaction.html">Transaction</a></span><span class="src-sym">::</span><span class="src-id">AMOUNT_MAX_LENGTH</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a770"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_select</span><span class="src-sym">(</span><span class="src-str">'is_debit'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Nature:'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-id">null</span><span class="src-sym">,&nbsp;</span><span class="src-var">$is_debit</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'0'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'Credit'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'1'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'Debit'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-id">false</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'size'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'1'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a771"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_select</span><span class="src-sym">(</span><span class="src-str">'mean_of_payment_code'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Mean&nbsp;of&nbsp;Payment:'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-str">'Please&nbsp;select&nbsp;a&nbsp;mean&nbsp;of&nbsp;payment'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$mean_of_payment_code</span><span class="src-sym">,&nbsp;</span><span class="src-id"><a href="../swam/Transaction.html">Transaction</a></span><span class="src-sym">::</span><a href="../swam/Transaction.html#methodget_means_of_payment">get_means_of_payment</a><span class="src-sym">(</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a772"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_input_date</span><span class="src-sym">(</span><span class="src-var">$date</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a773"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_textarea</span><span class="src-sym">(</span><span class="src-str">'comment'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Comment:'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$comment</span><span class="src-sym">,&nbsp;</span><span class="src-num">35</span><span class="src-sym">,&nbsp;</span><span class="src-num">4</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'optional'&nbsp;</span>=&gt;&nbsp;<span class="src-id">true</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a774"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_select</span><span class="src-sym">(</span><span class="src-str">'is_valid'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Valid:'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-id">null</span><span class="src-sym">,&nbsp;</span><span class="src-var">$is_valid</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'0'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'No'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'1'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'Yes'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-id">false</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'size'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'1'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a775"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_buttons</span><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'action'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Save'</span><span class="src-sym">))</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'action'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Cancel'</span><span class="src-sym">)))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a776"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_form</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a777"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_required_field_caption</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a778"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a779"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a780"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a781"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Prints&nbsp;a&nbsp;form&nbsp;for&nbsp;adding/editing&nbsp;account.</span></div></li>
<li><div class="src-line"><a name="a782"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a783"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">array&nbsp;</span><span class="src-doc-var">$data&nbsp;</span><span class="src-doc">associative&nbsp;array&nbsp;containing&nbsp;the&nbsp;account&nbsp;data</span></div></li>
<li><div class="src-line"><a name="a784"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;('account_id',&nbsp;'name',&nbsp;'bank_name',&nbsp;'currency_code',&nbsp;'comment',</span></div></li>
<li><div class="src-line"><a name="a785"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;'is_opened')&nbsp;when&nbsp;the&nbsp;account&nbsp;is&nbsp;edited.</span></div></li>
<li><div class="src-line"><a name="a786"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a787"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/HTML.html#methodprint_account_form">print_account_form</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a788"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$account_id&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'account_id'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a789"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$name&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'name'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a790"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$bank_name&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'bank_name'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a791"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$currency_code&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'currency_code'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a792"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$comment&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'comment'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a793"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$is_opened&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'is_opened'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a794"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a795"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_form</span><span class="src-sym">(</span><span class="src-str">'post'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$_SERVER</span><span class="src-sym">[</span><span class="src-str">'PHP_SELF'</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a796"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_hidden_input</span><span class="src-sym">(</span><span class="src-str">'account_id'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$account_id</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a797"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_text_input</span><span class="src-sym">(</span><span class="src-str">'name'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Name:'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$name</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'size'</span>=&gt;<span class="src-num">30</span><span class="src-sym">,&nbsp;</span><span class="src-str">'maxlength'</span>=&gt;&nbsp;<span class="src-id"><a href="../swam/Account.html">Account</a></span><span class="src-sym">::</span><span class="src-id">NAME_MAX_LENGTH</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a798"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_text_input</span><span class="src-sym">(</span><span class="src-str">'bank_name'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Bank&nbsp;Name:'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$bank_name</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'size'</span>=&gt;<span class="src-num">30</span><span class="src-sym">,&nbsp;</span><span class="src-str">'maxlength'</span>=&gt;&nbsp;<span class="src-id"><a href="../swam/Account.html">Account</a></span><span class="src-sym">::</span><span class="src-id">BANK_NAME_MAX_LENGTH</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a799"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_select</span><span class="src-sym">(</span><span class="src-str">'currency_code'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Currency:'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Please&nbsp;select&nbsp;a&nbsp;currency'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$currency_code</span><span class="src-sym">,&nbsp;</span><span class="src-id"><a href="../swam/Account.html">Account</a></span><span class="src-sym">::</span><a href="../swam/Account.html#methodget_currencies">get_currencies</a><span class="src-sym">(</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a800"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_textarea</span><span class="src-sym">(</span><span class="src-str">'comment'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Comment:'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$comment</span><span class="src-sym">,&nbsp;</span><span class="src-num">35</span><span class="src-sym">,&nbsp;</span><span class="src-num">4</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'optional'&nbsp;</span>=&gt;&nbsp;<span class="src-id">true</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a801"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_select</span><span class="src-sym">(</span><span class="src-str">'is_opened'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Opened:'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-id">null</span><span class="src-sym">,&nbsp;</span><span class="src-var">$is_opened</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'0'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'No'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'1'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'yes'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-id">false</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'size'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'1'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a802"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_buttons</span><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'action'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Save'</span><span class="src-sym">))</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'action'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Cancel'</span><span class="src-sym">)))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a803"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_form</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a804"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_required_field_caption</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a805"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a806"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a807"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a808"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Prints&nbsp;a&nbsp;form&nbsp;for&nbsp;adding/editing&nbsp;transaction&nbsp;template.</span></div></li>
<li><div class="src-line"><a name="a809"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a810"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">array&nbsp;</span><span class="src-doc-var">$accounts&nbsp;</span><span class="src-doc">the&nbsp;account&nbsp;list&nbsp;of&nbsp;the&nbsp;current&nbsp;user</span></div></li>
<li><div class="src-line"><a name="a811"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;(array&nbsp;of&nbsp;Account&nbsp;objects).</span></div></li>
<li><div class="src-line"><a name="a812"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">array&nbsp;</span><span class="src-doc-var">$data&nbsp;</span><span class="src-doc">associative&nbsp;array&nbsp;containing&nbsp;the&nbsp;transaction</span></div></li>
<li><div class="src-line"><a name="a813"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;template&nbsp;data&nbsp;('transaction_template_id',&nbsp;'account',&nbsp;'name',</span></div></li>
<li><div class="src-line"><a name="a814"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;'amount',&nbsp;'is_debit',&nbsp;'mean_of_payment_code',&nbsp;'date',&nbsp;'comment',</span></div></li>
<li><div class="src-line"><a name="a815"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;'is_valid')&nbsp;when&nbsp;the&nbsp;transaction&nbsp;is&nbsp;edited.</span></div></li>
<li><div class="src-line"><a name="a816"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a817"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/HTML.html#methodprint_transaction_template_form">print_transaction_template_form</a><span class="src-sym">(</span><span class="src-var">$accounts</span><span class="src-sym">,&nbsp;</span><span class="src-var">$data</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a818"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$transaction_template_id&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'transaction_template_id'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a819"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$account&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_object">get_object</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'account'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a820"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$account_id&nbsp;</span>=&nbsp;<span class="src-sym">(</span><span class="src-var">$account</span><span class="src-sym">)&nbsp;</span>?&nbsp;<span class="src-var">$account</span><span class="src-sym">-&gt;</span><span class="src-id">get_id</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span>:&nbsp;<span class="src-id">null</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a821"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$name&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'name'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a822"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$locale_amount&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'locale_amount'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a823"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$locale_amount</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a824"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$amount&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'amount'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a825"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$locale_amount&nbsp;</span>=&nbsp;<span class="src-sym">(</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$amount</span><span class="src-sym">))&nbsp;</span>?&nbsp;<span class="src-str">''&nbsp;</span>:&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodmoney_format">money_format</a><span class="src-sym">(</span><span class="src-var">$amount</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a826"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a827"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$is_debit&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'is_debit'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a828"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$mean_of_payment_code&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'mean_of_payment_code'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a829"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$date&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'date'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a830"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$comment&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'comment'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a831"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$is_valid&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'is_valid'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a832"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a833"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_form</span><span class="src-sym">(</span><span class="src-str">'post'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$_SERVER</span><span class="src-sym">[</span><span class="src-str">'PHP_SELF'</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a834"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_hidden_input</span><span class="src-sym">(</span><span class="src-str">'transaction_template_id'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$transaction_template_id</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a835"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_account_combobox</span><span class="src-sym">(</span><span class="src-str">'account_id'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Account:'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$accounts</span><span class="src-sym">,&nbsp;</span><span class="src-id">null</span><span class="src-sym">,&nbsp;</span><span class="src-var">$account_id</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a836"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_text_input</span><span class="src-sym">(</span><span class="src-str">'name'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Name:'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$name</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'size'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'30'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'maxlength'&nbsp;</span>=&gt;&nbsp;<span class="src-id"><a href="../swam/Transaction.html">Transaction</a></span><span class="src-sym">::</span><span class="src-id">NAME_MAX_LENGTH</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a837"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_text_input</span><span class="src-sym">(</span><span class="src-str">'locale_amount'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Amount:'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$locale_amount</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'size'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'10'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'maxlength'&nbsp;</span>=&gt;&nbsp;<span class="src-id"><a href="../swam/Transaction.html">Transaction</a></span><span class="src-sym">::</span><span class="src-id">AMOUNT_MAX_LENGTH</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a838"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_select</span><span class="src-sym">(</span><span class="src-str">'is_debit'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Nature:'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-id">null</span><span class="src-sym">,&nbsp;</span><span class="src-var">$is_debit</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'0'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'Credit'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'1'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'Debit'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-id">false</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'size'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'1'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a839"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_select</span><span class="src-sym">(</span><span class="src-str">'mean_of_payment_code'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Mean&nbsp;of&nbsp;Payment:'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-str">'Please&nbsp;select&nbsp;a&nbsp;mean&nbsp;of&nbsp;payment'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$mean_of_payment_code</span><span class="src-sym">,&nbsp;</span><span class="src-id"><a href="../swam/Transaction.html">Transaction</a></span><span class="src-sym">::</span><a href="../swam/Transaction.html#methodget_means_of_payment">get_means_of_payment</a><span class="src-sym">(</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a840"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_text_input</span><span class="src-sym">(</span><span class="src-str">'date'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Day:'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$date</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'size'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'4'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a841"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_textarea</span><span class="src-sym">(</span><span class="src-str">'comment'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Comment:'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$comment</span><span class="src-sym">,&nbsp;</span><span class="src-num">35</span><span class="src-sym">,&nbsp;</span><span class="src-num">4</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'optional'&nbsp;</span>=&gt;&nbsp;<span class="src-id">true</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a842"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_select</span><span class="src-sym">(</span><span class="src-str">'is_valid'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Valid:'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-id">null</span><span class="src-sym">,&nbsp;</span><span class="src-var">$is_valid</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'0'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'No'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'1'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'Yes'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-id">false</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'size'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'1'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a843"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_buttons</span><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'action'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Save'</span><span class="src-sym">))</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'action'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Cancel'</span><span class="src-sym">)))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a844"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_form</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a845"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_required_field_caption</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a846"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a847"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a848"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a849"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Prints&nbsp;a&nbsp;form&nbsp;for&nbsp;adding/editing&nbsp;a&nbsp;credit&nbsp;transfer.</span></div></li>
<li><div class="src-line"><a name="a850"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a851"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">array&nbsp;</span><span class="src-doc-var">$accounts&nbsp;</span><span class="src-doc">the&nbsp;account&nbsp;list&nbsp;of&nbsp;the&nbsp;current&nbsp;user</span></div></li>
<li><div class="src-line"><a name="a852"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;(array&nbsp;of&nbsp;Account&nbsp;objects).</span></div></li>
<li><div class="src-line"><a name="a853"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">array&nbsp;</span><span class="src-doc-var">$data&nbsp;</span><span class="src-doc">associative&nbsp;array&nbsp;containing&nbsp;the&nbsp;credit</span></div></li>
<li><div class="src-line"><a name="a854"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;transfer&nbsp;data&nbsp;('transaction_id',&nbsp;'account_to_debit',</span></div></li>
<li><div class="src-line"><a name="a855"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;'account_to_credit',&nbsp;'name',&nbsp;'amount',&nbsp;'date',&nbsp;'comment',</span></div></li>
<li><div class="src-line"><a name="a856"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;'is_valid')&nbsp;when&nbsp;the&nbsp;credit&nbsp;transfer&nbsp;is&nbsp;edited.</span></div></li>
<li><div class="src-line"><a name="a857"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a858"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/HTML.html#methodprint_credit_transfer_form">print_credit_transfer_form</a><span class="src-sym">(</span><span class="src-var">$accounts</span><span class="src-sym">,&nbsp;</span><span class="src-var">$data</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a859"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$transaction_id&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'transaction_id'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a860"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$account_to_debit&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_object">get_object</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'account_to_debit'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a861"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$account_to_debit_id&nbsp;</span>=&nbsp;<span class="src-sym">(</span><span class="src-var">$account_to_debit</span><span class="src-sym">)&nbsp;</span>?&nbsp;<span class="src-var">$account_to_debit</span><span class="src-sym">-&gt;</span><span class="src-id">get_id</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span>:&nbsp;<span class="src-id">null</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a862"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$account_to_credit&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_object">get_object</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'account_to_credit'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a863"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$account_to_credit_id&nbsp;</span>=&nbsp;<span class="src-sym">(</span><span class="src-var">$account_to_credit</span><span class="src-sym">)&nbsp;</span>?&nbsp;<span class="src-var">$account_to_credit</span><span class="src-sym">-&gt;</span><span class="src-id">get_id</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span>:&nbsp;<span class="src-id">null</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a864"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$name&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'name'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a865"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$locale_amount&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'locale_amount'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a866"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$locale_amount</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a867"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$amount&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'amount'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a868"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$locale_amount&nbsp;</span>=&nbsp;<span class="src-sym">(</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$amount</span><span class="src-sym">))&nbsp;</span>?&nbsp;<span class="src-str">''&nbsp;</span>:&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodmoney_format">money_format</a><span class="src-sym">(</span><span class="src-var">$amount</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a869"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a870"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$date&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'date'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a871"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$comment&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'comment'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a872"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$is_valid&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'is_valid'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a873"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a874"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_form</span><span class="src-sym">(</span><span class="src-str">'post'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$_SERVER</span><span class="src-sym">[</span><span class="src-str">'PHP_SELF'</span><span class="src-sym">]</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'id'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'transactionForm'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a875"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_hidden_input</span><span class="src-sym">(</span><span class="src-str">'transaction_id'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$transaction_id</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a876"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_hidden_input</span><span class="src-sym">(</span><span class="src-str">'mean_of_payment_code'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'credit_transfer'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a877"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_account_combobox</span><span class="src-sym">(</span><span class="src-str">'account_to_debit_id'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Account&nbsp;to&nbsp;debit:'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$accounts</span><span class="src-sym">,&nbsp;</span><span class="src-id">null</span><span class="src-sym">,&nbsp;</span><span class="src-var">$account_to_debit_id</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a878"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_account_combobox</span><span class="src-sym">(</span><span class="src-str">'account_to_credit_id'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Account&nbsp;to&nbsp;credit:'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$accounts</span><span class="src-sym">,&nbsp;</span><span class="src-id">null</span><span class="src-sym">,&nbsp;</span><span class="src-var">$account_to_credit_id</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a879"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_text_input</span><span class="src-sym">(</span><span class="src-str">'name'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Name:'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$name</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'size'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'35'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'maxlength'&nbsp;</span>=&gt;&nbsp;<span class="src-id"><a href="../swam/Transaction.html">Transaction</a></span><span class="src-sym">::</span><span class="src-id">NAME_MAX_LENGTH</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a880"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_text_input</span><span class="src-sym">(</span><span class="src-str">'locale_amount'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Amount:'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$locale_amount</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'size'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'10'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'maxlength'&nbsp;</span>=&gt;&nbsp;<span class="src-id"><a href="../swam/Transaction.html">Transaction</a></span><span class="src-sym">::</span><span class="src-id">AMOUNT_MAX_LENGTH</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a881"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_input_date</span><span class="src-sym">(</span><span class="src-var">$date</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a882"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_textarea</span><span class="src-sym">(</span><span class="src-str">'comment'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Comment:'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$comment</span><span class="src-sym">,&nbsp;</span><span class="src-num">35</span><span class="src-sym">,&nbsp;</span><span class="src-num">4</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'optional'&nbsp;</span>=&gt;&nbsp;<span class="src-id">true</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a883"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_select</span><span class="src-sym">(</span><span class="src-str">'is_valid'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Valid:'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-id">null</span><span class="src-sym">,&nbsp;</span><span class="src-var">$is_valid</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'0'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'No'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'1'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'Yes'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-id">false</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'size'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'1'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a884"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_buttons</span><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'action'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Save'</span><span class="src-sym">))</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'action'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Cancel'</span><span class="src-sym">)))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a885"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_form</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a886"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a887"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a888"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a889"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Prints&nbsp;a&nbsp;form&nbsp;for&nbsp;adding/editing&nbsp;a&nbsp;user.</span></div></li>
<li><div class="src-line"><a name="a890"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a891"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">array&nbsp;</span><span class="src-doc-var">$data&nbsp;</span><span class="src-doc">associative&nbsp;array&nbsp;containing&nbsp;the&nbsp;user&nbsp;data</span></div></li>
<li><div class="src-line"><a name="a892"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;('user_id',&nbsp;'login',&nbsp;'first_name',&nbsp;'last_name',&nbsp;'email',</span></div></li>
<li><div class="src-line"><a name="a893"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;'password',&nbsp;'password2',&nbsp;'crypted_password')&nbsp;when&nbsp;the&nbsp;user&nbsp;is</span></div></li>
<li><div class="src-line"><a name="a894"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;edited.</span></div></li>
<li><div class="src-line"><a name="a895"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">boolean&nbsp;</span><span class="src-doc-var">$new_registration&nbsp;</span><span class="src-doc">optional&nbsp;boolean&nbsp;indicating&nbsp;if</span></div></li>
<li><div class="src-line"><a name="a896"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;the&nbsp;user&nbsp;already&nbsp;exits&nbsp;(edition&nbsp;mode).</span></div></li>
<li><div class="src-line"><a name="a897"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a898"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/HTML.html#methodprint_user_form">print_user_form</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-var">$new_registration&nbsp;</span>=&nbsp;<span class="src-id">true</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a899"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$user_id&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'user_id'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a900"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$login&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'login'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a901"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$first_name&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'first_name'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a902"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$last_name&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'last_name'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a903"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$email&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'email'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a904"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$password&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'password'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a905"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$password2&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'password2'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a906"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$crypted_password&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'crypted_password'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a907"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$is_valid&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'is_valid'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a908"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$show_closed_accounts&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'show_closed_accounts'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a909"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a910"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!&nbsp;</span><span class="src-id"><a href="../swam/User.html">User</a></span><span class="src-sym">::</span><a href="../swam/User.html#methodget_logged_in_user">get_logged_in_user</a><span class="src-sym">(</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a911"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'p'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Please&nbsp;fill&nbsp;in&nbsp;the&nbsp;following&nbsp;form:'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a912"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a913"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_form</span><span class="src-sym">(</span><span class="src-str">'post'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$_SERVER</span><span class="src-sym">[</span><span class="src-str">'PHP_SELF'</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a914"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_hidden_input</span><span class="src-sym">(</span><span class="src-str">'user_id'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$user_id</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a915"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_hidden_input</span><span class="src-sym">(</span><span class="src-str">'crypted_password'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$crypted_password</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a916"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_hidden_input</span><span class="src-sym">(</span><span class="src-str">'is_valid'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$is_valid</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a917"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_text_input</span><span class="src-sym">(</span><span class="src-str">'login'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Login:'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$login</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'size'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'16'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'maxlength'&nbsp;</span>=&gt;&nbsp;<span class="src-id"><a href="../swam/User.html">User</a></span><span class="src-sym">::</span><span class="src-id">LOGIN_MAX_LENGTH</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a918"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_text_input</span><span class="src-sym">(</span><span class="src-str">'first_name'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'First&nbsp;Name:'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$first_name</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'size'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'30'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'maxlength'&nbsp;</span>=&gt;&nbsp;<span class="src-id"><a href="../swam/User.html">User</a></span><span class="src-sym">::</span><span class="src-id">FIRST_NAME_MAX_LENGTH</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a919"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_text_input</span><span class="src-sym">(</span><span class="src-str">'last_name'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Last&nbsp;Name:'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$last_name</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'size'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'30'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'maxlength'&nbsp;</span>=&gt;&nbsp;<span class="src-id"><a href="../swam/User.html">User</a></span><span class="src-sym">::</span><span class="src-id">LAST_NAME_MAX_LENGTH</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a920"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_text_input</span><span class="src-sym">(</span><span class="src-str">'email'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'E-Mail:'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$email</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'size'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'30'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'maxlength'&nbsp;</span>=&gt;&nbsp;<span class="src-id"><a href="../swam/User.html">User</a></span><span class="src-sym">::</span><span class="src-id">EMAIL_MAX_LENGTH</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a921"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$password_label&nbsp;</span>=&nbsp;<span class="src-sym">(</span><span class="src-var">$new_registration</span><span class="src-sym">)&nbsp;</span>?&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Password:'</span><span class="src-sym">)&nbsp;</span>:&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Password&nbsp;(enter&nbsp;to&nbsp;edit):'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a922"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_password_input</span><span class="src-sym">(</span><span class="src-str">'password'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$password_label</span><span class="src-sym">,&nbsp;</span><span class="src-var">$password</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'size'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'16'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'maxlength'&nbsp;</span>=&gt;&nbsp;<span class="src-id"><a href="../swam/User.html">User</a></span><span class="src-sym">::</span><span class="src-id">PASSWORD_MAX_LENGTH</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a923"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_password_input</span><span class="src-sym">(</span><span class="src-str">'password2'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Password&nbsp;Confirmation:'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$password2</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'size'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'16'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'maxlength'&nbsp;</span>=&gt;&nbsp;<span class="src-id"><a href="../swam/User.html">User</a></span><span class="src-sym">::</span><span class="src-id">PASSWORD_MAX_LENGTH</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a924"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$new_registration</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a925"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_security_field_input</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a926"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a927"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_select</span><span class="src-sym">(</span><span class="src-str">'show_closed_accounts'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Show&nbsp;closed&nbsp;accounts:'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-id">null</span><span class="src-sym">,&nbsp;</span><span class="src-var">$show_closed_accounts</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'0'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'No'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'1'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'Yes'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-id">false</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'size'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'1'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a928"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_buttons</span><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'action'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Save'</span><span class="src-sym">))</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'action'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Cancel'</span><span class="src-sym">)))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a929"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_form</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a930"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a931"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_required_field_caption</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a932"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-id"><a href="../swam/User.html">User</a></span><span class="src-sym">::</span><a href="../swam/User.html#methodget_logged_in_user">get_logged_in_user</a><span class="src-sym">(</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a933"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_form</span><span class="src-sym">(</span><span class="src-str">'post'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$_SERVER</span><span class="src-sym">[</span><span class="src-str">'PHP_SELF'</span><span class="src-sym">]</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'class'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'table'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a934"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_element</span><span class="src-sym">(</span><span class="src-str">'p'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a935"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../swam/Icon.html">Icon</a></span><span class="src-sym">::</span><span class="src-var">$CANCEL_REGISTRATION_ICON</span><span class="src-sym">-&gt;</span><span class="src-id">print_input</span><span class="src-sym">(</span><span class="src-str">'action'</span><span class="src-sym">,&nbsp;</span><span class="src-id">_</span><span class="src-sym">(</span><span class="src-str">'Unregister'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a936"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_element</span><span class="src-sym">(</span><span class="src-str">'p'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a937"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_form</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a938"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a939"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a940"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a941"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a942"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Prints&nbsp;a&nbsp;form&nbsp;for&nbsp;editing&nbsp;configuration&nbsp;data.</span></div></li>
<li><div class="src-line"><a name="a943"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a944"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">array&nbsp;</span><span class="src-doc-var">$data&nbsp;</span><span class="src-doc">associative&nbsp;array&nbsp;containing&nbsp;the&nbsp;configuration</span></div></li>
<li><div class="src-line"><a name="a945"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;data&nbsp;('current_step',&nbsp;'sqlite_file',&nbsp;'webmaster_email',</span></div></li>
<li><div class="src-line"><a name="a946"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;'smtp_server',&nbsp;'log_file',&nbsp;'log_level',&nbsp;'locale').</span></div></li>
<li><div class="src-line"><a name="a947"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a948"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/HTML.html#methodprint_config_form">print_config_form</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a949"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$current_step&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'current_step'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a950"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$sqlite_file&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'sqlite_file'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a951"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$webmaster_email&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'webmaster_email'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a952"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$smtp_server&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'smtp_server'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a953"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$log_file&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'log_file'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a954"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$log_level&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'log_level'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a955"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$locale&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'locale'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a956"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a957"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$path_to_installer&nbsp;</span>=&nbsp;<a href="http://www.php.net/realpath">realpath</a><span class="src-sym">(</span><span class="src-str">'.'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a958"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_form</span><span class="src-sym">(</span><span class="src-str">'post'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$_SERVER</span><span class="src-sym">[</span><span class="src-str">'PHP_SELF'</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a959"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_hidden_input</span><span class="src-sym">(</span><span class="src-str">'current_step'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$current_step</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a960"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_hidden_input</span><span class="src-sym">(</span><span class="src-str">'locale'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$locale</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a961"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_element</span><span class="src-sym">(</span><span class="src-str">'fieldset'</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'class'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'install'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a962"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'legend'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Data&nbsp;Source&nbsp;Settings'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a963"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'p'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Make&nbsp;sure&nbsp;that&nbsp;the&nbsp;database&nbsp;file&nbsp;is&nbsp;accessible&nbsp;in&nbsp;read-write&nbsp;mode&nbsp;by&nbsp;the&nbsp;Web&nbsp;server.&nbsp;Warning,&nbsp;for&nbsp;security&nbsp;reason,&nbsp;&lt;u&gt;do&nbsp;not&nbsp;use&nbsp;file&nbsp;accessible&nbsp;through&nbsp;the&nbsp;Web&nbsp;server&lt;/u&gt;.&nbsp;For&nbsp;your&nbsp;information,&nbsp;real&nbsp;path&nbsp;to&nbsp;the&nbsp;installer&nbsp;is:&nbsp;%s.'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$path_to_installer</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a964"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_text_input</span><span class="src-sym">(</span><span class="src-str">'sqlite_file'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'SQLite&nbsp;Database&nbsp;File:'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$sqlite_file</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'size'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'60'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'maxlength'&nbsp;</span>=&gt;&nbsp;<span class="src-id"><a href="../swam/Config.html">Config</a></span><span class="src-sym">::</span><span class="src-id">FILE_MAX_LENGTH</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a965"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_element</span><span class="src-sym">(</span><span class="src-str">'fieldset'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a966"></a>&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a967"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_element</span><span class="src-sym">(</span><span class="src-str">'fieldset'</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'class'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'install'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a968"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'legend'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Mail&nbsp;Settings'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a969"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_text_input</span><span class="src-sym">(</span><span class="src-str">'webmaster_email'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Webmaster&nbsp;Email:'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$webmaster_email</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'size'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'30'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'maxlength'&nbsp;</span>=&gt;&nbsp;<span class="src-id"><a href="../swam/Config.html">Config</a></span><span class="src-sym">::</span><span class="src-id">EMAIL_MAX_LENGTH</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a970"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_text_input</span><span class="src-sym">(</span><span class="src-str">'smtp_server'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'SMTP&nbsp;Server:'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$smtp_server</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'size'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'16'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'maxlength'&nbsp;</span>=&gt;&nbsp;<span class="src-id"><a href="../swam/Config.html">Config</a></span><span class="src-sym">::</span><span class="src-id">SMTP_SERVER_MAX_LENGTH</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a971"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_element</span><span class="src-sym">(</span><span class="src-str">'fieldset'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a972"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a973"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">begin_element</span><span class="src-sym">(</span><span class="src-str">'fieldset'</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'class'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'install'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a974"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'legend'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Log&nbsp;Settings'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a975"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_element</span><span class="src-sym">(</span><span class="src-str">'p'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Make&nbsp;sure&nbsp;that&nbsp;log&nbsp;file&nbsp;is&nbsp;accessible&nbsp;in&nbsp;read-write&nbsp;mode&nbsp;by&nbsp;the&nbsp;Web&nbsp;server.&nbsp;Warning,&nbsp;for&nbsp;security&nbsp;reason,&nbsp;&lt;u&gt;do&nbsp;not&nbsp;use&nbsp;file&nbsp;accessible&nbsp;through&nbsp;the&nbsp;Web&nbsp;server&lt;/u&gt;.&nbsp;For&nbsp;your&nbsp;information,&nbsp;real&nbsp;path&nbsp;to&nbsp;the&nbsp;installer&nbsp;is:&nbsp;%s.'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$path_to_installer</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a976"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_text_input</span><span class="src-sym">(</span><span class="src-str">'log_file'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Log&nbsp;File:'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$log_file</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'size'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'60'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'maxlength'&nbsp;</span>=&gt;&nbsp;<span class="src-id"><a href="../swam/Config.html">Config</a></span><span class="src-sym">::</span><span class="src-id">FILE_MAX_LENGTH</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a977"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_select</span><span class="src-sym">(</span><span class="src-str">'log_level'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Log&nbsp;Level:'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-id">null</span><span class="src-sym">,&nbsp;</span><span class="src-var">$log_level</span><span class="src-sym">,&nbsp;</span><span class="src-id"><a href="../swam/FileLog.html">FileLog</a></span><span class="src-sym">::</span><a href="../swam/FileLog.html#methodget_log_levels">get_log_levels</a><span class="src-sym">(</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a978"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_element</span><span class="src-sym">(</span><span class="src-str">'fieldset'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a979"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a980"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_buttons</span><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'previous'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Previous'</span><span class="src-sym">))</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'next'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Next'</span><span class="src-sym">)))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a981"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">end_form</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a982"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a983"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a984"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a985"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Prints&nbsp;a&nbsp;&quot;captcha&quot;&nbsp;field&nbsp;to&nbsp;prevent&nbsp;spam.&nbsp;The&nbsp;image&nbsp;code&nbsp;comes</span></div></li>
<li><div class="src-line"><a name="a986"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;from&nbsp;Auditor&nbsp;v.1.0&nbsp;at&nbsp;http://php.webmaster-kit.com/.</span></div></li>
<li><div class="src-line"><a name="a987"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a988"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/HTML.html#methodprint_security_field_input">print_security_field_input</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a989"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$audit_img&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/_config.inc.html#defineSWAM_ROOT_PATH">SWAM_ROOT_PATH</a>&nbsp;</span>.&nbsp;<span class="src-str">'/include/auditor.php'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a990"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">print_text_input</span><span class="src-sym">(</span><span class="src-str">'userdigit'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">'%s&lt;img&nbsp;src=&quot;%s&quot;&nbsp;width=&quot;120&quot;&nbsp;height=&quot;30&quot;&nbsp;alt=&quot;%s&quot;&nbsp;style=&quot;margin-left:&nbsp;5px&nbsp;;&nbsp;margin-right:&nbsp;5px&quot;&nbsp;/&gt;'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Security&nbsp;Code:&nbsp;'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$audit_img</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Random&nbsp;security&nbsp;code'</span><span class="src-sym">))</span><span class="src-sym">,&nbsp;</span><span class="src-str">''</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'size'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'16'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'maxlength'&nbsp;</span>=&gt;&nbsp;<span class="src-id"><a href="../swam/User.html">User</a></span><span class="src-sym">::</span><span class="src-id">CAPTCHA_MAX_LENGTH</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a991"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a992"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a993"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a994"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Check&nbsp;that&nbsp;the&nbsp;security&nbsp;number&nbsp;has&nbsp;been&nbsp;correctly&nbsp;entered&nbsp;by</span></div></li>
<li><div class="src-line"><a name="a995"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;the&nbsp;user&nbsp;using&nbsp;previous&nbsp;security&nbsp;field.</span></div></li>
<li><div class="src-line"><a name="a996"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a997"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@exception</span><span class="src-doc">&nbsp;PermissionDeniedException&nbsp;if&nbsp;the&nbsp;code&nbsp;is&nbsp;invalid.</span></div></li>
<li><div class="src-line"><a name="a998"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/&nbsp;&nbsp;</span></div></li>
<li><div class="src-line"><a name="a999"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/HTML.html#methodcheck_security_code">check_security_code</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1000"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$digit&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$_SESSION</span><span class="src-sym">,&nbsp;</span><span class="src-str">'digit'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1001"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$userdigit&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$_POST</span><span class="src-sym">,&nbsp;</span><span class="src-str">'userdigit'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1002"></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/session_destroy">session_destroy</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;&nbsp;&nbsp;&nbsp;</span></div></li>
<li><div class="src-line"><a name="a1003"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1004"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">((</span><span class="src-var">$digit&nbsp;</span>!=&nbsp;<span class="src-var">$userdigit</span><span class="src-sym">)&nbsp;</span>||&nbsp;<span class="src-sym">(</span><span class="src-var">$digit&nbsp;</span>&lt;=&nbsp;<span class="src-num">1</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1005"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../swam/PermissionDeniedException.html">PermissionDeniedException</a></span><span class="src-sym">(</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'The&nbsp;security&nbsp;code&nbsp;is&nbsp;invalid.'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1006"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1007"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1008"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1009"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1010"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Returns&nbsp;the&nbsp;HTTP&nbsp;protocol&nbsp;in&nbsp;use&nbsp;(using&nbsp;HTTPS&nbsp;environment&nbsp;variable).</span></div></li>
<li><div class="src-line"><a name="a1011"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1012"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc">the&nbsp;HTTP&nbsp;protocol&nbsp;in&nbsp;use&nbsp;(either&nbsp;'http://'&nbsp;or&nbsp;'https://')</span></div></li>
<li><div class="src-line"><a name="a1013"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1014"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/HTML.html#methodget_protocol_in_use">get_protocol_in_use</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1015"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span>isset<span class="src-sym">(</span><span class="src-var">$_SERVER</span><span class="src-sym">[</span><span class="src-str">'HTTPS'</span><span class="src-sym">]</span><span class="src-sym">)&nbsp;</span>?&nbsp;<span class="src-str">'https://'&nbsp;</span>:&nbsp;<span class="src-str">'http://'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1016"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1017"></a><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1018"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1019"></a><span class="src-php">?&gt;</span></div></li>
</ol></div>
</div>
	<p class="notes" id="credit">
		Documentation generated on Thu, 20 Aug 2009 01:04:14 +0200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.1</a>
	</p>
	</body>
</html>
Return current item: Simple Web Account Manager