Ignore:
Timestamp:
Mar 11, 2010, 11:03:23 PM (14 years ago)
Author:
Eric
Message:

[nbc_HistoryIPExcluder]

This set works fine. A fist release will be build ASAP.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/nbc_HistoryIPExcluder/trunk/admin/HIPE_admin.php

    r5099 r5113  
    33if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
    44
    5 //include_once(get_language_filepath('plugin.lang.php', NBC_HISTORYIPEXCLUDER_PATH));
    65load_language('plugin.lang', HIPE_PATH);
    76
    87
    98$ip_geolocalisation1 = '<a href="http://www.geoiptool.com/fr/?IP=';
    10 $ip_geolocalisation2 = '" title="Geo IP localisation" target="_blank"><img src="'.HIPE_PATH.'/geoip.ico" class="button" alt="'.l10n('nbc_IP_geolocalisation').'"></a>';
     9$ip_geolocalisation2 = '" title="Geo IP localisation" target="_blank"><img src="'.HIPE_PATH.'/geoip.ico" class="button" alt="'.l10n('IP_geolocalisation').'"></a>';
    1110
    1211$ip_ripe1 = '<a href="http://www.ripe.net/whois?form_type=simple&amp;full_query_string=&amp;searchtext=';
     
    2120  $v = str_replace( "\r\n", ",", $v );
    2221  $v = str_replace( ",,", ",", $v );
    23  
    24   $conf['nbc_HistoryIPExcluder'] = serialize($v);
    25   //$conf['nbc_HistoryIPExcluder'] = stripslashes($v);
     22
     23  $conf['nbc_HistoryIPExcluder'] = stripslashes($v);
    2624
    2725  $query = '
    2826    UPDATE '.CONFIG_TABLE.'
    29     SET value="'.addslashes($conf['nbc_HistoryIPExcluder']).'"
     27    SET value="'.$conf['nbc_HistoryIPExcluder'].'"
    3028    WHERE param="nbc_HistoryIPExcluder"
    3129    LIMIT 1';
     
    3331
    3432  // information message
    35   array_push($page['infos'], $lang['HIPE_save_config']);
     33  array_push($page['infos'], l10n('HIPE_save_config'));
    3634}
    3735elseif ( isset($_POST['CleanHist']) )
    3836{
    39   $conf_HIPE = unserialize($conf['nbc_HistoryIPExcluder']);
    40   //$conf_nbc_HistoryIPExcluder = explode("," , $conf['nbc_HistoryIPExcluder']);
     37  $conf_HIPE = explode("," , $conf['nbc_HistoryIPExcluder']);
    4138
    4239  foreach ( $conf_HIPE as $Exclusion )
     
    5956
    6057  // information message
    61   array_push($page['infos'], $lang['HIPE_hist_cleaned']);
     58  array_push($page['infos'], l10n('HIPE_hist_cleaned'));
    6259}
    6360elseif ( isset($_POST['HIPE_IPByMember']) )
     
    6562  $template->assign(
    6663    array(
    67       'HIPE_DESCRIPTION2' => $lang['HIPE_IPByMember_description'],
     64      'HIPE_DESCRIPTION2' => l10n('HIPE_IPByMember_description'),
    6865    )
    6966  );
     
    200197}
    201198
    202 
    203 $conf_HIPE = unserialize($conf['nbc_HistoryIPExcluder']);
    204 //$conf_nbc_HistoryIPExcluder = explode("," , $conf['nbc_HistoryIPExcluder']);
     199$conf_HIPE = explode("," , $conf['nbc_HistoryIPExcluder']);
    205200
    206201$template->assign(
    207202  array(
    208203    'HIPE_F_ACTION' => PHPWG_ROOT_PATH.'admin.php?page=plugin&section=nbc_HistoryIPExcluder%2Fadmin%2FHIPE_admin.php',
    209     'IPs_EXCLUDED' => $conf_HIPE,
     204    'IPs_EXCLUDED' => implode("\n", $conf_HIPE),
    210205  )
    211206);
     
    214209  $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
    215210
    216 //$template->set_filenames( array('plugin_admin_content' => HIPE_PATH.'admin/nbc_HistoryIPExcluder_admin.tpl') );
    217 
    218 //$template->assign_var_from_handle( 'ADMIN_CONTENT', 'plugin_admin_content');
    219 
    220211?>
Note: See TracChangeset for help on using the changeset viewer.