0) { while ($row = db_array ($result['result'])) { if (check_owner ($SESSID_USERNAME, $row['domain']) || authentication_has_role('global-admin')) { if ('pgsql'==$CONF['database_type']) { $row['modified']=gmstrftime('%c %Z',$row['modified']); $row['active']=('t'==$row['active']) ? 1 : 0; } $tAlias[] = $row; } } } /* */ if ($CONF['vacation_control_admin'] == 'YES') { $query = ("SELECT $table_mailbox.*, $table_vacation.active AS v_active FROM $table_mailbox LEFT JOIN $table_vacation ON $table_mailbox.username=$table_vacation.email WHERE $table_mailbox.username LIKE '%$fSearch%' OR $table_mailbox.name LIKE '%$fSearch%' ORDER BY $table_mailbox.username"); # TODO: special query for pgsql needed? } else { $query = "SELECT * FROM $table_mailbox WHERE username LIKE '%$fSearch%' OR name LIKE '%$fSearch%' ORDER BY username"; /* TODO: special query for pgsql really needed? if ('pgsql'==$CONF['database_type']) { $query = "SELECT *,extract(epoch from created) as uts_created,extract(epoch from modified) as uts_modified FROM $table_mailbox WHERE username LIKE '%$fSearch%' OR name LIKE '%$fSearch%' ORDER BY username"; } */ } $result = db_query ($query); if ($result['rows'] > 0) { while ($row = db_array ($result['result'])) { if (check_owner ($SESSID_USERNAME, $row['domain']) || authentication_has_role('global-admin')) { if ('pgsql'==$CONF['database_type']) { $row['created']=gmstrftime('%c %Z',$row['created']); $row['modified']=gmstrftime('%c %Z',$row['modified']); # TODO: code from admin/search.php # $row['created']=gmstrftime('%c %Z',$row['uts_created']); # $row['modified']=gmstrftime('%c %Z',$row['uts_modified']); $row['active']=('t'==$row['active']) ? 1 : 0; # TODO: code from admin/search.php # unset($row['uts_created']); # unset($row['uts_modified']); } $tMailbox[] = $row; } } } include ("$incpath/templates/header.tpl"); include ("$incpath/templates/menu.tpl"); include ("$incpath/templates/search.tpl"); include ("$incpath/templates/footer.tpl"); ?>