Changeset 1115


Ignore:
Timestamp:
Mar 31, 2006, 12:49:49 AM (18 years ago)
Author:
rub
Message:

[NBM] Step 6: Undo svn:1114 (Lost functionalities)
Re-adapt idea of svn:1114 and optimize treatment:

o check/uncheck all completely done by Javascript
o add function get_user_notifications
o reduce queries for not detailed content mail

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/notification_by_mail.php

    r1114 r1115  
    5454 * Get the authorized_status for each tab
    5555 * return corresponding status
    56 */
     56 */
    5757function get_tab_status($mode)
    5858{
     
    6161  {
    6262    case 'param':
    63     case 'subscribe' :
     63    case 'subscribe':
    6464      $result = ACCESS_WEBMASTER;
    6565      break;
    66     case 'send' :
     66    case 'send':
    6767      $result = ACCESS_ADMINISTRATOR;
    6868      break;
     
    7474}
    7575
    76 function get_user_notifications($enabled_only=false, $valid_email_only=false)
     76/*
     77 * Execute all main queries to get list of user
     78 *
     79 * Type are the type of list 'subscribe', 'send'
     80 *
     81 * return array of users
     82 */
     83function get_user_notifications($action, $check_key_list = array())
    7784{
    7885  global $conf;
    79   $query = '
    80 SELECT
    81   N.user_id, N.check_key, N.last_send, N.enabled,
    82   U.'.$conf['user_fields']['username'].' AS username, U.'.$conf['user_fields']['email'].' AS mail_address
    83 FROM
     86
     87  $data_users = array();
     88
     89  if (in_array($action, array('subscribe', 'send')))
     90  {
     91    $quoted_check_key_list = quote_check_key_list($check_key_list);
     92    if (count($quoted_check_key_list) != 0 )
     93    {
     94      $query_and_check_key = ' and
     95    check_key in ('.implode(",", $quoted_check_key_list).') ';
     96    }
     97    else
     98    {
     99      $query_and_check_key = '';
     100    }
     101
     102    $query = '
     103select
     104  N.user_id,
     105  N.check_key,
     106  U.'.$conf['user_fields']['username'].' as username,
     107  U.'.$conf['user_fields']['email'].' as mail_address,
     108  N.enabled,
     109  N.last_send
     110from
    84111  '.USER_MAIL_NOTIFICATION_TABLE.' as N,
    85112  '.USERS_TABLE.' as U
    86 WHERE
    87   N.user_id = U.'.$conf['user_fields']['id'];
    88   if ($enabled_only)
    89   {
     113where
     114  N.user_id =  U.'.$conf['user_fields']['id'];
     115 
     116    if ($action == 'send')
     117    {
     118      $query .= ' and
     119  N.enabled = \'true\' and
     120  U.'.$conf['user_fields']['email'].' is not null'.$query_and_check_key;
     121    }
     122
    90123    $query .= '
    91 AND N.enabled = \'true\'';
    92   }
    93 
    94   if ($valid_email_only)
    95   {
    96     $query .= '
    97 AND U.'.$conf['user_fields']['email'].' IS NOT NULL';
    98   }
    99   $query .= '
    100 ORDER BY username
    101 ;';
    102   $users = array();
    103   $result = pwg_query($query);
    104   while ($row = mysql_fetch_array($result))
    105   {
    106     $row['enabled'] = ($row['enabled']=='true') ? true:false;
    107     array_push($users, $row);
    108   }
    109   return $users;
    110 }
    111 
    112 function make_index_absolute_url($cat_id)
    113 {
    114   global $page, $conf;
    115   if ( isset($page['root_path']) )
    116   {
    117     $save_root_path = $page['root_path'];
    118   }
    119   $page['root_path'] = 'http://'.$_SERVER['HTTP_HOST'].cookie_path().'/';
    120   $url = make_index_url( array('category'=>$cat_id) );
    121   if (isset($save_root_path))
    122   {
    123     $page['root_path'] = $save_root_path;
    124   }
    125   else
    126   {
    127     unset($page['root_path']);
    128   }
    129   return $url;
     124order by
     125  username;';
     126
     127    $result = pwg_query($query);
     128    if (!empty($result))
     129    {
     130      while ($nbm_user = mysql_fetch_array($result))
     131      {
     132        array_push($data_users, $nbm_user);
     133      }
     134    }
     135  }
     136  return $data_users;
    130137}
    131138
     
    142149  '.USERS_TABLE.'
    143150set
    144   mail_address = null
     151  '.$conf['user_fields']['email'].' = null
    145152where
    146   trim(mail_address) = \'\';';
     153  trim('.$conf['user_fields']['email'].') = \'\';';
    147154  pwg_query($query);
    148155
     
    150157  $query = '
    151158select
    152   u.id user_id, u.username, u.mail_address
     159  u.'.$conf['user_fields']['id'].' as user_id,
     160  u.'.$conf['user_fields']['username'].' as username,
     161  u.'.$conf['user_fields']['email'].' as mail_address
    153162from
    154   '.USERS_TABLE.' as u left join '.USER_MAIL_NOTIFICATION_TABLE.' as m on u.id = m.user_id
     163  '.USERS_TABLE.' as u left join '.USER_MAIL_NOTIFICATION_TABLE.' as m on u.'.$conf['user_fields']['id'].' = m.user_id
    155164where
    156   u.mail_address is not null and
     165  u.'.$conf['user_fields']['email'].' is not null and
    157166  m.user_id is null
    158167order by
    159   id;';
     168  user_id;';
    160169
    161170  $result = pwg_query($query);
     
    166175    $check_key_list = array();
    167176
    168     while ($row = mysql_fetch_array($result))
     177    while ($nbm_user = mysql_fetch_array($result))
    169178    {
    170179      // Calculate key
    171       $row['check_key'] = find_available_check_key();
     180      $nbm_user['check_key'] = find_available_check_key();
    172181
    173182      // Save key
    174       array_push($check_key_list, $row['check_key']);
    175 
    176       // Insert new rows
     183      array_push($check_key_list, $nbm_user['check_key']);
     184
     185      // Insert new nbm_users
    177186      array_push
    178187      (
    179         $inserts,
     188        $inserts, 
    180189        array
    181190        (
    182           'user_id' => $row['user_id'],
    183           'check_key' => $row['check_key'],
     191          'user_id' => $nbm_user['user_id'],
     192          'check_key' => $nbm_user['check_key'],
    184193          'enabled' => 'false' // By default if false, set to true with specific functions
    185194        )
    186195      );
    187196
    188       array_push($page['infos'], sprintf(l10n('nbm_User %s [%s] added.'), $row['username'], $row['mail_address']));
    189     }
    190 
    191     // Insert new rows
     197      array_push($page['infos'], sprintf(l10n('nbm_User %s [%s] added.'), $nbm_user['username'], $nbm_user['mail_address']));
     198    }
     199
     200    // Insert new nbm_users
    192201    mass_inserts(USER_MAIL_NOTIFICATION_TABLE, array('user_id', 'check_key', 'enabled'), $inserts);
    193202    // Update field enabled with specific function
     
    204213 * Return list of "treated/selected" users
    205214 */
    206 function do_action_send_mail_notification($check_key_list = array(), $customize_mail_content = '')
     215function do_action_send_mail_notification($action = 'list', $check_key_list = array(), $customize_mail_content = '')
    207216{
    208217  global $conf, $page, $user, $lang_info, $lang;
    209 
    210   list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();'));
    211 
    212   if (isset($customize_mail_content))
    213   {
    214     $customize_mail_content = $conf['nbm_complementary_mail_content'];
    215   }
    216 
    217   $user_notifications = get_user_notifications(true,true);
    218 
    219   $error_on_mail_count = 0;
    220   $sent_mail_count = 0;
    221   $datas = array();
    222   // Save $user, $lang_info and $lang arrays (include/user.inc.php has been executed)
    223   $sav_mailtousers_user = $user;
    224   $sav_mailtousers_lang_info = $lang_info;
    225   $sav_mailtousers_lang = $lang;
    226   // Save message info and error in the original language
    227   $msg_info = l10n('nbm_Mail sent to %s [%s].');
    228   $msg_error = l10n('nbm_Error when sending email to %s [%s].');
    229   // Last Language
    230   $last_mailtousers_language = $user['language'];
    231 
    232   // Init mail configuration
    233   $send_as_name = ((isset($conf['nbm_send_mail_as']) and !empty($conf['nbm_send_mail_as'])) ? $conf['nbm_send_mail_as'] : $conf['gallery_title']);
    234   $send_as_mail_address = get_webmaster_mail_address();
    235   $send_as_mail_formated = format_email($send_as_name, $send_as_mail_address);
    236 
    237   foreach ($user_notifications as $user_notification)
    238   {
    239     if (!in_array($user_notification['check_key'], $check_key_list))
    240       continue;
    241     if (!$user_notification['enabled'])
    242       continue;
    243     $user = array();
    244     $user['id'] = $user_notification['user_id'];
    245     $user = array_merge($user, getuserdata($user['id'], true));
    246 
    247     if ($last_mailtousers_language != $user['language'])
    248     {
     218  $return_list = array();
     219 
     220  if (in_array($action, array('list', 'send')))
     221  {
     222    list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();'));
     223
     224    $is_action_send = ($action == 'send');
     225
     226    if (isset($customize_mail_content))
     227    {
     228      $customize_mail_content = $conf['nbm_complementary_mail_content'];
     229    }
     230
     231    // disabled and null mail_address are not selected in the list
     232    $data_users = get_user_notifications('send', $check_key_list);
     233
     234    if (count($data_users) > 0)
     235    {
     236      $error_on_mail_count = 0;
     237      $sent_mail_count = 0;
     238      // Save $user, $lang_info and $lang arrays (include/user.inc.php has been executed)
     239      $sav_mailtousers_user = $user;
     240      $sav_mailtousers_lang_info = $lang_info;
     241      $sav_mailtousers_lang = $lang;
     242      // Save message info and error in the original language
     243      $msg_info = l10n('nbm_Mail sent to %s [%s].');
     244      $msg_error = l10n('nbm_Error when sending email to %s [%s].');
     245      // Last Language
    249246      $last_mailtousers_language = $user['language'];
    250247
    251       // Re-Init language arrays
    252       $lang_info = array();
    253       $lang  = array();
    254 
    255       // language files
    256       include(get_language_filepath('common.lang.php'));
    257       // No test admin because script is checked admin (user selected no)
    258       // Translations are in admin file too
    259       include(get_language_filepath('admin.lang.php'));
    260     }
    261 
    262     $message = '';
    263     $news = news($user_notification['last_send'], $dbnow);
    264     if (count($news) > 0)
    265     {
    266       $subject = '['.$conf['gallery_title'].']: '.l10n('nbm_ContentObject');
    267       $message .= sprintf(l10n('nbm_ContentHello'), $user_notification['username']).",\n\n";
    268 
    269       if (!is_null($user_notification['last_send']))
    270         $message .= sprintf(l10n('nbm_ContentNewElementsBetween'), $user_notification['last_send'], $dbnow);
    271       else
    272         $message .= sprintf(l10n('nbm_ContentNewElements'), $dbnow);
    273 
    274       if ($conf['nbm_send_detailed_content'])
    275       {
    276         $message .= ":\n";
    277         foreach ($news as $line)
     248      if ($is_action_send)
     249      {
     250        // Init mail configuration
     251        $send_as_name = ((isset($conf['nbm_send_mail_as']) and !empty($conf['nbm_send_mail_as'])) ? $conf['nbm_send_mail_as'] : $conf['gallery_title']);
     252        $send_as_mail_address = get_webmaster_mail_address();
     253        $send_as_mail_formated = format_email($send_as_name, $send_as_mail_address);
     254      }
     255
     256      foreach ($data_users as $nbm_user)
     257      {
     258        $user = array();
     259        $user['id'] = $nbm_user['user_id'];
     260        $user = array_merge($user, getuserdata($user['id'], true));
     261
     262        if ($last_mailtousers_language != $user['language'])
    278263        {
    279           $message .= '  o '.$line."\n";
     264          $last_mailtousers_language = $user['language'];
     265
     266          // Re-Init language arrays
     267          $lang_info = array();
     268          $lang  = array();
     269
     270          // language files
     271          include(get_language_filepath('common.lang.php'));
     272          // No test admin because script is checked admin (user selected no)
     273          // Translations are in admin file too
     274          include(get_language_filepath('admin.lang.php'));
    280275        }
    281       }
    282       $message .= ".\n";
    283 
    284       $message .= sprintf(l10n('nbm_ContentGoTo'), $conf['gallery_title'], $conf['gallery_url'])."\n\n";
    285       $message .= $customize_mail_content."\n\n";
    286       $message .= l10n('nbm_ContentByeBye')."\n   ".$send_as_name."\n\n";
    287       $message .= "\n".sprintf(l10n('nbm_ContentUnsubscribe'), $send_as_mail_address)."\n\n";
    288       if (pwg_mail(format_email($user_notification['username'], $user_notification['mail_address']), $send_as_mail_formated, $subject, $message))
    289       {
    290         $sent_mail_count++;
    291         array_push($page['infos'], sprintf($msg_info, $user_notification['username'], $user_notification['mail_address']));
    292         $data = array('user_id' => $user_notification['user_id'],
    293                       'last_send' => $dbnow);
    294         array_push($datas, $data);
    295       }
    296       else
    297       {
    298         $error_on_mail_count++;
    299         array_push($page['errors'], sprintf($msg_error, $user_notification['username'], $user_notification['mail_address']));
    300       }
    301     }
    302   }
    303 
    304   // Restore $user, $lang_info and $lang arrays (include/user.inc.php has been executed)
    305   $user = $sav_mailtousers_user;
    306   $lang_info = $sav_mailtousers_lang_info;
    307   $lang = $sav_mailtousers_lang;
    308 
    309   mass_updates(
    310     USER_MAIL_NOTIFICATION_TABLE,
    311     array(
    312       'primary' => array('user_id'),
    313       'update' => array('last_send')
    314      ),
    315      $datas
    316      );
    317 
    318   if ($error_on_mail_count != 0)
    319   {
    320     array_push($page['errors'], sprintf(l10n('nbm_%d mails were not sent.'), $error_on_mail_count));
    321   }
    322   else
    323   {
    324     if ($sent_mail_count == 0)
    325       array_push($page['infos'], l10n('nbm_No mail to send.'));
     276
     277        if ($is_action_send)
     278        {
     279          $message = '';
     280
     281          if ($conf['nbm_send_detailed_content'])
     282          {
     283             $news = news($nbm_user['last_send'], $dbnow);
     284             $exist_data = count($news) > 0;
     285          }
     286          else
     287          {
     288            $exist_data = news_exists($nbm_user['last_send'], $dbnow);
     289          }
     290
     291          if ($exist_data)
     292          {
     293            array_push($return_list, $nbm_user);
     294
     295            $subject = '['.$conf['gallery_title'].']: '.l10n('nbm_ContentObject');
     296            $message .= sprintf(l10n('nbm_ContentHello'), $nbm_user['username']).",\n\n";
     297
     298            if (!is_null($nbm_user['last_send']))
     299              $message .= sprintf(l10n('nbm_ContentNewElementsBetween'), $nbm_user['last_send'], $dbnow);
     300            else
     301              $message .= sprintf(l10n('nbm_ContentNewElements'), $dbnow);
     302
     303            if ($conf['nbm_send_detailed_content'])
     304            {
     305              $message .= ":\n";
     306
     307              foreach ($news as $line)
     308              {
     309                $message .= '  o '.$line."\n";
     310              }
     311              $message .= "\n";
     312            }
     313            else
     314            {
     315              $message .= ".\n";
     316            }
     317
     318            $message .= sprintf(l10n('nbm_ContentGoTo'), $conf['gallery_title'], $conf['gallery_url'])."\n\n";
     319            $message .= $customize_mail_content."\n\n";
     320            $message .= l10n('nbm_ContentByeBye')."\n   ".$send_as_name."\n\n";
     321            $message .= "\n".sprintf(l10n('nbm_ContentUnsubscribe'), $send_as_mail_address)."\n\n";
     322
     323            if (pwg_mail(format_email($nbm_user['username'], $nbm_user['mail_address']), $send_as_mail_formated, $subject, $message))
     324            {
     325              $sent_mail_count += 1;
     326              array_push($page['infos'], sprintf($msg_info, $nbm_user['username'], $nbm_user['mail_address']));
     327
     328              $data = array('user_id' => $user_notification['user_id'],
     329                            'last_send' => $dbnow);
     330              array_push($datas, $data);
     331            }
     332            else
     333            {
     334              $error_on_mail_count += 1;
     335              array_push($page['errors'], sprintf($msg_error, $nbm_user['username'], $nbm_user['mail_address']));
     336            }
     337          }
     338        }
     339        else
     340        {
     341          if (news_exists($nbm_user['last_send'], $dbnow))
     342          {
     343            array_push($return_list, $nbm_user);
     344          }
     345        }
     346      }
     347
     348      // Restore $user, $lang_info and $lang arrays (include/user.inc.php has been executed)
     349      $user = $sav_mailtousers_user;
     350      $lang_info = $sav_mailtousers_lang_info;
     351      $lang = $sav_mailtousers_lang;
     352
     353      if ($is_action_send)
     354      {
     355        mass_updates(
     356          USER_MAIL_NOTIFICATION_TABLE,
     357          array(
     358            'primary' => array('user_id'),
     359            'update' => array('last_send')
     360           ),
     361           $datas
     362           );
     363
     364
     365        if ($error_on_mail_count != 0)
     366        {
     367          array_push($page['errors'], sprintf(l10n('nbm_%d mails were not sent.'), $error_on_mail_count));
     368        }
     369        else
     370        {
     371          if ($sent_mail_count == 0)
     372            array_push($page['infos'], l10n('nbm_No mail to send.'));
     373          else
     374            array_push($page['infos'], sprintf(l10n('nbm_%d mails were sent.'), $sent_mail_count));
     375        }
     376      }
     377    }
    326378    else
    327       array_push($page['infos'], sprintf(l10n('nbm_%d mails were sent.'), $sent_mail_count));
    328   }
     379    {
     380      if ($is_action_send)
     381      {
     382        array_push($page['errors'], l10n('nbm_No user to send notifications by mail.'));
     383      }
     384    }
     385  }
     386  return $return_list;
    329387}
    330388
     
    365423    // Update param
    366424    $result = pwg_query('select param, value from '.CONFIG_TABLE.' where param like \'nbm\\_%\'');
    367     while ($row = mysql_fetch_array($result))
     425    while ($nbm_user = mysql_fetch_array($result))
    368426    {
    369427      if (isset($_POST['param_submit']))
    370428      {
    371         if (isset($_POST[$row['param']]))
     429        if (isset($_POST[$nbm_user['param']]))
    372430        {
    373           $value = $_POST[$row['param']];
     431          $value = $_POST[$nbm_user['param']];
    374432
    375433          $query = '
    376434update
    377435  '.CONFIG_TABLE.'
    378 set
     436set 
    379437  value = \''. str_replace("\'", "''", $value).'\'
    380438where
    381   param = \''.$row['param'].'\';';
     439  param = \''.$nbm_user['param'].'\';';
    382440          pwg_query($query);
    383441          $updated_param_count += 1;
     
    385443      }
    386444
    387       $conf[$row['param']] = $row['value'];
     445      $conf[$nbm_user['param']] = $nbm_user['value'];
    388446
    389447      // if the parameter is present in $_POST array (if a form is submited), we
    390448      // override it with the submited value
    391       if (isset($_POST[$row['param']]))
    392       {
    393         $conf[$row['param']] = stripslashes($_POST[$row['param']]);
     449      if (isset($_POST[$nbm_user['param']]))
     450      {
     451        $conf[$nbm_user['param']] = stripslashes($_POST[$nbm_user['param']]);
    394452      }
    395453
    396454      // If the field is true or false, the variable is transformed into a
    397455      // boolean value.
    398       if ($conf[$row['param']] == 'true' or $conf[$row['param']] == 'false')
    399       {
    400         $conf[$row['param']] = get_boolean($conf[$row['param']]);
    401       }
    402     }
    403 
     456      if ($conf[$nbm_user['param']] == 'true' or $conf[$nbm_user['param']] == 'false')
     457      {
     458        $conf[$nbm_user['param']] = get_boolean($conf[$nbm_user['param']]);
     459      }
     460    }
     461   
    404462    if ($updated_param_count != 0)
    405463    {
     
    425483    if (isset($_POST['send_submit']) and isset($_POST['send_selection']) and isset($_POST['send_customize_mail_content']))
    426484    {
    427       do_action_send_mail_notification($_POST['send_selection'], $_POST['send_customize_mail_content']);
     485      do_action_send_mail_notification('send', $_POST['send_selection'], $_POST['send_customize_mail_content']);
    428486    }
    429487  }
     
    497555      );
    498556
    499     $user_notifications = get_user_notifications();
    500 
    501     foreach( $user_notifications as $user_notification)
     557    $data_users = get_user_notifications('subscribe');
     558    foreach ($data_users as $nbm_user)
    502559    {
    503560      $template->assign_block_vars(
    504         $user_notification['enabled'] ? 'category_option_true' : 'category_option_false',
     561        (get_boolean($nbm_user['enabled']) ? 'category_option_true' : 'category_option_false'),
    505562        array('SELECTED' => '',
    506               'VALUE' => $user_notification['check_key'],
    507               'OPTION' => $user_notification['username'].'['.$user_notification['mail_address'].']'
     563              'VALUE' => $nbm_user['check_key'],
     564              'OPTION' => $nbm_user['username'].'['.$nbm_user['mail_address'].']'
    508565          ));
    509566    }
     567
    510568    break;
    511569  }
     
    515573    $template->assign_block_vars($page['mode'], array());
    516574
    517     $data_rows = get_user_notifications(true,true);
    518 
    519     if  (count($data_rows) == 0)
     575    $data_users = do_action_send_mail_notification('list');
     576
     577    if  (count($data_users) == 0)
    520578    {
    521579      $template->assign_block_vars($page['mode'].'.send_empty', array());
     
    528586          'CUSTOMIZE_MAIL_CONTENT' => isset($_POST['send_customize_mail_content']) ? $_POST['send_customize_mail_content'] : $conf['nbm_complementary_mail_content']
    529587          ));
    530       foreach ($data_rows as $num => $local_user)
    531       {
    532         $checked = 'checked="checked"';
    533         if ( isset($_POST['send_submit']) and
    534              ( !isset($_POST['send_selection']) or
    535                !in_array($local_user['check_key'], $_POST['send_selection'])
    536              )
    537            )
    538         {
    539           $checked='';
    540         }
    541         $template->assign_block_vars(
     588
     589      foreach ($data_users as $num => $nbm_user)
     590          $template->assign_block_vars(
    542591            $page['mode'].'.send_data.user_send_mail',
    543592            array(
    544               'CLASS' => ($num % 2 == 1) ? 'row2' : 'row1',
    545               'ID' => $local_user['check_key'],
    546               'CHECKED' => $checked,
    547               'USERNAME'=> $local_user['username'],
    548               'EMAIL' => $local_user['mail_address'],
    549               'LAST_SEND'=> $local_user['last_send']
     593              'CLASS' => ($num % 2 == 1) ? 'nbm_user2' : 'nbm_user1',
     594              'ID' => $nbm_user['check_key'],
     595              'CHECKED' =>  ( // not check if not selected,  on init select<all
     596                              isset($_POST['send_selection']) and // not init
     597                              !in_array($nbm_user['check_key'],  $_POST['send_selection']) // not selected
     598                            )   ? '' : 'checked="checked"',
     599              'USERNAME'=> $nbm_user['username'],
     600              'EMAIL' => $nbm_user['mail_address'],
     601              'LAST_SEND'=> $nbm_user['last_send']
    550602              ));
    551       }
    552603    }
    553604
  • trunk/template/yoga/admin/notification_by_mail.tpl

    r1114 r1115  
    88  <h3>
    99    <p style="text-align:center;">
    10       <a href="{header_link.PARAM_MODE}">{lang:nbm_param_mode}</a> |
    11       <a href="{header_link.SUBSCRIBE_MODE}">{lang:nbm_subscribe_mode}</a> |
     10      <a href="{header_link.PARAM_MODE}">{lang:nbm_param_mode}</a> | 
     11      <a href="{header_link.SUBSCRIBE_MODE}">{lang:nbm_subscribe_mode}</a> | 
    1212      <a href="{header_link.SEND_MODE}">{lang:nbm_send_mode}</a>
    1313    </p>
     
    6262    <center>
    6363      {lang:nbm_no_user_available_to_send_L1}<br>
    64       {lang:nbm_no_user_available_to_send_L2}
     64      {lang:nbm_no_user_available_to_send_L2}<br>
    6565    </center>
    6666    <!-- END send_empty -->
     
    8585      </table>
    8686      <p>
    87         <input type="button" value="{lang:nbm_send_check_all}" onclick="SelectAll(document.getElementById('notification_by_mail'))"/>
    88         /
    89         <input type="button" value="{lang:nbm_send_uncheck_all}" onclick="DeselectAll(document.getElementById('notification_by_mail'))"/>
     87          <a href="" onclick="SelectAll(document.getElementById('notification_by_mail')); return false;">{lang:nbm_send_check_all}</a>
     88        / <a href="" onclick="DeselectAll(document.getElementById('notification_by_mail')); return false;">{lang:nbm_send_uncheck_all}</a>
    9089      </p>
    9190    </fieldset>
Note: See TracChangeset for help on using the changeset viewer.