function GROUP_SIEVE_UPDATE() { $gid = $_GET["sieve-update-users"]; $tpl = new templates(); $gp = new groups($gid); echo $tpl->_ENGINE_parse_body("<H1>{sieve_auto_script}:{events}</H1>"); if ($gp->Privileges_array["EnableSieveArticaScript"] == 1) { include_once 'ressources/class.sieve.inc'; if (!is_array($gp->members_array)) { echo $tpl->_ENGINE_parse_body("<span style='color:red;font-size:14px;font-weight:bold;color:red'>{ERROR_GROUP_STORE_NO_MEMBERS}</span>"); return null; } echo "<div style='width:100%;height:200px;overflow:auto;background-color:white'>"; while (list($num, $ligne) = each($gp->members_array)) { if (trim($num) == null) { continue; } $sieve = new clSieve($num); $sieve->ECHO_ERROR = false; if ($sieve->AddAutoScript()) { } else { $result = $tpl->_ENGINE_parse_body("{failed}:<div style='margin:4px;font-size:10px;font-weight:bold;color:red'>{$sieve->error}</div>"); } echo "<div style='border:1px dotted #CCCCCC;padding:3px;margin:3px'>\n\t\t\t\t\t<div style='font-size:12px;font-weight:bold'>{$num}: <code>{$result}</code></div>\n\t\t\t\t\n\t\t\t\t</div>"; } echo "</div>"; } }