function section_rules_list() { if ($_GET["tab"] == 1) { section_config(); exit; } $fetch = new Fetchmail_settings(); $rules = $fetch->LoadAllRules(); $html = section_tabs() . "<br><H5>{fetchmail_rules}</H5>"; $rd = "<table style='width:1OO%' class=table_form>"; while (list($num, $hash) = each($rules)) { $uid = $hash["uid"]; $user = new user($uid); if ($hash["enabled"] == 0) { $img = 'status_ok-grey.gif'; } else { $img = "status_ok.gif"; } $link = CellRollOver("UserFetchMailRule('{$num}','{$uid}')", '{edit}'); $rd = $rd . "<tr {$link}>\n\t\t<td width=1% valign='top'><img src='img/{$img}'></td>\n\t\t<td valign='top'><strong>{$user->mail}</strong></td>\n\t\t<td ><strong>{$hash["poll"]}</strong></td>\n\t\t<td ><strong>{$hash["proto"]}</strong></td>\n\t\t<td ><strong>{$hash["user"]}</strong></td>\n\t\t\n\t\t</tr>"; } $rd = $rd . "</table>"; $rd = "<div style='width:100%;height:400px;overflow:auto'>{$rd}</div>"; $tpl = new templates(); if (isset($_GET["ajax"])) { return $tpl->_ENGINE_parse_body($html . $rd); } echo $tpl->_ENGINE_parse_body($html . $rd); }
function section_rules_list() { if ($_GET["tab"] == 1) { section_config(); exit; } $fetch = new Fetchmail_settings(); $rules = $fetch->LoadAllRules(); include_once dirname(__FILE__) . "/ressources/class.user.inc"; $html = ""; $rd = "\t<table cellspacing='0' cellpadding='0' border='0' class='tableView' style='width:98%'>\n\t<thead class='thead'>\n\t\t<tr>\n\t\t<th width=5%>{date}</th>\n\t\t{$th_add}\n\t\t<th width=99% colsan=2>{website}</th>\n\t\t<th width=1% colspan=2>{size}</th>\n\t\t<th width=1% colspan=2>{client}</th>\n\t\t</tr>\n\t</thead>\n\t<tbody class='tbody'>"; $classtr = ""; while (list($num, $hash) = each($rules)) { if ($classtr == "oddRow") { $classtr = null; } else { $classtr = "oddRow"; } $uid = $hash["uid"]; $user = new user($uid); if ($hash["enabled"] == 0) { $img = 'status_ok-grey.gif'; } else { $img = "status_ok.gif"; } $js = "UserFetchMailRule('{$num}','{$uid}')"; $href = "<a href=\"javascript:blur();\" OnClick=\"javascript:{$js}\" style='font-size:13px;font-weight:bold;text-decoration:underline' >"; $rd = $rd . "<tr class={$classtr}>\n\t\t<td width=1%><img src='img/{$img}'></td>\n\t\t<td >{$href}{$user->mail}</a></td>\n\t\t<td >{$href}{$hash["poll"]}</a></td>\n\t\t<td >{$href}{$hash["proto"]}</a></td>\n\t\t<td >{$href}{$hash["user"]}</a></td>\n\t\t</tr>"; } $rd = $rd . "</table>"; $tpl = new templates(); if (isset($_GET["ajax"])) { return $tpl->_ENGINE_parse_body($html . $rd); } echo $tpl->_ENGINE_parse_body($html . $rd); }