Ejemplo n.º 1
0
function checkUrlName($searchUrlName)
{
    $splStr = '';
    $urlName = '';
    $url = '';
    $searchUrlName = lCase($searchUrlName);
    //搜索网址名称转小写
    $url = lCase(serverVariables('script_name'));
    $splStr = aspSplit($searchUrlName, '|');
    foreach ($splStr as $key => $urlName) {
        if ($urlName != '') {
            if (inStr($url, $urlName) > 0) {
                $checkUrlName = true;
                return @$checkUrlName;
            }
        }
    }
    $checkUrlName = false;
    return @$checkUrlName;
}
Ejemplo n.º 2
0
function webStat($folderPath)
{
    $dateTime = '';
    $content = '';
    $splStr = '';
    $thisUrl = '';
    $goToUrl = '';
    $caiShu = '';
    $c = '';
    $fileName = '';
    $co = '';
    $ie = '';
    $xp = '';
    $goToUrl = serverVariables('HTTP_REFERER');
    $thisUrl = 'http://' . serverVariables('HTTP_HOST') . serverVariables('SCRIPT_NAME');
    $caiShu = serverVariables('QUERY_STRING');
    if ($caiShu != '') {
        $thisUrl = $thisUrl . '?' . $caiShu;
    }
    $goToUrl = @$_REQUEST['GoToUrl'];
    $thisUrl = @$_REQUEST['ThisUrl'];
    $co = @$_GET['co'];
    $dateTime = now();
    $content = serverVariables('HTTP_USER_AGENT');
    $content = replace($content, 'MSIE', 'Internet Explorer');
    $content = replace($content, 'NT 5.0', '2000');
    $content = replace($content, 'NT 5.1', 'XP');
    $content = replace($content, 'NT 5.2', '2003');
    $splStr = aspSplit($content . ';;;;', ';');
    $ie = $splStr[1];
    $xp = aspTrim($splStr[2]);
    if (right($xp, 1) == ')') {
        $xp = mid($xp, 1, len($xp) - 1);
    }
    $c = '来访' . $goToUrl . vbCrlf();
    $c = $c . '当前:' . $thisUrl . vbCrlf();
    $c = $c . '时间:' . $dateTime . vbCrlf();
    $c = $c . 'IP:' . getIP() . vbCrlf();
    $c = $c . 'IE:' . getBrType('') . vbCrlf();
    $c = $c . 'Cookies=' . $co . vbCrlf();
    $c = $c . 'XP=' . $xp . vbCrlf();
    $c = $c . 'Screen=' . @$_REQUEST['screen'] . vbCrlf();
    //屏幕分辨率
    $c = $c . '用户信息=' . serverVariables('HTTP_USER_AGENT') . vbCrlf();
    //用户信息
    $c = $c . '-------------------------------------------------' . vbCrlf();
    //c=c & "CaiShu=" & CaiShu & vbcrlf
    $fileName = $folderPath . Format_Time(now(), 2) . '.txt';
    CreateAddFile($fileName, $c);
    $c = $c . vbCrlf() . $fileName;
    $c = replace($c, vbCrlf(), '\\n');
    $c = replace($c, '"', '\\"');
    //Response.Write("eval(""var MyWebStat=\""" & C & "\"""")")
    $splxx = '';
    $nIP = '';
    $nPV = '';
    $ipList = '';
    $s = '';
    $ip = '';
    //判断是否显示回显记录
    if (@$_REQUEST['stype'] == 'display') {
        $content = getFText($fileName);
        $splxx = aspSplit($content, vbCrlf() . '-------------------------------------------------' . vbCrlf());
        $nIP = 0;
        $nPV = 0;
        $ipList = '';
        foreach ($splxx as $key => $s) {
            if (inStr($s, '当前:') > 0) {
                $s = vbCrlf() . $s . vbCrlf();
                $ip = ADSql(getStrCut($s, vbCrlf() . 'IP:', vbCrlf(), 0));
                $nPV = $nPV + 1;
                if (inStr(vbCrlf() . $ipList . vbCrlf(), vbCrlf() . $ip . vbCrlf()) == false) {
                    $ipList = $ipList . $ip . vbCrlf();
                    $nIP = $nIP + 1;
                }
            }
        }
        Rw('document.write(\'网长统计 | 今日IP[' . $nIP . '] | 今日PV[' . $nPV . '] \')');
    }
    $webStat = $c;
    return @$webStat;
}
Ejemplo n.º 3
0
function getIISVersion()
{
    $getIISVersion = serverVariables('SERVER_SOFTWARE');
    return @$getIISVersion;
}
Ejemplo n.º 4
0
function getBrType($theInfo)
{
    $strType = '';
    $tmp1 = '';
    $s = '';
    $s = 'Other Unknown';
    if ($theInfo == '') {
        $theInfo = uCase(serverVariables('HTTP_USER_AGENT'));
    }
    if (inStr($theInfo, uCase('mozilla')) > 0) {
        $s = 'Mozilla';
    }
    if (inStr($theInfo, uCase('icab')) > 0) {
        $s = 'iCab';
    }
    if (inStr($theInfo, uCase('lynx')) > 0) {
        $s = 'Lynx';
    }
    if (inStr($theInfo, uCase('links')) > 0) {
        $s = 'Links';
    }
    if (inStr($theInfo, uCase('elinks')) > 0) {
        $s = 'ELinks';
    }
    if (inStr($theInfo, uCase('jbrowser')) > 0) {
        $s = 'JBrowser';
    }
    if (inStr($theInfo, uCase('konqueror')) > 0) {
        $s = 'konqueror';
    }
    if (inStr($theInfo, uCase('wget')) > 0) {
        $s = 'wget';
    }
    if (inStr($theInfo, uCase('ask jeeves')) > 0 || inStr($theInfo, uCase('teoma')) > 0) {
        $s = 'Ask Jeeves/Teoma';
    }
    if (inStr($theInfo, uCase('wget')) > 0) {
        $s = 'wget';
    }
    if (inStr($theInfo, uCase('opera')) > 0) {
        $s = 'opera';
    }
    if (inStr($theInfo, uCase('NOKIAN')) > 0) {
        $s = 'NOKIAN(诺基亚手机)';
    }
    if (inStr($theInfo, uCase('SPV')) > 0) {
        $s = 'SPV(多普达手机)';
    }
    if (inStr($theInfo, uCase('Jakarta Commons')) > 0) {
        $s = 'Jakarta Commons-HttpClient';
    }
    if (inStr($theInfo, uCase('Gecko')) > 0) {
        $strType = '[Gecko] ';
        $s = 'Mozilla Series';
        if (inStr($theInfo, uCase('aol')) > 0) {
            $s = 'AOL';
        }
        if (inStr($theInfo, uCase('netscape')) > 0) {
            $s = 'Netscape';
        }
        if (inStr($theInfo, uCase('firefox')) > 0) {
            $s = 'FireFox';
        }
        if (inStr($theInfo, uCase('chimera')) > 0) {
            $s = 'Chimera';
        }
        if (inStr($theInfo, uCase('camino')) > 0) {
            $s = 'Camino';
        }
        if (inStr($theInfo, uCase('galeon')) > 0) {
            $s = 'Galeon';
        }
        if (inStr($theInfo, uCase('k-meleon')) > 0) {
            $s = 'K-Meleon';
        }
        $s = $strType . $s;
    }
    if (inStr($theInfo, uCase('bot')) > 0 || inStr($theInfo, uCase('crawl')) > 0) {
        $strType = '[Bot/Crawler]';
        if (inStr($theInfo, uCase('grub')) > 0) {
            $s = 'Grub';
        }
        if (inStr($theInfo, uCase('googlebot')) > 0) {
            $s = 'GoogleBot';
        }
        if (inStr($theInfo, uCase('msnbot')) > 0) {
            $s = 'MSN Bot';
        }
        if (inStr($theInfo, uCase('slurp')) > 0) {
            $s = 'Yahoo! Slurp';
        }
        $s = $strType . $s;
    }
    if (inStr($theInfo, uCase('applewebkit')) > 0) {
        $strType = '[AppleWebKit]';
        $s = '';
        if (inStr($theInfo, uCase('omniweb')) > 0) {
            $s = 'OmniWeb';
        }
        if (inStr($theInfo, uCase('safari')) > 0) {
            $s = 'Safari';
        }
        $s = $strType . $s;
    }
    if (inStr($theInfo, uCase('msie')) > 0) {
        $strType = '[MSIE';
        $tmp1 = mid($theInfo, inStr($theInfo, uCase('MSIE')) + 4, 6);
        $tmp1 = left($tmp1, inStr($tmp1, ';') - 1);
        $strType = $strType . $tmp1 . ']';
        $s = 'Internet Explorer';
        $s = $strType . $s;
    }
    if (inStr($theInfo, uCase('msn')) > 0) {
        $s = 'MSN';
    }
    if (inStr($theInfo, uCase('aol')) > 0) {
        $s = 'AOL';
    }
    if (inStr($theInfo, uCase('webtv')) > 0) {
        $s = 'WebTV';
    }
    if (inStr($theInfo, uCase('myie2')) > 0) {
        $s = 'MyIE2';
    }
    if (inStr($theInfo, uCase('maxthon')) > 0) {
        $s = 'Maxthon(傲游浏览器)';
    }
    if (inStr($theInfo, uCase('gosurf')) > 0) {
        $s = 'GoSurf(冲浪高手浏览器)';
    }
    if (inStr($theInfo, uCase('netcaptor')) > 0) {
        $s = 'NetCaptor';
    }
    if (inStr($theInfo, uCase('sleipnir')) > 0) {
        $s = 'Sleipnir';
    }
    if (inStr($theInfo, uCase('avant browser')) > 0) {
        $s = 'AvantBrowser';
    }
    if (inStr($theInfo, uCase('greenbrowser')) > 0) {
        $s = 'GreenBrowser';
    }
    if (inStr($theInfo, uCase('slimbrowser')) > 0) {
        $s = 'SlimBrowser';
    }
    if (inStr($theInfo, uCase('360SE')) > 0) {
        $s = $s . '-360SE(360安全浏览器)';
    }
    if (inStr($theInfo, uCase('QQDownload')) > 0) {
        $s = $s . '-QQDownload(QQ下载器)';
    }
    if (inStr($theInfo, uCase('TheWorld')) > 0) {
        $s = $s . '-TheWorld(世界之窗浏览器)';
    }
    if (inStr($theInfo, uCase('icafe8')) > 0) {
        $s = $s . '-icafe8(网维大师网吧管理插件)';
    }
    if (inStr($theInfo, uCase('TencentTraveler')) > 0) {
        $s = $s . '-TencentTraveler(腾讯TT浏览器)';
    }
    if (inStr($theInfo, uCase('baiduie8')) > 0) {
        $s = $s . '-baiduie8(百度IE8.0)';
    }
    if (inStr($theInfo, uCase('iCafeMedia')) > 0) {
        $s = $s . '-iCafeMedia(网吧网媒趋势插件)';
    }
    if (inStr($theInfo, uCase('DigExt')) > 0) {
        $s = $s . '-DigExt(IE5允许脱机阅读模式特殊标记)';
    }
    if (inStr($theInfo, uCase('baiduds')) > 0) {
        $s = $s . '-baiduds(百度硬盘搜索)';
    }
    if (inStr($theInfo, uCase('CNCDialer')) > 0) {
        $s = $s . '-CNCDialer(数控拨号)';
    }
    if (inStr($theInfo, uCase('NOKIAN85')) > 0) {
        $s = $s . '-NOKIAN85(诺基亚手机)';
    }
    if (inStr($theInfo, uCase('SPV_C600')) > 0) {
        $s = $s . '-SPV_C600(多普达C600)';
    }
    if (inStr($theInfo, uCase('Smartphone')) > 0) {
        $s = $s . '-Smartphone(Windows Mobile for Smartphone Edition 操作系统的智能手机)';
    }
    $getBrType = $s;
    return @$getBrType;
}
Ejemplo n.º 5
0
function replaceLableContent($content)
{
    $s = '';
    $c = '';
    $splstr = '';
    $list = '';
    $content = replace($content, '{$webVersion$}', $GLOBALS['webVersion']);
    //网站版本
    $content = replace($content, '{$Web_Title$}', $GLOBALS['cfg_webTitle']);
    //网站标题
    $content = replace($content, '{$EDITORTYPE$}', EDITORTYPE);
    //ASP与PHP
    $content = replace($content, '{$adminDir$}', $GLOBALS['adminDir']);
    //后台目录
    $content = replace($content, '[$adminId$]', @$_SESSION['adminId']);
    //管理员ID
    $content = replace($content, '{$adminusername$}', @$_SESSION['adminusername']);
    //管理账号名称
    $content = replace($content, '{$EDITORTYPE$}', EDITORTYPE);
    //程序类型
    $content = replace($content, '{$WEB_VIEWURL$}', WEB_VIEWURL);
    //前台
    $content = replace($content, '{$webVersion$}', $GLOBALS['webVersion']);
    //版本
    $content = replace($content, '{$WebsiteStat$}', getConfigFileBlock($GLOBALS['WEB_CACHEFile'], '#访客信息#'));
    //最近访客信息
    $content = replace($content, '{$DB_PREFIX$}', $GLOBALS['db_PREFIX']);
    //表前缀
    $content = replace($content, '{$adminflags$}', IIF(@$_SESSION['adminflags'] == '|*|', '超级管理员', '普通管理员'));
    //管理员类型
    $content = replace($content, '{$SERVER_SOFTWARE$}', serverVariables('SERVER_SOFTWARE'));
    //服务器版本
    $content = replace($content, '{$SERVER_NAME$}', serverVariables('SERVER_NAME'));
    //服务器网址
    $content = replace($content, '{$LOCAL_ADDR$}', serverVariables('LOCAL_ADDR'));
    //服务器IP
    $content = replace($content, '{$SERVER_PORT$}', serverVariables('SERVER_PORT'));
    //服务器端口
    $content = replaceValueParam($content, 'mdbpath', @$_REQUEST['mdbpath']);
    $content = replaceValueParam($content, 'webDir', $GLOBALS['webDir']);
    //20160628
    if (inStr($content, '{$backupDatabaseSelectHtml$}') > 0) {
        $c = getDirTxtNameList($GLOBALS['adminDir'] . '/Data/BackUpDateBases/');
        $splstr = aspSplit($c, vbCrlf());
        foreach ($splstr as $key => $s) {
            $list = $list . '<option value="' . $s . '">' . $s . '</option>' . vbCrlf();
        }
        $content = replace($content, '{$backupDatabaseSelectHtml$}', $list);
    }
    //20160614
    if (EDITORTYPE == 'php') {
        $content = replace($content, '{$EDITORTYPE_PHP$}', 'php');
        //给phpinc/用
    }
    $content = replace($content, '{$EDITORTYPE_PHP$}', '');
    //给phpinc/用
    $replaceLableContent = $content;
    return @$replaceLableContent;
}
Ejemplo n.º 6
0
function chkPost()
{
    $Server_v1 = '';
    $Server_v2 = '';
    $chkPost = false;
    $Server_v1 = cStr(serverVariables('HTTP_REFERER'));
    $Server_v2 = cStr(serverVariables('SERVER_NAME'));
    aspEcho($Server_v1, $Server_v2);
    if (mid($Server_v1, 8, len($Server_v2)) != $Server_v2) {
        $chkPost = false;
    } else {
        $chkPost = true;
    }
    return @$chkPost;
}