Beispiel #1
0
function getEditorStr($inputName, $sType)
{
    $C = '';
    $C = '<script charset="utf-8" src="Keditor/kindeditor.js"></script> ' . vbCrlf();
    $C = $C . '<script charset="utf-8" src="Keditor/lang/zh_CN.js"></script>  ' . vbCrlf();
    $C = $C . '<script language="javascript">' . vbCrlf();
    $C = $C . 'KindEditor.ready(function(K) {' . vbCrlf();
    $C = $C . '	var editor1 = K.create(\'textarea[name="' . $inputName . '"]\', {		//处理让文本域' . vbCrlf();
    $C = $C . '		cssPath : \'Keditor/plugins/code/prettify.css\',' . vbCrlf();
    $C = $C . '		uploadJson : \'Keditor/' . $sType . '/upload_json.' . $sType . '\',' . vbCrlf();
    $C = $C . '		fileManagerJson : \'Keditor/' . $sType . '/file_manager_json.' . $sType . '\',' . vbCrlf();
    $C = $C . '		allowFileManager : true,' . vbCrlf();
    $C = $C . '		afterCreate : function() {' . vbCrlf();
    $C = $C . '			var self = this;' . vbCrlf();
    $C = $C . '			K.ctrl(document, 13, function() {' . vbCrlf();
    $C = $C . '				self.sync();' . vbCrlf();
    $C = $C . '				K(\'form[name=example]\')[0].submit();' . vbCrlf();
    $C = $C . '			});' . vbCrlf();
    $C = $C . '			K.ctrl(self.edit.doc, 13, function() {' . vbCrlf();
    $C = $C . '				self.sync();' . vbCrlf();
    $C = $C . '				K(\'form[name=example]\')[0].submit();' . vbCrlf();
    $C = $C . '			});' . vbCrlf();
    $C = $C . '		}' . vbCrlf();
    $C = $C . '	});' . vbCrlf();
    $C = $C . '	//prettyPrint();				//因为这个出错,所以给它注释掉 2013,12,12' . vbCrlf();
    $C = $C . '});' . vbCrlf();
    $C = $C . '</script>' . vbCrlf();
    $getEditorStr = $C;
    return @$getEditorStr;
}
Beispiel #2
0
function checkVbCrlf($content)
{
    $checkVbCrlf = false;
    if (inStr($content, vbCrlf()) > 0) {
        $checkVbCrlf = true;
    }
    return @$checkVbCrlf;
}
Beispiel #3
0
function testGetPY()
{
    $c = '';
    $splStr = '';
    $i = '';
    $s = '';
    $cn = '';
    $en = '';
    $splStr = aspSplit(getFText('1.txt'), 'End If');
    for ($i = 0; $i <= uBound($splStr); $i++) {
        $s = $splStr[$i];
        if (inStr($s, '=') > 0) {
            $cn = mid($s, inStr($s, '"') + 1, -1);
            $cn = mid($cn, 1, inStr($cn, ' ') - 3);
            $en = mid($s, inStr($s, '=') + 1, -1);
            $en = mid($en, 3, inStr($en, vbCrlf()) - 4);
            $c = 'PY(' . $i . ')="' . $cn . '_' . $en . '"';
            Rw($c);
        }
    }
}
Beispiel #4
0
function contentNameSort($content, $sType)
{
    $splStr = '';
    $arrayStr = aspArray(99);
    $fileName = '';
    $isOther = '';
    $otherStr = '';
    $id = '';
    $c = '';
    $s = '';
    $i = '';
    $left1 = '';
    $splStr = aspSplit($content, vbCrlf());
    foreach ($splStr as $key => $s) {
        if ($s != '') {
            $fileName = getStrFileName($s);
            $isOther = true;
            $left1 = left($fileName, 1);
            if (inStr($fileName, '、') > 0) {
                $id = replace(left($fileName, 2), '、', '');
                if (isNumber($id)) {
                    $arrayStr[$id] = $arrayStr[$id] . $s . vbCrlf();
                    $isOther = false;
                }
            }
            if (inStr($sType, $left1) == false && $isOther == true) {
                $otherStr = $otherStr . $s . vbCrlf();
            }
        }
    }
    for ($i = 0; $i <= uBound($arrayStr); $i++) {
        $c = $c . $arrayStr[$i];
    }
    $contentNameSort = $c . $otherStr;
    return @$contentNameSort;
}
Beispiel #5
0
function dedeCMSMsg()
{
    $c = '';
    $c = '<style> ' . vbCrlf();
    $c = $c . '.msgbox {' . vbCrlf();
    $c = $c . '    width: 450px;' . vbCrlf();
    $c = $c . '    border: 1px solid #DADADA;' . vbCrlf();
    $c = $c . '    margin:0 auto;' . vbCrlf();
    $c = $c . '    margin-top:20px;' . vbCrlf();
    $c = $c . '    line-height:20px;' . vbCrlf();
    $c = $c . '}' . vbCrlf();
    $c = $c . '.msgbox .ptitle{' . vbCrlf();
    $c = $c . '    padding: 6px;' . vbCrlf();
    $c = $c . '    font-size: 12px;' . vbCrlf();
    $c = $c . '    border-bottom: 1px solid #DADADA;' . vbCrlf();
    $c = $c . '    background: #DBEEBD url(/plus/img/wbg.gif);' . vbCrlf();
    $c = $c . '    font-weight:bold;' . vbCrlf();
    $c = $c . '    text-align:center;' . vbCrlf();
    $c = $c . '}' . vbCrlf();
    $c = $c . '.msgbox .pcontent{' . vbCrlf();
    $c = $c . '    height: 100px;' . vbCrlf();
    $c = $c . '    font-size: 10pt;' . vbCrlf();
    $c = $c . '    background: #ffffff;' . vbCrlf();
    $c = $c . '    text-align:center;' . vbCrlf();
    $c = $c . '    padding-top:30px;' . vbCrlf();
    $c = $c . '}' . vbCrlf();
    $c = $c . '</style> ' . vbCrlf();
    $c = $c . '<div class="msgbox">' . vbCrlf();
    $c = $c . '    <div class="ptitle">提示信息!</div>' . vbCrlf();
    $c = $c . '    <div class="pcontent">' . vbCrlf();
    $c = $c . '        成功登录,正在转向管理管理主页!<br>' . vbCrlf();
    $c = $c . '        <a href="#">如果你的浏览器没反应,请点击这里...</a>' . vbCrlf();
    $c = $c . '' . vbCrlf();
    $c = $c . '    </div>' . vbCrlf();
    $c = $c . '</div>' . vbCrlf();
    $dedeCMSMsg = $c;
    return @$dedeCMSMsg;
}
Beispiel #6
0
function getFileFolderList($folderPath, $c = '', $action = '|处理文件#|处理文件夹|文件名称|文件夹名称|循环文件夹|', $fileTypeList = '|*|')
{
    $folderPath = handlePath($folderPath);
    //文件夹为假退出 加了这个判断尽然把HTTP 错误 500.0 - Internal Server Error  报错给解决了 小云你牛 20160719home
    if (checkFolder($folderPath) == false) {
        return $c;
    }
    $fso = @opendir($folderPath);
    if ($fso) {
        while (($file = readdir($fso)) !== false) {
            if ($file != '.' && $file != '..') {
                $ffPath = $folderPath . "\\" . $file;
                //为文件夹
                if (is_dir($ffPath)) {
                    if (strstr('|' . $action . '|', '|处理文件夹|')) {
                        if (strstr('|' . $action . '|', '|文件夹名称|')) {
                            $s = $file;
                        } else {
                            $s = handlePath($ffPath);
                        }
                        $c = $c . $s . vbCrlf();
                    }
                    if (strstr('|' . $action . '|', '|循环文件夹|')) {
                        //aspecho('$ffPath',$ffPath);
                        $tempC = getFileFolderList($ffPath, "", $action, $fileTypeList);
                        if ($tempC != '') {
                            $tempC = $tempC . vbCrlf();
                        }
                        $c = $c . $tempC;
                    }
                } elseif (strstr('|' . $action . '|', '|处理文件|')) {
                    $fileType = strtolower(substr(strrchr($file, '.'), 1));
                    if (strstr('|' . $action . '|', '|文件名称|')) {
                        $s = $file;
                    } elseif (strstr('|' . $action . '|', '|文件类型|')) {
                        $s = $fileType;
                    } else {
                        $s = handlePath($ffPath);
                    }
                    if (strstr('|' . $fileTypeList . '|', '|' . $fileType . '|') || strstr('|' . $fileTypeList . '|', '|*|')) {
                        $c = $c . $s . vbCrlf();
                    }
                }
            }
        }
        closedir($fso);
    }
    if ($c != '') {
        $c = substr($c, 0, strlen($c) - 2);
    }
    return $c;
}
Beispiel #7
0
function printlnHtml($s)
{
    echo displayHtml($s) . '<br />' . vbCrlf();
}
function displayEditor($action)
{
    $c = '';
    $c = $c . '<script type="text/javascript" src="\\Jquery\\syntaxhighlighter\\scripts/shCore.js"></script> ' . vbCrlf();
    $c = $c . '<script type="text/javascript" src="\\Jquery\\syntaxhighlighter\\scripts/shBrushJScript.js"></script>' . vbCrlf();
    $c = $c . '<script type="text/javascript" src="\\Jquery\\syntaxhighlighter\\scripts/shBrushPhp.js"></script> ' . vbCrlf();
    $c = $c . '<script type="text/javascript" src="\\Jquery\\syntaxhighlighter\\scripts/shBrushVb.js"></script> ' . vbCrlf();
    $c = $c . '<link type="text/css" rel="stylesheet" href="\\Jquery\\syntaxhighlighter\\styles/shCore.css"/>' . vbCrlf();
    $c = $c . '<link type="text/css" rel="stylesheet" href="\\Jquery\\syntaxhighlighter\\styles/shThemeDefault.css"/>' . vbCrlf();
    $c = $c . '<script type="text/javascript">' . vbCrlf();
    $c = $c . '    SyntaxHighlighter.config.clipboardSwf = \'\\Jquery\\syntaxhighlighter\\scripts/clipboard.swf\';' . vbCrlf();
    $c = $c . '    SyntaxHighlighter.all();' . vbCrlf();
    $c = $c . '</script>' . vbCrlf();
    $displayEditor = $c;
    return @$displayEditor;
}
Beispiel #9
0
function getRandomPhoneNumber($nCount)
{
    $num1 = '';
    $rndnum = '';
    $j = '';
    $c = '';
    $c = '';
    $rndnum = '';
    $j = 1;
    while ($j < $nCount) {
        while (len($rndnum) < 9) {
            //产生随机数的个数
            $num1 = cStr(chr((57 - 48) * rnd() + 48));
            $rndnum = $rndnum . $num1;
        }
        $c = $c . 13 . $rndnum . vbCrlf();
        $rndnum = '';
        $j = $j + 1;
    }
    if ($c != '') {
        $c = left($c, len($c) - 2);
    }
    $getRandomPhoneNumber = $c;
    return @$getRandomPhoneNumber;
}
Beispiel #10
0
function formatting($content, $action)
{
    $i = '';
    $endStr = '';
    $s = '';
    $c = '';
    $labelName = '';
    $startLabel = '';
    $endLabel = '';
    $endLabelStr = '';
    $nLevel = '';
    $isYes = '';
    $parentLableName = '';
    $nextLableName = '';
    //下一个标题名称
    $isA = '';
    //是否为A链接
    $isTextarea = '';
    //是否为多行输入文本框
    $isScript = '';
    //脚本语言
    $isStyle = '';
    //Css层叠样式表
    $isPre = '';
    //是否为pre
    $startLabel = '<';
    $endLabel = '>';
    $nLevel = 0;
    $action = '|' . $action . '|';
    //层级
    $isA = false;
    $isTextarea = false;
    $isScript = false;
    $isStyle = false;
    $isPre = false;
    $content = replace(replace($content, vbCrlf(), chr(10)), vbTab(), '    ');
    for ($i = 1; $i <= len($content); $i++) {
        $s = mid($content, $i, 1);
        $endStr = mid($content, $i, -1);
        if ($s == '<') {
            if (inStr($endStr, '>') > 0) {
                $s = mid($endStr, 1, inStr($endStr, '>'));
                $i = $i + len($s) - 1;
                $s = mid($s, 2, len($s) - 2);
                if (right($s, 1) == '/') {
                    $s = PHPTrim(left($s, len($s) - 1));
                }
                $endStr = right($endStr, len($endStr) - len($s) - 2);
                //最后字符减去当前标签  -2是因为它有<>二个字符
                //注意之前放在labelName下面
                $labelName = mid($s, 1, inStr($s . ' ', ' ') - 1);
                $labelName = lCase($labelName);
                //call echo("labelName",labelName)
                if ($labelName == 'a') {
                    $isA = true;
                } else {
                    if ($labelName == '/a') {
                        $isA = false;
                    } else {
                        if ($labelName == 'textarea') {
                            $isTextarea = true;
                        } else {
                            if ($labelName == '/textarea') {
                                $isTextarea = false;
                            } else {
                                if ($labelName == 'script') {
                                    $isScript = true;
                                } else {
                                    if ($labelName == '/script') {
                                        $isScript = false;
                                    } else {
                                        if ($labelName == 'style') {
                                            $isStyle = true;
                                        } else {
                                            if ($labelName == '/style') {
                                                $isStyle = false;
                                            } else {
                                                if ($labelName == 'pre') {
                                                    $isPre = true;
                                                } else {
                                                    if ($labelName == '/pre') {
                                                        $isPre = false;
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
                $endLabelStr = $endLabel;
                $nextLableName = getHtmlLableName($endStr, 0);
                //不为压缩HTML
                if (inStr($action, '|ziphtml|') == false && $isPre == false) {
                    if ($isA == false) {
                        if (inStr('|a|strong|u|i|s|script|', '|' . $labelName . '|') == false && '/' . $labelName != $nextLableName && inStr('|/a|/strong|/u|/i|/s|/script|', '|' . $nextLableName . '|') == false) {
                            $endLabelStr = $endLabelStr . chr(10);
                        }
                    }
                }
                //单标签最后加个 /   20160615
                if (inStr('|br|hr|img|input|param|meta|link|', '|' . $labelName . '|') > 0) {
                    $s = $s . ' /';
                }
                $s = $startLabel . $s . $endLabelStr;
                //不为压缩HTML
                if (inStr($action, '|ziphtml|') == false && $isPre == false) {
                    //处理这个            aaaaa</span>
                    if ($isA == false && $isYes == false && left($labelName, 1) == '/' && $labelName != '/script' && $labelName != '/a') {
                        //排除这种    <span>天天发团</span>     并且判断上一个字段不等于vbcrlf换行
                        if ('/' . $parentLableName != $labelName && right(aspTrim($c), 1) != chr(10)) {
                            $s = chr(10) . $s;
                        }
                    }
                }
                $parentLableName = $labelName;
                $isYes = true;
            }
        } else {
            if ($s != '') {
                $isYes = false;
                //call echo("isPre",isPre)
                if ($isPre == false) {
                    if ($s == chr(10)) {
                        if ($isTextarea == false && $isScript == false && $isStyle == false) {
                            $s = '';
                        } else {
                            if ($isScript == true) {
                                if (inStr($action, '|zipscripthtml|') > 0) {
                                    $s = ' ';
                                }
                            } else {
                                if ($isStyle == true) {
                                    if (inStr($action, '|zipstylehtml|') > 0) {
                                        $s = '';
                                    }
                                } else {
                                    if ($isTextarea == true) {
                                        if (inStr($action, '|ziptextareahtml|') > 0) {
                                            $s = '';
                                        }
                                    } else {
                                        $s = chr(10);
                                    }
                                }
                            }
                        }
                        // Right(Trim(c), 1) = ">")   为在压缩时用到
                    } else {
                        if ((right(aspTrim($c), 1) == chr(10) || right(aspTrim($c), 1) == '>') && PHPTrim($s) == '' && $isTextarea == false && $isScript == false) {
                            $s = '';
                        }
                    }
                }
            }
        }
        $c = $c . $s;
    }
    $c = replace($c, chr(10), vbCrlf());
    $formatting = $c;
    return @$formatting;
}
Beispiel #11
0
function displayPanelList($dir)
{
    $content = '';
    $splstr = '';
    $s = '';
    $c = '';
    $content = getDirFolderNameList($dir);
    $splstr = aspSplit($content, vbCrlf());
    $c = '<select name=\'selectLeftStyle\'>';
    foreach ($splstr as $key => $s) {
        $s = '<option value=\'\'>' . $s . '</option>';
        $c = $c . $s . vbCrlf();
    }
    $displayPanelList = $c . '</select>';
    return @$displayPanelList;
}
Beispiel #12
0
function webPageControl($nRecrodCount, $nPageSize, $nPage, $configPageUrl, $action)
{
    $c = '';
    $nCountPage = '';
    $i = '';
    $nDisplay = '';
    $nDispalyOK = '';
    $nTemp = '';
    $cPages = '';
    $url = '';
    $selStr = '';
    $previousPage = '';
    $nextPage = '';
    //定义上一页,下一页
    $isDisplayTip = '';
    //是否显示提示翻页信息
    $isDisplayTip = true;
    $sPageStart = '';
    $sPageEnd = '';
    $sHomePage = '';
    $sHomePageFocus = '';
    $sUpPage = '';
    $sUpPageFocus = '';
    $sNextPage = '';
    $sNextPageFocus = '';
    $sForPage = '';
    $sForPageFocus = '';
    $sTailPage = '';
    $sTailPageFocus = '';
    if ($action != '') {
        $sPageStart = getStrCut($action, '[sPageStart]', '[/sPageStart]', 2);
        //页头部分
        $sPageEnd = getStrCut($action, '[sPageEnd]', '[/sPageEnd]', 2);
        //页尾部分
        $sHomePage = getStrCut($action, '[sHomePage]', '[/sHomePage]', 2);
        //首页
        $sHomePageFocus = getStrCut($action, '[sHomePageFocus]', '[/sHomePageFocus]', 2);
        //首页交点
        $sUpPage = getStrCut($action, '[sUpPage]', '[/sUpPage]', 2);
        //上一页
        $sUpPageFocus = getStrCut($action, '[sUpPageFocus]', '[/sUpPageFocus]', 2);
        //上一页交点
        $sNextPage = getStrCut($action, '[sNextPage]', '[/sNextPage]', 2);
        //下一页
        $sNextPageFocus = getStrCut($action, '[sNextPageFocus]', '[/sNextPageFocus]', 2);
        //下一页交点
        $sForPage = getStrCut($action, '[sForPage]', '[/sForPage]', 2);
        //循环页
        $sForPageFocus = getStrCut($action, '[sForPageFocus]', '[/sForPageFocus]', 2);
        //循环页交点
        $sTailPage = getStrCut($action, '[sTailPage]', '[/sTailPage]', 2);
        //最后页
        $sTailPageFocus = getStrCut($action, '[sTailPageFocus]', '[/sTailPageFocus]', 2);
        //最后页交点
    }
    //页头部分
    if ($sPageStart == '') {
        $sPageStart = '<ul class="pagecontrolwrap">' . vbCrlf() . '<li class="pageinfo">共[$nRecrodCount$]条 [$nPage$]/[$nCountPage$]页</li>' . vbCrlf();
    }
    //页尾部分
    if ($sPageEnd == '') {
        $sPageEnd = '</ul><div class="clear"></div>' . vbCrlf();
    }
    //首页
    if ($sHomePage == '') {
        $sHomePage = '<li><a href="[$url$]">首页</a></li>' . vbCrlf();
    }
    //首页交点
    if ($sHomePageFocus == '') {
        $sHomePageFocus = '<li class="pageli">首页</li>' . vbCrlf();
    }
    //上一页
    if ($sUpPage == '') {
        $sUpPage = '<li><a href="[$url$]">上一页</a></li>' . vbCrlf();
    }
    //上一页交点
    if ($sUpPageFocus == '') {
        $sUpPageFocus = '<li class="pageli">上一页</li>' . vbCrlf();
    }
    //下一页
    if ($sNextPage == '') {
        $sNextPage = '<li><a href="[$url$]">下一页</a></li>' . vbCrlf();
    }
    //下一页交点
    if ($sNextPageFocus == '') {
        $sNextPageFocus = '<li class="pageli">下一页</li>' . vbCrlf();
    }
    //循环页
    if ($sForPage == '') {
        $sForPage = '<li class="pagefocus">[$i$]</li>' . vbCrlf();
    }
    //循环页交点
    if ($sForPageFocus == '') {
        $sForPageFocus = '<li><a href="[$url$]">[$i$]</a></li>' . vbCrlf();
    }
    //最后页
    if ($sTailPage == '') {
        $sTailPage = '<li><a href="[$url$]">末页</a></li>' . vbCrlf();
    }
    //最后页交点
    if ($sTailPageFocus == '') {
        $sTailPageFocus = '<li class="pageli">末页</li>' . vbCrlf();
    }
    //测试时用到20160630
    if (1 == 2) {
        $c = '[sPageStart]' . vbCrlf() . $sPageStart . '[/sPageStart]' . vbCrlf() . vbCrlf();
        $c = $c . '[sHomePage]' . vbCrlf() . $sHomePage . '[/sHomePage]' . vbCrlf() . vbCrlf();
        $c = $c . '[sHomePageFocus]' . vbCrlf() . $sHomePageFocus . '[/sHomePageFocus]' . vbCrlf() . vbCrlf();
        $c = $c . '[sUpPage]' . vbCrlf() . $sUpPage . '[/sUpPage]' . vbCrlf() . vbCrlf();
        $c = $c . '[sUpPageFocus]' . vbCrlf() . $sUpPageFocus . vbCrlf() . '[/sUpPageFocus]' . vbCrlf();
        $c = $c . '[sForPage]' . vbCrlf() . $sForPage . '[/sForPage]' . vbCrlf() . vbCrlf();
        $c = $c . '[sForPageFocus]' . vbCrlf() . $sForPageFocus . '[/sForPageFocus]' . vbCrlf() . vbCrlf();
        $c = $c . '[sNextPage]' . vbCrlf() . $sNextPage . '[/sNextPage]' . vbCrlf() . vbCrlf();
        $c = $c . '[sNextPageFocus]' . vbCrlf() . $sNextPageFocus . '[/sNextPageFocus]' . vbCrlf() . vbCrlf();
        $c = $c . '[sTailPage]' . vbCrlf() . $sTailPage . '[/sTailPage]' . vbCrlf() . vbCrlf();
        $c = $c . '[sTailPageFocus]' . vbCrlf() . $sTailPageFocus . '[/sTailPageFocus]' . vbCrlf() . vbCrlf();
        $c = $c . '[sPageEnd]' . vbCrlf() . $sPageEnd . '[/sPageEnd]' . vbCrlf();
        rwEnd('[page]' . vbCrlf() . vbCrlf() . $c . vbCrlf() . '[/page]');
    }
    //配置页为空则
    if ($configPageUrl == '') {
        $configPageUrl = getUrlAddToParam(getUrl(), '?page=[id]', 'replace');
    }
    $nDisplay = 6;
    //显示数
    $nDispalyOK = 0;
    //显示成功数
    $nPage = handleNumberType($nPage);
    if ($nPage == '') {
        $nPage = 1;
    } else {
        $nPage = CInt($nPage);
    }
    //获得总页数
    $nCountPage = GetCountPage($nRecrodCount, $nPageSize);
    $previousPage = $nPage - 1;
    $nextPage = $nPage + 1;
    //处理上一页
    if ($previousPage <= 0) {
        $previousPage = '';
    }
    //处理下一页
    if ($nextPage > $nCountPage) {
        $nextPage = '';
    }
    //页开始
    $c = $sPageStart;
    //首页
    if ($nPage > 1) {
        $c = $c . replace($sHomePage, '[$url$]', replace($configPageUrl, '[id]', ''));
    } else {
        if ($isDisplayTip == true) {
            $c = $c . $sHomePageFocus;
        }
    }
    //上一页
    if ($previousPage != '') {
        $nTemp = $previousPage;
        if ($previousPage <= 1) {
            $nTemp = '';
        }
        $c = $c . replace($sUpPage, '[$url$]', replace($configPageUrl, '[id]', $nTemp));
    } else {
        if ($isDisplayTip == true) {
            $c = $c . $sUpPageFocus;
        }
    }
    $n = '';
    //call echo(npage,ncountpage)
    $n = $nPage - 3;
    //call echo("n",n)
    //翻页循环
    for ($i = $n; $i <= $nCountPage; $i++) {
        if ($i >= 1) {
            $nDispalyOK = $nDispalyOK + 1;
            //call echo(i,nPage)
            if ($i == $nPage) {
                $c = $c . replace($sForPage, '[$i$]', $i);
            } else {
                $nTemp = $i;
                if ($i <= 1) {
                    $nTemp = '';
                }
                $c = $c . replace(replace($sForPageFocus, '[$url$]', replace($configPageUrl, '[id]', $nTemp)), '[$i$]', $i);
            }
            if ($nDispalyOK > $nDisplay) {
                break;
            }
        }
    }
    //下一页
    if ($nCountPage > $nPage) {
        $c = $c . replace($sNextPage, '[$url$]', replace($configPageUrl, '[id]', $nextPage));
    } else {
        if ($isDisplayTip == true) {
            $c = $c . $sNextPageFocus;
        }
    }
    //末页
    if ($nCountPage > $nPage) {
        $c = $c . replace($sTailPage, '[$url$]', replace($configPageUrl, '[id]', $nCountPage));
    } else {
        if ($isDisplayTip == true) {
            $c = $c . $sTailPageFocus;
        }
    }
    $c = $c . $sPageEnd;
    $c = replaceValueParam($c, 'nRecrodCount', $nRecrodCount);
    $c = replaceValueParam($c, 'nPage', $nPage);
    if ($nCountPage == '0') {
        $nCountPage = 1;
    }
    $c = replaceValueParam($c, 'nCountPage', $nCountPage);
    if (inStr($c, '[$page-select-openlist$]') > 0) {
        for ($i = 1; $i <= $nCountPage; $i++) {
            $url = replace($configPageUrl, '[id]', $i);
            $selStr = '';
            if ($i == $nPage) {
                $selStr = ' selected';
            }
            $cPages = $cPages . '<option value="' . $url . '"' . $selStr . '>' . $i . '</option>' . vbCrlf();
        }
        $c = replace($c, '[$page-select-openlist$]', $cPages);
    }
    $webPageControl = $c . vbCrlf();
    return @$webPageControl;
}
Beispiel #13
0
function photoLeftScroll($demo, $demo1, $demo2)
{
    $c = '';
    $c = $c . '<!--图片向左轮番滚动-->' . vbCrlf();
    $c = $c . '<script language="javascript">' . vbCrlf();
    $c = $c . 'var speed=30' . vbCrlf();
    $c = $c . '' . $demo2 . '.innerHTML=' . $demo1 . '.innerHTML' . vbCrlf();
    $c = $c . 'function Marquee(){' . vbCrlf();
    $c = $c . '    if(' . $demo2 . '.offsetWidth-' . $demo . '.scrollLeft<=0)' . vbCrlf();
    $c = $c . '        ' . $demo . '.scrollLeft-=' . $demo1 . '.offsetWidth' . vbCrlf();
    $c = $c . '    else{' . vbCrlf();
    $c = $c . '        ' . $demo . '.scrollLeft++' . vbCrlf();
    $c = $c . '    }' . vbCrlf();
    $c = $c . '}' . vbCrlf();
    $c = $c . 'var MyMar=setInterval(Marquee,speed)' . vbCrlf();
    $c = $c . '' . $demo . '.onmouseover=function() {clearInterval(MyMar)}' . vbCrlf();
    $c = $c . '' . $demo . '.onmouseout=function() {MyMar=setInterval(Marquee,speed)}' . vbCrlf();
    $c = $c . '</script> ' . vbCrlf();
    $photoLeftScroll = $c;
    return @$photoLeftScroll;
}
Beispiel #14
0
function scanUrl($httpUrl, $toTitle, $codeset)
{
    $splStr = '';
    $i = '';
    $s = '';
    $content = '';
    $PubAHrefList = '';
    $PubATitleList = '';
    $splUrl = '';
    $spltitle = '';
    $title = '';
    $url = '';
    $htmlDir = '';
    $htmlFilePath = '';
    $nOK = '';
    $dataArray = '';
    $webState = '';
    $u = '';
    $iniDir = '';
    $iniFilePath = '';
    $websize = '';
    $nSetTime = '';
    $startTime = '';
    $openSpeed = '';
    $isLocal = '';
    $isThrough = '';
    $htmlDir = '/../网站UrlScan/' . setFileName(getWebSite($httpUrl));
    CreateDirFolder($htmlDir);
    $htmlFilePath = $htmlDir . '/' . setFileName($httpUrl) . '.html';
    $iniDir = $htmlDir . '/conifg';
    CreateFolder($iniDir);
    $iniFilePath = $iniDir . '/' . setFileName($httpUrl) . '.txt';
    //httpurl="http://maiside.net/"
    $webState = 0;
    $nSetTime = 1;
    $openSpeed = 0;
    if (CheckFile($htmlFilePath) == false) {
        $startTime = now();
        aspEcho('codeset', $codeset);
        $dataArray = handleXmlGet($httpUrl, $codeset);
        $content = $dataArray[0];
        $content = toGB2312Char($content);
        //给PHP用,转成gb2312字符
        $webState = $dataArray[1];
        $openSpeed = dateDiff('s', $startTime, now());
        //content=gethttpurl(httpurl,codeset)
        //call createfile(htmlFilePath,content)
        WriteToFile($htmlFilePath, $content, $codeset);
        createFile($iniFilePath, $webState . vbCrlf() . $openSpeed);
        $nSetTime = 3;
        $isLocal = 0;
    } else {
        //content=getftext(htmlFilePath)
        $content = reaFile($htmlFilePath, $codeset);
        $content = toGB2312Char($content);
        //给PHP用,转成gb2312字符
        $splStr = aspSplit(getFText($iniFilePath), vbCrlf());
        $webState = CInt($splStr[0]);
        $openSpeed = CInt($splStr[0]);
        $isLocal = 1;
    }
    $websize = getFSize($htmlFilePath);
    if ($websize == '') {
        $websize = 0;
    }
    aspEcho('isLocal', $isLocal);
    $rsObj = $GLOBALS['conn']->query('select * from ' . $GLOBALS['db_PREFIX'] . 'weburlscan where httpurl=\'' . $httpUrl . '\'');
    if (@mysql_num_rows($rsObj) == 0) {
        $rs = mysql_fetch_array($rsObj);
        connexecute('insert into ' . $GLOBALS['db_PREFIX'] . 'weburlscan(httpurl,title,charset) values(\'' . $httpUrl . '\',\'' . $toTitle . '\',\'' . $codeset . '\')');
    }
    connexecute('update ' . $GLOBALS['db_PREFIX'] . 'weburlscan  set webstate=' . $webState . ',websize=' . $websize . ',openspeed=' . $openSpeed . ',charset=\'' . $codeset . '\'  where httpurl=\'' . $httpUrl . '\'');
    //strLen(content)  不用这个,不精准
    $s = getContentAHref('', $content, $PubAHrefList, $PubATitleList);
    $s = handleScanUrlList($httpUrl, $s);
    //call echo("httpurl",httpurl)
    //call echo("s",s)
    //call echo("PubATitleList",PubATitleList)
    $nOK = 0;
    $splUrl = aspSplit($PubAHrefList, vbCrlf());
    $spltitle = aspSplit($PubATitleList, vbCrlf());
    for ($i = 1; $i <= uBound($splUrl); $i++) {
        $title = $spltitle[$i];
        $url = $splUrl[$i];
        //去掉#号后台的字符20160506
        if (inStr($url, '#') > 0) {
            $url = mid($url, 1, inStr($url, '#') - 1);
        }
        if ($url == '') {
            if ($title != '') {
                aspEcho('网址为空', $title);
            }
        } else {
            $url = handleScanUrlList($httpUrl, $url);
            $url = handleWithWebSiteList($httpUrl, $url);
            if ($url != '') {
                $rsObj = $GLOBALS['conn']->query('select * from ' . $GLOBALS['db_PREFIX'] . 'weburlscan where httpurl=\'' . $url . '\'');
                if (@mysql_num_rows($rsObj) == 0) {
                    $rs = mysql_fetch_array($rsObj);
                    $u = lCase($url);
                    if (inStr($u, 'tools/downfile.asp') > 0 || inStr($u, '/url.asp?') > 0 || inStr($u, '/aspweb.asp?') > 0 || inStr($u, '/phpweb.php?') > 0 || $u == 'http://www.maiside.net/qq/' || inStr($u, 'mailto:') > 0 || inStr($u, 'tel:') > 0 || inStr($u, '.html?replytocom') > 0) {
                        //.html?replytocom  王通网站
                        $isThrough = 0;
                    } else {
                        $isThrough = 1;
                        //不用true 因为写入数据会有问题
                    }
                    connexecute('insert into ' . $GLOBALS['db_PREFIX'] . 'weburlscan(tohttpurl,totitle,httpurl,title,isthrough,charset) values(\'' . $httpUrl . '\',\'' . $toTitle . '\',\'' . $url . '\',\'' . left($title, 255) . '\',' . $isThrough . ',\'' . $codeset . '\')');
                    $nOK = $nOK + 1;
                    aspEcho($i, $url);
                } else {
                    aspEcho($title, $url);
                }
            }
        }
    }
    $scanUrl = $nSetTime;
    return @$scanUrl;
}
Beispiel #15
0
function resetAccessData_temp()
{
    handlePower('恢复模板数据');
    //管理权限处理
    $GLOBALS['conn='] = OpenConn();
    $splStr = '';
    $i = '';
    $s = '';
    $columnname = '';
    $title = '';
    $nCount = '';
    $webdataDir = '';
    $webdataDir = @$_REQUEST['webdataDir'];
    if ($webdataDir != '') {
        if (checkFolder($webdataDir) == false) {
            eerr('网站数据目录不存在,恢复默认数据未成功', $webdataDir);
        }
    } else {
        $webdataDir = '/Data/WebData/';
    }
    aspEcho('提示', '恢复数据完成');
    rw('<hr><a href=\'../index.php\' target=\'_blank\'>进入首页</a> | <a href="?" target=\'_blank\'>进入后台</a>');
    $content = '';
    $filePath = '';
    $parentid = '';
    $author = '';
    $adddatetime = '';
    $fileName = '';
    $bodycontent = '';
    $webtitle = '';
    $webkeywords = '';
    $webdescription = '';
    $sortrank = '';
    $labletitle = '';
    $target = '';
    $websitebottom = '';
    $webTemplate = '';
    $webimages = '';
    $webcss = '';
    $webjs = '';
    $flags = '';
    $websiteurl = '';
    $splxx = '';
    $columntype = '';
    $relatedtags = '';
    $npagesize = '';
    $customaurl = '';
    $nofollow = '';
    $templatepath = '';
    $isthrough = '';
    $titlecolor = '';
    $showreason = '';
    $ncomputersearch = '';
    $nmobliesearch = '';
    $ncountsearch = '';
    $ndegree = '';
    //竞价表
    $displaytitle = '';
    $aboutcontent = '';
    $isonhtml = '';
    //单页表
    $columnenname = '';
    //导航表
    $smallimage = '';
    $bigImage = '';
    $bannerimage = '';
    //文章表
    $httpurl = '';
    $price = '';
    $morepageurl = '';
    $charset = '';
    $thispage = '';
    $countpage = '';
    $bigClassName = '';
    $startStr = '';
    $endStr = '';
    $startaddstr = '';
    $endaddstr = '';
    $sType = '';
    $saction = '';
    $fieldName = '';
    $fieldcheck = '';
    //网站配置
    $content = GetFText($webdataDir . '/website.txt');
    //这样做是为了从GitHub下载时它把vbcrlf转成 chr(10)  20160409
    if (inStr($content, vbCrlf()) == false) {
        $content = replace($content, chr(10), vbCrlf());
    }
    if ($content != '') {
        $webtitle = newGetStrCut($content, 'webtitle');
        $webkeywords = newGetStrCut($content, 'webkeywords');
        $webdescription = newGetStrCut($content, 'webdescription');
        $websitebottom = newGetStrCut($content, 'websitebottom');
        $webTemplate = newGetStrCut($content, 'webtemplate');
        $webimages = newGetStrCut($content, 'webimages');
        $webcss = newGetStrCut($content, 'webcss');
        $webjs = newGetStrCut($content, 'webjs');
        $flags = newGetStrCut($content, 'flags');
        $websiteurl = newGetStrCut($content, 'websiteurl');
        if (getRecordCount($GLOBALS['db_PREFIX'] . 'website', '') == 0) {
            connexecute('insert into ' . $GLOBALS['db_PREFIX'] . 'website(webtitle) values(\'测试\')');
        }
        connexecute('update ' . $GLOBALS['db_PREFIX'] . 'website  set webtitle=\'' . $webtitle . '\',webkeywords=\'' . $webkeywords . '\',webdescription=\'' . $webdescription . '\',websitebottom=\'' . $websitebottom . '\',webtemplate=\'' . $webTemplate . '\',webimages=\'' . $webimages . '\',webcss=\'' . $webcss . '\',webjs=\'' . $webjs . '\',flags=\'' . $flags . '\',websiteurl=\'' . $websiteurl . '\'');
    }
    //导航
    connexecute('delete from ' . $GLOBALS['db_PREFIX'] . 'webcolumn');
    $content = getDirTxtList($webdataDir . '/webcolumn/');
    $content = contentNameSort($content, '');
    $splStr = aspSplit($content, vbCrlf());
    HR();
    foreach ($splStr as $key => $filePath) {
        $fileName = getFileName($filePath);
        if ($filePath != '' && inStr('_#', left($fileName, 1)) == false) {
            aspEcho('导航', $filePath);
            $content = GetFText($filePath);
            //这样做是为了从GitHub下载时它把vbcrlf转成 chr(10)  20160409
            if (inStr($content, vbCrlf()) == false) {
                $content = replace($content, chr(10), vbCrlf());
            }
            $splxx = aspSplit($content, vbCrlf() . '-------------------------------');
            foreach ($splxx as $key => $s) {
                if (inStr($s, '【webtitle】') > 0) {
                    $s = $s . vbCrlf();
                    $webtitle = newGetStrCut($s, 'webtitle');
                    $webkeywords = newGetStrCut($s, 'webkeywords');
                    $webdescription = newGetStrCut($s, 'webdescription');
                    $customaurl = newGetStrCut($s, 'customaurl');
                    $sortrank = newGetStrCut($s, 'sortrank');
                    if ($sortrank == '') {
                        $sortrank = 0;
                    }
                    $fileName = newGetStrCut($s, 'filename');
                    $columnname = newGetStrCut($s, 'columnname');
                    $columnenname = newGetStrCut($s, 'columnenname');
                    $columntype = newGetStrCut($s, 'columntype');
                    $flags = newGetStrCut($s, 'flags');
                    $parentid = newGetStrCut($s, 'parentid');
                    $parentid = phpTrim(getColumnId($parentid));
                    //可根据栏目名称找到对应ID   不存在为-1
                    //call echo("parentid",parentid)
                    $labletitle = newGetStrCut($s, 'labletitle');
                    //每页显示条数
                    $npagesize = newGetStrCut($s, 'npagesize');
                    if ($npagesize == '') {
                        $npagesize = 10;
                    }
                    //默认分页数为10条
                    $target = newGetStrCut($s, 'target');
                    $smallimage = newGetStrCut($s, 'smallimage');
                    $bigImage = newGetStrCut($s, 'bigImage');
                    $bannerimage = newGetStrCut($s, 'bannerimage');
                    $templatepath = newGetStrCut($s, 'templatepath');
                    $bodycontent = newGetStrCut($s, 'bodycontent');
                    $bodycontent = contentTranscoding($bodycontent);
                    //是否启用生成html
                    $isonhtml = newGetStrCut($s, 'isonhtml');
                    if ($isonhtml == '0' || lCase($isonhtml) == 'false') {
                        $isonhtml = 0;
                    } else {
                        $isonhtml = 1;
                    }
                    //是否为nofollow
                    $nofollow = newGetStrCut($s, 'nofollow');
                    if ($nofollow == '1' || lCase($nofollow) == 'true') {
                        $nofollow = 1;
                    } else {
                        $nofollow = 0;
                    }
                    //call echo(columnname,nofollow)
                    $aboutcontent = newGetStrCut($s, 'aboutcontent');
                    $aboutcontent = contentTranscoding($aboutcontent);
                    $bodycontent = newGetStrCut($s, 'bodycontent');
                    $bodycontent = contentTranscoding($bodycontent);
                    connexecute('insert into ' . $GLOBALS['db_PREFIX'] . 'webcolumn (webtitle,webkeywords,webdescription,columnname,columnenname,columntype,sortrank,filename,customaurl,flags,parentid,labletitle,aboutcontent,bodycontent,npagesize,isonhtml,nofollow,target,smallimage,bigImage,bannerimage,templatepath) values(\'' . $webtitle . '\',\'' . $webkeywords . '\',\'' . $webdescription . '\',\'' . $columnname . '\',\'' . $columnenname . '\',\'' . $columntype . '\',' . $sortrank . ',\'' . $fileName . '\',\'' . $customaurl . '\',\'' . $flags . '\',' . $parentid . ',\'' . $labletitle . '\',\'' . $aboutcontent . '\',\'' . $bodycontent . '\',' . $npagesize . ',' . $isonhtml . ',' . $nofollow . ',\'' . $target . '\',\'' . $smallimage . '\',\'' . $bigImage . '\',\'' . $bannerimage . '\',\'' . $templatepath . '\')');
                }
            }
        }
    }
    //文章
    connexecute('delete from ' . $GLOBALS['db_PREFIX'] . 'articledetail');
    $content = getDirAllFileList($webdataDir . '/articledetail/', 'txt');
    $content = contentNameSort($content, '');
    $splStr = aspSplit($content, vbCrlf());
    HR();
    foreach ($splStr as $key => $filePath) {
        $fileName = getFileName($filePath);
        if ($filePath != '' && inStr('_#', left($fileName, 1)) == false) {
            aspEcho('文章', $filePath);
            $content = GetFText($filePath);
            //这样做是为了从GitHub下载时它把vbcrlf转成 chr(10)  20160409
            if (inStr($content, vbCrlf()) == false) {
                $content = replace($content, chr(10), vbCrlf());
            }
            $splxx = aspSplit($content, vbCrlf() . '-------------------------------');
            foreach ($splxx as $key => $s) {
                if (inStr($s, '【title】') > 0) {
                    $s = $s . vbCrlf();
                    $parentid = newGetStrCut($s, 'parentid');
                    $parentid = getColumnId($parentid);
                    $title = newGetStrCut($s, 'title');
                    $titlecolor = newGetStrCut($s, 'titlecolor');
                    $webtitle = newGetStrCut($s, 'webtitle');
                    $webkeywords = newGetStrCut($s, 'webkeywords');
                    $webdescription = newGetStrCut($s, 'webdescription');
                    $author = newGetStrCut($s, 'author');
                    $sortrank = newGetStrCut($s, 'sortrank');
                    if ($sortrank == '') {
                        $sortrank = 0;
                    }
                    $adddatetime = newGetStrCut($s, 'adddatetime');
                    $fileName = newGetStrCut($s, 'filename');
                    $templatepath = newGetStrCut($s, 'templatepath');
                    $flags = newGetStrCut($s, 'flags');
                    $relatedtags = newGetStrCut($s, 'relatedtags');
                    $customaurl = newGetStrCut($s, 'customaurl');
                    $target = newGetStrCut($s, 'target');
                    $smallimage = newGetStrCut($s, 'smallimage');
                    $bigImage = newGetStrCut($s, 'bigImage');
                    $bannerimage = newGetStrCut($s, 'bannerimage');
                    $labletitle = newGetStrCut($s, 'labletitle');
                    $aboutcontent = newGetStrCut($s, 'aboutcontent');
                    $aboutcontent = contentTranscoding($aboutcontent);
                    $bodycontent = newGetStrCut($s, 'bodycontent');
                    $bodycontent = contentTranscoding($bodycontent);
                    //是否启用生成html
                    $isonhtml = newGetStrCut($s, 'isonhtml');
                    if ($isonhtml == '0' || lCase($isonhtml) == 'false') {
                        $isonhtml = 0;
                    } else {
                        $isonhtml = 1;
                    }
                    //是否为nofollow
                    $nofollow = newGetStrCut($s, 'nofollow');
                    if ($nofollow == '1' || lCase($nofollow) == 'true') {
                        $nofollow = 1;
                    } else {
                        $nofollow = 0;
                    }
                    //价格
                    $price = getDianNumb(newGetStrCut($s, 'price'));
                    if ($price == '') {
                        $price = 0;
                    }
                    connexecute('insert into ' . $GLOBALS['db_PREFIX'] . 'articledetail (parentid,title,titlecolor,webtitle,webkeywords,webdescription,author,sortrank,adddatetime,filename,flags,relatedtags,aboutcontent,bodycontent,updatetime,isonhtml,customaurl,nofollow,target,smallimage,bigImage,bannerimage,templatepath,labletitle,price) values(' . $parentid . ',\'' . $title . '\',\'' . $titlecolor . '\',\'' . $webtitle . '\',\'' . $webkeywords . '\',\'' . $webdescription . '\',\'' . $author . '\',' . $sortrank . ',\'' . $adddatetime . '\',\'' . $fileName . '\',\'' . $flags . '\',\'' . $relatedtags . '\',\'' . $aboutcontent . '\',\'' . $bodycontent . '\',\'' . now() . '\',' . $isonhtml . ',\'' . $customaurl . '\',' . $nofollow . ',\'' . $target . '\',\'' . $smallimage . '\',\'' . $bigImage . '\',\'' . $bannerimage . '\',\'' . $templatepath . '\',\'' . $labletitle . '\',' . $price . ')');
                }
            }
        }
    }
    //单页
    connexecute('delete from ' . $GLOBALS['db_PREFIX'] . 'OnePage');
    $content = getDirTxtList($webdataDir . '/OnePage/');
    $content = contentNameSort($content, '');
    $splStr = aspSplit($content, vbCrlf());
    HR();
    foreach ($splStr as $key => $filePath) {
        $fileName = getFileName($filePath);
        if ($filePath != '' && inStr('_#', left($fileName, 1)) == false) {
            aspEcho('单页', $filePath);
            $content = GetFText($filePath);
            //这样做是为了从GitHub下载时它把vbcrlf转成 chr(10)  20160409
            if (inStr($content, vbCrlf()) == false) {
                $content = replace($content, chr(10), vbCrlf());
            }
            $splxx = aspSplit($content, vbCrlf() . '-------------------------------');
            foreach ($splxx as $key => $s) {
                if (inStr($s, '【webkeywords】') > 0) {
                    $s = $s . vbCrlf();
                    $title = newGetStrCut($s, 'title');
                    $displaytitle = newGetStrCut($s, 'displaytitle');
                    $webtitle = newGetStrCut($s, 'webtitle');
                    $webkeywords = newGetStrCut($s, 'webkeywords');
                    $webdescription = newGetStrCut($s, 'webdescription');
                    $adddatetime = newGetStrCut($s, 'adddatetime');
                    $fileName = newGetStrCut($s, 'filename');
                    $aboutcontent = newGetStrCut($s, 'aboutcontent');
                    $aboutcontent = contentTranscoding($aboutcontent);
                    $target = newGetStrCut($s, 'target');
                    $templatepath = newGetStrCut($s, 'templatepath');
                    $bodycontent = newGetStrCut($s, 'bodycontent');
                    $bodycontent = contentTranscoding($bodycontent);
                    //是否启用生成html
                    $isonhtml = newGetStrCut($s, 'isonhtml');
                    if ($isonhtml == '0' || lCase($isonhtml) == 'false') {
                        $isonhtml = 0;
                    } else {
                        $isonhtml = 1;
                    }
                    //是否为nofollow
                    $nofollow = newGetStrCut($s, 'nofollow');
                    if ($nofollow == '1' || lCase($nofollow) == 'true') {
                        $nofollow = 1;
                    } else {
                        $nofollow = 0;
                    }
                    connexecute('insert into ' . $GLOBALS['db_PREFIX'] . 'onepage (title,displaytitle,webtitle,webkeywords,webdescription,adddatetime,filename,isonhtml,aboutcontent,bodycontent,nofollow,target,templatepath) values(\'' . $title . '\',\'' . $displaytitle . '\',\'' . $webtitle . '\',\'' . $webkeywords . '\',\'' . $webdescription . '\',\'' . $adddatetime . '\',\'' . $fileName . '\',' . $isonhtml . ',\'' . $aboutcontent . '\',\'' . $bodycontent . '\',' . $nofollow . ',\'' . $target . '\',\'' . $templatepath . '\')');
                }
            }
        }
    }
    //竞价
    connexecute('delete from ' . $GLOBALS['db_PREFIX'] . 'Bidding');
    $content = getDirTxtList($webdataDir . '/Bidding/');
    $content = contentNameSort($content, '');
    $splStr = aspSplit($content, vbCrlf());
    HR();
    foreach ($splStr as $key => $filePath) {
        $fileName = getFileName($filePath);
        if ($filePath != '' && inStr('_#', left($fileName, 1)) == false) {
            aspEcho('竞价', $filePath);
            $content = GetFText($filePath);
            //这样做是为了从GitHub下载时它把vbcrlf转成 chr(10)  20160409
            if (inStr($content, vbCrlf()) == false) {
                $content = replace($content, chr(10), vbCrlf());
            }
            $splxx = aspSplit($content, vbCrlf() . '-------------------------------');
            foreach ($splxx as $key => $s) {
                if (inStr($s, '【webkeywords】') > 0) {
                    $s = $s . vbCrlf();
                    $webkeywords = newGetStrCut($s, 'webkeywords');
                    $showreason = newGetStrCut($s, 'showreason');
                    $ncomputersearch = newGetStrCut($s, 'ncomputersearch');
                    $nmobliesearch = newGetStrCut($s, 'nmobliesearch');
                    $ncountsearch = newGetStrCut($s, 'ncountsearch');
                    $ndegree = newGetStrCut($s, 'ndegree');
                    $ndegree = getNumber($ndegree);
                    if ($ndegree == '') {
                        $ndegree = 0;
                    }
                    connexecute('insert into ' . $GLOBALS['db_PREFIX'] . 'Bidding (webkeywords,showreason,ncomputersearch,nmobliesearch,ndegree) values(\'' . $webkeywords . '\',\'' . $showreason . '\',' . $ncomputersearch . ',' . $nmobliesearch . ',' . $ndegree . ')');
                }
            }
        }
    }
    //搜索统计
    connexecute('delete from ' . $GLOBALS['db_PREFIX'] . 'SearchStat');
    $content = getDirTxtList($webdataDir . '/SearchStat/');
    $content = contentNameSort($content, '');
    $splStr = aspSplit($content, vbCrlf());
    HR();
    foreach ($splStr as $key => $filePath) {
        $fileName = getFileName($filePath);
        if ($filePath != '' && inStr('_#', left($fileName, 1)) == false) {
            aspEcho('搜索统计', $filePath);
            $content = GetFText($filePath);
            //这样做是为了从GitHub下载时它把vbcrlf转成 chr(10)  20160409
            if (inStr($content, vbCrlf()) == false) {
                $content = replace($content, chr(10), vbCrlf());
            }
            $splxx = aspSplit($content, vbCrlf() . '-------------------------------');
            foreach ($splxx as $key => $s) {
                if (inStr($s, '【title】') > 0) {
                    $s = $s . vbCrlf();
                    $title = newGetStrCut($s, 'title');
                    $webtitle = newGetStrCut($s, 'webtitle');
                    $webkeywords = newGetStrCut($s, 'webkeywords');
                    $webdescription = newGetStrCut($s, 'webdescription');
                    $customaurl = newGetStrCut($s, 'customaurl');
                    $target = newGetStrCut($s, 'target');
                    $isthrough = newGetStrCut($s, 'isthrough');
                    if ($isthrough == '0' || lCase($isthrough) == 'false') {
                        $isthrough = 0;
                    } else {
                        $isthrough = 1;
                    }
                    $sortrank = newGetStrCut($s, 'sortrank');
                    if ($sortrank == '') {
                        $sortrank = 0;
                    }
                    //是否启用生成html
                    $isonhtml = newGetStrCut($s, 'isonhtml');
                    if ($isonhtml == '0' || lCase($isonhtml) == 'false') {
                        $isonhtml = 0;
                    } else {
                        $isonhtml = 1;
                    }
                    //是否为nofollow
                    $nofollow = newGetStrCut($s, 'nofollow');
                    if ($nofollow == '1' || lCase($nofollow) == 'true') {
                        $nofollow = 1;
                    } else {
                        $nofollow = 0;
                    }
                    //call echo("title",title)
                    connexecute('insert into ' . $GLOBALS['db_PREFIX'] . 'SearchStat (title,webtitle,webkeywords,webdescription,customaurl,target,isthrough,sortrank,isonhtml,nofollow) values(\'' . $title . '\',\'' . $webtitle . '\',\'' . $webkeywords . '\',\'' . $webdescription . '\',\'' . $customaurl . '\',\'' . $target . '\',' . $isthrough . ',' . $sortrank . ',' . $isonhtml . ',' . $nofollow . ')');
                }
            }
        }
    }
    $itemid = '';
    $userName = '';
    $ip = '';
    $reply = '';
    $tableName = '';
    //评论
    //评论
    connexecute('delete from ' . $GLOBALS['db_PREFIX'] . 'TableComment');
    $content = getDirTxtList($webdataDir . '/TableComment/');
    $content = contentNameSort($content, '');
    $splStr = aspSplit($content, vbCrlf());
    HR();
    foreach ($splStr as $key => $filePath) {
        $fileName = getFileName($filePath);
        if ($filePath != '' && inStr('_#', left($fileName, 1)) == false) {
            aspEcho('评论', $filePath);
            $content = GetFText($filePath);
            //这样做是为了从GitHub下载时它把vbcrlf转成 chr(10)  20160409
            if (inStr($content, vbCrlf()) == false) {
                $content = replace($content, chr(10), vbCrlf());
            }
            $splxx = aspSplit($content, vbCrlf() . '-------------------------------');
            foreach ($splxx as $key => $s) {
                if (inStr($s, '【title】') > 0) {
                    $s = $s . vbCrlf();
                    $tableName = newGetStrCut($s, 'tablename');
                    $title = newGetStrCut($s, 'title');
                    $itemid = getArticleId(newGetStrCut($s, 'itemid'));
                    if ($itemid == '') {
                        $itemid = 0;
                    }
                    //call echo("itemID",itemID)
                    $adddatetime = newGetStrCut($s, 'adddatetime');
                    $userName = newGetStrCut($s, 'username');
                    $ip = newGetStrCut($s, 'ip');
                    $bodycontent = newGetStrCut($s, 'bodycontent');
                    $reply = newGetStrCut($s, 'reply');
                    $isthrough = newGetStrCut($s, 'isthrough');
                    if ($isthrough == '0' || lCase($isthrough) == 'false') {
                        $isthrough = 0;
                    } else {
                        $isthrough = 1;
                    }
                    //call echo("title",title)
                    connexecute('insert into ' . $GLOBALS['db_PREFIX'] . 'TableComment (tablename,title,itemid,adddatetime,username,ip,bodycontent,reply,isthrough) values(\'' . $tableName . '\',\'' . $title . '\',' . $itemid . ',\'' . $adddatetime . '\',\'' . $userName . '\',\'' . $ip . '\',\'' . $bodycontent . '\',\'' . $reply . '\',' . $isthrough . ')');
                }
            }
        }
    }
    //友情链接
    connexecute('delete from ' . $GLOBALS['db_PREFIX'] . 'FriendLink');
    $content = getDirTxtList($webdataDir . '/FriendLink/');
    $content = contentNameSort($content, '');
    $splStr = aspSplit($content, vbCrlf());
    HR();
    foreach ($splStr as $key => $filePath) {
        $fileName = getFileName($filePath);
        if ($filePath != '' && inStr('_#', left($fileName, 1)) == false) {
            aspEcho('评论', $filePath);
            $content = GetFText($filePath);
            //这样做是为了从GitHub下载时它把vbcrlf转成 chr(10)  20160409
            if (inStr($content, vbCrlf()) == false) {
                $content = replace($content, chr(10), vbCrlf());
            }
            $splxx = aspSplit($content, vbCrlf() . '-------------------------------');
            foreach ($splxx as $key => $s) {
                if (inStr($s, '【title】') > 0) {
                    $s = $s . vbCrlf();
                    $title = newGetStrCut($s, 'title');
                    $httpurl = newGetStrCut($s, 'httpurl');
                    $smallimage = newGetStrCut($s, 'smallimage');
                    $flags = newGetStrCut($s, 'flags');
                    $target = newGetStrCut($s, 'target');
                    $sortrank = newGetStrCut($s, 'sortrank');
                    if ($sortrank == '0' || lCase($sortrank) == 'false') {
                        $sortrank = 0;
                    } else {
                        $sortrank = 1;
                    }
                    $isthrough = newGetStrCut($s, 'isthrough');
                    if ($isthrough == '0' || lCase($isthrough) == 'false') {
                        $isthrough = 0;
                    } else {
                        $isthrough = 1;
                    }
                    //call echo("title",title)
                    connexecute('insert into ' . $GLOBALS['db_PREFIX'] . 'FriendLink (title,httpurl,smallimage,flags,sortrank,isthrough,target) values(\'' . $title . '\',\'' . $httpurl . '\',\'' . $smallimage . '\',\'' . $flags . '\',' . $sortrank . ',' . $isthrough . ',\'' . $target . '\')');
                }
            }
        }
    }
    //留言
    connexecute('delete from ' . $GLOBALS['db_PREFIX'] . 'GuestBook');
    $content = getDirTxtList($webdataDir . '/GuestBook/');
    $content = contentNameSort($content, '');
    $splStr = aspSplit($content, vbCrlf());
    HR();
    foreach ($splStr as $key => $filePath) {
        $fileName = getFileName($filePath);
        if ($filePath != '' && inStr('_#', left($fileName, 1)) == false) {
            aspEcho('留言', $filePath);
            $content = GetFText($filePath);
            //这样做是为了从GitHub下载时它把vbcrlf转成 chr(10)  20160409
            if (inStr($content, vbCrlf()) == false) {
                $content = replace($content, chr(10), vbCrlf());
            }
            $splxx = aspSplit($content, vbCrlf() . '-------------------------------');
            foreach ($splxx as $key => $s) {
                if (inStr($s, '【adddatetime】') > 0) {
                    $s = $s . vbCrlf();
                    $adddatetime = newGetStrCut($s, 'adddatetime');
                    $bodycontent = newGetStrCut($s, 'bodycontent');
                    $reply = newGetStrCut($s, 'reply');
                    $isthrough = newGetStrCut($s, 'isthrough');
                    if ($isthrough == '0' || lCase($isthrough) == 'false') {
                        $isthrough = 0;
                    } else {
                        $isthrough = 1;
                    }
                    connexecute('insert into ' . $GLOBALS['db_PREFIX'] . 'GuestBook (adddatetime,bodycontent,reply,isthrough) values(\'' . $adddatetime . '\',\'' . $bodycontent . '\',\'' . $reply . '\',' . $isthrough . ')');
                }
            }
        }
    }
    //采集网站
    connexecute('delete from ' . $GLOBALS['db_PREFIX'] . 'CaiWeb');
    $content = getDirTxtList($webdataDir . '/CaiWeb/');
    $content = contentNameSort($content, '');
    $splStr = aspSplit($content, vbCrlf());
    HR();
    foreach ($splStr as $key => $filePath) {
        $fileName = getFileName($filePath);
        if ($filePath != '' && inStr('_#', left($fileName, 1)) == false) {
            aspEcho('采集网站', $filePath);
            $content = GetFText($filePath);
            //这样做是为了从GitHub下载时它把vbcrlf转成 chr(10)  20160409
            if (inStr($content, vbCrlf()) == false) {
                $content = replace($content, chr(10), vbCrlf());
            }
            $splxx = aspSplit($content, vbCrlf() . '-------------------------------');
            foreach ($splxx as $key => $s) {
                if (inStr($s, '【bigclassname】') > 0) {
                    $s = $s . vbCrlf();
                    $bigClassName = newGetStrCut($s, 'bigclassname');
                    $httpurl = newGetStrCut($s, 'httpurl');
                    $morepageurl = newGetStrCut($s, 'morepageurl');
                    $charset = newGetStrCut($s, 'charset');
                    $adddatetime = newGetStrCut($s, 'adddatetime');
                    $bodycontent = newGetStrCut($s, 'bodycontent');
                    $sortrank = newGetStrCut($s, 'sortrank');
                    if ($sortrank == '') {
                        $sortrank = 0;
                    }
                    $thispage = newGetStrCut($s, 'thispage');
                    if ($thispage == '') {
                        $thispage = 0;
                    }
                    $countpage = newGetStrCut($s, 'countpage');
                    if ($countpage == '') {
                        $thispage = 0;
                    }
                    $columnname = newGetStrCut($s, 'columnname');
                    connexecute('insert into ' . $GLOBALS['db_PREFIX'] . 'CaiWeb (adddatetime,bodycontent,httpurl,morepageurl,charset,sortrank,thispage,countpage,bigclassname,columnname) values(\'' . $adddatetime . '\',\'' . $bodycontent . '\',\'' . $httpurl . '\',\'' . $morepageurl . '\',\'' . $charset . '\',' . $sortrank . ',' . $thispage . ',' . $countpage . ',\'' . $bigClassName . '\',\'' . $columnname . '\')');
                }
            }
        }
    }
    //采集配置
    connexecute('delete from ' . $GLOBALS['db_PREFIX'] . 'CaiConfig');
    $content = getDirTxtList($webdataDir . '/CaiConfig/');
    $content = contentNameSort($content, '');
    $splStr = aspSplit($content, vbCrlf());
    HR();
    foreach ($splStr as $key => $filePath) {
        $fileName = getFileName($filePath);
        if ($filePath != '' && inStr('_#', left($fileName, 1)) == false) {
            aspEcho('采集配置', $filePath);
            $content = GetFText($filePath);
            //这样做是为了从GitHub下载时它把vbcrlf转成 chr(10)  20160409
            if (inStr($content, vbCrlf()) == false) {
                $content = replace($content, chr(10), vbCrlf());
            }
            $splxx = aspSplit($content, vbCrlf() . '-------------------------------');
            foreach ($splxx as $key => $s) {
                if (inStr($s, '【bigclassname】') > 0) {
                    $s = $s . vbCrlf();
                    $bigClassName = newGetStrCut($s, 'bigclassname');
                    $sType = newGetStrCut($s, 'stype');
                    $startStr = newGetStrCut($s, 'startstr');
                    $endStr = newGetStrCut($s, 'endstr');
                    $startaddstr = newGetStrCut($s, 'startaddstr');
                    $endaddstr = newGetStrCut($s, 'endaddstr');
                    $adddatetime = newGetStrCut($s, 'adddatetime');
                    $sortrank = newGetStrCut($s, 'sortrank');
                    if ($sortrank == '') {
                        $sortrank = 0;
                    }
                    $saction = newGetStrCut($s, 'saction');
                    $isthrough = newGetStrCut($s, 'isthrough');
                    $isthrough = IIF($isthrough == '0' || lCase($isthrough) == 'false', 0, 1);
                    $fieldName = newGetStrCut($s, 'fieldname');
                    $fieldcheck = newGetStrCut($s, 'fieldcheck');
                    if ($fieldcheck == '') {
                        $fieldcheck = 0;
                    }
                    connexecute('insert into ' . $GLOBALS['db_PREFIX'] . 'CaiConfig (adddatetime,sortrank,bigclassname,stype,startstr,endstr,startaddstr,endaddstr,saction,isthrough,fieldname,fieldcheck) values(\'' . $adddatetime . '\',' . $sortrank . ',\'' . $bigClassName . '\',\'' . $sType . '\',\'' . $startStr . '\',\'' . $endStr . '\',\'' . $startaddstr . '\',\'' . $endaddstr . '\',\'' . $saction . '\',' . $isthrough . ',\'' . $fieldName . '\',' . $fieldcheck . ')');
                }
            }
        }
    }
    writeSystemLog('', '恢复默认数据' . $GLOBALS['db_PREFIX']);
    //系统日志
}
Beispiel #16
0
function getTableList()
{
    $sql = "SHOW TABLES FROM " . $GLOBALS['dbname'];
    $result = mysql_query($sql);
    $c = '';
    if (!$result) {
        echo "DB Error, could not list tablesn";
        echo 'MySQL Err(www.111cn.net)or: ' . mysql_error();
        exit;
    }
    while ($row = mysql_fetch_row($result)) {
        //echo "Table: {$row[0]}n";
        if ($c != '') {
            $c .= vbCrlf();
        }
        $c = $c . $row[0];
    }
    //	echo('显示'.$c);
    return $c;
}
Beispiel #17
0
function VBGetTimer()
{
    $n = '';
    $n = dateDiff('s', $GLOBALS['PubTimer'], now());
    $n = printTimeValue($n);
    $VBGetTimer = vbCrlf() . '------------------------------------' . vbCrlf() . '运行时间:' . $n;
    return @$VBGetTimer;
}
Beispiel #18
0
function controlDialogCss()
{
    $c = '';
    $c = '<style>' . vbCrlf();
    $c = $c . '/*控制Css20150128*/' . vbCrlf();
    $c = $c . '.controlDialog{' . vbCrlf();
    $c = $c . '    position:relative;' . vbCrlf();
    $c = $c . '    height:50px;' . vbCrlf();
    $c = $c . '    width:auto;' . vbCrlf();
    $c = $c . '}' . vbCrlf();
    $c = $c . '.controlDialog .menu{' . vbCrlf();
    $c = $c . '    position:absolute;' . vbCrlf();
    $c = $c . '    right:0px;' . vbCrlf();
    $c = $c . '    top:0px;' . vbCrlf();
    $c = $c . '}' . vbCrlf();
    $c = $c . '.controlDialog .menu a{' . vbCrlf();
    $c = $c . '    color:#FF0000;' . vbCrlf();
    $c = $c . '    font-size:14px;' . vbCrlf();
    $c = $c . '    text-decoration:none;' . vbCrlf();
    $c = $c . '    background-color:#FFFFFF;' . vbCrlf();
    $c = $c . '    border:1px solid #003300;' . vbCrlf();
    $c = $c . '    padding:4px;' . vbCrlf();
    $c = $c . '}' . vbCrlf();
    $c = $c . '.controlDialog .menu a:hover{' . vbCrlf();
    $c = $c . '    color:#C60000;' . vbCrlf();
    $c = $c . '    text-decoration:underline;' . vbCrlf();
    $c = $c . '}' . vbCrlf();
    $c = $c . '</style>' . vbCrlf();
    $controlDialogCss = $c;
    return @$controlDialogCss;
}
Beispiel #19
0
function XY_TitleInSearchEngineList($action)
{
    $title = '';
    $sType = '';
    $divclass = '';
    $spanclass = '';
    $s = '';
    $c = '';
    $title = RParam($action, 'title');
    $sType = RParam($action, 'sType');
    $divclass = RParam($action, 'divclass');
    $spanclass = RParam($action, 'spanclass');
    $s = '<strong>更多关于《' . $title . '》</strong>';
    if ($divclass != '') {
        $s = '<div class="' . $divclass . '">' . $s . '</div>';
    } else {
        if ($spanclass != '') {
            $s = '<span class="' . $spanclass . '">' . $s . '</span>' . '<br>';
        } else {
            $s = $s . '<br>';
        }
    }
    $c = $c . $s . vbCrlf();
    $c = $c . '<ul class="list"> ' . vbCrlf();
    $c = $c . '<li><a href="https://www.baidu.com/s?ie=gb2312&word=' . $title . '" rel="nofollow" target="_blank">【baidu搜索】在百度里搜索(' . $title . ')</a></li>' . vbCrlf();
    $c = $c . '<li><a href="http://www.haosou.com/s?ie=gb2312&q=' . $title . '" rel="nofollow" target="_blank">【haosou搜索】在好搜里搜索(' . $title . ')</a></li>' . vbCrlf();
    $c = $c . '<li><a href="https://search.yahoo.com/search;_ylt=A86.JmbkJatWH5YARmebvZx4?toggle=1&cop=mss&ei=gb2312&fr=yfp-t-901&fp=1&p=' . $title . '" rel="nofollow" target="_blank">【yahoo搜索】在雅虎里搜索(' . $title . ')</a></li>' . vbCrlf();
    $c = $c . '<li><a href="https://www.sogou.com/sogou?ie=utf8&query=' . toUTFChar($title) . '" rel="nofollow" target="_blank">【sogou搜索】在搜狗里搜索(' . $title . ')</a></li>' . vbCrlf();
    $c = $c . '<li><a href="http://www.youdao.com/search?ue=utf8&q=' . toUTFChar($title) . '" rel="nofollow" target="_blank">【youdao搜索】在有道里搜索(' . $title . ')</a></li>' . vbCrlf();
    $c = $c . '<li><a href="http://search.yam.com/Search/Web/DefaultKSA.aspx?SearchType=web&l=0&p=0&k=' . toUTFChar($title) . '" rel="nofollow" target="_blank">【yam搜索(google提供技术)】在蕃薯藤里搜索(' . $title . ')</a></li>' . vbCrlf();
    $c = $c . '<li><a href="http://cn.bing.com/search?q=' . toUTFChar($title) . '" rel="nofollow" target="_blank">【bing搜索】在必应里搜索(' . $title . ')</a></li>' . vbCrlf();
    $c = $c . '</ul>' . vbCrlf();
    $XY_TitleInSearchEngineList = $c;
    return @$XY_TitleInSearchEngineList;
}
Beispiel #20
0
function handleConfigFile($ConfigPath)
{
    $c = '';
    if (CheckFile($ConfigPath) == false) {
        $c = '#Help帮助# start' . vbCrlf() . '默认帮助内容' . vbCrlf() . '#Help帮助# end';
        createFile($ConfigPath, $c);
    }
}
Beispiel #21
0
function findModuleStr($content, $valueStr)
{
    $startStr = '';
    $endStr = '';
    $YuanStr = '';
    $replaceStr = '';
    $i = '';
    $Block = '';
    $BlockFile = '';
    $action = '';
    for ($i = 1; $i <= 9; $i++) {
        $startStr = '[$读出内容 ';
        $endStr = '$]';
        if (inStr($valueStr, $startStr) > 0 && inStr($valueStr, $endStr) > 0) {
            $action = StrCut($valueStr, $startStr, $endStr, 2);
            $Block = RParam($action, 'Block');
            $BlockFile = RParam($action, 'File');
            if (inStr(vbCrlf() . $GLOBALS['ReadBlockList'] . vbCrlf(), vbCrlf() . $Block . vbCrlf()) == false) {
                $GLOBALS['ReadBlockList'] = $GLOBALS['ReadBlockList'] . $Block . vbCrlf();
            }
            //块文件存在 则读出内容
            if ($BlockFile != '') {
                $content = getFText($BlockFile);
            }
            $YuanStr = $startStr . $action . $endStr;
            $replaceStr = '';
            $startStr = '<R#读出内容' . $Block . ' start#>';
            $endStr = '<R#读出内容' . $Block . ' end#>';
            if (inStr($content, $startStr) > 0 && inStr($content, $endStr) > 0) {
                $replaceStr = StrCut($content, $startStr, $endStr, 2);
            } else {
                $startStr = '<!--#读出内容' . $Block;
                $endStr = '#-->';
                if (inStr($content, $startStr) > 0 && inStr($content, $endStr) > 0) {
                    $replaceStr = StrCut($content, $startStr, $endStr, 2);
                }
            }
            //Call Eerr(YuanStr,ReplaceStr)
            $valueStr = replace($valueStr, $YuanStr, $replaceStr);
            //Call Echo("ValueStr",ValueStr)
        } else {
            //没有模块要处理了 则退出
            break;
        }
    }
    $findModuleStr = $valueStr;
    return @$findModuleStr;
}
Beispiel #22
0
function optimizeAspCode($content)
{
    $splStr = '';
    $s = '';
    $c = '';
    $i = '';
    $splStr = aspSplit($content, vbCrlf());
    foreach ($splStr as $key => $s) {
        $s = trimVbTab($s);
        if ($s != '') {
            $c = $c . trimVbTab($s) . vbCrlf();
        }
    }
    $optimizeAspCode = $c;
    return @$optimizeAspCode;
}
Beispiel #23
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;
}
Beispiel #24
0
function setFileName($fileName)
{
    $i = '';
    $s = '';
    $tStr = '';
    $splstr = '';
    $splReplace = '';
    $splstr = array('\\', '/', ':', '*', '?', '"', '<', '>', '|', '.', ',');
    //换这种方法是为了与PHP版通用 20160511
    $splReplace = array('撇', '揦', ':', '星', '?', '“', '左', '右', '横', '。', ',');
    for ($i = 0; $i <= uBound($splstr); $i++) {
        $s = $splstr[$i];
        $tStr = $splReplace[$i];
        $fileName = replace($fileName, $s, $tStr);
    }
    $fileName = replace($fileName, '&nbsp;', ' ');
    $fileName = replace($fileName, '&quot;', '双');
    $fileName = replace($fileName, vbCrlf(), '');
    $setFileName = $fileName;
    return @$setFileName;
}
Beispiel #25
0
function authorInfo2()
{
    $c = '';
    $c = '                \'\'\'' . vbCrlf();
    $c = $c . '               (0 0)' . vbCrlf();
    $c = $c . '   +-----oOO----(_)------------+' . vbCrlf();
    $c = $c . '   |                           |' . vbCrlf();
    $c = $c . '   |    让我们一起来体验       |' . vbCrlf();
    $c = $c . '   |    QQ:313801120           |' . vbCrlf();
    $c = $c . '   |    sharembweb.com         |' . vbCrlf();
    $c = $c . '   |                           |' . vbCrlf();
    $c = $c . '   +------------------oOO------+' . vbCrlf();
    $c = $c . '              |__|__|' . vbCrlf();
    $c = $c . '               || ||' . vbCrlf();
    $c = $c . '              ooO Ooo' . vbCrlf();
    $authorInfo2 = $c;
    return @$authorInfo2;
}
Beispiel #26
0
function saveSiteMap()
{
    $isWebRunHtml = '';
    //是否为html方式显示网站
    $changefreg = '';
    //更新频率
    $priority = '';
    //优先级
    $s = '';
    $c = '';
    $url = '';
    handlePower('修改生成SiteMap');
    //管理权限处理
    $changefreg = @$_REQUEST['changefreg'];
    $priority = @$_REQUEST['priority'];
    loadWebConfig();
    //加载配置
    //call eerr("cfg_flags",cfg_flags)
    if (inStr($GLOBALS['cfg_flags'], '|htmlrun|') > 0) {
        $isWebRunHtml = true;
    } else {
        $isWebRunHtml = false;
    }
    $c = $c . '<?xml version="1.0" encoding="UTF-8"?>' . vbCrlf();
    $c = $c . vbTab() . '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' . vbCrlf();
    //栏目
    $rsxObj = $GLOBALS['conn']->query('select * from ' . $GLOBALS['db_PREFIX'] . 'webcolumn where isonhtml<>0 order by sortrank asc');
    while ($rsx = $GLOBALS['conn']->fetch_array($rsxObj)) {
        if ($rsx['nofollow'] == false) {
            $c = $c . copyStr(vbTab(), 2) . '<url>' . vbCrlf();
            if ($isWebRunHtml == true) {
                $url = getRsUrl($rsx['filename'], $rsx['customaurl'], '/nav' . $rsx['id']);
                $url = handleAction($url);
            } else {
                $url = escape('?act=nav&columnName=' . $rsx['columnname']);
            }
            $url = urlAddHttpUrl($GLOBALS['cfg_webSiteUrl'], $url);
            //call echo(cfg_webSiteUrl,url)
            $c = $c . copyStr(vbTab(), 3) . '<loc>' . $url . '</loc>' . vbCrlf();
            $c = $c . copyStr(vbTab(), 3) . '<lastmod>' . Format_Time($rsx['updatetime'], 2) . '</lastmod>' . vbCrlf();
            $c = $c . copyStr(vbTab(), 3) . '<changefreq>' . $changefreg . '</changefreq>' . vbCrlf();
            $c = $c . copyStr(vbTab(), 3) . '<priority>' . $priority . '</priority>' . vbCrlf();
            $c = $c . copyStr(vbTab(), 2) . '</url>' . vbCrlf();
            aspEcho('栏目', '<a href="' . $url . '" target=\'_blank\'>' . $url . '</a>');
        }
    }
    //文章
    $rsxObj = $GLOBALS['conn']->query('select * from ' . $GLOBALS['db_PREFIX'] . 'articledetail  where isonhtml<>0 order by sortrank asc');
    while ($rsx = $GLOBALS['conn']->fetch_array($rsxObj)) {
        if ($rsx['nofollow'] == false) {
            $c = $c . copyStr(vbTab(), 2) . '<url>' . vbCrlf();
            if ($isWebRunHtml == true) {
                $url = getRsUrl($rsx['filename'], $rsx['customaurl'], '/detail/detail' . $rsx['id']);
                $url = handleAction($url);
            } else {
                $url = '?act=detail&id=' . $rsx['id'];
            }
            $url = urlAddHttpUrl($GLOBALS['cfg_webSiteUrl'], $url);
            //call echo(cfg_webSiteUrl,url)
            $c = $c . copyStr(vbTab(), 3) . '<loc>' . $url . '</loc>' . vbCrlf();
            $c = $c . copyStr(vbTab(), 3) . '<lastmod>' . Format_Time($rsx['updatetime'], 2) . '</lastmod>' . vbCrlf();
            $c = $c . copyStr(vbTab(), 3) . '<changefreq>' . $changefreg . '</changefreq>' . vbCrlf();
            $c = $c . copyStr(vbTab(), 3) . '<priority>' . $priority . '</priority>' . vbCrlf();
            $c = $c . copyStr(vbTab(), 2) . '</url>' . vbCrlf();
            aspEcho('文章', '<a href="' . $url . '">' . $url . '</a>');
        }
    }
    //单页
    $rsxObj = $GLOBALS['conn']->query('select * from ' . $GLOBALS['db_PREFIX'] . 'onepage where isonhtml<>0 order by sortrank asc');
    while ($rsx = $GLOBALS['conn']->fetch_array($rsxObj)) {
        if ($rsx['nofollow'] == false) {
            $c = $c . copyStr(vbTab(), 2) . '<url>' . vbCrlf();
            if ($isWebRunHtml == true) {
                $url = getRsUrl($rsx['filename'], $rsx['customaurl'], '/page/detail' . $rsx['id']);
                $url = handleAction($url);
            } else {
                $url = '?act=onepage&id=' . $rsx['id'];
            }
            $url = urlAddHttpUrl($GLOBALS['cfg_webSiteUrl'], $url);
            //call echo(cfg_webSiteUrl,url)
            $c = $c . copyStr(vbTab(), 3) . '<loc>' . $url . '</loc>' . vbCrlf();
            $c = $c . copyStr(vbTab(), 3) . '<lastmod>' . Format_Time($rsx['updatetime'], 2) . '</lastmod>' . vbCrlf();
            $c = $c . copyStr(vbTab(), 3) . '<changefreq>' . $changefreg . '</changefreq>' . vbCrlf();
            $c = $c . copyStr(vbTab(), 3) . '<priority>' . $priority . '</priority>' . vbCrlf();
            $c = $c . copyStr(vbTab(), 2) . '</url>' . vbCrlf();
            aspEcho('单页', '<a href="' . $url . '">' . $url . '</a>');
        }
    }
    $c = $c . vbTab() . '</urlset>' . vbCrlf();
    loadWebConfig();
    createFile('sitemap.xml', $c);
    aspEcho('生成sitemap.xml文件成功', '<a href=\'/sitemap.xml\' target=\'_blank\'>点击预览sitemap.xml</a>');
    //判断是否生成sitemap.html
    if (@$_REQUEST['issitemaphtml'] == '1') {
        $c = '';
        //第二种
        //栏目
        $rsxObj = $GLOBALS['conn']->query('select * from ' . $GLOBALS['db_PREFIX'] . 'webcolumn order by sortrank asc');
        while ($rsx = $GLOBALS['conn']->fetch_array($rsxObj)) {
            if ($rsx['nofollow'] == false) {
                if ($isWebRunHtml == true) {
                    $url = getRsUrl($rsx['filename'], $rsx['customaurl'], '/nav' . $rsx['id']);
                    $url = handleAction($url);
                } else {
                    $url = escape('?act=nav&columnName=' . $rsx['columnname']);
                }
                $url = urlAddHttpUrl($GLOBALS['cfg_webSiteUrl'], $url);
                //判断是否生成html
                if ($rsx['isonhtml'] == true) {
                    $s = '<a href="' . $url . '">' . $rsx['columnname'] . '</a>';
                } else {
                    $s = '<span>' . $rsx['columnname'] . '</span>';
                }
                $c = $c . '<li style="width:20%;">' . $s . vbCrlf() . '<ul>' . vbCrlf();
                //文章
                $rssObj = $GLOBALS['conn']->query('select * from ' . $GLOBALS['db_PREFIX'] . 'articledetail where parentId=' . $rsx['id'] . ' order by sortrank asc');
                while ($rss = $GLOBALS['conn']->fetch_array($rssObj)) {
                    if ($rss['nofollow'] == false) {
                        if ($isWebRunHtml == true) {
                            $url = getRsUrl($rss['filename'], $rss['customaurl'], '/detail/detail' . $rss['id']);
                            $url = handleAction($url);
                        } else {
                            $url = '?act=detail&id=' . $rss['id'];
                        }
                        $url = urlAddHttpUrl($GLOBALS['cfg_webSiteUrl'], $url);
                        //判断是否生成html
                        if ($rss['isonhtml'] == true) {
                            $s = '<a href="' . $url . '">' . $rss['title'] . '</a>';
                        } else {
                            $s = '<span>' . $rss['title'] . '</span>';
                        }
                        $c = $c . '<li style="width:20%;">' . $s . '</li>' . vbCrlf();
                    }
                }
                $c = $c . '</ul>' . vbCrlf() . '</li>' . vbCrlf();
            }
        }
        //单面
        $c = $c . '<li style="width:20%;"><a href="javascript:;">单面列表</a>' . vbCrlf() . '<ul>' . vbCrlf();
        $rsxObj = $GLOBALS['conn']->query('select * from ' . $GLOBALS['db_PREFIX'] . 'onepage order by sortrank asc');
        while ($rsx = $GLOBALS['conn']->fetch_array($rsxObj)) {
            if ($rsx['nofollow'] == false) {
                $c = $c . copyStr(vbTab(), 2) . '<url>' . vbCrlf();
                if ($isWebRunHtml == true) {
                    $url = getRsUrl($rsx['filename'], $rsx['customaurl'], '/page/detail' . $rsx['id']);
                    $url = handleAction($url);
                } else {
                    $url = '?act=onepage&id=' . $rsx['id'];
                }
                //判断是否生成html
                if ($rsx['isonhtml'] == true) {
                    $s = '<a href="' . $url . '">' . $rsx['title'] . '</a>';
                } else {
                    $s = '<span>' . $rsx['title'] . '</span>';
                }
                $c = $c . '<li style="width:20%;">' . $s . '</li>' . vbCrlf();
                // target=""_blank""  去掉
            }
        }
        $c = $c . '</ul>' . vbCrlf() . '</li>' . vbCrlf();
        $templateContent = '';
        $templateContent = getFText($GLOBALS['adminDir'] . '/template_SiteMap.html');
        $templateContent = replace($templateContent, '{$content$}', $c);
        $templateContent = replace($templateContent, '{$Web_Title$}', $GLOBALS['cfg_webTitle']);
        createFile('sitemap.html', $templateContent);
        aspEcho('生成sitemap.html文件成功', '<a href=\'/sitemap.html\' target=\'_blank\'>点击预览sitemap.html</a>');
    }
    writeSystemLog('', '保存sitemap.xml');
    //系统日志
}
Beispiel #27
0
function removeBlankLines($content)
{
    $s = '';
    $c = '';
    $splStr = '';
    $splStr = aspSplit($content, vbCrlf());
    foreach ($splStr as $key => $s) {
        if (replace(replace($s, vbTab(), ''), ' ', '') != '') {
            if ($c != '') {
                $c = $c . vbCrlf();
            }
            $c = $c . $s;
        }
    }
    $removeBlankLines = $c;
    return @$removeBlankLines;
}
Beispiel #28
0
function handleHtmlStyle($content)
{
    $serchS = '';
    $replaceS = '';
    $nLength = '';
    $serchS = $content;
    $nLength = inStr(lCase($serchS), '</style>') + 7;
    $serchS = mid($serchS, 1, $nLength);
    $nLength = inStrRev(lCase($serchS), '<style');
    if ($nLength > 0) {
        $serchS = mid($serchS, $nLength, -1);
    }
    $replaceS = $serchS;
    $replaceS = cssCompression($replaceS, 0) . vbCrlf();
    //格式化CSS
    $replaceS = removeBlankLines($replaceS);
    $content = replace($content, $serchS, $replaceS);
    $handleHtmlStyle = $content;
    return @$handleHtmlStyle;
}
Beispiel #29
0
function handleDifferenceWebSiteList($httpurl, $urllist)
{
    $website = '';
    $splstr = '';
    $url = '';
    $c = '';
    $urlWebsite = '';
    $websiteList = '';
    $website = lCase(getWebSite($httpurl));
    $splstr = aspSplit($urllist, vbCrlf());
    foreach ($splstr as $key => $url) {
        $urlWebsite = lCase(getWebSite($url));
        if ($urlWebsite != '' && $website != $urlWebsite && inStr(vbCrlf() . $websiteList . vbCrlf(), vbCrlf() . $urlWebsite . vbCrlf()) == false) {
            $websiteList = $websiteList . $urlWebsite . vbCrlf();
        }
    }
    $handleDifferenceWebSiteList = $websiteList;
    return @$handleDifferenceWebSiteList;
}
Beispiel #30
0
function displayTemplatesList($content)
{
    $templatesFolder = '';
    $templatePath = '';
    $templatePath2 = '';
    $templateName = '';
    $defaultList = '';
    $folderList = '';
    $splStr = '';
    $s = '';
    $c = '';
    $s1 = '';
    $s2 = '';
    $s3 = '';
    $splTemplatesFolder = '';
    //加载网址配置
    loadWebConfig();
    $defaultList = getStrCut($content, '[list]', '[/list]', 2);
    $splTemplatesFolder = aspSplit('/Templates/|/Templates2015/|/Templates2016/', '|');
    foreach ($splTemplatesFolder as $key => $templatesFolder) {
        if ($templatesFolder != '') {
            $folderList = getDirFolderNameList($templatesFolder);
            $splStr = aspSplit($folderList, vbCrlf());
            foreach ($splStr as $key => $templateName) {
                if ($templateName != '' && inStr('#_', left($templateName, 1)) == false) {
                    $templatePath = $templatesFolder . $templateName;
                    $templatePath2 = $templatePath;
                    $s = $defaultList;
                    $s1 = getStrCut($content, '<!--启用 start-->', '<!--启用 end-->', 2);
                    $s2 = getStrCut($content, '<!--恢复数据 start-->', '<!--恢复数据 end-->', 2);
                    $s3 = getStrCut($content, '<!--删除模板 start-->', '<!--删除模板 end-->', 2);
                    if (lCase($GLOBALS['cfg_webtemplate']) == lCase($templatePath)) {
                        $templateName = '<font color=red>' . $templateName . '</font>';
                        $templatePath2 = '<font color=red>' . $templatePath2 . '</font>';
                        $s = replace(replace($s, $s1, ''), $s3, '');
                    } else {
                        $s = replace($s, $s2, '');
                    }
                    $s = replaceValueParam($s, 'templatename', $templateName);
                    $s = replaceValueParam($s, 'templatepath', $templatePath);
                    $s = replaceValueParam($s, 'templatepath2', $templatePath2);
                    $c = $c . $s . vbCrlf();
                }
            }
        }
    }
    $content = replace($content, '[list]' . $defaultList . '[/list]', $c);
    $displayTemplatesList = $content;
    return @$displayTemplatesList;
}