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.
|
Rev | Line | |
---|
[5988] | 1 | <?php |
---|
| 2 | |
---|
| 3 | $GLOBALS['phpgw_info']['server']['found_validation_hook'] = True; |
---|
| 4 | |
---|
| 5 | function 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.