source: sandbox/2.5.0-expresso1/expressoMail1_2/inc/hook_config_validate.inc.php @ 5988

Revision 5988, 538 bytes checked in by marcieli, 12 years ago (diff)

Ticket #2633 - Concluído: Inserir validação de limite de marcadores no Administrador.

Line 
1<?php
2
3$GLOBALS['phpgw_info']['server']['found_validation_hook'] = True;
4
5function expressoMail_limit_labels($value){
6        $db = '';
7        $db = $db ? $db : $GLOBALS['phpgw']->db;        // this is to allow setup to set the db
8        $db->query("SELECT max(slot) as slot from expressomail_label",__LINE__,__FILE__);
9        while( $db->next_record() )
10        {
11                $slot = $db->f('slot');
12        }
13        if(isset($slot)){
14                if($value < $slot){
15                        $GLOBALS['config_error'] = 'There are users with an quantity greater than of markers. Respect the minimum number indicated.';
16                }
17        }
18
19}
20
21?>
Note: See TracBrowser for help on using the repository browser.