WordPress.org

Plugin Directory

Changeset 433606


Ignore:
Timestamp:
09/05/11 15:42:40 (3 years ago)
Author:
michelem
Message:

WassUp 1.8.2 released

Location:
wassup/trunk
Files:
1 added
13 edited

Legend:

Unmodified
Added
Removed
  • wassup/trunk/badhosts-intl.txt

    r315060 r433606  
    311311wonderdrug\.ws 
    312312x67fr22v\.ph 
    313 xcelentbio\.us 
    314 xcelwonder\.us 
    315313xer\.com\.au 
    316 yapped2284pills\.us 
    317 ycxzvbsdds\.us 
    318 zarf1antipodean\.us 
  • wassup/trunk/badhosts.txt

    r315060 r433606  
    193193betterservice\.info 
    194194beud\.com 
     195red\.bezeqint\.net 
    195196bhex\.com 
    196197bibles\.com 
     
    383384cr3am\.com 
    384385cr3at3\.com 
    385 cream\-?pies\.* 
     386cream\-?pies.* 
    386387creamy\-facials\.com 
    387388crescentarian\.net 
     
    411412datesaturday\.com 
    412413dating\-s\.net 
    413 dating\-?christian\.* 
     414dating\-?christian.* 
    414415dating\.blogs\.com 
    415416datinggoldengirls.com 
     
    448449discountrx4u\.info 
    449450discoverdownloads\.com 
    450 discrete\-?encounters\.* 
     451discrete\-?encounters.* 
    451452dishtvforpc\.com 
    452453dkdns\.com 
     
    573574financialfirms\.net 
    574575findawoman\.net 
    575 finder\-?adult\.* 
    576 finder\-?friend\.* 
     576finder\-?adult.* 
     577finder\-?friend.* 
    577578findfunhere\.com 
    578579findtheoneonthissite\.com 
     
    598599foxmediasolutions\.com 
    599600freakycheats\.com 
    600 free\-?sms\.* 
     601free\-?sms.* 
    601602freeautobot\.com 
    602603freekin\.info 
     
    604605freetest\.info 
    605606freshperiod\.com 
    606 friend\-?adult\.* 
    607 friend\-?finder\.* 
     607friend\-?adult.* 
     608friend\-?finder.* 
    608609fsck\.com 
    609610ftgoal\.com 
     
    618619garyshawkey\.com 
    619620gasep\.com 
    620 gay\-?chat\.* 
    621 gay\-?teen\.* 
     621gay\-?chat.* 
     622gay\-?teen.* 
    622623gb\.com 
    623624gdries\.com 
     
    652653globaltrustsavings\.com 
    653654gmgmedical\.com 
    654 gmi\-autoimports*\.com 
     655gmi\-autoimports.*\.com 
    655656go\.com 
    656657go\-medz\.com 
     
    733734herpills\.com 
    734735hgee1\.info 
    735 hgh\-* 
     736hgh\-.* 
    736737hidor\.com 
    737738himailer\.com 
     
    849850jenniferyoungtart\.com 
    850851jettisonit\.com 
    851 jewish-?singles\.* 
     852jewish-?singles.* 
    852853jhex\.com 
    853854ji2\.net 
     
    16481649wwmeds\.com 
    16491650x\-forms\.net 
    1650 xadulthosting\.com 
    16511651xanaz\.net 
    16521652xanex\.org 
    16531653xans\.net 
    16541654xantz\.com 
    1655 xbvbaar\.net 
    16561655xcce\.com 
    16571656xciconsulting\.com 
    1658 xedffrr\.com 
    16591657xftp\.net 
    1660 xgremlin\.com 
    1661 xhjwien\.info 
    16621658xiagra\.net 
    1663 ximportmeds\.net 
    1664 xinternetstore\.com 
    1665 xlkifge\.com 
    1666 xmaad\.com 
    1667 xmasdeal\.info 
    1668 xmasdownloadnetwork\.com 
    1669 xmaslowrate\.com 
    1670 xmasrefinance\.com 
    16711659xmassavings\.com 
    1672 xmastimerates\.com 
    16731660xmr3\.com 
    1674 xnsidh4h\.info 
    16751661xnue\.biz 
    1676 xofferz\.com 
    1677 xognei\.com 
    1678 xopy\.com 
     1662xognei.com 
    16791663xoware\.com 
    16801664xpays\.com 
    1681 xpoem\.info 
    1682 xpojga\.com 
    1683 xpsoftsell\.biz 
    16841665xsalez\.org 
    1685 xseason\.biz 
    16861666xstore\.biz 
    16871667xtrameg\.com 
    1688 xtreemteeming\.com 
    1689 xtremebikebabes\.com 
    16901668xtst\.com 
    1691 xumcejc\.com 
    1692 xvxxdatwers\.info 
    1693 xx\-powo\.com 
    1694 xxdksq\.com 
    1695 xxdksq\.net 
    16961669xxxdate\.com 
    1697 xxxlargepenis\.net 
    1698 xxxmeds\.info 
    1699 xxxteenzoo\.com 
    1700 xxxxstore\.com 
    1701 y\-2\-m\.com 
    1702 y\-mrg\.net 
    1703 y\-mrt\.com 
    1704 y3ss1r\.com 
    17051670y73\.net 
    17061671yaadig\.com 
    1707 yahoohut\.com 
    1708 yahoosostore\.com 
    17091672yahoososupersite\.com 
    17101673yahoosotime\.com 
    1711 yawps440pinn\.com 
    17121674yayshop\.com 
    17131675yellfore\.com 
    1714 yellowcasefile\.com 
    17151676yellowrate\.com 
    17161677yelpp\.biz 
    17171678yelucie\.com 
    1718 yes03284\.com 
    1719 yes2shipz\.com 
    1720 yesmort\.net 
    17211679yf4\.net 
    1722 yfoedbx\.com 
    1723 ymha1773drygs\.com 
    1724 ynmort\.net 
    1725 ynotmyrxworld\.com 
    1726 ynotsavem0re\.com 
    17271680yo6\.net 
    1728 yomaoem\.net 
    1729 yomoi\.com 
    1730 yorhere2savez\.com 
    1731 yosofts\.info 
    1732 youarehealthy\.info 
    1733 youaretaking\.com 
    1734 youfoundidealsolution\.com 
    1735 youheynow\.info 
    1736 youkostylaya\.com 
    1737 youlikeviagra\.info 
    1738 youngfreespirits\.com 
    1739 youngtallitemss\.com 
    17401681your\-financial\.com 
    1741 your\-home\-loan\.net 
    1742 your\-mort\-gages\.com 
    1743 your\-mort\.com 
    1744 your\-re\-finance\.com 
    1745 your\-refi\.com 
    1746 your\-value\-loan\.com 
    1747 yourbestmeds\.info 
    1748 yourbestrxplace\.com 
    17491682yourbignight\.com 
    1750 yourbollnas\.info 
    17511683yourcasinobiz\.com 
    1752 yourchanceathome\.net 
    17531684yourcheap\-rx\.com 
    1754 yourdoctor\.biz 
    1755 youreasyloans\.net 
    1756 youreasymeds\.com 
    1757 youreasymeds\.net 
    1758 yourfitnessonline\.com 
    1759 yourhealthmatters\-now\.com 
    17601685yourhostingaccount\.com 
    1761 yourloanz\.com 
    17621686yourmeds\.info 
    1763 yourmembersdirectory\.com 
    17641687yourmort\.com 
    17651688yourname\.com 
    17661689yourowndoctor\.info 
    1767 yourowngaming\.net 
    1768 yourownmeds\.info 
    1769 yourpills4me\.com 
    1770 yourpillsusa\.com 
    1771 yourpils24\.info 
    17721690yourpsychic\.net 
    1773 yourrate\.net 
    1774 yourscinedesign\.com 
    1775 yourstuffabsolute\.com 
    1776 yourstuffcentral\.com 
    1777 yourstuffforme\.com 
    1778 yourstuffforus\.com 
    1779 yourstuffsupply\.com 
    1780 yoursunlightzone\.info 
    1781 yourtabl\.info 
    17821691yourtablet\.info 
    1783 yourthings2004\.com 
    1784 yourthings4us\.com 
    1785 yourthingslive\.com 
    1786 yourthingsplace\.com 
    1787 yourthingssoltuion\.com 
    1788 youthemans\.com 
    1789 youweretiredi\.com 
    1790 youyouhey\.info 
    1791 ypaym0re1z1\.com 
    17921692ypx132\.com 
    1793 ypypgroupy\.com 
    1794 yrme33\.com 
    1795 yrt009il\.com 
    1796 yuiiooiutr\.com 
    1797 yuiuku\.info 
    1798 yunkgbcd\.com 
    1799 yunoz\.biz 
    1800 yuomnad\.com 
    1801 yupnamethisnow\.com 
    1802 yurgag\.com 
    1803 yuritemple\.net 
    1804 yuyumant\.com 
    18051693yx\-colorweaving\.com 
    1806 zablen\.com 
    1807 zainetsell\.com 
    1808 zaliam\.com 
    1809 zap\-internet\.com 
    18101694zapbook\.info 
    1811 zaphomeloans\.com 
    1812 zarinahsports\.com 
    1813 zazxex\.info 
    1814 zazxox\.info 
    1815 zazxpx\.info 
    1816 zazxtx\.info 
    1817 zbestantid0te\.com 
    1818 zbgadjdf\.info 
    1819 zebalx\.com 
    1820 zersurf\.com 
    1821 zfeedbx\.com 
    1822 ziagra\.net 
    1823 zick\.biz 
    1824 zigzagging\.net 
    1825 zinkuq\.com 
    1826 ziuyt\.info 
    1827 zloanz\.info 
    1828 zndrz\.com 
    1829 zockkfosa\.com 
    1830 zoeyhasafever\.com 
    18311695zolotko\.info 
    1832 zoobrandsour\.com 
    1833 zoodnights\.com 
    18341696zoomgirls\.net 
    1835 zoomwatches\.info 
    18361697zoophilelinks\.net 
    1837 zooumbrela\.info 
    1838 zoozits\.com 
    18391698zowk\.com 
    1840 zpromeds\.biz 
    1841 zpromeds\.info 
    1842 zrwkd\.com 
    18431699ztcash\.com 
    1844 zuodalu\.com 
    1845 zuperone\.info 
    1846 zuvvka\.com 
    18471700zwallet\.com 
    1848 zxcvbdf\.com 
  • wassup/trunk/css/wassup.css

    r318010 r433606  
    3838.wassup-icon {} 
    3939.wassup-content { min-height:225px; } 
    40 #wpbody-content {  
    41     padding-top: 3px;  
    42     margin-bottom: -5px; 
    43 } 
    4440/* 
    4541 * for wassup admin top menu styles in Wordpress 2.7+ */ 
     
    6359    background: url("images/link2.png") no-repeat 0 0; 
    6460} 
     61/* Wordpress css adjustments */ 
    6562#contextual-help-link {  
    66     border: 1px solid #d6d6d6; 
    6763    -moz-border-radius-topleft: 3px; 
    6864    -moz-border-radius-topright: 3px; 
     
    7268    border-top-right-radius: 3px; 
    7369    border-bottom: 0px none; 
     70    border: 1px solid #d6d6d6; 
    7471    background: url("images/link2.png") no-repeat 0 0 !important; 
    7572} 
     73#wpbody-content { margin-bottom: -5px; padding-top: 3px; } 
     74#ozh_menu_wrap { margin-top: -3px !important; } /* for ozh drop-down menu */ 
     75 
    7676#wassup-menu {  
    7777    display: inline; 
     
    129129} 
    130130div.main-tabs { 
    131     /* width: 97%;  */ 
    132131    margin: 10px auto 3px auto; 
    133132    padding: 2px 1px 1px; 
    134     border: 1px solid #efebef; 
    135     border-radius: 3px; 
     133    color: #445; 
     134    background-color: #dedade; 
     135    box-shadow: 0 0 5px rgba(24, 24, 64, 0.9); /* 0 0 2px rgba(108,108,168, 0.8); */ 
     136    -moz-box-shadow: 0 0 5px rgba(24, 24, 64, 0.9); 
     137    -webkit-box-shadow: 0 0 5px rgba(24, 24, 64, 0.9); 
     138    border: 1px solid #c9d9e9; /* #a5a5bb; #efebef; */ 
     139    /* border-radius: 3px; 
    136140    -webkit-border-radius: 3px; 
    137     -moz-border-radius: 3px; 
    138     background-color: #dedade; 
    139     color: #445; 
    140     box-shadow: 0 0 5px rgba(44,44,104, 0.9); 
    141     -moz-box-shadow: 0 0 5px rgba(44,44,104, 0.9); 
    142     -webkit-box-shadow: 0 0 5px rgba(44,44,104, 0.9); 
     141    -moz-border-radius: 3px; */ 
    143142} 
    144143.main-tabs a, .main-tabs a:link {  
     
    213212 a.toggle-allcrono:hover, a.toggle-all:hover { background-color: #676767 !important; } */ 
    214213.sum-rec, .sum {  
    215     /* margin: 0 0 5px 0; */ 
    216214    margin: 0 0 2px; 
    217     padding: 1px 0 0 !important; /* 1px 1px 0 !important; */ 
     215    padding: 1px 0 0 !important; 
     216    font-size: 11px; 
    218217    background-color: #f4f6f6; 
    219218    border: 1px solid #c7c7cc; /* 89a; */ 
    220219    border-bottom: 3px solid #347; 
    221     /* border-right: 1px solid #dedade; #789; */ 
    222     /* border-left: 1px solid #dedade; #789; */ 
    223     /* box-shadow: 0 0 2px rgba(80, 100, 100, 0.3); 
    224     -moz-box-shadow:0 0 2px rgba(80, 100, 100, 0.3); 
    225     -webkit-box-shadow:0 0 2px rgba(80, 100, 100, 0.3); */ 
    226220} 
    227221.sum-nav, .sum-nav-mark, .sum-spy { 
     
    232226    margin: 0 !important; 
    233227    padding: 22px 0 0; 
     228    font-size: 11px; 
    234229    border-top: 1px solid #fffcff; 
    235230    border-bottom: 1px solid #ddd; 
     
    287282    margin: 0 0 0 165px; 
    288283    padding: 0; 
    289     font-size: 14px; 
    290284    line-height: 1.3em; 
    291285} 
     
    294288    padding: 0; 
    295289} 
    296 .det1 { line-height: 1.5em; display: block; } 
    297 .det2 { font-size: 11px; color:#464646; display: block; } 
    298 .det3 { padding-left: 20px; font-size: 11px; color: #464646; } 
     290.det1 {  
     291    line-height: 1.5em;  
     292    display: block; 
     293    font-size: 14px; 
     294} 
     295.det2 {  
     296    line-height: 1.5em; 
     297    display: block; 
     298} 
     299.det3 { padding-left: 20px; } 
    299300.det1 a { font-weight: bold; border-bottom: 1px solid !important; } 
    300301.det2 a, .det2 a:link, .sum-det span.det2 a { 
    301     color: #00284a !important; 
     302    color: #349 !important; /*#00008c  #00284a */ 
    302303} 
    303304.det2 a:hover, .sum-det span.det2 a:hover { 
    304     color: #d54e21 !important; 
    305 } 
    306 .det2 strong { color: #00284a; font-weight: normal; } 
     305    color: #d54d22 !important; 
     306} 
     307.det2 strong { color: #001616; font-weight: normal; } 
    307308.agent strong { font-weight: bold; } 
    308309.sum-box { 
     
    365366} 
    366367#toptenchart a { color: #464646; } 
    367 #toptenchart a:hover { color: #d54e21; } 
     368#toptenchart a:hover { color: #d54d22; } 
    368369ul.charts    { 
    369370    list-style-type: none; 
     
    394395    clear:both; 
    395396    border-bottom: 0 none; 
    396 } 
    397 .detail-data a, .detail-data a:link { color: #559 !important; } 
     397    color: #445; 
     398    font-size: 11px; 
     399} 
     400.detail-data a, .detail-data a:link { color: #349 !important; } 
    398401.detail-data a:hover { color: #c64 !important; } 
    399402.detail-data ul { 
     
    402405    margin: 0;  
    403406    padding: 3px 0 4px 0; 
     407    font-size: 11px; 
    404408    border-top: 1px solid #ddd; 
    405409    border-bottom: 1px solid #bbb; 
    406410} 
    407411ul.searcheng { 
    408     background-color: #adf; 
    409     border-color: #66cbcb; 
     412    background-color: #abdbff; /* #adf; */ 
     413    border-color: #9cd; 
    410414} 
    411415.searchimage {  
    412     background-color: #aeaaea !important; 
    413     border-color: #a99 !important; 
     416    background-color: #abbbff !important; 
     417    border-color: #9b9bff !important; 
    414418} 
    415419li.searcheng { 
     
    418422    padding: 0 4px 0 4px; 
    419423    display: inline; 
    420     font-size: 11px; 
    421     color: #667; 
    422424    border-right: 1px dotted #8e8e8e; 
    423425} 
    424426ul.useragent {  
    425427    padding: 4px 0 2px 0;  
    426     background-color: #595595; 
     428    background-color: #67a; 
    427429    border-bottom: 1px #ccc solid; 
    428430} 
     
    430432    list-style-type: none; 
    431433    color: #f5f5f5; 
    432     font-size: 11px; 
    433434    width: 100%; 
    434435    padding: 0 6px 0 0; 
     
    445446        padding: 0 6px 0 0; 
    446447    color: #eff; 
    447         font-size: 11px; 
    448448} 
    449449ul.spider {  
     
    455455    display: inline; 
    456456    width: 100%; 
    457     font-size: 11px; 
    458457} 
    459458li.spider { padding: 0 6px 0 0; color: #f5f5f5; } 
    460459li.spider a, li.spider a:link { color: #f5f5f5 !important; } 
    461460li.spider a:hover { color: #fda !important; } 
     461ul.feed {  
     462    background-color: #edc !important; 
     463    border-color: #dcb !important; 
     464} 
    462465li.feed { 
    463466    padding: 0 4px 0 4px; 
    464     color: #667; 
    465467    border-right: 1px dotted #8e8e8e; 
    466468} 
     
    470472    display: inline; width: 100%; 
    471473    padding: 0 4px 0 4px; 
    472     color: #667; 
    473     font-size: 11px; 
    474474    border-right: 1px dotted #8e8e8e; 
    475475} 
     
    491491    width: 100%; 
    492492    padding: 0 4px 0 4px; 
    493     color: #667; 
    494     font-size: 11px; 
    495493    border-right: 1px dotted #8e8e8e; 
    496494} 
     
    509507    margin: 0; 
    510508    padding: 0; 
    511     color: #667; 
    512     font-size: 11px; 
    513509    line-height: 2em; 
    514510    background-image: url("images/list-bg2.png"); 
     
    520516    margin: 0; 
    521517    padding: 4px 0 6px 0; 
    522     color: #667; 
    523     font-size: 11px; 
    524518    background-image: url("images/list-bg3.png"); 
    525519    border-bottom: 1px #ddd solid; 
     
    559553    padding: 1px 1px 2px !important; 
    560554    background-color: #dedade; 
    561     box-shadow: 0 0 5px rgba(44,44,104, 0.9); 
    562     -moz-box-shadow: 0 0 5px rgba(44,44,104, 0.9); 
    563     -webkit-box-shadow: 0 0 5px rgba(44,44,104, 0.9); 
    564     border: 1px solid #efebef; 
    565     border-radius: 3px; 
    566     -webkit-border-radius: 3px; 
    567     -moz-border-radius: 3px; 
     555    box-shadow: 0 0 5px rgba(24, 24, 64, 0.9); /* 0 0 5px rgba(44,44,104, 0.9); */ 
     556    -moz-box-shadow: 0 0 5px rgba(24, 24, 64, 0.9); 
     557    -webkit-box-shadow: 0 0 5px rgba(24, 24, 64, 0.9); 
     558    border: 1px solid #c9d9e9; /* #efebef; */ 
    568559} 
    569560#spyContainer { clear: both; padding: 5px 5px 0 0; } 
  • wassup/trunk/readme.txt

    r318010 r433606  
    44Tags: tracker, tracking, statistics, analyze, web, realtime, stats, ajax, visitors, visits, online users, details, seo, admin, spy, visitors, widgets, widget, sidebar, monitor, stalker, detector, webmaster, tool, geolocation, chart, google!charts, spammers, exploits, injection, security, useragent, browser, spider, detection, pageviews  
    55Requires at least: 2.2 
    6 Tested up to: 3.0.2 
    7 Stable tag: 1.8.1 
     6Tested up to: 3.2.1 
     7Stable tag: 1.8.2 
    88 
    99Analyze your visitors traffic with real-time statistics, a lot of chronological information, charts, a sidebar widget. 
     
    6868* Email alert for table growth 
    6969 
    70 DISCLAIMER: Use at your own risk. No warranty expressed or implied is provided. 
     70IMPORTANT: WassUp is incompatible with page-based caching plugins such as "WP Super-Cache".  
    7171 
    7272== Frequently Asked Questions == 
    7373 
    7474= How do I add WassUp's chart to my admin dashboard? = 
    75 Go to Wassup >> Wassup-Options submenu, select [General Setup] tab and check "Display small chart in dashboard", then click [Save Settings] button.  
     75Go to Wassup >> Options submenu, select [General Setup] tab and check "Display small chart in dashboard", then click [Save Settings] button.  
    7676 
    7777= My Wordpress theme is not widget ready. Is it possible to add WassUp Widget to my site? = 
     
    7979 
    8080= How do I exclude a visitor from being recorded? = 
    81 Go to Wassup >> Wassup-Options, select [Statistics Recording] tab and enter the IP address or username to be excluded in the appropriate text area. 
     81Go to Wassup >> Options, select [Statistics Recording] tab and enter the IP address or username to be excluded in the appropriate text area. 
    8282 
    8383= How do I stop (temporarily) WassUp from recording new visits on my site? = 
    84 Go to Wassup >> Wassup-Options, select [Statistics Recording] tab and uncheck "Enable/disable recording", then click [Save Settings] button. 
     84Go to Wassup >> Options, select [Statistics Recording] tab and uncheck "Enable/disable recording", then click [Save Settings] button. 
    8585 
    8686= Can Wassup record visits on a web site that is not Wordpress? = 
     
    111111 
    112112= Installation: = 
    113  
    1141131. Download the plugin, WassUp (Real-Time Visitors Tracking), to your local computer 
    1151141. Unpack this plugin's zip or gz file with your preferred unzip/untar program or use the command line: `tar xzvf wassup.tar.gz` (linux) 
     
    1181171. Activate WassUp plugin 
    119118 
    120 OR you can install it using Wordpress automatic install by going to Plugins >> Add New >> and type "WassUp" plugin name 
     119OR  
     120You can install the plugin using Wordpress automatic install by navigating to Plugins >> Add New >> and type "WassUp" plugin name 
    121121 
    122 = Upgrading: = 
    123  
    124 1. Check your current visitors count. If your site is busy, don't upgrade! 
     122= Upgrading (with caution**): = 
     1231. Check your current visitors count. If your site is busy, stop! Do the upgrade later when your site is less busy. 
    1251241. Deactivate WassUp plugin in Wordpress admin >> Plugins page 
    1261251. Delete "wassup" directory from `wp-content/plugins/` on your host server 
     
    1301291. Activate WassUp plugin 
    131130 
    132 OR you can upgrade it using Wordpress automatic upgrade in Wordpress admin >> Plugins page. 
     131OR  
     132You can upgrade the plugin using Wordpress automatic upgrade in Wordpress Admin >> Plugins page. 
    133133 
    134 IMPORTANT: Never upgrade WassUp when your site is busy. Interrupting WassUp in the midst of recording visitor data could cause a permanent lock or corruption of WassUp table that prevents any further recording.  If your site is always busy, I recommend that you temporarily "disable recording" in WassUp >> Wassup-Options, [Statistics Recording] Tab, beforehand, or put your site into "maintenance mode" prior to WassUp upgrade.  
     134IMPORTANT: **Upgrade with caution.  
     135To safely upgrade WassUp when your site is busy, you should temporarily stop WassUp recording of new visitors manually (uncheck `Enable/disable recording` in WassUp >> Wassup-Options >> [Statistics Recording] Tab), then do the automatic upgrade, and afterwards, re-enable WassUp recording manually. 
    135136 
    136137= Usage: = 
    137  
    138 When you activate this plugin (as described in "Installation"), it works "as is". You don't have anything to do. Wait for visitors to hit your site and start seeing details (click the dashboard and go to WassUp page) 
     138* When you activate this plugin (as described in "Installation"), it works "as is". You don't have anything to do. Wait for visitors to hit your site and start seeing details (click the dashboard and go to WassUp page) 
    139139 
    140140IMPORTANT: WassUp is incompatible with page-based caching plugins such as "WP Super-Cache".  
     
    142142== Changelog == 
    143143 
     144= 1.8.2 = 
     145= Urgent bugfix, compatibility and feature improvement upgrade =  
     146* fixed regex bug that caused a `preg.match` compilation warning error to display in some configurations. 
     147* fixed a typo in `wassup_install` function and updated code to suppress warning errors when 1st table install attempt fails. 
     148* added a javascript cookie to footer function for better screen resolution tracking in IE. 
     149* added 'Google Web Preview' snapshot bot to list of known spiders. 
     150* added code to detect faked referrer strings. 
     151* added new referrer spammers and removed obsolete domains from spammer lists. 
     152* added validity check to refresh timer to limit user input range to between 0 and 180 minutes (3 hours). An input value of 0 disables the timer. 
     153* improved search engine/search phrase detection. 
     154* improved namespace compatibility with other plugins. 
     155* miscellaneous minor code and style changes. 
     156 
    144157= 1.8.1 = 
    145 = Urgent bugfix and code improvements upgrade = 
    146 * fixed `set_time_limit` warning triggered when PHP is in safe_mode. 
    147 * fixed `preg.match` compilation warning in 'wGetSpamRef' function. 
    148 * disabled display of PHP warnings and other non-fatal errors within WassUp tracker function. 
    149 * added important new upgrade information to `readme.txt` Installation instructions. 
    150 * added a time period to "top ten" report heading. 
    151 * minor style changes in wassup css. 
     158= Urgent bugfix and code improvement upgrade = 
     159* fixed bug that caused `set_time_limit` and other warning errors to display to visitors.  
     160* improved upgrade instructions in `readme.txt`. 
     161* miscellaneous minor code changes. 
    152162  
    153163= 1.8 = 
     
    155165* new table, "wassup_meta", for data caching and extended tracking. 
    156166* new web service, [freegeoip.net](http://freegeoip.net), for IP Geolocation. Thanks to [@AlexandreFiori](http://twitter.com/alexandrefiori) for giving us access to his API. 
    157 * updated admin interface and menus. 
    158 * updated browser, OS, and search engine detection. 
     167* new admin interface style. 
     168* improved browser, OS, and search engine detection. 
    159169* improved security and performance. 
    160170* improved compatibility with Wordpress 3.0-3.0.1 and security plugins.  
     
    179189== Upgrade Notice == 
    180190 
    181 = 1.8.1 = 
    182 * Urgent bug fix upgrade plus code improvements. This upgrade is required for WassUp 1.8 users. Read plugin `Installation` instructions for important new upgrade information. 
     191= 1.8.2 = 
     192* Urgent bug fix and feature improvement upgrade. Required for WassUp 1.8+ users. Read plugin install instructions for important upgrade information. 
    183193 
    184194== Infos == 
  • wassup/trunk/wassup.php

    r318010 r433606  
    33Plugin Name: WassUp 
    44Plugin URI: http://www.wpwp.org 
    5 Description: Wordpress plugin to analyze your visitors traffic with real-time stats, charts, and a lot of chronological information. It has a sidebar widget that shows current online visitors and other statistics. For Wordpress 2.2 or higher. Caution: don't upgrade when your site is busy! 
    6 Version: 1.8.1 
     5Description: Analyze your visitors traffic with real-time stats, charts, and a lot of chronological information. Includes a sidebar widget of current online visitors and other statistics and an admin dashboard widget with chart. For Wordpress 2.2 or higher. Caution: don't upgrade when your site is busy! 
     6Version: 1.8.2 
    77Author: Michele Marcucci, Helene Duncker 
    88Author URI: http://www.michelem.org/ 
     
    2424//wassup globals & constants 
    2525global $wp_version, $current_user, $user_level, $wassup_options; 
    26 $wassupversion="1.8.1"; 
     26$wassupversion="1.8.2"; 
    2727$wassup_cookie_value=""; 
    2828$debug_mode=false;  //turn on debugging (global)...Use cautiously! Will display errors from all plugins, not just WassUp 
     
    3232require_once(WASSUPDIR.'/lib/main.php'); 
    3333include_once(WASSUPDIR.'/lib/uadetector.class.php'); 
    34  
    35 //$wpurl = get_bloginfo('wpurl');   //no longer global (name conflict) 
    36 //$blogurl = get_bloginfo('home');  //no longer global (name conflict) 
    3734 
    3835//WassUp works only in WP2.2 or higher 
     
    6966    //#Add/update wassup settings in Wordpress options table 
    7067    $wassup_options = new wassupOptions; //#settings initialized here 
    71     $table_name = (!empty($wassup_options->wassup_table))? $wassup_options->wassup_table : $wpdb->prefix . "wassup"; 
    72     $table_meta_name = $table_name."_meta"; 
     68    $wassup_table = (!empty($wassup_options->wassup_table))? $wassup_options->wassup_table : $wpdb->prefix . "wassup"; 
    7369 
    7470    //# wassup should not be active during install 
     
    9793    } 
    9894    if (empty($wassup_options->wassup_table)) { 
    99         $wassup_options->wassup_table = $table_name; 
    100     } 
    101     //New in v1.8: wassup_cache for caching of charts and geoip data 
     95        $wassup_options->wassup_table = $wassup_table; 
     96    } 
     97    //wassup_cache for caching of charts and geoip data 
    10298    //...wassup_cache automatically disabled for pre-1.8 wassup users 
    10399    if (!empty($wassup_options->wassup_version) && version_compare($wassup_options->wassup_version,'1.8','<')) { 
     
    114110        exit (1); 
    115111    } 
    116     $success = wassup_tableInstaller(); 
     112    $success = @wassup_tableInstaller(); 
    117113    //double-check that main table was installed 
    118     if ($wpdb->get_var("SHOW TABLES LIKE '$table_name'") == $table_name){  
    119         //New in v1.8: Reset 'dbengine' MySQL setting with each upgrade...because host server settings can change 
     114    $wassup_table = (!empty($wassup_options->wassup_table))? $wassup_options->wassup_table : $wpdb->prefix . "wassup"; 
     115    if ($wpdb->get_var("SHOW TABLES LIKE '$wassup_table'") == $wassup_table){  
     116        //Reset 'dbengine' MySQL setting with each upgrade...because host server settings can change 
    120117        if (!empty($wassup_options->wassup_version)) {  //upgrade only 
    121118            $wassup_options->wassup_dbengine = $wassup_options->getMySQLsetting('engine'); 
    122119        } 
    123         //New in v1.8: turn off wassup_cache if meta table does not exist 
    124         if ($wassup_options->wassup_cache == 1 && $wpdb->get_var("SHOW TABLES LIKE '$table_meta_name'") != $table_meta_name){  
    125             $wassup_options->wassup_cache = 0; 
    126         } 
    127  
    128         //TODO: Show warning when 'wp_footer()' does not exist in active theme template 
    129         //New in v1.8: show warning when 'WP_CACHE' constant is set 
     120        //turn off wassup_cache if meta table does not exist 
     121        $wassup_meta_table = $wassup_table . "_meta"; 
     122        if ($wassup_options->wassup_cache == 1) { 
     123            if ($wpdb->get_var("SHOW TABLES LIKE '$wassup_meta_table'") != $wassup_meta_table) {  
     124                $wassup_options->wassup_cache = 0; 
     125            } 
     126        } 
     127 
     128        //show warning when 'WP_CACHE' constant is set 
    130129        if (wassup_compatCheck("WP_CACHE") == true) { 
    131             $wassup_options->wassup_alert_message = '<strong style="color:#c00;padding:5px;">'.__("WassUp cannot generate accurate statistics with page caching enabled. If your caching plugin stores your site as html pages, you must deactivate that plugin and remove \"WP_CACHE\" from \"wp_config.php\" to use WassUp effectively.","wassup").'</strong>'; 
    132         } 
     130            $wassup_options->wassup_alert_message = '<strong style="color:#c00;padding:5px;">'.__("Page caching affect WassUp's ability to generate accurate statistics. If your cache plugin does whole page caching, WassUp won't run properly. Please deactivate that plugin and remove \"WP_CACHE\" from \"wp_config.php\".","wassup").'</strong>'; 
     131        } 
     132        //TODO: Show warning when 'wp_footer()' does not exist in active theme template (non-cache setups only) 
    133133 
    134134        //#Since v1.7: put current version# in options after update 
     
    143143    } else { 
    144144        //main table not created - exit with error 
    145         remove_option('wassup_settings'); 
     145        delete_option('wassup_settings'); 
    146146        if (function_exists('deactivate_plugins')) { 
    147147            deactivate_plugins(__FILE__); 
     
    180180        } 
    181181        //purge wassup tables- WARNING: this is a permanent erase!! 
    182         $table_name = (empty($wassup_settings['wassup_table'])?$wpdb->prefix.'wassup': $wassup_settings['wassup_table']); 
    183         $table_tmp_name = $table_name."_tmp"; 
    184         $table_meta_name = $table_name."_meta"; 
    185         //$wpdb->query("DROP TABLE IF EXISTS $table_name"); //incorrectly causes an activation error in Wordpress 
     182        $wassup_table = (empty($wassup_settings['wassup_table'])?$wpdb->prefix.'wassup': $wassup_settings['wassup_table']); 
     183        $table_tmp_name = $wassup_table."_tmp"; 
     184        $table_meta_name = $wassup_table."_meta"; 
     185        //$wpdb->query("DROP TABLE IF EXISTS $wassup_table"); //incorrectly causes an activation error in Wordpress 
    186186        //$wpdb->query("DROP TABLE IF EXISTS $table_tmp_name"); //incorrectly causes an activation error in Wordpress 
    187187        mysql_query("DROP TABLE IF EXISTS $table_meta_name"); 
    188188        mysql_query("DROP TABLE IF EXISTS $table_tmp_name"); 
    189         mysql_query("DROP TABLE IF EXISTS $table_name"); 
     189        mysql_query("DROP TABLE IF EXISTS $wassup_table"); 
    190190 
    191191        delete_option('wassup_settings'); 
     
    195195/** 
    196196 * Output javascript in page head for wassup tracking  
    197  * New in 1.8: renamed from 'wassup_meta_info' to 'wassup_head' 
    198197 * @param string (optional); 
    199198 * @return none; 
     
    326325 
    327326//### Wassup Admin functions 
    328 //New in v1.8: For improved WassUp performance, restrict admin hooks and  
     327//For improved WassUp performance, restrict admin hooks and  
    329328// admin functions to admin pages only 
    330329if (is_admin()) { 
     
    364363        echo "\n".'<link rel="stylesheet" href="'.WASSUPURL.'/js/thickbox/thickbox.css'.'" type="text/css" />'; 
    365364 
    366         if ($_GET['page'] != "wassup-options" AND $_GET['page'] != "wassup-spia") { ?> 
     365        if ($_GET['page'] != "wassup-options" AND $_GET['page'] != "wassup-spia") { 
     366?> 
     367<script type='text/javascript'> 
     368  //<![CDATA[ 
     369//  var selftimerID = 0; 
     370  function selfRefresh(){ 
     371    location.href='?<?php print $_SERVER['QUERY_STRING']; ?>'; 
     372  } 
     373//  selftimerID = setTimeout('selfRefresh()', <?php print ($wassup_options->wassup_refresh * 60000)+2000; ?>); 
     374  //]]> 
     375</script> 
     376<?php           //New in 1.8.2: restrict refresh to range 0-180 minutes (3 hrs) 
     377            $wrefresh = 0; 
     378            if (!is_numeric($wassup_options->wassup_refresh) || $wassup_options->wassup_refresh < 0  || $wassup_options->wassup_refresh > 180) { 
     379                $wrefresh = 3; //3 minutes default; 
     380            } else { 
     381                $wrefresh = (int) $wassup_options->wassup_refresh; 
     382            }  
     383            //always refresh wassup-online page every 1-3 mins 
     384            if ($_GET['page'] == "wassup-online" && ($wrefresh > 3 || $wrefresh < 1)) { 
     385                $wrefresh = 3; 
     386            } 
     387 
     388            //don't add refresh timer javascript if refresh==0 
     389            if ($wrefresh > 0) {  
     390                echo "\n"; ?> 
    367391<script type='text/javascript'> 
    368392  //<![CDATA[ 
    369393  var selftimerID = 0; 
    370   function selfRefresh(){ 
    371     location.href='?<?php print $_SERVER['QUERY_STRING']; ?>'; 
    372   } 
    373   selftimerID = setTimeout('selfRefresh()', <?php print ($wassup_options->wassup_refresh * 60000)+2000; ?>); 
    374   //]]> 
    375 </script> 
    376  
    377 <script type='text/javascript'> 
    378   //<![CDATA[ 
    379394  var _countDowncontainer="0"; 
    380395  var _currentSeconds=0; 
     
    407422    return ((num >= "0")&&(num < 10))?"0"+num:num+""; 
    408423  } 
     424  selftimerID = setTimeout('selfRefresh()', <?php print ($wrefresh * 60000)+2000; ?>); 
    409425  //]]> 
    410426</script> 
     
    413429  window.onload=WindowLoad; 
    414430  function WindowLoad(event) { 
    415     ActivateCountDown("CountDownPanel", <?php print ($wassup_options->wassup_refresh * 60); ?>); 
     431    ActivateCountDown("CountDownPanel", <?php print ($wrefresh * 60); ?>); 
    416432  } 
    417433  //]]> 
    418434</script> 
    419  
     435<?php           } //end if $wrefresh > 0 
     436?> 
    420437<script type="text/javascript"> 
    421438//<![CDATA[ 
     
    510527       return false; 
    511528    }); 
    512  
     529<?php            
     530    //don't add refresh timer click function if refresh==0 
     531    if ($wrefresh > 0) {  ?> 
    513532    $("#CountDownPanel").click(function(){  //Pause|Resume countdown 
    514533       var timeleft = _currentSeconds*1000; 
     
    525544       } 
    526545    }); 
     546<?php   } //end if $wrefresh > 0 (2nd) 
     547?> 
    527548}); //end jQuery(document).ready 
    528549//]]> 
     
    628649    add_submenu_page(WASSUPFOLDER, __('Spy Visitors', 'wassup'), __('SPY Visitors', 'wassup'), $userlevel, 'wassup-spia', 'WassUp'); 
    629650    add_submenu_page(WASSUPFOLDER, __('Current Visitors Online', 'wassup'), __('Current Visitors Online', 'wassup'), $userlevel, 'wassup-online', 'WassUp'); 
    630     //New in 1.8: only admins can change WassUp options, so userlevel is always 8 
     651    //only admins can change WassUp options, so userlevel is always 8 
    631652    add_submenu_page(WASSUPFOLDER, __('Options', 'wassup'), __('Options', 'wassup'), 8, 'wassup-options', 'WassUp'); 
    632653 
    633     //New in v1.8: Wassup Stats submenu on WP2.7+ dashboard menu 
    634     //New in v1.8: "settings" added to action links on "plugins" page 
     654    //add Wassup Stats submenu on WP2.7+ dashboard menu 
     655    //add "settings" to action links on "plugins" page 
    635656    if (version_compare($wp_version, '2.5', '>=')) { 
    636657        if (version_compare($wp_version, '2.7', '>=')) { 
     
    682703    $wpurl =  get_bloginfo('wpurl'); 
    683704    $blogurl =  get_bloginfo('home'); 
    684     $table_name = (!empty($wassup_options->wassup_table)? $wassup_options->wassup_table: $wpdb->prefix . "wassup"); 
    685     $table_tmp_name = $table_name."_tmp"; 
     705    $wassup_table = (!empty($wassup_options->wassup_table)? $wassup_options->wassup_table: $wpdb->prefix . "wassup"); 
     706    $table_tmp_name = $wassup_table."_tmp"; 
    686707 
    687708    //"action_param" are preassigned "GET" parameters used for "action.php" external/ajax calls like "top ten"  
     
    717738                $delete_condition .= " AND spam>0"; 
    718739            } 
    719             $wpdb->query("DELETE FROM $table_name WHERE $delete_condition"); 
     740            $wpdb->query("DELETE FROM $wassup_table WHERE $delete_condition"); 
    720741            $affected_recs = $wpdb->rows_affected + 0; 
    721             //$wpdb->query("OPTIMIZE TABLE $table_name"); //table already optimized daily 
     742            //$wpdb->query("OPTIMIZE TABLE $wassup_table"); //table already optimized daily 
    722743        } 
    723744        if ($affected_recs > 0) { 
     
    743764                    $delete_condition .= " AND spam>0"; 
    744765                } 
    745                 $wpdb->query("DELETE FROM $table_name WHERE $delete_condition"); 
     766                $wpdb->query("DELETE FROM $wassup_table WHERE $delete_condition"); 
    746767                $affected_recs = $wpdb->rows_affected + 0; 
    747768                if ($affected_recs > 0) { 
     
    756777    } //end if delete_auto 
    757778    if (!empty($_POST['wassup_empty'])) { 
    758         $wpdb->query("DELETE FROM $table_name"); 
     779        $wpdb->query("DELETE FROM $wassup_table"); 
    759780        if ($affected_recs > 0) { 
    760781            $affected_recs = $wpdb->rows_affected + 0; 
     
    765786        //TODO: "Optimize" operation locks table so it must finish in background to prevent browser close/timeout from interrupting the release of the lock, making it permanent. 
    766787        //if ($affected_recs > 1000) { 
    767         //  $wpdb->query("OPTIMIZE TABLE $table_name"); 
     788        //  $wpdb->query("OPTIMIZE TABLE $wassup_table"); 
    768789        //} 
    769790        $wassup_options->saveSettings(); 
     
    802823        } 
    803824        $wassup_options->wassup_screen_res = $_POST['wassup_screen_res']; 
    804         $wassup_options->wassup_refresh = $_POST['wassup_refresh']; 
    805         $wassup_options->wassup_userlevel = $_POST['wassup_userlevel']; 
     825        //validate wassup_refresh option input 
     826        if (is_numeric($_POST['wassup_refresh']) && $_POST['wassup_refresh']>=0 && $_POST['wassup_refresh']<=180) {  
     827            $wassup_options->wassup_refresh = (int)$_POST['wassup_refresh']; 
     828        } 
     829 
     830        $wassup_options->wassup_userlevel = (int)$_POST['wassup_userlevel']; 
    806831        $wassup_options->wassup_dashboard_chart = $_POST['wassup_dashboard_chart']; 
    807832        $wassup_options->wassup_geoip_map = $_POST['wassup_geoip_map']; 
     
    918943    <ul id="wassup-menu"> 
    919944        <li class="wassup-menu-link <?php echo $class_opt; ?>"><?php 
    920         //New in v1.8: only administrators can view "wassup-options" 
     945        //only administrators can view "wassup-options" 
    921946        if ($user_level >= 8) { 
    922947            echo '<a href="'.admin_url("admin.php?page=wassup-options").'">'.__('Options','wassup').'</a>'; 
     
    11181143        $to_date = current_time('timestamp'); 
    11191144        $from_date = ($to_date - 12*(60*60)); //display last 10 visits in 12 hours... 
    1120         wassup_spiaView($from_date,0,$spytype,$table_name); ?> 
     1145        wassup_spiaView($from_date,0,$spytype,$wassup_table); ?> 
    11211146        <p style="height:2px;clear:both;"></p> 
    11221147    </div><!-- /spyContainer --> 
     
    12371262        //#  Delete limited to selected date range only. -Helene D. 3/4/08. 
    12381263        if (!empty($_GET['deleteMARKED']) && $wassup_options->wmark == "1" && !empty($_GET['dip'])) { 
    1239                         $del_count = $wpdb->get_var("SELECT COUNT(ip) as deleted FROM $table_name WHERE ip='".attribute_escape($_GET['dip'])."' AND `timestamp` BETWEEN $from_date AND $to_date"); 
     1264                        $del_count = $wpdb->get_var("SELECT COUNT(ip) as deleted FROM $wassup_table WHERE ip='".attribute_escape($_GET['dip'])."' AND `timestamp` BETWEEN $from_date AND $to_date"); 
    12401265                        if (method_exists($wpdb,'prepare')) { 
    1241                                 $wpdb->query($wpdb->prepare("DELETE FROM $table_name WHERE ip='%s' AND `timestamp` BETWEEN %s AND %s", $_GET['dip'], $from_date, $to_date)); 
     1266                                $wpdb->query($wpdb->prepare("DELETE FROM $wassup_table WHERE ip='%s' AND `timestamp` BETWEEN %s AND %s", $_GET['dip'], $from_date, $to_date)); 
    12421267                        } else { 
    1243                                 $wpdb->query("DELETE FROM $table_name WHERE ip='".attribute_escape($_GET['dip'])."' AND `timestamp` BETWEEN $from_date AND $to_date"); 
     1268                                $wpdb->query("DELETE FROM $wassup_table WHERE ip='".attribute_escape($_GET['dip'])."' AND `timestamp` BETWEEN $from_date AND $to_date"); 
    12441269                        } 
    1245                         $rec_count = $wpdb->get_var("SELECT COUNT(ip) as deleted FROM $table_name WHERE ip='".attribute_escape($_GET['dip'])."' AND `timestamp` BETWEEN $from_date AND $to_date");  //double-check deletions 
     1270                        $rec_count = $wpdb->get_var("SELECT COUNT(ip) as deleted FROM $wassup_table WHERE ip='".attribute_escape($_GET['dip'])."' AND `timestamp` BETWEEN $from_date AND $to_date");    //double-check deletions 
    12461271            $rec_deleted = ($del_count - $rec_count)." ".__('records deleted','wassup'); 
    12471272            $wassup_options->showMessage($rec_deleted); 
     
    12561281 
    12571282        // Instantiate class to count items 
    1258         $Tot = New MainItems($table_name,$from_date,$to_date,$whereis,$limit); 
     1283        $Tot = New MainItems($wassup_table,$from_date,$to_date,$whereis,$limit); 
    12591284        $Tot->whereis = $whereis; 
    12601285        $Tot->Limit = $limit; 
     
    13851410        <a href="#" onclick='selfRefresh()'><img src="<?php echo WASSUPURL; ?>/img/reload.png" id="refresh" alt="refresh screen" title="Refresh screen" /></a></td> 
    13861411    <td class="legend" align="left"><?php  
    1387         echo __('Auto refresh in','wassup').'&nbsp;<span id="CountDownPanel"></span>&nbsp;'.__('seconds','wassup').'<br/>'; 
     1412        echo __('Auto refresh in','wassup').'&nbsp;<span id="CountDownPanel">00</span>&nbsp;'.__('seconds','wassup'); 
     1413        echo '<br/>'; 
    13881414        // Marked items - Refresh 
    13891415        if ($wassup_options->wmark == 1) { 
     
    14201446        <form action="" method="get"> 
    14211447        <input type="hidden" name="page" value="<?php echo WASSUPFOLDER; ?>" /><?php 
    1422         $filterargs=str_replace('&type='.$type,'',$stickyFilters); 
    1423         if (!empty($filterargs)) { 
    1424             $filters=explode('&',$filterargs); 
    1425             foreach ($filters AS $filter) { 
    1426                 $filterval=explode('=',$filter); 
    1427                 if (!empty($filterval[0])) { ?> 
    1428         <input type="hidden" name="<?php echo $filterval[0].'" value="'.$filterval[1]; ?>" /><?php 
    1429                 } 
    1430             } 
    1431         } ?> 
     1448        if (!empty($stickyFilters)) { 
     1449            $wfilterargs=wGetQueryPairs($stickyFilters); 
     1450        if (!empty($wfilterargs)) { 
     1451            foreach ($w_filterargs AS $wfilter) { 
     1452                $wfilterval=explode('=',$wfilter); 
     1453                if (!empty($wfilterval[0]) && $wfilterval[0]!= 'type') { ?> 
     1454        <input type="hidden" name="<?php echo $wfilterval[0].'" value="'.$wfilterval[1]; ?>" /><?php 
     1455                } 
     1456            } 
     1457        } } ?> 
    14321458        <input type="text" size="25" name="search" value="<?php if ($search != "") print attribute_escape($search); ?>" /><input type="submit" name="submit-search" value="search" /> 
    14331459        </form> 
     
    14671493        if ($rk->hostname != "") $hostname = $rk->hostname;  
    14681494        else $hostname = "unknown"; 
    1469         //$numurl = $wpdb->get_var("SELECT COUNT(DISTINCT id) as numurl FROM $table_name WHERE wassup_id='".$rk->wassup_id."'"); 
     1495        //$numurl = $wpdb->get_var("SELECT COUNT(DISTINCT id) as numurl FROM $wassup_table WHERE wassup_id='".$rk->wassup_id."'"); 
    14701496        $numurl = (int) $rk->page_hits; 
    14711497        echo "\n"; 
     
    16291655            if ($rk->spider != "") { 
    16301656            if ($rk->feed != "") { ?> 
    1631             <ul class="spider" style="background:#eeddcc;"> 
     1657            <ul class="spider feed"> 
    16321658            <li class="feed"><span class="indent-li-agent"><?php _e('FEEDREADER','wassup'); ?>: <strong><a href="#" class="toggleagent" id="<?php echo $rk->id; ?>"><?php print $rk->spider; ?></a></strong></span></li> 
    16331659<?php               if (is_numeric($rk->feed)) { ?> 
     
    16851711        if ($numurl > 1) { 
    16861712            //Important Note: list of urls visited is affected by browsers like Safari 4 which hits a page from both the user window and from it's "top sites" page, creating multiple duplicate records with distinct id's... 
    1687             //$qryCD = $wpdb->get_results("SELECT `timestamp`, urlrequested FROM $table_name WHERE wassup_id='".$rk->wassup_id."' ORDER BY `timestamp`");   //duplicates possible 
    1688             $qryCD = $wpdb->get_results("SELECT DISTINCT `timestamp`, urlrequested, agent FROM $table_name WHERE wassup_id='".$rk->wassup_id."' ORDER BY `timestamp`"); //no duplication, unless agent is differnt 
    1689             //$qryCD = $wpdb->get_results("SELECT `id`, `timestamp`, urlrequested FROM $table_name WHERE wassup_id='".$rk->wassup_id."' ORDER BY `id`");    //id is sequential, so sort order == visit order...UPDATE: may not be in visit order because 'insert delayed' could make `id` out of sync with `timestamp` 
     1713            //$qryCD = $wpdb->get_results("SELECT `timestamp`, urlrequested FROM $wassup_table WHERE wassup_id='".$rk->wassup_id."' ORDER BY `timestamp`"); //duplicates possible 
     1714            $qryCD = $wpdb->get_results("SELECT DISTINCT `timestamp`, urlrequested, agent FROM $wassup_table WHERE wassup_id='".$rk->wassup_id."' ORDER BY `timestamp`");   //no duplication, unless agent is differnt 
     1715            //$qryCD = $wpdb->get_results("SELECT `id`, `timestamp`, urlrequested FROM $wassup_table WHERE wassup_id='".$rk->wassup_id."' ORDER BY `id`");  //id is sequential, so sort order == visit order...UPDATE: may not be in visit order because 'insert delayed' could make `id` out of sync with `timestamp` 
    16901716            $i=1; 
    16911717            $char_len = round($max_char_len*.92,0); 
     
    17701796} //end function Wassup 
    17711797 
    1772 //New in v1.8: moved createTable/upgradeTable functions to 'upgrade.php' module where they are loaded only when needed to keep WassUp fast 
    1773 //function wCreateTable($table_name="",$withcharset=true) { 
    1774 //  global $wpdb, $wassupversion, $current_user; 
    1775 // 
    1776 //  $wassup_table = (!empty($wassup_options->wassup_table))? $wassup_options->wassup_table: $wpdb->prefix . "wassup"; 
    1777 // 
    1778 //  if (empty($table_name)) { 
    1779 //      $table_name = $wassup_table; 
    1780 //  } 
    1781 //  $table_tmp_name = $wassup_table."_tmp"; 
    1782 //   
    1783 //  //...Set default character set and collation (on new table) 
    1784 //  $charset_collate = ''; 
    1785 //  //#don't do charset/collation when < MySQL 4.1 or when DB_CHARSET is undefined 
    1786 //  //Note: it is possible that table default charset !== WP database charset on preexisting MySQL database and tables (from WP2.3 or less) because old charsets persist after upgrades 
    1787 //  if ($withcharset && version_compare(mysql_get_server_info(),'4.1.0','>') && defined('DB_CHARSET') && !empty($wpdb->charset)) { 
    1788 //      $charset_collate = 'DEFAULT CHARACTER SET '.$wpdb->charset; 
    1789 //      //add collate only when charset is specified 
    1790 //      if (!empty($wpdb->collate)) { 
    1791 //          $charset_collate .= ' COLLATE '.$wpdb->collate; 
    1792 //      } 
    1793 //  } 
    1794 // 
    1795 //  //wassup table structure 
    1796 //  $sql_createtable = "CREATE TABLE `$table_name` ( 
    1797 //  `id` mediumint(11) NOT NULL auto_increment, 
    1798 //  `wassup_id` varchar(60) NOT NULL, 
    1799 //  `timestamp` varchar(20) NOT NULL, 
    1800 //  `ip` varchar(50) default NULL, 
    1801 //  `hostname` varchar(150) default NULL, 
    1802 //  `urlrequested` text, 
    1803 //  `agent` varchar(255) default NULL, 
    1804 //  `referrer` text, 
    1805 //  `search` varchar(255) default NULL, 
    1806 //  `searchpage` int(11) unsigned default '0', 
    1807 //  `os` varchar(15) default NULL, 
    1808 //  `browser` varchar(50) default NULL, 
    1809 //  `language` varchar(5) default NULL, 
    1810 //  `screen_res` varchar(15) default NULL, 
    1811 //  `searchengine` varchar(25) default NULL, 
    1812 //  `spider` varchar(50) default NULL, 
    1813 //  `feed` varchar(50) default NULL, 
    1814 //  `username` varchar(50) default NULL, 
    1815 //  `comment_author` varchar(50) default NULL, 
    1816 //  `spam` varchar(5) default '0', 
    1817 //  `url_wpid` varchar(50) default NULL, 
    1818 //  UNIQUE KEY `id` (`id`), 
    1819 //  KEY `idx_wassup` (`wassup_id`(32),`timestamp`), 
    1820 //  INDEX (`os`), 
    1821 //  INDEX (`browser`), 
    1822 //  INDEX `timestamp` (`timestamp`)) {$charset_collate};"; 
    1823 //  //...Include a first record if new table (not temp table) 
    1824 //  $sql_firstrecord = ''; 
    1825 //  if ($table_name != $table_tmp_name && $wpdb->get_var("SHOW TABLES LIKE '$table_name'") != $table_name) { 
    1826 //      if (!class_exists('UADetector')) 
    1827 //          include_once (dirname(__FILE__) . '/lib/uadetector.class.php'); 
    1828 //      $ua = new UADetector; 
    1829 //      if (empty($current_user->user_login)) get_currentuserinfo(); 
    1830 //      $logged_user = (!empty($current_user->user_login)? $current_user->user_login: ""); 
    1831 //      $sql_firstrecord = sprintf("INSERT INTO $table_name (`wassup_id`, `timestamp`, `ip`, `hostname`, `urlrequested`, `agent`, `referrer`, `search`, `searchpage`, `os`, `browser`, `language`, `screen_res`, `searchengine`, `spider`, `feed`, `username`, `comment_author`, `spam`) VALUES ('%032s','%s','%s','%s','%s','%s','%s','','','%s','%s','','','','','','%s','','0')", 
    1832 //          1, time()+(get_option(gmt_offset)*3600),  
    1833 //          '127.0.0.1', 'localhost',  
    1834 //          '[404] '.__('Welcome to WassUP','wassup'),  
    1835 //          $ua->agent . ' WassUp/'.$wassupversion.' (http://www.wpwp.org)',  
    1836 //          'http://www.wpwp.org', $ua->os,  
    1837 //          trim($ua->name .' '. $ua->majorVersion($ua->version)), 
    1838 //          $logged_user); 
    1839 //  } 
    1840 // 
    1841 //  if (!function_exists('dbDelta')) { 
    1842 //  if (file_exists(ABSPATH . 'wp-admin/includes/upgrade.php')) { 
    1843 //      require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); 
    1844 //  } else {    //deprecated since 2.5 
    1845 //          require_once( ABSPATH.'wp-admin/upgrade-functions.php'); 
    1846 //  } 
    1847 //  } 
    1848 //  //...create/upgrade wassup table 
    1849 //  if (!empty($sql_firstrecord)) { 
    1850 //      $result = dbDelta(array($sql_createtable,$sql_firstrecord)); 
    1851 //  } else { 
    1852 //      $result = dbDelta($sql_createtable); 
    1853 //  }  
    1854 // 
    1855 //  //...return 'true' if table created successfully, false otherwise 
    1856 //  $retvalue=true; 
    1857 //  if ($wpdb->get_var("SHOW TABLES LIKE '$table_name'") != $table_name) { 
    1858 // 
    1859 //      $retvalue=false; 
    1860 //  } else { 
    1861 //      if ($table_name != $table_tmp_name && version_compare(mysql_get_server_info(),'4.1.0','>')) { 
    1862 //          //'CREATE TABLE LIKE' syntax not supported in MySQL 4.1 or less 
    1863 //          $upgrade = dbDelta("CREATE TABLE $table_tmp_name LIKE {$table_name}"); 
    1864 //      } 
    1865 //  } 
    1866 //  return $retvalue; 
    1867 //} //end function wCreateTable 
    1868  
    1869 //function wUpdateTable() {  -- moved to "lib/upgrade.php" 
    1870 //  global $wpdb, $wassup_options, $wassupversion; 
    1871 // 
    1872 //  $table_name = (!empty($wassup_options->wassup_table))? $wassup_options->wassup_table: $wpdb->prefix . "wassup"; 
    1873 //  $table_tmp_name = $table_name."_tmp"; 
    1874 //  // Drop and re-create all indices except 'id' 
    1875 //  //# get list of all wassup indices 
    1876 //  $qryresult = mysql_query("SHOW INDEX FROM {$table_name}"); 
    1877 //  if ($qryresult) {  
    1878 //      $row_count = mysql_num_rows($qryresult);  
    1879 //  } else { 
    1880 //      $row_count = 0; 
    1881 //  } 
    1882 //  //# get the names of all indices 
    1883 //  $idx_names = array(); 
    1884 //  $prev_key = ""; //names listed multiples times per columns in key 
    1885 //  if ($row_count > 1) { 
    1886 //      while ($row = mysql_fetch_array($qryresult,MYSQL_ASSOC)) { 
    1887 //          if ($row["Column_name"] != "id" && $row["Key_name"] != $prev_key) { 
    1888 //              $idx_names[] = $row["Key_name"]; 
    1889 //          } 
    1890 //          $prev_key = $row["Key_name"]; 
    1891 //      } //end while 
    1892 //  } //end if row_count 
    1893 //  mysql_free_result($qryresult); 
    1894 //  //# drop all the indices in $idx_names and drop temp table... 
    1895 //  //drop indices 
    1896 //  foreach ($idx_names AS $idx_drop) { 
    1897 //      mysql_query("DROP INDEX $idx_drop ON {$table_name}"); 
    1898 //  } 
    1899 // 
    1900 //  //...could take a long time, so run in background if window times out 
    1901 //  ignore_user_abort(1); 
    1902 //  mysql_query("DROP TABLE IF EXISTS $table_tmp_name");  
    1903 // 
    1904 //  //call 'wCreateTable' to update table structure and rebuild indices using wordpress' 'dbdelta' function... 
    1905 //  if (wCreateTable($table_name,false)) { 
    1906 //      if ($wpdb->get_var("SHOW TABLES LIKE '$table_tmp_name'") != $table_tmp_name) {  
    1907 //          wCreateTable($table_tmp_name); 
    1908 //      } 
    1909 //      return true; 
    1910 //  } elseif ($wpdb->get_var("SHOW TABLES LIKE '$table_name'") == $table_name) {  
    1911 //      //table upgrade warning error 
    1912 //      return true; 
    1913 //  } else { 
    1914 //      //table upgrade fatal error 
    1915 //      return false; 
    1916 //  } 
    1917 //} //end function wUpdateTable 
     1798//Since v.1.8: createTable/upgradeTable functions were moved to  
     1799//  'upgrade.php' module where they are loaded only when needed to keep  
     1800//   WassUp fast 
    19181801} //end if is_admin 
    19191802 
     
    21492032    } else { 
    21502033        //do only fatal error reporting 
     2034        // note: this won't work if PHP in safe mode 
    21512035        $errlvl = @error_reporting(); 
    21522036        if (!empty($errlvl)) { 
     
    21572041    $wpurl = get_bloginfo('wpurl'); 
    21582042    $blogurl = get_option('home'); 
    2159     $table_name = (!empty($wassup_options->wassup_table)?$wassup_options->wassup_table:$wpdb->prefix."wassup"); 
    2160     $table_tmp_name = $table_name . "_tmp"; 
    2161     $table_cache = $table_name."_meta"; 
     2043    $wassup_table = (!empty($wassup_options->wassup_table)?$wassup_options->wassup_table:$wpdb->prefix."wassup"); 
     2044    $table_tmp_name = $wassup_table . "_tmp"; 
     2045    $table_cache = $wassup_table."_meta"; 
    21622046    $wassup_rec = ""; 
    21632047    $wassup_dbtask=array(); //for scheduled db operations 
     
    23622246    // visitor.  Dup==same wassup_id, same URL, and timestamp <180 secs 
    23632247    $dup_urlrequest=0; 
    2364     $pageviews=0; 
     2248    $w_pageviews=0; 
    23652249    $spamresult=0; 
    23662250    $wpdb->query("SET wait_timeout = 7"); //don't wait for slow responses 
    23672251    $recent = $wpdb->get_results("SELECT wassup_id, urlrequested, spam, screen_res, `timestamp`, browser, spider, os, feed, `language`, `agent`, `referrer` FROM ".$table_tmp_name." WHERE wassup_id='".$wassup_id."' AND `timestamp` >".($timestamp-180)." ORDER BY `timestamp` DESC"); 
    23682252    if (!empty($recent)) { 
    2369         $pageviews=count($recent); 
     2253        $w_pageviews=count($recent); 
    23702254        //check 1st record only 
    23712255        //record is dup if same url (with 'wscr' removed) and same user-agent 
     
    23852269        //...queue the update because of "delayed insert" 
    23862270        if (empty($recent[0]->screen_res) && !empty($screen_res)) { 
    2387             $wassup_dbtask[] = "UPDATE $table_name SET `screen_res`='$screen_res' WHERE `wassup_id`='$wassup_id' AND `screen_res`='' "; 
     2271            $wassup_dbtask[] = "UPDATE $wassup_table SET `screen_res`='$screen_res' WHERE `wassup_id`='$wassup_id' AND `screen_res`='' "; 
    23882272        } 
    23892273 
     
    24122296        // Detect disguised spiders and harvesters by checking for 
    24132297        //  excessive pageviews (threshold: 8+ views in < 16 secs) 
    2414         if ($pageviews >7 && empty($spider)) { 
     2298        if ($w_pageviews >7 && empty($spider)) { 
    24152299            $visitstart = $recent[7]->timestamp; 
    24162300            if (($timestamp - $recent[7]->timestamp) < 16) { 
     
    24182302                $pagetest[]="$urlRequested"; 
    24192303                //a spider is unlikely to hit same page 2+ times 
    2420                 foreach ($recent AS $pageview) { 
    2421                     if (stristr($pageview['urlrequested'],"robots.txt")!==false) { 
     2304                foreach ($recent AS $w_pgview) { 
     2305                    if (stristr($w_pgview->urlrequested,"robots.txt")!==false) { 
    24222306                        $is_spider = true; 
    24232307                        break; 
    2424                     } elseif (in_array($pageview['urlrequested'],$pagetest)) { 
     2308                    } elseif (in_array($w_pgview->urlrequested,$pagetest)) { 
    24252309                        $is_spider = false; 
    24262310                        break; 
    24272311                    } else { 
    2428                         $pagetest[] = $pageview['urlrequested']; 
     2312                        $pagetest[] = $w_pgview->urlrequested; 
    24292313                    } 
    24302314                } 
    24312315                if ($is_spider) { 
    24322316                    $spider = __("Unknown Spider","wassup"); 
    2433                     $wassup_dbtask[] = "UPDATE $table_name SET `spider`='$spider' WHERE `wassup_id`='$wassup_id' AND `spider`=''"; 
     2317                    $wassup_dbtask[] = "UPDATE $wassup_table SET `spider`='$spider' WHERE `wassup_id`='$wassup_id' AND `spider`=''"; 
    24342318                } 
    24352319            } 
     
    24702354        //retroactively update record for hack attempt 
    24712355        if ($spam == "3" && $spamresult == "0" && !empty($recent)) { 
    2472             $wassup_dbtask[] = "UPDATE $table_name SET `spam`='3' WHERE `wassup_id`='$wassup_id' AND `spam`='0' "; 
     2356            $wassup_dbtask[] = "UPDATE $wassup_table SET `spam`='3' WHERE `wassup_id`='$wassup_id' AND `spam`='0' "; 
    24732357        } 
    24742358 
     
    25922476                $spam = 2; 
    25932477            //check referer against a list of known spammers 
    2594             } elseif (wGetSpamRef($referrer,$hostname) == true) { 
    2595                 $spam = 2; 
     2478            } else { 
     2479                if ($debug_mode) { 
     2480                    $isspam = wGetSpamRef($referrer,$hostname); 
     2481                } else { 
     2482                    $isspam = @wGetSpamRef($referrer,$hostname); 
     2483                } 
     2484                if ($isspam) $spam = 2; 
    25962485            } 
    25972486            } 
     
    26112500                $spam = 1; 
    26122501            } 
    2613             //New in 1.8: spam if both URL and referrer are "comment" and browser is obsolete or Opera 
     2502            //set as spam if both URL and referrer are "comment" and browser is obsolete or Opera 
    26142503            if ($spam== 0 && $wassup_options->wassup_spam==1 && stristr($urlRequested,"comment")!== FALSE && stristr($referrer,"#comment")!==FALSE && (stristr($browser,"opera")!==FALSE || preg_match('/^(AOL|Netscape|IE)\s[1-6]$/',$browser)>0)) { 
    26152504                $spam=1; 
     
    26482537            if (!empty($recent) && !empty($spam) && $spamresult==0) { 
    26492538                //queue the update... 
    2650                 $wassup_dbtask[]="UPDATE $table_name SET `spam`='".$spam."' WHERE `wassup_id`='".$wassup_id."' AND `spam`='0' "; 
     2539                $wassup_dbtask[]="UPDATE $wassup_table SET `spam`='".$spam."' WHERE `wassup_id`='".$wassup_id."' AND `spam`='0' "; 
    26512540            } 
    26522541 
     
    27442633 
    27452634        // Insert the record into the db 
    2746         insert_into_wp($table_name, $wassup_rec); 
     2635        insert_into_wp($wassup_table, $wassup_rec); 
    27472636        // Insert the record into the wassup_tmp table too 
    27482637        insert_into_wp($table_tmp_name, $wassup_rec); 
     
    27752664       // check database size ~every 5 minutes to keep wassup fast... 
    27762665       if ( (time())%299 == 0 ) { 
    2777         $table_status = $wpdb->get_results("SHOW TABLE STATUS LIKE '$table_name'"); 
     2666        $table_status = $wpdb->get_results("SHOW TABLE STATUS LIKE '$wassup_table'"); 
    27782667        foreach ($table_status as $fstatus) { 
    27792668            $data_lenght = $fstatus->Data_length; 
     
    28132702                } 
    28142703                //#check before doing delete as it locks the table... 
    2815                 if ((int)$wpdb->get_var("SELECT COUNT(id) FROM $table_name WHERE $delete_condition") > 0) { 
    2816                     $wassup_dbtask[] = "DELETE FROM $table_name WHERE $delete_condition"; 
     2704                if ((int)$wpdb->get_var("SELECT COUNT(id) FROM $wassup_table WHERE $delete_condition") > 0) { 
     2705                    $wassup_dbtask[] = "DELETE FROM $wassup_table WHERE $delete_condition"; 
    28172706                } 
    28182707            } 
     
    28282717            $wassup_options->wassup_optimize = current_time('timestamp'); 
    28292718                        $wassup_options->saveSettings(); 
    2830             $wassup_dbtask[] = "OPTIMIZE TABLE $table_name "; 
     2719            $wassup_dbtask[] = "OPTIMIZE TABLE $wassup_table "; 
    28312720        } 
    28322721    } 
     
    30622951        "Google Images|images.google.|prev|start|hl||",  //obsolete 
    30632952        "Google Images|/imgres?imgurl=|prev|start|hl||",  
     2953        "Google Images|.google.com/images?|q|cd|hl||", 
     2954        "Google Mobile|google.com/m/|q|cd|hl||",  
    30642955        "Google|www.google.|q|cd|hl||", 
    30652956        "Google|www.google.|as_q|start|hl||",   //advanced query 
     
    32153106        } //end if preg_match 
    32163107    } //end foreach 
    3217     //search engine or key is not in list, so check for general search phrase instead 
     3108    //search engine or key is not in list, so check for search phrase instead 
    32183109    if (empty($search_phrase) && !empty($referrer)) { 
    32193110        //unset($nome,$domain,$key,$page,$lang); 
    32203111 
    32213112    //Check for general search phrases 
    3222     if (preg_match("#^https?://([^/]+).*[&?](q|s|search|searchfor|as_q|as_epq|query|keywords?|term|encquery)=([^&]+)#i",$referrer,$pcs) > 0) { 
     3113    if (preg_match("#^https?://([^/]+).*[&?](q|search|searchfor|as_q|as_epq|query|keywords?|term|text|encquery)=([^&]+)#i",$referrer,$pcs) > 0) { 
    32233114        if (empty($searchengine)) { 
    32243115            $searchengine = trim(strtolower($pcs[1])); 
     
    32313122 
    32323123    //Check separately for queries that use nonstandard search variable 
    3233     // names to avoid retrieving values like "p=parameter" when "q=query" exists 
    3234     } elseif(preg_match("#^https?://([^/]+).*(?:results|search|query).*[&?](aq|as|p|su|kw|k|qo|qp|qs|string)=([^&]+)#i",$referrer,$pcs) > 0) { 
     3124    // to avoid retrieving values like "p=parameter" when "q=query" exists 
     3125    } elseif(preg_match("#^https?://([^/]+).*(?:results|search|query).*[&?](aq|as|p|su|s|kw|k|qo|qp|qs|string)=([^&]+)#i",$referrer,$pcs) > 0) { 
    32353126        if (empty($searchengine)) { 
    32363127            $searchengine = trim(strtolower($pcs[1])); 
     
    32423133    //do a separate check for page number, if not found above 
    32433134    if (!empty($search_phrase)) { 
    3244         if (empty($searchpage) && preg_match("#[&\?](start|startpage|b|cd|first|stq|pi|page)[=/](\d+)#i",$referrer,$pcs)>0) { 
     3135        if (empty($searchpage) && preg_match("#[&\?](start|startpage|b|cd|first|stq|p|pi|page)[=/](\d+)#i",$referrer,$pcs)>0) { 
    32453136            $searchpage = $pcs[2]; 
    32463137        } 
     
    34213312    $crawler = trim($crawler); 
    34223313    if (empty($crawler)) { 
    3423         $agent=str_replace(" ","",$ua); 
     3314        $uagent=str_replace(" ","",$ua); 
    34243315        $key = null; 
    34253316        // array format: "Spider Name|UserAgent keywords (no spaces)| Spider type (R=robot, B=Browser/downloader, F=feedreader, H=hacker, L=Link checker, M=siteMap generator, S=Spammer/email harvester, V=CSS/Html validator) 
     
    34863377            "Google AdSense|Mediapartners-Google|R|",  
    34873378            "Google Desktop|GoogleDesktop|F|",  
     3379            "Google Web Preview|GoogleWebPreview|R|", 
    34883380            "GreatNews|GreatNews|F|",  
    34893381            "Gregarius|Gregarius/|F|", 
     
    37043596            list($nome,$key,$crawlertype)=explode("|",$spider); 
    37053597            if ($key != "") { 
    3706                 if(strstr($agent,$key)===FALSE) {  
     3598                if(strstr($uagent,$key)===FALSE) {  
    37073599                    continue;  
    37083600                } else {  
     
    37623654//#get the visitor locale/language 
    37633655function wGetLocale($language="",$hostname="",$referrer="") { 
    3764     global $wpdb, $wassup_options; 
     3656    global $wpdb, $wassup_options, $debug_mode; 
    37653657    $clocale=""; 
    37663658    $country=""; 
     
    38463738/** 
    38473739 * Check referrer host (or visitor hostname) against a list of known  
    3848  * referrer spammers and return "true" if match found.  
     3740 * referrer spammers and return "true" if match or if faked 
    38493741 * @param string (2) 
    38503742 * @return boolean 
    38513743 */ 
    38523744function wGetSpamRef($referrer,$hostname="") { 
     3745    global $debug_mode; 
    38533746    $referrer=attribute_escape(strip_tags(str_replace(" ","",html_entity_decode($referrer)))); 
     3747    $badhost=false; 
     3748        //$key = null; 
    38543749    $referrer_host = ""; 
    38553750    $referrer_path = ""; 
     3751 
    38563752    if (empty($referrer) && !empty($hostname)) { 
    38573753        $referrer_host = $hostname; 
    38583754        $hostname=""; 
    3859     } else { 
    3860         $url = parse_url(strtolower($referrer)); 
    3861         $referrer_host = $url['host']; 
    3862         $referrer_path = $url['path']; 
    3863     } 
    3864     if (empty($referrer_host)) return false; 
    3865  
    3866     $badhost=false; 
    3867     $badhostfile= WASSUPDIR.'/badhosts.txt'; 
    3868         $key = null; 
    3869  
     3755    } elseif (!empty($referrer)) { 
     3756        $rurl = parse_url(strtolower($referrer)); 
     3757        if (isset($rurl['host'])) { 
     3758            $referrer_host = $rurl['host']; 
     3759            //$referrer_path = $rurl['path']; 
     3760            $thissite = parse_url(get_option('home')); 
     3761            if (isset($thissite['host']) && $referrer_host == $thissite['host']) { 
     3762                $referrer_host = ""; 
     3763            } 
     3764        } else {    //faked referrer string 
     3765            $badhost=true; 
     3766        } 
     3767        //#a shortened URL is likely FAKED referrer string! 
     3768        if (!$badhost && !empty($referrer_host)) { 
     3769            $url_shorteners = array('bit.ly', 'cli.gs',  
     3770                'goo.gl', 'is.gd',  
     3771                'shorturl.com', 'snurl.com', 
     3772                'tinyurl.com','tr.im'); 
     3773            if(in_array($referrer_host,$url_shorteners)) { 
     3774                $badhost=true; 
     3775            } 
     3776        } 
     3777    } //end elseif 
     3778    if (empty($referrer_host) || $badhost) return $badhost; 
     3779     
     3780    if ($debug_mode) echo "\$referrer_host = $referrer_host.\n"; 
    38703781    //compare against a list of recent referer spammers 
    38713782    $lines = array( '123666123\.com', 
     
    38843795            'bumphero\.com', 
    38853796            'canadapharm\.atwebpages\.com', 
     3797            'candy\.com', 
     3798            'carartexpert\.com', 
    38863799            'celebritydietdoctor\.com', 
    38873800            'celebrity\-?diets\.(com|org|net|info|biz)', 
     3801            'chocolate\.com', 
    38883802            'clients\.your\-server\.de', 
    38893803            'couplesresortsonline\.com', 
    3890             '*dietplan\.com', 
     3804            '.*dietplan\.com', 
    38913805            'dreamworksdentalcenter\.com', 
     3806            'duunot\.eu', 
    38923807            '\.ewebesales\.net', 
    38933808            'exactinsurance\.info', 
     
    38963811            'frenchforbeginnerssite\.com', 
    38973812            'gameskillinggames\.net', 
     3813            'globalringtones\.net', 
    38983814            'gskstudio\.com', 
    38993815            'h\-13\d\-\d{3}\.cssgroup\.lv', 
     
    39013817            'highheelsale\.com', 
    39023818            'homebasedaffiliatemarketingbusiness\.com', 
     3819            'hosting37\d{2}\.com/', 
    39033820            'howgrowtall\.(com|info)', 
    39043821            'insurancebinder\.info', 
     
    39073824            'it\.n\-able\.com', 
    39083825            'justanimal\.com', 
     3826            'koreanracinggirls\.com', 
    39093827            'lactoseintolerancesymptoms\.net', 
     3828            'liquiddiet[a-z\-]*\.com', 
     3829            'locksmith[a-z\-]+\.org', 
    39103830            'lockyourpicz\.com', 
    39113831            'luia\.ru', 
     3832            'mydirtyhobbycom\.de', 
    39123833            'myhealthcare\.com', 
     3834            'nextcars\.net', 
    39133835            'odcadide\.iinaa\.net', 
    39143836            'oma\-chat\-live\.de', 
     
    39223844            'play\-mp3\.com', 
    39233845            'poker\-review\.tk', 
     3846            'pornobesto\.ru', 
    39243847            '21[89]\-124\-182\-64\.cust\.propagation\.net', 
    39253848            'prosperent\-adsense\-alternative\.blogspot\.com', 
    39263849            'ragedownloads\.info', 
    39273850            'red\-black\.ru', 
    3928             '*sales\.net', 
     3851            '[a-z\-]*ringtone\.net', 
     3852            'rufights\.com', 
    39293853            'seoindiawizard\.com', 
    39303854            'sexcam\-girls\.at', 
     
    39383862            'thisweekendsmovies\.com', 
    39393863            'unassigned\.psychz\.net', 
     3864            'ultrabait\.biz', 
     3865            '[a-z\-\.]+vigra\-buy\.info', 
    39403866            'vitamin\-d\-deficiency\-symptoms\.com', 
    39413867            'vpn\-privacy\.org', 
     
    39523878    foreach($lines as $spammer) { 
    39533879        if (!empty($spammer)) { 
    3954         if(preg_match("/^{$spammer}\$/",$referrer_host)>0) { 
     3880        if(preg_match("#^{$spammer}\$#",$referrer_host)>0) { 
    39553881            // found it! 
    39563882            $badhost=true; 
    39573883            break 1; 
    3958         } elseif(!empty($hostname) && preg_match("/(^|\.){$spammer}\$/i",$hostname)>0) { 
     3884        } elseif(!empty($hostname) && preg_match('#(^|\.){$spammer}\$#i',$hostname)>0) { 
    39593885            $badhost=true; 
    39603886            break 1; 
     
    39663892    if (!$badhost) { 
    39673893        $lines = array( "allegra", "ambien", "ativan", "blackjack", 
    3968             "bukakke", "casino","cialis", "celebrex", 
     3894            "bukakke", "casino","cialis","ciallis", "celebrex", 
    39693895            "cumdripping", "cumeating", "cumfilled", 
    39703896            "cumpussy", "cumsucking", "cumswapping", 
     
    39793905            "suckingcum", "swappingcum", "swingers", 
    39803906            "tadalafil", "tigerspice", "tramadol", "ultram-", 
    3981             "valium", "valtrex", "viagra", "vicodin", 
    3982             "xanax", "xenical", "xxx-", "yandex", 
     3907            "valium", "valtrex", "viagra", "viagara","vicodin", 
     3908            "xanax", "xenical", "xxx-", 
    39833909            "zoloft", "zovirax", "zanax" 
    39843910            ); 
     
    40003926        foreach($lines as $spammer) {  
    40013927            if (!empty($spammer)) { 
    4002             if (preg_match("/(^|\.){$spammer}\$/",$referrer_host)>0) { 
     3928            if (preg_match("#(^|\.){$spammer}\$#",$referrer_host)>0) { 
    40033929                            // found it! 
    40043930                $badhost=true; 
    40053931                break 1; 
    4006             } elseif(!empty($hostname) && preg_match("/(^|\.){$spammer}\$/i",$hostname)>0) { 
     3932            } elseif(!empty($hostname) && preg_match("#(^|\.){$spammer}\$#i",$hostname)>0) { 
    40073933                $badhost=true; 
    40083934                break 1; 
     
    40383964 
    40393965    if (empty($wassup_options->wassup_table)) { 
    4040         $table_name = $wpdb->prefix . "wassup"; 
     3966        $wassup_table = $wpdb->prefix . "wassup"; 
    40413967    } else { 
    4042         $table_name = $wassup_options->wassup_table; 
     3968        $wassup_table = $wassup_options->wassup_table; 
    40433969    } 
    40443970    $filename = 'wassup.' . gmdate('Y-m-d') . '.sql'; 
    40453971 
    40463972    //# check for records before exporting... 
    4047     $numrecords = $wpdb->get_var("SELECT COUNT(wassup_id) FROM $table_name"); 
     3973    $numrecords = $wpdb->get_var("SELECT COUNT(wassup_id) FROM $wassup_table"); 
    40483974    if ( $numrecords > 0 ) { 
    40493975        if ($numrecords > 10000) { 
     
    40513977            ignore_user_abort(1); 
    40523978        } 
    4053         $exportdata=backup_table("$table_name"); 
     3979        $exportdata=backup_table("$wassup_table"); 
    40543980 
    40553981    if ($exportdata) { 
     
    40613987 
    40623988    // Function is below 
    4063     //backup_table($table_name); 
     3989    //backup_table($wassup_table); 
    40643990    echo $exportdata; 
    40653991 
     
    42074133} 
    42084134 
    4209 // hook function to put a timestamp in page footer to check if page is cached - moved 
     4135// hook function to put a timestamp in page footer for page caching test 
    42104136function wassup_foot() { 
    42114137    global $wassup_options, $wassupversion, $debug_mode; 
    42124138    if ($wassup_options->wassup_active == "1") { 
     4139        //New in 1.8.2: separate screen resolution cookie for IE 
     4140        if (!isset($_COOKIE['wassup_screen_res'])) {  
     4141            echo "\n"; ?> 
     4142<!--[if IE]> 
     4143<script language=javascript> 
     4144    var sheight = screen.height; 
     4145    var swidth = screen.width; 
     4146    document.cookie = "wassup_screen_res=" + swidth + " x " + sheight + "; path=/; domain=" + document.domain; 
     4147</script> 
     4148<![endif]--><?php 
     4149        } 
    42134150        //Output a comment with a current timestamp to verify that page is not cached (i.e. visit is being recorded). 
    42144151        echo "<!--\n<p class=\"small\"> WassUp $wassupversion ".__("timestamp","wassup").": ".date('Y-m-d h:i:sA T')." (".gmdate('h:iA',time()+(get_option('gmt_offset')*3600)).")<br />\n"; 
     
    42184155 
    42194156/** 
    4220  * New in v1.8: Perform db operations on wassup tables 
     4157 * Perform db operations on wassup tables 
    42214158 *  -Helene D. 2010-04-27 
    42224159 * @param array 
     
    42494186// Security functions 
    42504187/** 
    4251  * New in v1.8: Check for obvious signs of script injection and hack attempts -Helene D. 2010-02-01 
     4188 * Check for obvious signs of script injection and hack attempts -Helene D. 2010-02-01 
    42524189 * @param none 
    42534190 * @return boolean 
     
    42854222    $wpurl =  get_bloginfo('wpurl'); 
    42864223    $blogurl =  get_bloginfo('home'); 
    4287     $table_name = $wassup_settings['wassup_table']; 
    4288     $table_tmp_name = $table_name . "_tmp"; 
     4224    $wassup_table = $wassup_settings['wassup_table']; 
     4225    $table_tmp_name = $wassup_table . "_tmp"; 
    42894226    if ($wassup_settings['wassup_widget_title'] != "") $title = $wassup_settings['wassup_widget_title']; else $title = "Visitors Online"; 
    42904227    if ($wassup_settings['wassup_widget_ulclass'] != "") $ulclass = $wassup_settings['wassup_widget_ulclass']; else $ulclass = "links"; 
     
    45374474    $blogurl =  get_bloginfo('home'); 
    45384475    $wassup_settings = get_option('wassup_settings'); 
    4539     $table_name = $wassup_settings['wassup_table']; 
    4540     $table_tmp_name = $table_name . "_tmp"; 
     4476    $wassup_table = $wassup_settings['wassup_table']; 
     4477    $table_tmp_name = $wassup_table . "_tmp"; 
    45414478    if ($wtitle != "") $title = $wtitle; else $title = "Visitors Online"; 
    45424479    if ($wulclass != "") $ulclass = $wulclass; else $ulclass = "links"; 
     
    45464483    if ($wtopbrlimit != "") $topbrlimit = $wtopbrlimit; else $topbrlimit = "5"; 
    45474484    if ($wtoposlimit != "") $toposlimit = $wtoposlimit; else $toposlimit = "5"; 
    4548     //$table_name = $wpdb->prefix . "wassup"; 
    4549     //$table_tmp_name = $wpdb->prefix . "wassup_tmp"; 
    4550     //$wassup_settings = get_option('wassup_settings'); 
    45514485    $to_date = current_time('timestamp'); 
    45524486    $from_date = strtotime('-3 minutes', $to_date); 
     
    46464580function wassupDashChart() { 
    46474581    global $wpdb, $wassup_options; 
    4648     $table_name = $wassup_options->wassup_table; 
     4582    $wassup_table = $wassup_options->wassup_table; 
    46494583    if ($wassup_options->wassup_dashboard_chart == 1) { 
    46504584        $chart_type = ($wassup_options->wassup_chart_type >0)? $wassup_options->wassup_chart_type: "2"; 
    46514585        $to_date = current_time("timestamp"); 
    4652         $Chart = New MainItems($table_name,"",$to_date); 
     4586        $Chart = New MainItems($wassup_table,"",$to_date); 
    46534587            $chart_url = $Chart->TheChart(1, "400", "125", "", $chart_type, "bg,s,efebef|c,lg,90,edffff,0,efebef,0.8", "dashboard"); ?> 
    46544588    <h3>WassUp <?php _e('Stats','wassup'); ?> <cite><a href="admin.php?page=<?php echo WASSUPFOLDER; ?>"><?php _e('More','wassup'); ?> &raquo;</a></cite></h3> 
     
    46634597    global $wpdb, $wassup_options, $user_level; 
    46644598 
    4665     $table_name = $wassup_options->wassup_table; 
    4666     $table_tmp_name = $table_name."_tmp"; 
     4599    $wassup_table = $wassup_options->wassup_table; 
     4600    $table_tmp_name = $wassup_table."_tmp"; 
    46674601    $to_date = current_time("timestamp"); 
    46684602    $chart_type = ($wassup_options->wassup_chart_type >0)? $wassup_options->wassup_chart_type: "2"; 
    46694603    $res = ((int)$wassup_options->wassup_screen_res-160)/2; 
    4670     $Chart = New MainItems($table_name,"",$to_date); 
     4604    $Chart = New MainItems($wassup_table,"",$to_date); 
    46714605    $chart_url = $Chart->TheChart(1, $res, "180", "", $chart_type, "bg,s,efebef|c,lg,90,edffff,0,eae9e9,0.8", "dashboard");  
    46724606    $max_char_len= 40; 
Note: See TracChangeset for help on using the changeset viewer.