Changeset 3695 for extensions/whois_online
- Timestamp:
- Jul 28, 2009, 9:33:06 PM (16 years ago)
- Location:
- extensions/whois_online
- Files:
-
- 104 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/whois_online/config.php
r3340 r3695 16 16 if (!defined('IN_ADMIN') or !IN_ADMIN) die('Hacking attempt!'); 17 17 global $conf, $conf_whois, $lang; 18 $conf['show_gt'] = true; 18 19 load_language('plugin.lang', WHOIS_ONLINE_PATH); 19 20 … … 83 84 if ( $sub and count($errors) == 0 and $_POST['from']=='config' and !is_adviser()) { 84 85 if ( $conf['Whois Online'] != serialize($conf_whois) ) { 86 $conf['Whois Online'] = serialize($conf_whois); 85 87 pwg_query('REPLACE INTO ' . CONFIG_TABLE . " (param,value,comment) 86 VALUES ('Whois Online','". serialize($conf_whois)."','Whois Online configuration');");88 VALUES ('Whois Online','". $conf['Whois Online'] ."','Whois Online configuration');"); 87 89 array_push($infos, l10n('Configuration has been saved.')); 88 90 } … … 210 212 // Most members ever online was 211 213 if (!isset($conf_whois['Users']['count']) or $conf_whois['Users']['count'] == 0) { 212 $count = mysql_fetch_assoc(pwg_query('SELECT MAX(` id`) AS `ctr` FROM ' . USERS_TABLE));214 $count = mysql_fetch_assoc(pwg_query('SELECT MAX(`'. $conf['user_fields']['id'] .'`) AS `ctr` FROM ' . USERS_TABLE)); 213 215 $conf_whois['Users']['count'] = $count['ctr']; 214 216 } -
extensions/whois_online/main.inc.php
r3340 r3695 21 21 // | USA. | 22 22 // +-----------------------------------------------------------------------+ 23 24 23 /* 25 24 Plugin Name: Whois online 26 Version: 2.0. i25 Version: 2.0.j 27 26 Description: Who is online? 28 27 Plugin URI: http://fr.piwigo.org/ext/extension_view.php?eid=279 … … 30 29 Author URI: http://www.vdigital.org 31 30 */ 32 /* 33 34 /** History ** 35 2009-05-xx 2.0.j 36 37 Additionnal flags (Ireland, Armenia, Estonia, Kazakhstan, Belarus, Andorra, 38 Turkey, Albania, Bosnia and Herzegovina, Azerbaijan, Iceland, European Union, 39 Israel, Morocco, New Caledonia and some other revised) 40 2009-05-20 2.0.i 41 Bug resolution. 42 Icons removed due to tablesorter constraints. 43 Active link style on active filter. 44 Additionnal flags (Luxemburg, Austria, Malta, and some other revised) 45 2009-05-19 2.0.h 46 Additional links to profile and permissions corrective path with filtering. 47 Minor optimizations. 48 Additionnal flags (Egypt, Indonesia, Malaysia) 49 2009-05-17 2.0.g 50 htmlspecialchars for Countries (Some City have quoted names) 51 Keep Previous config. 52 Additional links to profile and permissions 53 Additionnal flags 54 2009-05-12 2.0.e and 2.0.f 55 IPV4 Localisation 56 Monitoring Permanence/Temporary user lists 57 Reporting of User accesses 58 Most connected 59 And more... 60 2009-04-14 2.0.d 61 Icon on History can be removed 62 Appropriate titles for both links 63 2009-04-14 2.0.c 64 Default display on admin pages even if not displayed on other pages 65 Bug on History Search page 66 Appropriate titles for both links on each first access (later "Random picture") 67 2009-04-13 2.0.b 68 Corrective of &review and &others 69 Automatic upgrade 70 */ 71 define('WHOIS_ONLINE_VER', '2.0.i'); 31 define('WHOIS_ONLINE_VER', '2.0.j'); 72 32 global $prefixeTable, $conf; 73 33 // $conf['debug_l10n'] = true; 74 34 if (!defined('WHOIS_ONLINE_TABLE')) define('WHOIS_ONLINE_TABLE', $prefixeTable.'whois_online'); 35 75 36 define('WHOIS_ONLINE_DIR' , basename(dirname(__FILE__))); 76 37 define('WHOIS_ONLINE_PATH' , PHPWG_PLUGINS_PATH . WHOIS_ONLINE_DIR . '/'); 77 38 include_once(WHOIS_ONLINE_PATH.'online.php'); 39 /* History: WHOIS_ONLINE_PATH.'Changelog.txt.php' */ 78 40 ?> -
extensions/whois_online/maintain.inc.php
r3319 r3695 8 8 function plugin_activate() 9 9 { 10 global $user ;10 global $user,$conf; 11 11 $query = "CREATE TABLE IF NOT EXISTS ". WHOIS_ONLINE_TABLE ." ( 12 `IP` varchar(39) NOT NULL default'',13 `hidden_IP` enum('true','false') NOT NULL default'false',12 `IP` varchar(39) NOT NULL DEFAULT '', 13 `hidden_IP` enum('true','false') NOT NULL DEFAULT 'false', 14 14 `session_id` varchar(40) NOT NULL, 15 `user_id` smallint(5) NOT NULL default '0', 16 `username` varchar(100) character set utf8 collate utf8_bin NOT NULL default '', 17 `lang` char(2) character set utf8 collate utf8_bin NOT NULL default 'en', 18 `country` VARCHAR( 256 ) NOT NULL default '', 19 `permanent` enum('true','false') NOT NULL default 'false', 20 `last_access` varchar(12) NOT NULL default '', 21 `last_elm_ids` varchar(75) NOT NULL default '', 22 `last_cat_ids` varchar(75) NOT NULL default '', 23 `last_tag_ids` varchar(75) NOT NULL default '', 24 `last_sch_ids` varchar(75) NOT NULL default '', 25 `first_access_date` varchar(45) NOT NULL default '', 26 `last_dates` varchar(110) character set utf8 collate utf8_bin NOT NULL default '', 27 `elm_hits` int(10) unsigned NOT NULL default '0', 28 `pag_hits` int(10) unsigned NOT NULL default '0', 29 `db_timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, 15 `user_id` smallint(5) NOT NULL DEFAULT '0', 16 `username` varchar(100) character set utf8 collate utf8_bin NOT NULL DEFAULT '', 17 `lang` char(2) character set utf8 collate utf8_bin NOT NULL DEFAULT 'en', 18 `country` VARCHAR( 256 ) NOT NULL DEFAULT '', 19 `user_agent` VARCHAR( 160 ) NOT NULL DEFAULT '', 20 `any_previous` VARCHAR( 256 ) NOT NULL DEFAULT '', 21 `same_previous` VARCHAR( 256 ) NOT NULL DEFAULT '', 22 `permanent` enum('true','false') NOT NULL DEFAULT 'false', 23 `last_access` varchar(12) NOT NULL DEFAULT '', 24 `last_elm_ids` varchar(75) NOT NULL DEFAULT '', 25 `last_cat_ids` varchar(75) NOT NULL DEFAULT '', 26 `last_tag_ids` varchar(75) NOT NULL DEFAULT '', 27 `last_sch_ids` varchar(75) NOT NULL DEFAULT '', 28 `first_access_date` varchar(45) NOT NULL DEFAULT '', 29 `last_dates` varchar(110) character set utf8 collate utf8_bin NOT NULL DEFAULT '', 30 `elm_hits` int(10) unsigned NOT NULL DEFAULT '0', 31 `pag_hits` int(10) unsigned NOT NULL DEFAULT '0', 32 `db_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, 30 33 PRIMARY KEY (`session_id`) 31 34 ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 32 35 "; 33 36 $result = pwg_query($query); 34 if (isset($conf['Whois Online'])) { 35 $conf_whois = unserialize($conf['Whois Online']); 36 if (!isset($conf_whois['Active'])) $conf_whois['Active'] = true; 37 if (!isset($conf_whois['Delete level'])) $conf_whois['Delete level'] = 20; 38 if (!isset($conf_whois['Radar limit'])) $conf_whois['Radar limit'] = 25; 39 if (!isset($conf_whois['Webmasters'])) $conf_whois['Webmasters'] = 2; 40 if (!isset($conf_whois['Administrators'])) $conf_whois['Administrators'] = 2; 41 if (!isset($conf_whois['Obsolete limit'])) $conf_whois['Obsolete limit'] = 20; 42 if (!isset($conf_whois['Add to Plugins menu'])) $conf_whois['Add to Plugins menu'] = false; 43 if (!isset($conf_whois['Add icon to History'])) $conf_whois['Add icon to History'] = true; 44 if (!isset($conf_whois['Keep data'])) $conf_whois['Keep data'] = true; 45 if (!isset($conf_whois['Default display'])) $conf_whois['Default display'] = true; 46 if (!isset($conf_whois['Search id'])) $conf_whois['Search id'] = 0; 47 if (!isset($conf_whois['Users'])) 48 $conf_whois['Users'] = Array('max' => 0, 'When' => date('Y-m-d'), 'count' => 0); 49 $conf['Whois Online'] = serialize($conf_whois); 37 if (!isset($conf['Whois Online'])) { 38 $conf['Whois Online'] = serialize(Array()); 39 pwg_query('REPLACE INTO ' . CONFIG_TABLE . " (param,value,comment) 40 VALUES ('Whois Online','". $conf['Whois Online'] ."','Whois Online configuration');"); 50 41 } 51 else {52 $conf['Whois Online'] = serialize(Array(53 'Active' => true,54 'Delete level' => 20,55 'Radar limit' => 25,56 'Obsolete limit' => 20,57 'Webmasters' => 2,58 'Administrators' => 2,59 'Search id' => 0,60 'Users' => Array('max' => 0, 'When' => date('Y-m-d'), 'count' => 0),61 'Add to Plugins menu' => false,62 'Add icon to History' => true,63 'Keep data' => true,64 'Default display' => true,65 ));66 }67 pwg_query('REPLACE INTO ' . CONFIG_TABLE . " (param,value,comment)68 VALUES ('Whois Online','". $conf['Whois Online'] ."','Whois Online configuration');");69 $conf_whois = unserialize($conf['Whois Online']);70 42 if (isset($conf_whois['Keep data']) and !$conf_whois['Keep data']) { 71 43 pwg_query('DELETE FROM ' . WHOIS_ONLINE_TABLE); -
extensions/whois_online/online.php
r3340 r3695 2 2 3 3 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 4 global $conf, $conf_whois ;5 4 global $conf, $conf_whois, $prefixeTable; 5 include_once(WHOIS_ONLINE_PATH.'include/wo_functions.inc.php'); 6 6 /* Secure Config */ 7 8 7 if (!isset($conf_whois['Active'])) $conf_whois = whois_online_conf(); 9 8 … … 11 10 { 12 11 global $conf; 13 $conf_whois = unserialize($conf['Whois Online']); 14 if (!isset($conf_whois['Active'])) $conf_whois['Active'] = true; 15 if (!isset($conf_whois['Delete level'])) $conf_whois['Delete level'] = 20; 16 if (!isset($conf_whois['Radar limit'])) $conf_whois['Radar limit'] = 25; 17 if (!isset($conf_whois['Webmasters'])) $conf_whois['Webmasters'] = 2; 18 if (!isset($conf_whois['Administrators'])) $conf_whois['Administrators'] = 2; 19 if (!isset($conf_whois['Obsolete limit'])) $conf_whois['Obsolete limit'] = 20; 20 if (!isset($conf_whois['Add to Plugins menu'])) $conf_whois['Add to Plugins menu'] = false; 21 if (!isset($conf_whois['Add icon to History'])) $conf_whois['Add icon to History'] = true; 22 if (!isset($conf_whois['Keep data'])) $conf_whois['Keep data'] = true; 23 if (!isset($conf_whois['Default display'])) $conf_whois['Default display'] = true; 24 if (!isset($conf_whois['Search id'])) $conf_whois['Search id'] = 0; 25 if (!isset($conf_whois['Users'])) 26 $conf_whois['Users'] = Array('max' => 0, 'When' => date('Y-m-d'), 'count' => 0); 12 $default = array( 13 'Active' => true, 14 'Delete level' => 20, 15 'Radar limit' => 25, 16 'Webmasters' => 2, // Normal 17 'Administrators' => 2, 18 'Obsolete limit' => 20, 19 'Default display' => true, 20 'Add to Plugins menu' => false, 21 'Add icon to History' => true, 22 'Keep data' => true, 23 'Search id' => 0, 24 'Users' => Array('max' => 0, 'When' => date('Y-m-d'), 'count' => 0), 25 ); 26 $conf_whois = array_merge($default, unserialize($conf['Whois Online'])); 27 27 if ((!isset($conf_whois['Version'])) or $conf_whois['Version'] != WHOIS_ONLINE_VER 28 28 or $conf['Whois Online'] != serialize($conf_whois)) { … … 39 39 40 40 /* Admin menus are always available */ 41 $conf['Add to Plugins menu'] = $conf_whois['Add to Plugins menu'];42 $conf['Add icon to History'] = $conf_whois['Add icon to History'];43 41 add_event_handler('get_admin_plugin_menu_links', 'whois_add_icon' ); 44 42 /* On Active */ … … 51 49 } 52 50 53 /* --------------- Functions ----------------- */ 54 55 // pparse whois_online/default.tpl 51 52 53 54 // Assume the Default display on pages 56 55 function whois_default_display() { 57 56 global $template; 58 57 $template->set_filenames(array( 'Whois_display' => dirname(__FILE__).'/default.tpl')); 59 58 $template->pparse('Whois_display'); 60 // Based on get_enums(USER_INFOS_TABLE, 'status') ???61 59 } 62 60 63 61 // Add admin links 64 62 function whois_add_icon($menu) { 65 global $conf , $lang;66 if ($conf ['Add icon to History'])63 global $conf_whois, $lang; 64 if ($conf_whois['Add icon to History']) 67 65 $lang['History'] .= '</a> <a class="external" href="' . get_admin_plugin_menu_link(WHOIS_ONLINE_PATH.'config.php') . '"> 68 66 <img class="button" src="' . WHOIS_ONLINE_PATH . 'icons/Whois_tuner.gif" alt="Whois Online configuration" title="Whois Online configuration" /></a>'; 69 if ($conf ['Add to Plugins menu']) array_push($menu, array(67 if ($conf_whois['Add to Plugins menu']) array_push($menu, array( 70 68 'NAME' => 'Whois Online', 71 69 'URL' => get_admin_plugin_menu_link(WHOIS_ONLINE_PATH.'config.php'), … … 117 115 $c['Code'] = '__'; 118 116 } 117 $new = htmlspecialchars(serialize($c),ENT_QUOTES,'UTF-8'); 118 if ($new == $trace['country']) return $c; 119 119 pwg_query('UPDATE ' . WHOIS_ONLINE_TABLE . ' 120 SET `country` = \'' . htmlspecialchars(serialize($c),ENT_QUOTES,'UTF-8'). '\'120 SET `country` = \'' . $new . '\' 121 121 WHERE `session_id` = \'' . $trace['session_id'] . '\';'); 122 122 return $c; … … 185 185 } 186 186 // Write or Rewrite the dedicated record 187 $query = 'REPLACE INTO ' . WHOIS_ONLINE_TABLE . ' (`IP`, `hidden_IP`, `session_id`,`user_id`,`username`,`lang`, 188 ` permanent`,`last_access`,`last_elm_ids`, `last_cat_ids`, `last_tag_ids`, `last_sch_ids`,187 $query = 'REPLACE INTO ' . WHOIS_ONLINE_TABLE . ' (`IP`, `hidden_IP`, `session_id`,`user_id`,`username`,`lang`, `user_agent`, 188 `any_previous`, `same_previous`, `permanent`,`last_access`,`last_elm_ids`, `last_cat_ids`, `last_tag_ids`, `last_sch_ids`, 189 189 `first_access_date`, `last_dates`, `elm_hits`, `pag_hits`) 190 190 VALUES (\''. $dedicated['IP'] .'\', \'' … … 192 192 . $dedicated['user_id'] .'\', \''. $dedicated['username'] .'\', \'' 193 193 . substr($lang_info['code'],0,2) .'\', \'' 194 . $dedicated['user_agent'] .'\', \'' 195 . $dedicated['any_previous'] .'\', \'' 196 . $dedicated['same_previous'] .'\', \'' 194 197 . $dedicated['permanent'] . '\', \''. time() .'\', \'' 195 198 . implode(' ',$dedicated['elm_ids']) . '\', \'' … … 220 223 } 221 224 225 // Antiaspi delay conversion in seconds 226 // delay in "HH:ii:ss" or "d :HH:ii:ss" 227 // return delay in seconds 228 function whois_online_duration($date_string) 229 { 230 list($s, $i, $H, $d, $more) = 231 array_merge(array_reverse( 232 explode(" ",str_ireplace(':',' ', $date_string))), 233 array(0,0,0,0,0)); 234 $t = time(); 235 return strtotime(sprintf("+%s days %s hours %s minutes %s seconds", 236 $d, $H, $i, $s), $t) - $t; 237 } 238 222 239 /* 223 240 Main process: Analyze, set new values and prepare displayed values. … … 239 256 unset($online[0]); 240 257 $sid = session_id(); 241 258 242 259 // Step 1 - Find the User and/or IP/session_id 243 260 foreach ($online as $key => $record) { … … 358 375 $global['tag_ids'][$hour%12]++; 359 376 $global['sch_ids'][$day%14]++; 360 // !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!!377 // !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! 361 378 $global['elm_ids'][10] = $current; // reference minute has changed 362 379 $global['cat_ids'][12] = $five; 363 380 $global['tag_ids'][24] = $hour; 364 381 $global['sch_ids'][14] = $day; 365 // !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! 366 382 // !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! 383 384 // 5.5 - Add in previous 385 if (!isset($global['any_previous'])) { 386 pwg_query('ALTER TABLE ' . WHOIS_ONLINE_TABLE . 387 ' ADD `same_previous` VARCHAR( 256 ) NOT NULL DEFAULT \'\' AFTER `country`;'); 388 pwg_query('ALTER TABLE ' . WHOIS_ONLINE_TABLE . 389 ' ADD `any_previous` VARCHAR( 256 ) NOT NULL DEFAULT \'\' AFTER `country`;'); 390 pwg_query('ALTER TABLE ' . WHOIS_ONLINE_TABLE . 391 ' ADD `user_agent` VARCHAR( 160 ) NOT NULL DEFAULT \'\' AFTER `country`;'); 392 } 393 394 $antiaspi = array( 395 'diff' => '20 pages in 00:00:10' , // Banned for 20 access in 10 seconds or less 396 'same' => '15 pages in 00:00:30' , // Banned for 15 access on the same page in 30 seconds or less 397 'banned during' => '23:59:59' , // Banned time hh:mm:ss or any valid MySQL datetime expression 'YYYY-MM-DD HH:MM:SS' 398 'only guest' => true , // True, registred members won't be banned 399 'only picture' => false , // True, Check only on picture pages 400 'allowed ip' => array() // Allowed IP array (Bots, or your fixed IP) 401 ); 402 if (isset($conf['antiaspi'])) $antiaspi = array_merge($antiaspi, $conf['antiaspi']); 403 404 // For AntiAspi follow ANY PREVIOUS access 405 $access = '0:'; 406 list($max_any, $maxtext) = explode(' pages in ', $antiaspi['diff']); 407 $maxtime = whois_online_duration($maxtext); 408 $prev=''; 409 $previous = (isset($visit['any_previous'])) ? explode(' ', $visit['any_previous']):Array(); 410 foreach ($previous as $v) { 411 $old = explode(':', $v); 412 $old[0] += $visit['delay']; 413 if ($old[0]<$maxtime) $prev .= $old[0].': '; 414 } 415 $prev = $access . ' ' . $prev; 416 $prev = substr($prev, 0, -2); 417 $visit['any_previous'] = $prev; 418 // For AntiAspi follow ANY SAME PICTURE access 419 $access = '0:'; 420 $same_elem = (isset($page['image_id'])) ? $page['image_id']:'0'; 421 list($max_same, $maxtext) = explode(' pages in ', $antiaspi['same']); 422 $maxtime = whois_online_duration($maxtext); 423 $access .= $same_elem . ':'; 424 $prev=''; 425 $previous = (isset($visit['same_previous'])) ? explode(' ', $visit['same_previous']):Array(); 426 foreach ($previous as $v) { 427 $old = explode(':', $v); 428 $old[0] += $visit['delay']; 429 if ($old[0]<$maxtime and $old[1]==$same_elem) $prev .= $old[0].':'.$old[1].': '; 430 } 431 $prev = $access . ' ' . $prev; 432 $prev = substr($prev, 0, -2); 433 $visit['same_previous'] = $prev; 434 435 // Check limits of $visit['any_previous'] and $visit['same_previous'] 436 // by 256 characters 437 // by $max_any and by $max_same 438 while (strlen($visit['any_previous'])>256) { 439 $previous = explode(' ',$visit['any_previous']); 440 $oldest = array_pop($previous); 441 $visit['any_previous'] = implode(' ', $previous); 442 } 443 $ctr_any = count(explode(' ',$visit['any_previous'])); 444 while (strlen($visit['same_previous'])>256) { 445 $previous = explode(' ',$visit['same_previous']); 446 $oldest = array_pop($previous); 447 $visit['same_previous'] = implode(' ', $previous); 448 } 449 $ctr_same = count(explode(' ',$visit['same_previous'])); 450 451 $visit['user_agent'] = $_SERVER['HTTP_USER_AGENT']; 452 $Vip =& $visit['IP']; 453 $visit['Allowed_SE'] = false; 454 if (!empty($antiaspi['allowed ip'])) 455 { 456 $allowed_ips = str_replace(array('.', '%'), array('\.', '.*?'), $antiaspi['allowed ip']); 457 foreach ($allowed_ips as $ip) 458 { 459 if (preg_match("#" . $ip . "#", $Vip)) { $visit['Allowed_SE'] = true; break; } 460 } 461 } 462 367 463 // Step 6 - Update (on Conf_Update and trace) and send trace to determine global tracing or not 368 464 $dtrace = 0; -
extensions/whois_online/reload.php
r3319 r3695 9 9 define('IN_ADMIN', true); 10 10 include_once(PHPWG_ROOT_PATH.'include/common.inc.php'); 11 $conf['show_gt'] = true; 11 12 $included = false; 12 13 load_language('plugin.lang', WHOIS_ONLINE_PATH); … … 79 80 $limit = 20; 80 81 $ql = 0; 82 $inlist = '0'; 83 foreach ($online as $k => $v) { 84 $inlist .= ', ' . implode( ', ', explode(' ',$online[$k]['last_elm_ids'])); 85 $ql++; 86 if ($ql >= $conf_whois['Radar limit']) break; 87 } 88 $image = array(); 89 $result = pwg_query('SELECT * FROM ' . IMAGES_TABLE . 90 ' WHERE id IN (' . $inlist .');'); 91 while ($row = mysql_fetch_assoc($result)) { 92 $images[$row['id']] = $row; 93 $images[$row['id']]['tn_url'] = get_thumbnail_url($row); 94 } 81 95 foreach ($online as $k => $v) { 82 96 // The stupid History search will be reused instead of created... (even if History search will recreate it) … … 100 114 $online[$k]['guest'] = false; 101 115 } 102 $ql++;103 116 // Images queries are limited (no cluetip over $conf_whois['Radar limit']) 104 117 // For performance reasons 105 if ($ql <= $conf_whois['Radar limit']) { 106 $result = pwg_query('SELECT * FROM ' . IMAGES_TABLE . 107 ' WHERE id IN (' . implode(', ',explode(' ',$online[$k]['last_elm_ids'])) .');'); 108 while ($row = mysql_fetch_assoc($result)) { 109 $online[$k]['images'][$row['id']] = $row; 110 $online[$k]['images'][$row['id']]['ws_level'] = ($row['level']>$online[$k]['user']['level']) ? 'ws':''; 111 $online[$k]['images'][$row['id']]['tn_url'] = get_thumbnail_url($row); 112 $online[$k]['images'][$row['id']]['url_modify'] = PHPWG_ROOT_PATH . 'admin.php?page=picture_modify&image_id='.$row['id']; 113 } 114 } else { 115 // Only the id is available for links (NO LEVEL CONTROL) 116 foreach (explode(' ',$online[$k]['last_elm_ids']) as $id) { 117 if ($id > 0) { 118 $online[$k]['Bot'] = is_a_bot($online[$k]['user_agent']); 119 $online[$k]['last_ids'] = explode(' ',$online[$k]['last_elm_ids']); 120 foreach ($online[$k]['last_ids'] as $id) { 121 if (isset($images[$id])) { 122 $online[$k]['images'][$id] = $images[$id]; 123 $online[$k]['images'][$id]['ws_level'] = ($images[$id]['level']>$online[$k]['user']['level']) ? 'ws':''; 124 } 118 125 $online[$k]['images'][$id]['id'] = $id; 119 $online[$k]['images'][$row['id']]['url_modify'] = PHPWG_ROOT_PATH . 'admin.php?page=picture_modify&image_id='.$id; 120 } 126 $online[$k]['images'][$id]['url_modify'] = PHPWG_ROOT_PATH . 'admin.php?page=picture_modify&image_id='.$id; 121 127 } 122 128 } 123 } 129 124 130 pwg_debug('*********** Radar reloaded ***********'); 125 131 $template->assign('search_results', $online); -
extensions/whois_online/report.tpl
r3319 r3695 42 42 {/if} 43 43 </td> 44 <td>{$detail.first_access_date}</td> 44 <td>{$detail.first_access_date} {if ($detail.Bot!==false and $detail.Allowed_SE)}<a class="other" href="#" title="{'Allowed Search engine: '|@translate}{$detail.Bot} - ({$detail.user_agent})"><sub>SE</sub></a>{/if} 45 {if ($detail.Bot!==false and !$detail.Allowed_SE and !$detail.Banned_SE)}<a href="#" title="{'Possible Banned Search engine: '|@translate}{$detail.Bot} - ({$detail.user_agent})"><sub>SE</sub></a>{/if} 46 {if ($detail.Bot!==false and $detail.Banned_SE)}<a class="external" href="#" title="{'Banned Search engine: '|@translate}{$detail.Bot} - ({$detail.user_agent})"><sub>SE</sub></a>{/if} 47 </td> 45 48 <td> 46 49 <a href="./admin.php?page=user_perm&user_id={$detail.user_id}" onclick="window.open(this.href); return false;" title="{'permissions'|@translate}">
Note: See TracChangeset
for help on using the changeset viewer.