Beispiel #1
0
function getFormFieldList()
{
    $s = '';
    $c = '';
    $splstr = '';
    $fieldName = '';
    $splstr = aspSplit(@$_POST, '&');
    foreach ($splstr as $key => $s) {
        $fieldName = lCase(mid($s, 1, inStr($s, '=') - 1));
        if ($c != '') {
            $c = $c . '|';
        }
        $c = $c . $fieldName;
    }
    $getFormFieldList = $c;
    return @$getFormFieldList;
}
Beispiel #2
0
function upperCaseORLowerCase($content)
{
    $i = '';
    $s = '';
    $c = '';
    $nRnd = '';
    $c = '';
    for ($i = 1; $i <= len($content); $i++) {
        $s = mid($content, $i, 1);
        $nRnd = CInt(rnd() * 1);
        if ($nRnd == 0) {
            $c = $c . lCase($s);
        } else {
            $c = $c . uCase($s);
        }
    }
    $upperCaseORLowerCase = $c;
    return @$upperCaseORLowerCase;
}
Beispiel #3
0
function seo($s, $id)
{
    /* ************************************************ **
     ** Neden bilmiyorum, regex'ten hiç hazzetmiyorum... **
     ** ************************************************ */
    $tr = array('ş', 'Ş', 'ı', 'İ', 'ğ', 'Ğ', 'ü', 'Ü', 'ö', 'Ö', 'ç', 'Ç');
    $en = array('s', 's', 'i', 'i', 'g', 'g', 'u', 'u', 'o', 'o', 'c', 'c');
    $s = str_replace($tr, $en, $s);
    $s = strtolower($s);
    $s = charReplace($s);
    $s = lCase($s);
    $s = str_replace("--", "-", $s);
    $s = trim($s, '-');
    /* Belirlenen URL kullanımda mı? */
    global $db;
    $kntr = 0;
    while ($hoy = current($db->query("SELECT id FROM makaleler WHERE url = '" . $s . ($kntr ? '-' . $kntr : '') . "' AND id <> {$id}")->fetch_row())) {
        $kntr++;
    }
    // Ürkütücü
    return $s . ($kntr ? '-' . $kntr : '');
}
Beispiel #4
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;
}
Beispiel #5
0
function handleCssPX($nValue)
{
    $nValue = lCase(aspTrim($nValue));
    if (right($nValue, 1) != '%' && right($nValue, 2) != 'px') {
        $nValue = $nValue . 'px';
    }
    $handleCssPX = $nValue;
    return @$handleCssPX;
}
function htmlAddAction($content, $jsAction)
{
    $s = '';
    $startStr = '';
    $endStr = '';
    $isHandle = '';
    $lableName = '';
    $s = $content;
    $s = PHPTrim($s);
    $startStr = mid($s, 1, inStr($s, ' '));
    $endStr = '>';
    $isHandle = true;
    $lableName = aspTrim(lCase(replace($startStr, '<', '')));
    if (inStr($s, $startStr) == false || inStr($s, $endStr) == false || inStr('|a|div|span|font|h1|h2|h3|h4|h5|h6|dt|dd|dl|li|ul|table|tr|td|', '|' . $lableName . '|') == false) {
        $isHandle = false;
    }
    if ($isHandle == true) {
        $content = $startStr . $jsAction . right($s, len($s) - len($startStr));
    }
    $htmlAddAction = $content;
    return @$htmlAddAction;
}
Beispiel #7
0
function replaceOneNOLU($content, $SearchStr, $replaceStr)
{
    $LeftStr = '';
    $RightStr = '';
    $LCaseContent = '';
    $SearchStr = lCase($SearchStr);
    $LCaseContent = lCase($content);
    if (inStr($LCaseContent, $SearchStr) > 0) {
        $LeftStr = mid($content, 1, inStr($LCaseContent, $SearchStr) - 1);
        $RightStr = mid($content, len($LeftStr) + len($SearchStr) + 1, -1);
        $content = $LeftStr . $replaceStr . $RightStr;
    }
    $replaceOneNOLU = $content;
    return @$replaceOneNOLU;
}
Beispiel #8
0
function getRParam($content, $lableStr)
{
    $contentLCase = '';
    $endS = '';
    $i = '';
    $s = '';
    $c = '';
    $isStart = '';
    $startStr = '';
    $isValue = '';
    $content = ' ' . $content . ' ';
    //避免更精准获得值
    $contentLCase = lCase($content);
    $lableStr = lCase($lableStr);
    $endS = mid($content, inStr($contentLCase, $lableStr) + len($lableStr), -1);
    //call echo("ends",ends)
    $isStart = false;
    //是否有开始类型值
    $isValue = false;
    //是否有值
    for ($i = 1; $i <= len($endS); $i++) {
        $s = mid($endS, $i, 1);
        if ($isStart == true) {
            if ($s != '') {
                if ($startStr == '') {
                    $startStr = $s;
                } else {
                    if ($startStr == '"' || $startStr == '\'') {
                        if ($s == $startStr) {
                            $isValue = true;
                            break;
                        }
                    } else {
                        if ($s == ' ' && $c == '') {
                        } else {
                            if ($s == ' ' || $s == '/' || $s == '>') {
                                $isValue = true;
                                break;
                            }
                        }
                    }
                    if ($s != ' ') {
                        $c = $c . $s;
                    }
                }
            }
        }
        if ($s == '=') {
            $isStart = true;
        }
    }
    if ($isValue == false) {
        $c = '';
    }
    $getRParam = $c;
    //call echo("c",c)
    return @$getRParam;
}
Beispiel #9
0
function jsCodeConfusion($content)
{
    $splStr = '';
    $i = '';
    $YesJs = '';
    $YesWord = '';
    $Sx = '';
    $s = '';
    $Wc = '';
    $Zc = '';
    $s1 = '';
    $AspCode = '';
    $SYHCount = '';
    $UpWord = '';
    $UpWordn = '';
    $tempS = '';
    $DimList = '';
    $YesFunction = '';
    //函数是否为真
    $StartFunction = '';
    //开始函数 目的是为了让function default 处理函数后面没有()   20150218
    $StartFunction = false;
    //默认开始函数为假
    //If nType="" Then  nType  = 0
    $yesJs = false;
    //是ASP 默认为假
    $YesFunction = false;
    //是函数 默认为假
    $YesWord = false;
    //是单词 默认为假
    $SYHCount = 0;
    //双引号默认为0
    $splStr = aspSplit($content, vbCrlf());
    //分割行
    $wcType = '';
    //输入文本类型,如 " 或 '
    $isAddToSYH = '';
    //是否累加双引号
    $beforeStr = '';
    $afterStr = '';
    $endCode = '';
    $nSYHCount = '';
    //循环分行
    foreach ($splStr as $key => $s) {
        //循环每个字符
        for ($i = 1; $i <= len($s); $i++) {
            $Sx = mid($s, $i, 1);
            //Asp开始
            if ($Sx == '<' && $Wc == '') {
                //输出文本必需为空 Wc为输出内容 如"<%" 排除 修改于20140412
                if (mid($s, $i + 1, 6) == 'script') {
                    $yesJs = true;
                    //ASP为真
                    $i = $i + 1;
                    //加1而不能加2,要不然<%function Test() 就截取不到
                    $Sx = mid($s, $i, 1);
                    $AspCode = $AspCode . '<';
                }
                //ASP结束
            } else {
                if ($Sx == '<' && mid($s, $i + 1, 8) == '/script>' && $Wc == '') {
                    //Wc为输出内容
                    $yesJs = false;
                    //ASP为假
                    $i = $i + 1;
                    //不能加2,只能加1,因为这里定义ASP为假,它会在下一次显示上面的 'ASP运行为假
                    $Sx = mid($s, $i, 8);
                    $AspCode = $AspCode . '/script>';
                }
            }
            if ($yesJs == true) {
                $beforeStr = right(replace(mid($s, 1, $i - 1), ' ', ''), 1);
                //上一个字符
                $afterStr = left(replace(mid($s, $i + 1, -1), ' ', ''), 1);
                //下一个字符
                $endCode = mid($s, $i + 1, -1);
                //当前字符往后面代码 一行
                //输入文本
                if ($sx == '"' || $sx == '\'' && $wcType == '' || $sx == $wcType || $wc != '') {
                    $isAddToSYH = true;
                    //这是一种简单的方法,等完善(20150914)
                    if ($isAddToSYH == true && $beforeStr == '\\') {
                        if (len($wc) >= 1) {
                            if (isStrTransferred($wc) == true) {
                                //为转义字符为真
                                //call echo(wc,isStrTransferred(wc))
                                $isAddToSYH = false;
                            }
                        } else {
                            $isAddToSYH = false;
                        }
                        //call echo(wc,isAddToSYH)
                    }
                    if ($wc == '') {
                        $wcType = $sx;
                    }
                    //双引号累加
                    if ($sx == $wcType && $isAddToSYH == true) {
                        $nSYHCount = $nSYHCount + 1;
                    }
                    //排除上一个字符为\这个转义字符(20150914)
                    //判断是否"在最后
                    if ($nSYHCount % 2 == 0 && $beforeStr != '\\') {
                        if (mid($s, $i + 1, 1) != $wcType) {
                            $wc = $wc . $sx;
                            $AspCode = $AspCode . $wc;
                            //行代码累加
                            //call echo("wc",wc)
                            $nSYHCount = 0;
                            $wc = '';
                            //清除
                            $wcType = '';
                        } else {
                            $wc = $wc . $sx;
                        }
                    } else {
                        $wc = $wc . $sx;
                    }
                } else {
                    if ($Sx == '\'') {
                        //注释则退出
                        $AspCode = $AspCode . mid($s, $i, -1);
                        break;
                        //字母
                    } else {
                        if (checkABC($Sx) == true || $Sx == '_' && $Zc != '' || $Zc != '') {
                            $Zc = $Zc . $Sx;
                            $s1 = lCase(mid($s . ' ', $i + 1, 1));
                            if (inStr('abcdefghijklmnopqrstuvwxyz0123456789', $s1) == 0 && ($s1 == '_' && $Zc != '')) {
                                //最简单判断
                                $tempS = mid($s, $i + 1, -1);
                                if (inStr('|function|sub|', '|' . lCase($Zc) . '|')) {
                                    //函数开始
                                    if ($YesFunction == false && lCase($UpWord) != 'end') {
                                        $YesFunction = true;
                                        $DimList = getFunDimName($tempS);
                                        $StartFunction = true;
                                    } else {
                                        if ($YesFunction == true && lCase($UpWord) == 'end') {
                                            //获得上一个单词
                                            $YesFunction = false;
                                        }
                                    }
                                } else {
                                    if ($YesFunction == true && lCase($Zc) == 'var') {
                                        $DimList = $DimList . ',' . getVarName($tempS);
                                    } else {
                                        if ($YesFunction == true) {
                                            //排除函数后面每一个名称
                                            if ($StartFunction == false) {
                                                $Zc = replaceDim2($DimList, $Zc);
                                            }
                                            $StartFunction = false;
                                        }
                                    }
                                }
                                $UpWord = $Zc;
                                //记住当前单词
                                $AspCode = $AspCode . $Zc;
                                $Zc = '';
                            }
                        } else {
                            $AspCode = $AspCode . $Sx;
                        }
                    }
                }
            } else {
                $AspCode = $AspCode . $Sx;
            }
            doEvents();
        }
        $AspCode = aspRTrim($AspCode);
        //去除右边空格
        $AspCode = $AspCode . vbCrlf();
        //Asp换行
        doEvents();
    }
    $jsCodeConfusion = $AspCode;
    return @$jsCodeConfusion;
}
Beispiel #10
0
function checkHtmlFormatting($content)
{
    $splStr = '';
    $s = '';
    $c = '';
    $splxx = '';
    $nLable = '';
    $lableStr = '';
    $content = lCase($content);
    $splStr = aspSplit('ul|li|dt|dd|dl|div|span', '|');
    foreach ($splStr as $key => $s) {
        $s = PHPTrim($s);
        if ($s != '') {
            $nLable = 0;
            $lableStr = '<' . $s . ' ';
            if (inStr($content, $lableStr) > 0) {
                $splxx = aspSplit($content, $lableStr);
                $nLable = $nLable + uBound($splxx);
            }
            $lableStr = '<' . $s . '>';
            if (inStr($content, $lableStr) > 0) {
                $splxx = aspSplit($content, $lableStr);
                $nLable = $nLable + uBound($splxx);
            }
            $lableStr = '</' . $s . '>';
            if (inStr($content, $lableStr) > 0) {
                $splxx = aspSplit($content, $lableStr);
                $nLable = $nLable - uBound($splxx);
            }
            //call echo(ShowHtml(lableStr),nLable)
            if ($nLable != 0) {
                $checkHtmlFormatting = false;
                return @$checkHtmlFormatting;
            }
        }
    }
    $checkHtmlFormatting = true;
    return @$checkHtmlFormatting;
}
Beispiel #11
0
function cutStrNOLU($content, $startStr, $endStr)
{
    $s = '';
    $LCaseContent = '';
    $nStartLen = '';
    $nEndLen = '';
    $NewStartStr = '';
    $startStr = lCase($startStr);
    $endStr = lCase($endStr);
    $LCaseContent = lCase($content);
    if (inStr($LCaseContent, $startStr) > 0) {
        $nStartLen = inStr($LCaseContent, $startStr);
        $s = mid($content, $nStartLen, -1);
        $LCaseContent = mid($s, len($startStr) + 1, -1);
        $NewStartStr = mid($s, 1, len($startStr) + 1);
        //获得开始字符
        $LCaseContent = replace($LCaseContent, '<', '&lt;');
        //Call eerr("111",LCaseContent)
        $nEndLen = inStr($LCaseContent, $endStr);
        aspEcho('nEndLen', $nEndLen);
        $s = mid($content, $nStartLen, $nEndLen + len($startStr));
        //Call Echo(nStartLen,nEndLen)
        //Call Echo("S",S)
        $cutStrNOLU = $s;
    }
    return @$cutStrNOLU;
}
Beispiel #12
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 #13
0
function inputTextArea($textName, $valueStr, $width, $height, $helpStr)
{
    $Css = '';
    $HeightStr = '';
    $width = aspTrim(lCase($width));
    if ($width != '') {
        if (right($width, 1) != '%' && right($width, 2) != 'px') {
            $width = $width . 'px';
        }
        $Css = ' style=\'width:' . $width . ';\'';
    }
    if ($height != '') {
        if (checkNumber($height)) {
            //自动加个px像素
            $height = $height . 'px';
        }
        $HeightStr = 'height:' . $height . ';';
        if ($Css != '') {
            $Css = replace($Css, ';\'', ';' . $HeightStr . ';\'');
        } else {
            $Css = ' style=\'height:' . $height . ';\'';
        }
    }
    $Css = replace($Css, ';;', ';');
    //去掉多余的值
    $inputTextArea = '<textarea name="' . $textName . '" type="text" id="' . $textName . '"' . $Css . '>' . $valueStr . '</textarea>' . $helpStr;
    return @$inputTextArea;
}
Beispiel #14
0
function addEditFile($dir, $fileName)
{
    $filePath = '';
    $promptMsg = '';
    if (right(lCase($fileName), 5) != '.html' && @$_SESSION['adminusername'] != 'ASPPHPCMS') {
        $fileName = $fileName . '.html';
    }
    $filePath = $dir . '/' . $fileName;
    if (CheckFile($filePath) == false) {
        handlePower('添加模板文件');
        //管理权限处理
    } else {
        handlePower('修改模板文件');
        //管理权限处理
    }
    //保存内容
    if (@$_REQUEST['issave'] == 'true') {
        createFile($filePath, @$_REQUEST['content']);
        $promptMsg = '保存成功';
    }
    ?>
    <form name="form1" method="post" action="?act=addEditFile&issave=true">
    <table width="99%" border="0" cellspacing="0" cellpadding="0" class="tableline">
    <tr>
    <td height="30">目录<?php 
    echo $dir;
    ?>
<br>
    <input name="dir" type="hidden" id="dir" value="<?php 
    echo $dir;
    ?>
" /></td>
    </tr>
    <tr>
    <td>文件名称
    <input name="fileName" type="text" id="fileName" value="<?php 
    echo $fileName;
    ?>
" size="40">&nbsp;<input type="submit" name="button" id="button" value=" 保存 " /><?php 
    echo $promptMsg;
    ?>
    <br>
    <textarea name="content" style="width:99%;height:480px;"id="content"><?php 
    Rw(getFText($filePath));
    ?>
</textarea></td>
    </tr>
    </table>
    </form>
    <?php 
}
Beispiel #15
0
function getStrFileType($fileName)
{
    $c = '';
    $c = '';
    if (inStr($fileName, '.') > 0) {
        $c = lCase(mid($fileName, inStrRev($fileName, '.') + 1, -1));
        if (inStr($c, '?') > 0) {
            $c = mid($c, 1, inStr($c, '?') - 1);
        }
    }
    $getStrFileType = $c;
    return @$getStrFileType;
}
Beispiel #16
0
function XY_handleGetTableBody($action, $tableName, $fieldParamName, $defaultFileName, $adminUrl)
{
    $url = '';
    $content = '';
    $id = '';
    $sql = '';
    $addSql = '';
    $fieldName = '';
    $fieldParamValue = '';
    $fieldNameList = '';
    $nLen = '';
    $delHtmlYes = '';
    $trimYes = '';
    $defaultStr = '';
    $noisonhtml = '';
    $intoFieldStr = '';
    $valuesStr = '';
    $nonull = '';
    $fieldName = RParam($action, 'fieldname');
    //字段名称
    $noisonhtml = RParam($action, 'noisonhtml');
    //不生成html
    $nonull = RParam($action, 'noisonhtml');
    //内容不能为空20160716 home
    if ($noisonhtml == 'true') {
        $intoFieldStr = ',isonhtml';
        $valuesStr = ',0';
    }
    $fieldNameList = getHandleFieldList($GLOBALS['db_PREFIX'] . $tableName, '字段列表');
    //字段名称不为空,并且要在表字段里
    if ($fieldName == '' || inStr($fieldNameList, ',' . $fieldName . ',') == false) {
        $fieldName = $defaultFileName;
    }
    $fieldName = lCase($fieldName);
    //转为小写,因为在PHP里是全小写的
    $fieldParamValue = RParam($action, $fieldParamName);
    //截取字段内容
    $id = handleNumber(RParam($action, 'id'));
    //获得ID
    $addSql = ' where ' . $fieldParamName . '=\'' . $fieldParamValue . '\'';
    if ($id != '') {
        $addSql = ' where id=' . $id;
    }
    $content = getDefaultValue($action);
    $defaultStr = $content;
    //获得默认内容
    $sql = 'select * from ' . $GLOBALS['db_PREFIX'] . $tableName . $addSql;
    $rsObj = $GLOBALS['conn']->query($sql);
    if (@mysql_num_rows($rsObj) == 0) {
        $rs = mysql_fetch_array($rsObj);
        //自动添加 20160113
        if (RParam($action, 'autoadd') == 'true') {
            connexecute('insert into ' . $GLOBALS['db_PREFIX'] . $tableName . ' (' . $fieldParamName . ',' . $fieldName . $intoFieldStr . ') values(\'' . $fieldParamValue . '\',\'' . ADSql($content) . '\'' . $valuesStr . ')');
        }
    } else {
        $id = $rs['id'];
        $content = $rs[$fieldName];
        if (len($content) <= 0) {
            $content = $defaultStr;
            connexecute('update ' . $GLOBALS['db_PREFIX'] . $tableName . ' set ' . $fieldName . '=\'' . $content . '\' where id=' . $rs['id']);
        }
    }
    //删除Html
    $delHtmlYes = RParam($action, 'delHtml');
    //是否删除Html
    if ($delHtmlYes == 'true') {
        $content = replace(delHtml($content), '<', '&lt;');
    }
    //HTML处理
    //删除两边空格
    $trimYes = RParam($action, 'trim');
    //是否删除两边空格
    if ($trimYes == 'true') {
        $content = TrimVbCrlf($content);
    }
    //截取字符处理
    $nLen = RParam($action, 'len');
    //字符长度值
    $nLen = handleNumber($nLen);
    //If nLen<>"" Then ReplaceStr = CutStr(ReplaceStr,nLen,"null")' Left(ReplaceStr,nLen)
    if ($nLen != '') {
        $content = CutStr($content, $nLen, '...');
    }
    //Left(ReplaceStr,nLen)
    if ($id == '') {
        $id = XY_AP_GetFieldValue('', $sql, 'id');
    }
    $url = $adminUrl . '&id=' . $id . '&n=' . getRnd(11);
    if (@$_REQUEST['gl'] == 'edit') {
        $content = '<span>' . $content . '</span>';
    }
    //call echo(sql,url)
    $content = handleDisplayOnlineEditDialog($url, $content, '', 'span');
    $XY_handleGetTableBody = $content;
    return @$XY_handleGetTableBody;
}
Beispiel #17
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 #18
0
function getRsUrl($fileName, $customAUrl, $defaultFileName)
{
    $url = '';
    //用默认文件名称
    if ($fileName == '') {
        $fileName = $defaultFileName;
    }
    //网址
    if ($fileName != '') {
        $fileName = lCase($fileName);
        //让文件名称小写20160315
        $url = $fileName;
        if (inStr(lCase($url), '.html') == false && right($url, 1) != '/') {
            $url = $url . '.html';
        }
    }
    if (aspTrim($customAUrl) != '') {
        $url = aspTrim($customAUrl);
    }
    if (inStr($GLOBALS['cfg_flags'], '|addwebsite|') > 0) {
        //url = replaceGlobleVariable(url)   '替换全局变量
        if (inStr($url, '$cfg_websiteurl$') == false && inStr($url, '{$GetColumnUrl ') == false && inStr($url, '{$GetArticleUrl ') == false && inStr($url, '{$GetOnePageUrl ') == false) {
            $url = urlAddHttpUrl($GLOBALS['cfg_webSiteUrl'], $url);
        }
    }
    $getRsUrl = $url;
    return @$getRsUrl;
}
Beispiel #19
0
function pinYin($content, $sType)
{
    $py = aspArray(402);
    $splStr = '';
    $en = '';
    $s = '';
    $c = '';
    $i = '';
    $j = '';
    $c2 = '';
    $C3 = '';
    $C4 = '';
    $En2 = '';
    $En3 = '';
    $En4 = '';
    $sType = cStr($sType);
    //ת���ַ�����
    $py[0] = '����߹����煁�H_a';
    $py[1] = '�������������������������������������������_ai';
    $py[2] = '�����������������������������������_an';
    $py[3] = '������_ang';
    $py[4] = '�������������°ð���������������������������_ao';
    $py[5] = '�ŰưǰȰɰʰ˰̰ͰΰϰаѰҰӰ԰հ���������������_ba';
    $py[6] = '�װذٰڰ۰ܰݰ�������_bai';
    $py[7] = '�߰������������������������_ban';
    $py[8] = '���������������������_bang';
    $py[9] = '�����������������������������������������������_bao';
    $py[10] = '�������������������������������������������������_bei';
    $py[11] = '���������������_ben';
    $py[12] = '�����±ñı����_beng';
    $py[13] = '�ƱDZȱɱʱ˱̱ͱαϱбѱұӱԱձֱױرٱڱ��ɱܱ�ذ����ݩ޵�����������������������������������������_bi';
    $py[14] = '�ޱ߱������������������������������������_bian';
    $py[15] = '�����������������������_biao';
    $py[16] = '�������_bie';
    $py[17] = '������������������������������_bin';
    $py[18] = '������������������������_bing';
    $py[19] = '���������������������������������������������������������_bo';
    $py[20] = '����������������������߲�����������_bu';
    $py[21] = '������_ca';
    $py[22] = '�²òIJŲƲDzȲɲʲ˲�_cai';
    $py[23] = '�ͲβϲвѲҲ����������_can';
    $py[24] = '�Բղֲײ�_cang';
    $py[25] = '�ٲڲ۲ܲ��������_cao';
    $py[26] = '�޲߲�����_ce';
    $py[27] = '��_cen';
    $py[28] = '�����_ceng';
    $py[29] = '�����������������������������_cha';
    $py[30] = '����٭�����_chai';
    $py[31] = '����������������������������������������������_chan';
    $py[32] = '�������������������������������������������������_chang';
    $py[33] = '��������������������������_chao';
    $py[34] = '���������������_che';
    $py[35] = '���������������³ó������������������_chen';
    $py[36] = '�ųƳdzȳɳʳ˳̳ͳγϳгѳҳ�ة�������������������_cheng';
    $py[37] = '�Գճֳ׳سٳڳ۳ܳݳ޳߳��������ܯ��߳��������������������������������_chi';
    $py[38] = '����������������_chong';
    $py[39] = '�������������ٱ������_chou';
    $py[40] = '��������������������������������ءۻ�������������������_chu';
    $py[41] = '�����������_chuai';
    $py[42] = '������������������������_chuan';
    $py[43] = '��������������_chuang';
    $py[44] = '��������������_chui';
    $py[45] = '��������������ݻ����_chun';
    $py[46] = '���������_chuo';
    $py[47] = '�ôĴŴƴǴȴɴʴ˴̴ʹ�����������_ci';
    $py[48] = '�ϴдѴҴӴ������������_cong';
    $py[49] = '������_cou';
    $py[50] = '�ִ״ش��������������_cu';
    $py[51] = '�ڴ۴���ߥ����_cuan';
    $py[52] = '�ݴ޴ߴ����������������_cui';
    $py[53] = '��������_cun';
    $py[54] = '����������������������_cuo';
    $py[55] = '��������������������������_da';
    $py[56] = '������������������������ܤ߰߾����������_dai';
    $py[57] = '������������������������������������������������_dan';
    $py[58] = '��������������������_dang';
    $py[59] = '������������������������߶�������_dao';
    $py[60] = '�µõ��_de';
    $py[61] = '�ŵƵǵȵɵʵ������������_deng';
    $py[62] = '�̵͵εϵеѵҵӵԵյֵ׵صٵڵ۵ܵݵ�ص��ڮ��ۡݶ��������������������_di';
    $py[63] = '��_dia';
    $py[64] = '�ߵ�������������������������������_dian';
    $py[65] = '��������������������_diao';
    $py[66] = '����������������ܦ�����������_die';
    $py[67] = '������������������������������������_ding';
    $py[68] = '����_diu';
    $py[69] = '����������������������������������_dong';
    $py[70] = '��������������������_dou';
    $py[71] = '�������������¶öĶŶƶǶȶɶ�ܶ�������������_du';
    $py[72] = '�˶̶Ͷζ϶������_duan';
    $py[73] = '�ѶҶӶ�������_dui';
    $py[74] = '�նֶ׶ضٶڶ۶ܶ������������_dun';
    $py[75] = '�޶߶�������������������������_duo';
    $py[76] = '����������������ج������ݭ����������������������_e';
    $py[77] = '��_ei';
    $py[78] = '������_en';
    $py[79] = '����������������٦���������_er';
    $py[80] = '��������������������_fa';
    $py[81] = '����������������������������������ެ����������_fan';
    $py[82] = '���������������·÷ķ�������������_fang';
    $py[83] = '�ƷǷȷɷʷ˷̷ͷηϷз�������������������������������_fei';
    $py[84] = '�ҷӷԷշַ׷طٷڷ۷ܷݷ޷߷����������_fen';
    $py[85] = '����������������ٺۺ�������_feng';
    $py[86] = '��_fo';
    $py[87] = '���_fou';
    $py[88] = '��������������������������������������������������������������������������������������������ۮܽ����ݳ����߻����������������������������������������������_fu';
    $py[89] = '����٤���������_ga';
    $py[90] = '�øĸŸƸǸ�ؤ�������_gai';
    $py[91] = '�ɸʸ˸̸͸θϸиѸҸ�������ߦ���������������_gan';
    $py[92] = '�Ըոָ׸ظٸڸ۸�����_gang';
    $py[93] = '�ݸ޸߸�������غھ۬޻��������_gao';
    $py[94] = '���������������������ت������ܪ������������������_ge';
    $py[95] = '��_gei';
    $py[96] = '����بݢ����_gen';
    $py[97] = '���������������������_geng';
    $py[98] = '�������������������������������������_gong';
    $py[99] = '��������������������ڸ������������������_gou';
    $py[100] = '�������������¹ùĹŹƹǹȹɹʹ˹̹���ڬ����������������������������������������_gu';
    $py[101] = '�ιϹйѹҹ���ڴ�����_gua';
    $py[102] = '�Թչ���_guai';
    $py[103] = '�׹عٹڹ۹ܹݹ޹߹����ݸ������������_guan';
    $py[104] = '������������_guang';
    $py[105] = '��������������������������������������_gui';
    $py[106] = '�������������_gun';
    $py[107] = '�������������������������������_guo';
    $py[108] = '����_ha';
    $py[109] = '��������������������_hai';
    $py[110] = '��������������������������������������������������������_han';
    $py[111] = '�����������_hang';
    $py[112] = '���������ºúĺź���޶����������_hao';
    $py[113] = '�ǺȺɺʺ˺̺ͺκϺкѺҺӺԺպֺ׺�ڭ���������������_he';
    $py[114] = '�ٺ�_hei';
    $py[115] = '�ۺܺݺ�_hen';
    $py[116] = '�ߺ����޿����_heng';
    $py[117] = '��������������ڧݦޮް����_hong';
    $py[118] = '��������ܩ��������������_hou';
    $py[119] = '������������������������������������������������������������������������������_hu';
    $py[120] = '�������������������������_hua';
    $py[121] = '������������_huai';
    $py[122] = '�������������������������»�ۨۼ��ߧ������������������_huan';
    $py[123] = '�ĻŻƻǻȻɻʻ˻̻ͻλϻл��������������������_huang';
    $py[124] = '�һӻԻջֻ׻ػٻڻۻܻݻ޻߻�������ڶ����ޥ����������������������_hui';
    $py[125] = '�������ڻ������_hun';
    $py[126] = '���������������޽߫������������_huo';
    $py[127] = '�����������������������������������������������������������������������������������¼üļżƼǼȼɼʼ˼̼�آؽ����٥��ڵ��ܸ������ު��ߴ�������������������������������������������������������_ji';
    $py[128] = '�μϼмѼҼӼԼռּ׼ؼټڼۼܼݼ�ۣ������������������������������_jia';
    $py[129] = '�߼�������������������������������������������������������������������������������������������������������������_jian';
    $py[130] = '������������������������������������������_jiang';
    $py[131] = '�������������������������½ýĽŽƽǽȽɽʽ˽̽ͽνϽн�ٮ��ܴ������������������������_jiao';
    $py[132] = '�ҽӽԽսֽ׽ؽٽڽ۽ܽݽ޽߽������������������������ڦ����������_jie';
    $py[133] = '�����������������������������������ݣ��������������������_jin';
    $py[134] = '��������������������������������������������������������ݼ������������������_jing';
    $py[135] = '��������_jiong';
    $py[136] = '���������¾þľžƾǾȾɾʾ˾̾;�����������������_jiu';
    $py[137] = '�ϾоѾҾӾԾվ־׾ؾپھ۾ܾݾ޾߾����������ڪ������������������������������������������_ju';
    $py[138] = '��������۲�������������_juan';
    $py[139] = '�����������������������ާ�����������������������_jue';
    $py[140] = '������������������������������_jun';
    $py[141] = '��������������_ka';
    $py[142] = '�������������������������_kai';
    $py[143] = '������������٩ݨ������_kan';
    $py[144] = '��������������������_kang';
    $py[145] = '����������������_kao';
    $py[146] = '�����¿ÿĿſƿǿȿɿʿ˿̿Ϳ������������������������������_ke';
    $py[147] = '�Ͽпѿ���_ken';
    $py[148] = '�ӿ��_keng';
    $py[149] = '�տֿ׿�������_kong';
    $py[150] = '�ٿڿۿ���ޢߵ����_kou';
    $py[151] = '�ݿ޿߿������ܥ����_ku';
    $py[152] = '������٨_kua';
    $py[153] = '�������ۦ������_kuai';
    $py[154] = '�����_kuan';
    $py[155] = '�����������ڲڿ��������������_kuang';
    $py[156] = '����������������������ظ���������������������������_kui';
    $py[157] = '��������������������_kun';
    $py[158] = '����������_kuo';
    $py[159] = '�����������������������_la';
    $py[160] = '�����������������������_lai';
    $py[161] = '����������������������������������������_lan';
    $py[162] = '��������������ݹ����������_lang';
    $py[163] = '���������������������������������_lao';
    $py[164] = '������߷����_le';
    $py[165] = '������������������������ڳ������������_lei';
    $py[166] = '������ܨ�_leng';
    $py[167] = '��������������������������������������������������������������������ٳٵ۪����ݰ��޼߿���������������������������������������������������������_li';
    $py[168] = '��_lia';
    $py[169] = '������������������������������������������������_lian';
    $py[170] = '����������������������ܮ�����_liang';
    $py[171] = '��������������������������ޤ������������_liao';
    $py[172] = '�������������������������_lie';
    $py[173] = '���������������������������������������������_lin';
    $py[174] = '������������������������������۹����������������������_ling';
    $py[175] = '��������������������������������������_liu';
    $py[176] = '����������¡¢£¤���������������_long';
    $py[177] = '¥¦§¨©ª�����������������_lou';
    $py[178] = '«¬­®¯°±²³´µ¶·¸¹º»¼½¾��ߣ����������������������������������_lu';
    $py[179] = '��������������������_luan';
    $py[180] = '����������������_lun';
    $py[181] = '�����������������������������������������������_luo';
    $py[182] = '¿�������������������������������������_lu';
    $py[183] = '�����_lue';
    $py[184] = '߼_m';
    $py[185] = '����������������������_ma';
    $py[186] = '������������۽ݤ����_mai';
    $py[187] = '����������������áܬ��������������_man';
    $py[188] = 'âãäåæç��������_mang';
    $py[189] = 'èéêëìíîïðñòó���������������������_mao';
    $py[190] = 'ô��_me';
    $py[191] = 'õö÷øùúûüýþÿ����������ݮ���������������_mei';
    $py[192] = '�������������_men';
    $py[193] = '��������������������ޫ��������������_meng';
    $py[194] = '����������������������������������������������������������_mi';
    $py[195] = '������������������������������_mian';
    $py[196] = '������������������������������_miao';
    $py[197] = '����ؿ�����_mie';
    $py[198] = '����������������������������_min';
    $py[199] = '������������ڤ���������_ming';
    $py[200] = '��_miu';
    $py[201] = '��ġĢģĤĥĦħĨĩĪīĬĭĮįİ�������������������������_mo';
    $py[202] = 'ıIJijٰ��������_mou';
    $py[203] = 'ĴĵĶķĸĹĺĻļĽľĿ�����������������_mu';
    $py[204] = '��_n';
    $py[205] = '����������������������_na';
    $py[206] = '����������ؾܵ����_nai';
    $py[207] = '����������������_nan';
    $py[208] = '��߭������_nang';
    $py[209] = '����������ث������������_nao';
    $py[210] = '��ګ_ne';
    $py[211] = '����_nei';
    $py[212] = '���_nen';
    $py[213] = '��_neng';
    $py[214] = '����������������������٣��������������_ni';
    $py[215] = '��������������إ���������_nian';
    $py[216] = '����_niang';
    $py[217] = '������������_niao';
    $py[218] = '������������������������_nie';
    $py[219] = '��_nin';
    $py[220] = '��������šŢ�������_ning';
    $py[221] = 'ţŤťŦ�����_niu';
    $py[222] = 'ŧŨũŪٯ��_nong';
    $py[223] = '��_nou';
    $py[224] = 'ūŬŭ��������_nu';
    $py[225] = 'ů_nuan';
    $py[226] = 'ŲųŴŵ�������_nuo';
    $py[227] = '�����_nu';
    $py[228] = 'Űű_nue';
    $py[229] = 'Ŷ��_o';
    $py[230] = 'ŷŸŹźŻżŽک�����_ou';
    $py[231] = 'žſ��������������_pa';
    $py[232] = '������������ٽ����_pai';
    $py[233] = '�����������������������������_pan';
    $py[234] = '���������������_pang';
    $py[235] = '������������������������_pao';
    $py[236] = '�����������������������������_pei';
    $py[237] = '������_pen';
    $py[238] = '����������������������������ܡ�����_peng';
    $py[239] = '����������������ơƢƣƤƥƦƧƨƩا������ۯ����ܱ��ߨ����������������������_pi';
    $py[240] = 'ƪƫƬƭ������������_pian';
    $py[241] = 'ƮƯưƱ������������_piao';
    $py[242] = 'ƲƳ���_pie';
    $py[243] = 'ƴƵƶƷƸ��������_pin';
    $py[244] = 'ƹƺƻƼƽƾƿ����ٷ�����_ping';
    $py[245] = '������������������۶����������_po';
    $py[246] = '������_pou';
    $py[247] = '���������������������������������������������_pu';
    $py[248] = '��������������������������������������������������������������������������ٹ��ܻ��ݽ����ޭ������������������������������������������膢_qi';
    $py[249] = '��ǡǢ����_qia';
    $py[250] = 'ǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴǵǶǷǸٻ����ܷ����ݡ���������������������_qian';
    $py[251] = 'ǹǺǻǼǽǾǿ������������������������_qiang';
    $py[252] = '��������������������������������ڽ����������������_qiao';
    $py[253] = '����������ۧ��������_qie';
    $py[254] = '������������������������������������������_qin';
    $py[255] = '����������������������������������������������_qing';
    $py[256] = '���������������_qiong';
    $py[257] = '����������������ٴ������������������������_qiu';
    $py[258] = '����������������ȡȢȣȤȥڰ۾ޡ޾������������������������_qu';
    $py[259] = 'ȦȧȨȩȪȫȬȭȮȯȰڹ�������������_quan';
    $py[260] = 'ȱȲȳȴȵȶȷȸ�����_que';
    $py[261] = 'ȹȺ��_qun';
    $py[262] = 'ȻȼȽȾ������_ran';
    $py[263] = 'ȿ�����������_rang';
    $py[264] = '�����������_rao';
    $py[265] = '����_re';
    $py[266] = '���������������������������������_ren';
    $py[267] = '����_reng';
    $py[268] = '��_ri';
    $py[269] = '������������������������������_rong';
    $py[270] = '������������_rou';
    $py[271] = '����ų����������������޸������������_ru';
    $py[272] = '������_ruan';
    $py[273] = '��������ި����_rui';
    $py[274] = '����_run';
    $py[275] = '����ټ��_ruo';
    $py[276] = '������ئ�������_sa';
    $py[277] = '����������_sai';
    $py[278] = '����ɡɢ�����_san';
    $py[279] = 'ɣɤɥ�����_sang';
    $py[280] = 'ɦɧɨɩܣ��������_sao';
    $py[281] = 'ɪɫɬ����_se';
    $py[282] = 'ɭ_sen';
    $py[283] = 'ɮ_seng';
    $py[284] = 'ɯɰɱɲɳɴɵɶɷ������������_sha';
    $py[285] = 'ɸɹ��_shai';
    $py[286] = 'ɺɻɼɽɾɿ��������������������ڨ۷������������������������_shan';
    $py[287] = '�������������������������_shang';
    $py[288] = '����������������������ۿ����������_shao';
    $py[289] = '�����������������������������������_she';
    $py[290] = '��������������������������������ڷ��ݷ�����������_shen';
    $py[291] = '������������ʡʢʣʤʥ��������_sheng';
    $py[292] = 'ʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼʽʾʿ����������������������������������������������ݪ��߱�������������������_shi';
    $py[293] = '�������������������������_shou';
    $py[294] = '����������������������������������������������������������������ˡٿ������������������_shu';
    $py[295] = 'ˢˣ�_shua';
    $py[296] = 'ˤ˥˦˧�_shuai';
    $py[297] = '˨˩����_shuan';
    $py[298] = '˪˫ˬ��_shuang';
    $py[299] = '˭ˮ˯˰_shui';
    $py[300] = '˱˲˳˴_shun';
    $py[301] = '˵˶˷˸����������_shuo';
    $py[302] = '˹˺˻˼˽˾˿������������������������������������������������_si';
    $py[303] = '����������������ڡݿ����������_song';
    $py[304] = '����������޴�������������_sou';
    $py[305] = '���������������������������������������_su';
    $py[306] = '�������_suan';
    $py[307] = '������������������������ݴ��������_sui';
    $py[308] = '������ݥ������_sun';
    $py[309] = '�����������������������������_suo';
    $py[310] = '����������̡̢̣̤�������������_ta';
    $py[311] = '̧̨̥̦̩̪̫̬̭ۢ޷����������_tai';
    $py[312] = '̴̵̶̷̸̮̯̰̱̲̳̹̺̻̼̽̾̿۰�������_tan';
    $py[313] = '�����������������������������������������������_tang';
    $py[314] = '����������������������ػ������_tao';
    $py[315] = '��߯����_te';
    $py[316] = '����������_teng';
    $py[317] = '���������������������������������������������_ti';
    $py[318] = '�������������������������_tian';
    $py[319] = '����������٬���������������_tiao';
    $py[320] = '����������_tie';
    $py[321] = '������ͣͤͥͦͧ͢͡������������_ting';
    $py[322] = 'ͨͩͪͫͬͭͮͯͰͱͲͳʹ١������������_tong';
    $py[323] = '͵Ͷͷ͸����_tou';
    $py[324] = '͹ͺͻͼͽ;Ϳ��������ܢݱ������_tu';
    $py[325] = '���������_tuan';
    $py[326] = '��������������_tui';
    $py[327] = '�������������_tun';
    $py[328] = '����������������������ر٢��������������������_tuo';
    $py[329] = '�������������������_wa';
    $py[330] = '������_wai';
    $py[331] = '������������������������������������ܹ������������_wan';
    $py[332] = '���������������������������_wang';
    $py[333] = '��Ρ΢ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξο������������ޱ�����������������������������_wei';
    $py[334] = '�����������������������������_wen';
    $py[335] = '��������޳_weng';
    $py[336] = '��������������������ݫ���������_wo';
    $py[337] = '����������������������������������������������������������أ����������������������������������������������_wu';
    $py[338] = '����������������������ϡϢϣϤϥϦϧϨϩϪϫϬϭϮϯϰϱϲϳϴϵ϶Ϸϸ������ۭݾ�������������������������������������������������������_xi';
    $py[339] = 'ϹϺϻϼϽϾϿ���������������������������_xia';
    $py[340] = '��������������������������������������������������������ݲ޺����������������������������_xian';
    $py[341] = '����������������������������������������ܼ��������������_xiang';
    $py[342] = '����������������������СТУФХЦЧ���������������������_xiao';
    $py[343] = 'ШЩЪЫЬЭЮЯабвгдежзийклм��������ޯߢ����������������_xie';
    $py[344] = 'ноп��������������ضܰ����_xin';
    $py[345] = '������������������������������������ߩ���_xing';
    $py[346] = '��������������ܺ_xiong';
    $py[347] = '��������������������������������_xiu';
    $py[348] = '��������������������������������������ڼ��ޣ���������������_xu';
    $py[349] = '������������ѡѢѣѤ������������������������������_xuan';
    $py[350] = 'ѥѦѧѨѩѪ�������_xue';
    $py[351] = 'ѫѬѭѮѯѰѱѲѳѴѵѶѷѸ������ަ޹���������������_xun';
    $py[352] = 'ѹѺѻѼѽѾѿ����������������������������������������_ya';
    $py[353] = '������������������������������������������������������������������������ٲ������۱۳ܾ�������������������������������������_yan';
    $py[354] = '������������������������������������������������_yang';
    $py[355] = '��������ҡҢңҤҥҦҧҨҩҪҫزسߺ�����������������������_yao';
    $py[356] = 'ҬҭҮүҰұҲҳҴҵҶҷҸҹҺ��������������_ye';
    $py[357] = 'һҼҽҾҿ������������������������������������������������������������������������������������������������������٫ڱ����ܲ��޲������߽߮����������������������������������������������������������_yi';
    $py[358] = '������������������������������ӡط۴��ܧ������������������_yin';
    $py[359] = 'ӢӣӤӥӦӧӨөӪӫӬӭӮӯӰӱӲӳ��۫��ݺ��������������������������_ying';
    $py[360] = 'Ӵ�_yo';
    $py[361] = 'ӵӶӷӸӹӺӻӼӽӾӿ��������ٸ��ܭ�����������_yong';
    $py[362] = '��������������������������������������������٧ݬݯݵ����������������������������_you';
    $py[363] = '������������������������������������������������������������������������������ԡԢԣԤԥԦخع��ٶ���������������������������������������������������������������������������_yu';
    $py[364] = 'ԧԨԩԪԫԬԭԮԯ԰ԱԲԳԴԵԶԷԸԹԺ��ܫ������������������_yuan';
    $py[365] = 'ԻԼԽԾԿ������������������_yue';
    $py[366] = '������������������������۩ܿ�����������_yun';
    $py[367] = '����������_za';
    $py[368] = '������������������_zai';
    $py[369] = '�������������������_zan';
    $py[370] = '�����������_zang';
    $py[371] = '������������������������������_zao';
    $py[372] = '�������������������������_ze';
    $py[373] = '��_zei';
    $py[374] = '����_zen';
    $py[375] = '����������������_zeng';
    $py[376] = '����������աբգդեզէըթ��߸������������_zha';
    $py[377] = 'ժ��իլխծկ���_zhai';
    $py[378] = 'հձղճմյնշոչպջռսվտ�������_zhan';
    $py[379] = '��������������������������������۵��������_zhang';
    $py[380] = '��������������������گ��������_zhao';
    $py[381] = '����������������������ߡ��������������_zhe';
    $py[382] = '���������������������������������������������������������_zhen';
    $py[383] = '����������������������֢֣֤֡ں��������_zheng';
    $py[384] = 'ְֱֲֳִֵֶַָֹֺֻּֽ֥֦֧֪֭֮֨֩֫֬֯־ֿ��������������������������������ش��ۤ�������������������������������������������������������������_zhi';
    $py[385] = '����������������������ڣ�������_zhong';
    $py[386] = '����������������������������ݧ������������_zhou';
    $py[387] = '��������������������������������������������סעףפ��٪ۥ����������������������������������_zhu';
    $py[388] = 'ץצ_zhua';
    $py[389] = 'ק_zhuai';
    $py[390] = 'רשת׫׬׭�����_zhuan';
    $py[391] = '׮ׯװױײ׳״��_zhuang';
    $py[392] = '׵׶׷׸׹׺�����_zhui';
    $py[393] = '׻׼���_zhun';
    $py[394] = '׽׾׿����������������پ��ߪ���������_zhuo';
    $py[395] = '��������������������������������������������������������������������_zi';
    $py[396] = '��������������������_zong';
    $py[397] = '������������۸����_zou';
    $py[398] = '����������������������_zu';
    $py[399] = '����߬����_zuan';
    $py[400] = '��������ީ_zui';
    $py[401] = '����ߤ����_zun';
    $py[402] = '��������������������������_zuo';
    if ($sType == 'ƴ��') {
        for ($i = 1; $i <= len($content); $i++) {
            $s = mid($content, $i, 1);
            if (inStr('0123456789_abcdefghijklmnopqrstuvwxyz', $s) == false) {
                for ($j = 0; $j <= uBound($py); $j++) {
                    if (inStr($py[$j], $s) > 0) {
                        $en = mid($py[$j], inStrRev($py[$j], '_') + 1, -1);
                        $en = uCase(left($en, 1)) . right($en, len($en) - 1);
                        $s = $en;
                        break;
                    }
                }
            }
            $c = $c . $s;
        }
        $pinYin = $c;
        return @$pinYin;
    }
    if (inStr('|����|���ִ�ӡ|', '|' . $sType . '|') > 0) {
        $content = lCase($content) . ' ';
        //���Ӹ��ո����һ����ת�����ˣ���
        $splStr = aspSplit($content, ' ');
        foreach ($splStr as $key => $s) {
            if ($s != '') {
                for ($j = 0; $j <= uBound($py); $j++) {
                    if (inStr($py[$j], '_' . $s) > 0) {
                        $s = mid($py[$j], 1, 1);
                        break;
                    }
                }
            }
            $c = $c . $s;
        }
        if ($sType == '���ִ�ӡ') {
            aspEcho('ƴ��ת����', $c);
        }
        $pinYin = $c;
    } else {
        for ($i = 1; $i <= len($content); $i++) {
            $s = lCase(mid($content, $i, 1));
            $En2 = '';
            $En3 = $s;
            if (inStr('0123456789_abcdefghijklmnopqrstuvwxyz', $s) == false) {
                for ($j = 0; $j <= uBound($py); $j++) {
                    if (inStr($py[$j], $s) > 0) {
                        $en = mid($py[$j], inStrRev($py[$j], '_') + 1, -1);
                        $En2 = uCase(left($en, 1)) . ' ';
                        $En3 = uCase(left($en, 1)) . right($en, len($en) - 1);
                        $En4 = $En3 . ' ';
                        //�ӿո�
                        $s = $en . ' ';
                        break;
                    }
                }
            }
            $c = $c . $s;
            $c2 = $c2 . $En2;
            $C3 = $C3 . $En3;
            $C4 = $C4 . $En4;
        }
        if ($sType == '1') {
            $pinYin = $c;
        } else {
            if ($sType == '2') {
                $pinYin = $c2;
            } else {
                if ($sType == '3') {
                    $C3 = uCase(left($C3, 1)) . mid($C3, 2, -1);
                    //����ĸ��д
                    $pinYin = $C3;
                } else {
                    if ($sType == '4') {
                        $pinYin = $C4;
                    } else {
                        aspEcho('ת���ַ�', $content);
                        aspEcho('ƴ��Сд', aspTrim($c));
                        aspEcho('����ĸ��д', aspTrim($C4));
                        aspEcho('ȡ����ĸ', aspTrim($c2));
                        aspEcho('��˾��׼', enToCompany($C4));
                        aspEcho('�޿ո�����ĸСд', aspTrim(replace($c, ' ', '')));
                        aspEcho('�޿ո�����ĸ��д', aspTrim(replace($C3, ' ', '')));
                    }
                }
            }
        }
    }
    return @$pinYin;
}
Beispiel #20
0
function orAndSearch($addSql, $SeectField, $SearchValue)
{
    $splStr = '';
    $s = '';
    $c = '';
    $SearchValue = regExp_Replace($SearchValue, ' or ', ' Or ');
    $SearchValue = regExp_Replace($SearchValue, ' and ', ' And ');
    if (inStr($SearchValue, ' Or ') > 0) {
        $splStr = aspSplit($SearchValue, ' Or ');
        foreach ($splStr as $key => $s) {
            if ($s != '') {
                if ($c != '') {
                    $c = $c . ' Or ';
                }
                $c = $c . ' ' . $SeectField . ' Like \'%' . $s . '%\'';
            }
        }
    } else {
        if (inStr($SearchValue, ' And ') > 0) {
            $splStr = aspSplit($SearchValue, ' And ');
            foreach ($splStr as $key => $s) {
                if ($s != '') {
                    if ($c != '') {
                        $c = $c . ' And ';
                    }
                    $c = $c . ' ' . $SeectField . ' Like \'%' . $s . '%\'';
                }
            }
        } else {
            if ($SearchValue != '') {
                $splStr = aspSplit($SearchValue, ' And ');
                foreach ($splStr as $key => $s) {
                    if ($s != '') {
                        if ($c != '') {
                            $c = $c . ' And ';
                        }
                        $c = $c . ' ' . $SeectField . ' Like \'%' . $s . '%\'';
                    }
                }
            }
        }
    }
    if ($c != '') {
        if (inStr(lCase($addSql), ' where ') == 0) {
            $c = ' Where ' . $c;
        } else {
            $c = ' And ' . $c;
        }
        $addSql = $addSql . $c;
    }
    $orAndSearch = $addSql;
    return @$orAndSearch;
}
Beispiel #21
0
function handleArray($content, $SplType, $SType)
{
    $splStr = '';
    $s = '';
    $c = '';
    $OKYes = '';
    $SType = '|' . lCase($SType) . '|';
    $splStr = aspSplit($content, $SplType);
    foreach ($splStr as $key => $s) {
        $OKYes = true;
        if (inStr($SType, '|nonull|') > 0 && $OKYes == true) {
            if ($s == '') {
                $OKYes = false;
            }
        }
        if (inStr($SType, '|norepeat|') > 0 && $OKYes == true) {
            if (inStr($SplType . $c . $SplType, $SplType . $s . $SplType) > 0) {
                $OKYes = false;
            }
        }
        if ($OKYes == true) {
            $c = $c . $s . $SplType;
        }
    }
    if ($c != '') {
        $c = left($c, len($c) - len($SplType));
    }
    $handleArray = $c;
    return @$handleArray;
}
Beispiel #22
0
function getParamValue($content, $paramName)
{
    $LCaseContent = '';
    $s = '';
    $splStart = '';
    $splEnd = '';
    $i = '';
    $startStr = '';
    $endStr = '';
    $LCaseContent = lCase($content);
    $splStart = array('="', '=\'', '=');
    $splEnd = array('"', '\'', '>');
    for ($i = 0; $i <= uBound($splStart); $i++) {
        $startStr = $paramName . $splStart[$i];
        $endStr = $splEnd[$i];
        if (inStr($LCaseContent, $startStr) > 0 && inStr($LCaseContent, $endStr) > 0) {
            $s = StrCut($content, $startStr, $endStr, 2);
            if ($s != '') {
                $getParamValue = $s;
                return @$getParamValue;
            }
        }
    }
    return @$getParamValue;
}
Beispiel #23
0
function makeHtmlWebToZip($webDir)
{
    $content = '';
    $splStr = '';
    $filePath = '';
    $c = '';
    $fileArray = '';
    $fileName = '';
    $fileType = '';
    $isTrue = '';
    $webFolderName = '';
    $cleanFileList = '';
    $splStr = aspSplit($webDir, '/');
    $webFolderName = $splStr[2];
    //call eerr(webFolderName,webDir)
    $content = getFileFolderList($webDir, true, '全部', '', '全部文件夹', '', '');
    $splStr = aspSplit($content, vbCrlf());
    foreach ($splStr as $key => $filePath) {
        if (CheckFolder($filePath) == false) {
            $fileArray = handleFilePathArray($filePath);
            $fileName = lCase($fileArray[2]);
            $fileType = lCase($fileArray[4]);
            $fileName = remoteNumber($fileName);
            $isTrue = true;
            if (inStr('|' . $cleanFileList . '|', '|' . $fileName . '|') > 0 && $fileType == 'html') {
                $isTrue = false;
            }
            if ($isTrue == true) {
                //call echo(fileType,fileName)
                if ($c != '') {
                    $c = $c . '|';
                }
                $c = $c . replace($filePath, HandlePath('/'), '');
                $cleanFileList = $cleanFileList . $fileName . '|';
            }
        }
    }
    Rw($c);
    $c = $c . '|||||';
    createFileGBK('htmlweb/1.txt', $c);
    aspEcho('<hr>cccccccccccc', $c);
    //先判断这个文件存在20160309
    if (CheckFile('/myZIP.php') == true) {
        aspEcho('', XMLPost(getHost() . '/myZIP.php?webFolderName=' . $webFolderName, 'content=' . escape($c)));
    }
}
Beispiel #24
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 #25
0
function foundInArr($strArr, $strToFind, $strSplit)
{
    $arrTemp = '';
    $i = '';
    $foundInArr = false;
    if (inStr($strArr, $strSplit) > 0) {
        $arrTemp = aspSplit($strArr, $strSplit);
        for ($i = 0; $i <= uBound($arrTemp); $i++) {
            if (lCase(aspTrim($arrTemp[$i])) == lCase(aspTrim($strToFind))) {
                $foundInArr = true;
                break;
            }
        }
    } else {
        if (lCase(aspTrim($strArr)) == lCase(aspTrim($strToFind))) {
            $foundInArr = true;
        }
    }
    return @$foundInArr;
}