Changeset 21237 for extensions/whois_online
- Timestamp:
- Mar 6, 2013, 12:38:35 PM (12 years ago)
- Location:
- extensions/whois_online
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/whois_online/config.php
r9145 r21237 146 146 // The whois_online table summary 147 147 if (isset($_GET['tab']) and $_GET['tab']=='monitor') { 148 $whois_status = mysql_fetch_assoc(pwg_query('SHOW TABLE STATUS LIKE "' . WHOIS_ONLINE_TABLE .'%" ;'));148 $whois_status = pwg_db_fetch_assoc(pwg_query('SHOW TABLE STATUS LIKE "' . WHOIS_ONLINE_TABLE .'%" ;')); 149 149 $whois_status['table'] = WHOIS_ONLINE_TABLE; 150 150 $whois_status['size'] = ($whois_status['Data_length'] + $whois_status['Index_length']) . ' bytes'; … … 169 169 if (!empty($result)) 170 170 { 171 while ($row = mysql_fetch_assoc($result))171 while ($row = pwg_db_fetch_assoc($result)) 172 172 { 173 173 $tpl[$row['session_id']] = $row['username']; … … 187 187 if (!empty($result)) 188 188 { 189 while ($row = mysql_fetch_assoc($result))189 while ($row = pwg_db_fetch_assoc($result)) 190 190 { 191 191 $tpl[$row['session_id']] = $row['username']; … … 218 218 'a:1:{s:6:"fields";a:5:{s:10:"date-after";s:10:"2009-09-09";s:11:"date-before";s:10:"2009-09-09";s:5:"types";a:4:{i:0;s:4:"none";i:1;s:7:"picture";i:2;s:4:"high";i:3;s:5:"other";}s:4:"user";s:2:"-1";s:17:"display_thumbnail";s:26:"display_thumbnail_hoverbox";}}' 219 219 .'\');'); 220 $conf_whois['Search id'] = mysql_insert_id();220 $conf_whois['Search id'] = pwg_db_insert_id(); 221 221 $conf['Whois Online'] = serialize($conf_whois); 222 222 pwg_query('REPLACE INTO ' . CONFIG_TABLE . " (param,value,comment) … … 224 224 } 225 225 // Get and Set to current date the stupid History search. 226 list($serialized_rules) = mysql_fetch_row(pwg_query('SELECT rules FROM '.SEARCH_TABLE.'226 list($serialized_rules) = pwg_db_fetch_row(pwg_query('SELECT rules FROM '.SEARCH_TABLE.' 227 227 WHERE id = '.$conf_whois['Search id'].';')); 228 228 $page['search'] = unserialize($serialized_rules); … … 234 234 // Most members ever online was 235 235 if (!isset($conf_whois['Users']['count']) or $conf_whois['Users']['count'] == 0) { 236 $count = mysql_fetch_assoc(pwg_query('SELECT MAX(`'. $conf['user_fields']['id'] .'`) AS `ctr` FROM ' . USERS_TABLE));236 $count = pwg_db_fetch_assoc(pwg_query('SELECT MAX(`'. $conf['user_fields']['id'] .'`) AS `ctr` FROM ' . USERS_TABLE)); 237 237 $conf_whois['Users']['count'] = $count['ctr']; 238 238 } -
extensions/whois_online/include/wo_functions.inc.php
r6386 r21237 58 58 $ctr = 0; $Online[0] = ''; 59 59 $result = pwg_query('SELECT * FROM ' . WHOIS_ONLINE_TABLE . $order . ';'); 60 while($row= mysql_fetch_array($result)) {60 while($row=pwg_db_fetch_assoc($result)) { 61 61 $row['delay'] = (int) time() - $row['last_access']; 62 62 $row['elm_ids'] = explode(' ', $row['last_elm_ids']); -
extensions/whois_online/main.inc.php
r16632 r21237 30 30 */ 31 31 32 // no need to show this info to search engine robots: even if we tell them 33 // rel="nofollow" they follow the link. By deactivation this plugin to 34 // robots, we avoid wasting resources on servers. 35 if (preg_match('/(Googlebot|bingbot|Baiduspider|yandex|AhrefsBot|msnbot)/', $_SERVER["HTTP_USER_AGENT"])) 36 { 37 return; 38 } 39 32 40 global $prefixeTable, $conf; 33 41 // $conf['debug_l10n'] = true; -
extensions/whois_online/maintain.inc.php
r6193 r21237 44 44 pwg_query('DELETE FROM ' . WHOIS_ONLINE_TABLE); 45 45 } 46 list($hits) = mysql_fetch_row(pwg_query('SELECT SUM(hit) FROM '.IMAGES_TABLE.';'));46 list($hits) = pwg_db_fetch_row(pwg_query('SELECT SUM(hit) FROM '.IMAGES_TABLE.';')); 47 47 $pags = floor($hits * 1.69); /* estimate : 1.69 is a frequent ratio between images hits and pages hits */ 48 48 pwg_query('INSERT IGNORE INTO ' . WHOIS_ONLINE_TABLE . ' (`IP`, `hidden_IP`, `session_id`, `user_id`,`username`,`lang`,`permanent`,`last_access`, -
extensions/whois_online/reload.php
r6386 r21237 71 71 72 72 // prefetch to optimize 73 $local_guest = mysql_fetch_assoc(pwg_query('SELECT * FROM ' . USER_INFOS_TABLE .73 $local_guest = pwg_db_fetch_assoc(pwg_query('SELECT * FROM ' . USER_INFOS_TABLE . 74 74 ' WHERE user_id = ' . $conf['guest_id'] .';')); 75 75 … … 89 89 $result = pwg_query('SELECT * FROM ' . IMAGES_TABLE . 90 90 ' WHERE id IN (' . $inlist .');'); 91 while ($row = mysql_fetch_assoc($result)) {91 while ($row = pwg_db_fetch_assoc($result)) { 92 92 $images[$row['id']] = $row; 93 93 $images[$row['id']]['tn_url'] = get_thumbnail_url($row); … … 113 113 } 114 114 else { 115 $online[$k]['user'] = mysql_fetch_assoc(pwg_query('SELECT * FROM ' . USER_INFOS_TABLE .115 $online[$k]['user'] = pwg_db_fetch_assoc(pwg_query('SELECT * FROM ' . USER_INFOS_TABLE . 116 116 ' WHERE user_id = ' . $v['user_id'] .';')); 117 117 $online[$k]['guest'] = false;
Note: See TracChangeset
for help on using the changeset viewer.