function ListSubRules($ruleid, $userid) { $sieve = new clSieve($userid); $hash = $sieve->ParseSubRules($ruleid); if (!is_array($hash)) { return null; } while (list($key, $value) = each($hash)) { $count = $count + 1; $andor = $value["field_andor"]; if ($andor == null) { $andor = 'or'; } if ($count == 1) { $andor = null; } $html = $html . "\n\t\t<table style='border:1px dotted #8e8785;padding:3px;margin:4px;width:100%' class=caption\n\t\tOnMouseOver=\"this.style.background='#eeeeee';this.style.cursor='pointer'\" \n\t\tOnMouseOut=\"this.style.background='transparent';this.style.cursor='default'\"\n\t\t>\n\t\t<tr>\n\t\t<td width=1%'><img src='img/fw_bold.gif'></td>\n\t\t<td width=90% \n\t\tOnClick=\"javascript:LoadSubRule('{$key}');\"\n\t\t>{$andor} {if} <strong>{$value["field_header"]}</strong> {" . $value["field_conditions"] . "} {$value["string"]}</div></td>\n\t\t<td width=2% nowrap style='padding-left:5px'> " . imgtootltip('arrow_up.gif', '{up}', "MoveSubrule('{$key}','up')") . " </td>\n\t\t<td width=2% nowrap> " . imgtootltip('arrow_down.gif', '{down}', "MoveSubrule('{$key}','down')") . " </td>\n\t\t<td width=1%> </td>\n\t\t<td width=1%>" . imgtootltip('x.gif', '{delete}', "DeleteSubRule('{$key}');") . "</td>\n\t\t</tr>\n\t\t</table>"; } $tpl = new templates(); return $tpl->_ENGINE_parse_body($html); }