Changeset 5615 for extensions/nbc_HistoryIPExcluder
- Timestamp:
- Apr 3, 2010, 11:39:13 PM (15 years ago)
- Location:
- extensions/nbc_HistoryIPExcluder/trunk
- Files:
-
- 2 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/nbc_HistoryIPExcluder/trunk/admin/HIPE_admin.php
r5162 r5615 4 4 5 5 load_language('plugin.lang', HIPE_PATH); 6 7 // +-----------------------------------------------------------------------+ 8 // | Getting plugin version | 9 // +-----------------------------------------------------------------------+ 10 $plugin = HIPE_infos(HIPE_PATH); 11 $version = $plugin['version']; 12 $name = $plugin['name']; 6 13 7 14 … … 76 83 $subresult = pwg_query($query); 77 84 78 while ($subrow = mysql_fetch_array($subresult))85 while ($subrow = pwg_db_fetch_assoc($subresult)) 79 86 { 80 87 $template->assign( … … 116 123 $subresult = pwg_query($query); 117 124 118 while ($subrow = mysql_fetch_array($subresult))125 while ($subrow = pwg_db_fetch_assoc($subresult)) 119 126 { 120 127 $template->assign( … … 149 156 $subresult = pwg_query($query); 150 157 151 while ($subrow = mysql_fetch_array($subresult))158 while ($subrow = pwg_db_fetch_assoc($subresult)) 152 159 { 153 160 $template->assign( … … 182 189 $subresult = pwg_query($query); 183 190 184 while ($subrow = mysql_fetch_array($subresult))191 while ($subrow = pwg_db_fetch_assoc($subresult)) 185 192 { 186 193 $template->assign( … … 201 208 $template->assign( 202 209 array( 203 'HIPE_F_ACTION' => PHPWG_ROOT_PATH.'admin.php?page=plugin§ion=HistoryIPExcluder%2Fadmin%2FHIPE_admin.php', 210 'HIPE_VERSION' => $version, 211 'HIPE_NAME' => $name, 212 'HIPE_PATH' => HIPE_PATH, 204 213 'IPs_EXCLUDED' => implode("\n", $conf_HIPE), 205 214 ) -
extensions/nbc_HistoryIPExcluder/trunk/admin/HIPE_admin.tpl
r5162 r5615 1 1 <div class="titrePage"> 2 <h2>{ 'HIPE_admin_title'|@translate}</h2>2 <h2>{$HIPE_NAME}{'HIPE_version'|@translate}{$HIPE_VERSION}</h2> 3 3 </div> 4 4 5 5 <p>{'HIPE_description'|@translate}</p> 6 6 7 <form method="post" action=" {$HIPE_F_ACTION}" class="general">7 <form method="post" action="" class="general"> 8 8 <fieldset> 9 9 <legend>{'HIPE_admin_section1'|@translate}</legend> -
extensions/nbc_HistoryIPExcluder/trunk/language/en_UK/plugin.lang.php
r5121 r5615 2 2 global $lang; 3 3 4 $lang['HIPE_admin_title'] = 'NBC History IP Excluder';5 4 $lang['HIPE_description'] = 'This plugin allows to exclude from the history and statistics of IP or IP ranges. <br>Its activation blocks record in the table of IP *_history specified in the table below.'; 6 5 $lang['HIPE_admin_section1'] = 'IP Exclusion'; … … 27 26 28 27 $lang['IP_geolocalisation'] = 'Geolocalisation'; 28 29 // --------- Starting below: New or revised $lang ---- from version 2.1.0 30 $lang['HIPE_version'] = ' - Version: '; 31 // --------- End: New or revised $lang ---- from version 2.1.0 29 32 ?> -
extensions/nbc_HistoryIPExcluder/trunk/language/es_ES/plugin.lang.php
r5135 r5615 2 2 global $lang; 3 3 4 $lang['HIPE_admin_title'] = 'NBC History IP Excluder';5 4 $lang['HIPE_description'] = 'Este plugin permite excluir de la reseña histórica y las estadísticas del IP o las playas d \'IP. <br> Su activación bloquea el registro en la mesa * _history IP especificados en el tablero más abajo.'; 6 5 $lang['HIPE_admin_section1'] = 'IP a excluir'; … … 28 27 $lang['IP_geolocalisation'] = 'Geolocalización'; 29 28 $lang['submit'] = 'Someter'; 29 30 // --------- Starting below: New or revised $lang ---- from version 2.1.0 31 $lang['HIPE_version'] = ' - Versión: '; 32 // --------- End: New or revised $lang ---- from version 2.1.0 30 33 ?> -
extensions/nbc_HistoryIPExcluder/trunk/language/fr_FR/plugin.lang.php
r5121 r5615 2 2 global $lang; 3 3 4 $lang['HIPE_admin_title'] = 'NBC History IP Excluder';5 4 $lang['HIPE_description'] = 'Ce plugin permet d\'exclure de l\'historique et des statistiques des IP ou plages d\'IP.<br>Son activation bloque l\'enregistrement dans la table *_history des IP spécifiées dans le tableau ci-dessous.'; 6 5 $lang['HIPE_admin_section1'] = 'IP à exclure'; … … 27 26 28 27 $lang['IP_geolocalisation'] = 'Géolocalisation'; 28 29 // --------- Starting below: New or revised $lang ---- from version 2.1.0 30 $lang['HIPE_version'] = ' - Version: '; 31 // --------- End: New or revised $lang ---- from version 2.1.0 29 32 ?> -
extensions/nbc_HistoryIPExcluder/trunk/language/hu_HU/plugin.lang.php
r5149 r5615 2 2 global $lang; 3 3 4 $lang['HIPE_admin_title'] = 'NBC History IP Excluder';5 4 $lang['HIPE_description'] = 'Ezzel a bővítménnyel kizárhat IP címeket, vagy IP tartományokat az előzményekből és a statisztikából. <br>A blokkolt rekordokat az IP *_history táblában az alábbi táblázat tartalmazza.'; 6 5 $lang['HIPE_admin_section1'] = 'IP-k kizárása'; … … 27 26 28 27 $lang['IP_geolocalisation'] = 'Földrajzi hely'; 28 29 // --------- Starting below: New or revised $lang ---- from version 2.1.0 30 $lang['HIPE_version'] = ' - Változat: '; 31 // --------- End: New or revised $lang ---- from version 2.1.0 29 32 ?> -
extensions/nbc_HistoryIPExcluder/trunk/language/it_IT/plugin.lang.php
r5152 r5615 2 2 global $lang; 3 3 4 $lang['HIPE_admin_title'] = 'NBC History IP Excluder';5 4 $lang['HIPE_description'] = 'Questo plugin esclude gli indirizzi IP o intervalli d\indieizzi dalla cronologgia e dalle statistiche.<br>Attivandolo, gli indirizzi IP specifici della tabella sottostante non saranno più registrati nella tabella *.history de PWG.'; 6 5 $lang['HIPE_admin_section1'] = 'Esclusione d\'IP'; … … 27 26 28 27 $lang['IP_geolocalisation'] = 'Geolocalizzazione'; 28 29 // --------- Starting below: New or revised $lang ---- from version 2.1.0 30 $lang['HIPE_version'] = ' - Versione: '; 31 // --------- End: New or revised $lang ---- from version 2.1.0 29 32 ?> -
extensions/nbc_HistoryIPExcluder/trunk/main.inc.php
r5162 r5615 2 2 /* 3 3 Plugin Name: History IP Excluder 4 Version: 2. 0.14 Version: 2.1.0 5 5 Description: Permet l'exclusion d'une IP ou d'une plage d'IP de l historique - Excludes one IP or a range of IP from the history. 6 6 Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=147 … … 9 9 */ 10 10 11 /* 12 :: HISTORY 13 14 1.0.x to 1.6.x - Plugin only for PWG 1.7.x 15 16 2.0.0 - Compliance with Piwigo 2.0.x 17 18 2.1.0 - Compliance with Piwigo 2.1.x 19 - Multiple database support 20 - Removing "nbc_" prefix in plugin code and display in piwigo's plugin manager 21 - Displaying the good plugin name and current version in admin panel 22 23 -------------------------------------------------------------------------------- 24 */ 25 11 26 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 12 27 13 28 if (!defined('HIPE_DIR')) define('HIPE_DIR' , basename(dirname(__FILE__))); 14 29 if (!defined('HIPE_PATH')) define('HIPE_PATH' , PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/'); 30 31 include_once (HIPE_PATH.'/include/functions.inc.php'); 15 32 16 33 load_language('plugin.lang', HIPE_PATH); … … 25 42 // | Getting plugin name | 26 43 // +-----------------------------------------------------------------------+ 27 $plugin = PluginNfo(HIPE_PATH);44 $plugin = HIPE_infos(HIPE_PATH); 28 45 $name = $plugin['name']; 29 46 … … 69 86 } 70 87 } 71 72 73 /* Email sending debugger function */74 function DebugLog($value1,$value2)75 {76 $fo=fopen (HIPE_PATH.'admin/log.txt','a') ;77 fwrite($fo,"======================\n") ;78 fwrite($fo, "\n" . $value1 . "\r\n") ;79 fwrite($fo, "\n" . $value2 . "\r\n") ;80 fclose($fo) ;81 }82 83 /* Function called to get the plugin name */84 function PluginNfo($dir)85 {86 $path = $dir;87 88 $plg_data = implode( '', file($path.'main.inc.php') );89 if ( preg_match("|Plugin Name: (.*)|", $plg_data, $val) )90 {91 $plugin['name'] = trim( $val[1] );92 }93 if (preg_match("|Version: (.*)|", $plg_data, $val))94 {95 $plugin['version'] = trim($val[1]);96 }97 if ( preg_match("|Plugin URI: (.*)|", $plg_data, $val) )98 {99 $plugin['uri'] = trim($val[1]);100 }101 if ($desc = load_language('description.txt', $path.'/', array('return' => true)))102 {103 $plugin['description'] = trim($desc);104 }105 elseif ( preg_match("|Description: (.*)|", $plg_data, $val) )106 {107 $plugin['description'] = trim($val[1]);108 }109 if ( preg_match("|Author: (.*)|", $plg_data, $val) )110 {111 $plugin['author'] = trim($val[1]);112 }113 if ( preg_match("|Author URI: (.*)|", $plg_data, $val) )114 {115 $plugin['author uri'] = trim($val[1]);116 }117 if (!empty($plugin['uri']) and strpos($plugin['uri'] , 'extension_view.php?eid='))118 {119 list( , $extension) = explode('extension_view.php?eid=', $plugin['uri']);120 if (is_numeric($extension)) $plugin['extension'] = $extension;121 }122 // IMPORTANT SECURITY !123 $plugin = array_map('htmlspecialchars', $plugin);124 125 return $plugin ;126 }127 128 88 ?> -
extensions/nbc_HistoryIPExcluder/trunk/maintain.inc.php
r5162 r5615 27 27 WHERE param = "nbc_HistoryIPExcluder" 28 28 ;'; 29 $count = mysql_num_rows(pwg_query($query));29 $count = pwg_db_num_rows(pwg_query($query)); 30 30 31 31 if ($count == 1)
Note: See TracChangeset
for help on using the changeset viewer.