Ejemplo n.º 1
0
function handleGetContentUrlList($httpUrl, $content, $sType)
{
    $i = '';
    $s = '';
    $nextS = '';
    $endSLCase = '';
    $endS = '';
    $urlStr = '';
    $nLen = '';
    $urlList = '';
    $url = '';
    $urlLCase = '';
    $webSite = '';
    $labelType = '';
    $isHandle = '';
    $valueLabel = '';
    $sType = '|' . lCase(aspTrim($sType)) . '|';
    $webSite = getWebSite($httpUrl);
    for ($i = 1; $i <= len($content); $i++) {
        $s = mid($content, $i, 1);
        $nextS = mid($content . ' ', $i + 1, 1);
        $endS = mid($content, $i + 1, -1);
        $endSLCase = lCase($endS);
        if ($s == '<') {
            $url = '';
            $labelType = '';
            $isHandle = false;
            if (left($endSLCase, 2) == 'a ') {
                $labelType = 'a';
                $valueLabel = 'href';
                $isHandle = true;
            } else {
                if (left($endSLCase, 5) == 'link ') {
                    $labelType = 'link';
                    $valueLabel = 'href';
                    $isHandle = true;
                } else {
                    if (left($endSLCase, 4) == 'img ') {
                        $labelType = 'img';
                        $valueLabel = 'src';
                        $isHandle = true;
                    } else {
                        if (left($endSLCase, 7) == 'script ') {
                            $labelType = 'script';
                            $valueLabel = 'src';
                            $isHandle = true;
                        }
                    }
                }
            }
            if ($isHandle == true) {
                if (inStr($sType, '|' . $labelType . '|') > 0 || inStr($sType, '|*|') > 0) {
                    $nLen = inStr($endS, '>');
                    $urlStr = mid($endS, 1, $nLen);
                    $url = RParam($urlStr, $valueLabel);
                    $i = $i + $nLen;
                }
            }
            if ($url != '') {
                $urlLCase = lCase($url);
                if ($urlLCase != '#' && left($urlLCase, 11) != 'javascript:') {
                    if (inStr(vbCrlf() . $urlList . vbCrlf(), vbCrlf() . $url . vbCrlf()) == false) {
                        $url = fullHttpUrl($httpUrl, $url);
                        $isHandle = isSonWebSite($url, $httpUrl);
                        if (inStr($sType, '|内链|') > 0) {
                            if ($isHandle == true) {
                                $urlList = $urlList . $url . vbCrlf();
                            }
                        } else {
                            if (inStr($sType, '|外链|') > 0) {
                                if ($isHandle == false) {
                                    $urlList = $urlList . $url . vbCrlf();
                                }
                            } else {
                                $urlList = $urlList . $url . vbCrlf();
                            }
                        }
                    }
                }
            }
        }
    }
    if ($urlList != '') {
        $urlList = left($urlList, len($urlList) - 2);
    }
    $handleGetContentUrlList = $urlList;
    return @$handleGetContentUrlList;
}
Ejemplo n.º 2
0
function readColumeSetTitle($action, $id, $ColumeTitle, $ColumeContent)
{
    $TitleWidth = '';
    //标题宽度
    $TitleHeight = '';
    //标题高度
    $ContentHeight = '';
    //内容高度
    $ContentWidth = '';
    //内容宽度
    $ContentCss = '';
    $TitleWidth = RParam($action, 'TitleWidth');
    //获得标题高度    待应用20150715
    $TitleHeight = RParam($action, 'TitleHeight');
    //获得标题宽度
    $ContentWidth = RParam($action, 'ContentWidth');
    //获得内容宽度
    $ContentHeight = RParam($action, 'ContentHeight');
    //获得内容高度
    //标题宽
    $TitleWidth = aspTrim($TitleWidth);
    //自动加px单位,不加会无效果 20150115
    if (right($TitleHeight, 1) != '%' && right($TitleHeight, 2) != 'px' && $TitleHeight != '' && $TitleHeight != 'auto') {
        $TitleHeight = $TitleHeight . 'px';
    }
    if (right($TitleWidth, 1) != '%' && right($TitleWidth, 2) != 'px' && $TitleWidth != '' && $TitleWidth != 'auto') {
        $TitleWidth = $TitleWidth . 'px';
    }
    //内容高
    $ContentHeight = aspTrim($ContentHeight);
    //自动加px单位,不加会无效果 20150115
    if (right($ContentHeight, 1) != '%' && right($ContentHeight, 2) != 'px' && $ContentHeight != '' && $ContentHeight != 'auto') {
        $ContentHeight = $ContentHeight . 'px';
    }
    //内容宽
    $ContentWidth = aspTrim($ContentWidth);
    //自动加px单位,不加会无效果 20150115
    if (right($ContentWidth, 1) != '%' && right($ContentWidth, 2) != 'px' && $ContentWidth != '' && $ContentWidth != 'auto') {
        $ContentWidth = $ContentWidth . 'px';
    }
    if ($ContentHeight != '') {
        $ContentCss = 'height:' . $ContentHeight . ';';
    }
    if ($ContentWidth != '') {
        $ContentCss = $ContentCss . 'width:' . $ContentWidth . ';';
    }
    $content = '';
    $content = readColumn($id);
    //标题宽
    if ($TitleWidth != '') {
        $content = replace($content, '<div class="tvalue">', '<div class="tvalue" style=\'width:' . $TitleWidth . ';\'>');
    }
    //内容高
    if ($ContentCss != '') {
        $content = replace($content, '<div class="ccontent">', '<div class="ccontent" style=\'' . $ContentCss . '\'>');
    }
    //call echo(ContentWidth,ContentCss)
    $content = replace($content, '栏目标题', $ColumeTitle);
    $content = replace($content, '栏目内容', $ColumeContent);
    $readColumeSetTitle = $content;
    return @$readColumeSetTitle;
}
Ejemplo n.º 3
0
function makeWebHtml($action)
{
    $actionType = '';
    $npagesize = '';
    $npage = '';
    $url = '';
    $addSql = '';
    $sortSql = '';
    $sortFieldName = '';
    $ascOrDesc = '';
    $serchKeyWordName = '';
    $parentid = '';
    //追加于20160716 home
    $actionType = RParam($action, 'actionType');
    $npage = RParam($action, 'npage');
    $npage = getNumber($npage);
    if ($npage == '') {
        $npage = 1;
    } else {
        $npage = CInt($npage);
    }
    //导航
    if ($actionType == 'nav') {
        $GLOBALS['glb_columnType'] = RParam($action, 'columnType');
        $GLOBALS['glb_columnName'] = RParam($action, 'columnName');
        $GLOBALS['glb_columnId'] = RParam($action, 'columnId');
        if ($GLOBALS['glb_columnId'] == '') {
            $GLOBALS['glb_columnId'] = RParam($action, 'id');
        }
        if ($GLOBALS['glb_columnType'] != '') {
            $addSql = 'where columnType=\'' . $GLOBALS['glb_columnType'] . '\'';
        }
        if ($GLOBALS['glb_columnName'] != '') {
            $addSql = getWhereAnd($addSql, 'where columnName=\'' . $GLOBALS['glb_columnName'] . '\'');
        }
        if ($GLOBALS['glb_columnId'] != '') {
            $addSql = getWhereAnd($addSql, 'where id=' . $GLOBALS['glb_columnId'] . '');
        }
        //call echo("addsql",addsql)
        $rsObj = $GLOBALS['conn']->query('Select * from ' . $GLOBALS['db_PREFIX'] . 'webcolumn ' . $addSql);
        if (@mysql_num_rows($rsObj) != 0) {
            $rs = mysql_fetch_array($rsObj);
            $GLOBALS['glb_columnId'] = $rs['id'];
            $GLOBALS['glb_columnName'] = $rs['columnname'];
            $GLOBALS['glb_columnType'] = $rs['columntype'];
            $GLOBALS['glb_bodyContent'] = $rs['bodycontent'];
            $GLOBALS['glb_detailTitle'] = $GLOBALS['glb_columnName'];
            $GLOBALS['glb_flags'] = $rs['flags'];
            $npagesize = $rs['npagesize'];
            //每页显示条数
            $GLOBALS['glb_isonhtml'] = $rs['isonhtml'];
            //是否生成静态网页
            $sortSql = ' ' . $rs['sortsql'];
            //排序SQL
            if ($rs['webtitle'] != '') {
                $GLOBALS['cfg_webTitle'] = $rs['webtitle'];
                //网址标题
            }
            if ($rs['webkeywords'] != '') {
                $GLOBALS['cfg_webKeywords'] = $rs['webkeywords'];
                //网站关键词
            }
            if ($rs['webdescription'] != '') {
                $GLOBALS['cfg_webDescription'] = $rs['webdescription'];
                //网站描述
            }
            if ($GLOBALS['templateName'] == '') {
                if (aspTrim($rs['templatepath']) != '') {
                    $GLOBALS['templateName'] = $rs['templatepath'];
                } else {
                    if ($rs['columntype'] != '首页') {
                        $GLOBALS['templateName'] = getDateilTemplate($rs['id'], 'List');
                    }
                }
            }
        }
        $GLOBALS['glb_columnENType'] = handleColumnType($GLOBALS['glb_columnType']);
        $GLOBALS['glb_url'] = getColumnUrl($GLOBALS['glb_columnName'], 'name');
        //文章类列表
        if (inStr('|产品|新闻|视频|下载|案例|', '|' . $GLOBALS['glb_columnType'] . '|') > 0) {
            $GLOBALS['glb_bodyContent'] = getDetailList($action, defaultListTemplate($GLOBALS['glb_columnType'], $GLOBALS['glb_columnName']), 'ArticleDetail', '栏目列表', '*', $npagesize, $npage, 'where parentid=' . $GLOBALS['glb_columnId'] . $sortSql);
            //留言类列表
        } else {
            if (inStr('|留言|', '|' . $GLOBALS['glb_columnType'] . '|') > 0) {
                $GLOBALS['glb_bodyContent'] = getDetailList($action, defaultListTemplate($GLOBALS['glb_columnType'], $GLOBALS['glb_columnName']), 'GuestBook', '留言列表', '*', $npagesize, $npage, ' where isthrough<>0 ' . $sortSql);
            } else {
                if ($GLOBALS['glb_columnType'] == '文本') {
                    //航行栏目加管理
                    if (@$_REQUEST['gl'] == 'edit') {
                        $GLOBALS['glb_bodyContent'] = '<span>' . $GLOBALS['glb_bodyContent'] . '</span>';
                    }
                    $url = WEB_ADMINURL . '?act=addEditHandle&actionType=WebColumn&lableTitle=网站栏目&nPageSize=10&page=&id=' . $GLOBALS['glb_columnId'] . '&n=' . getRnd(11);
                    $GLOBALS['glb_bodyContent'] = handleDisplayOnlineEditDialog($url, $GLOBALS['glb_bodyContent'], '', 'span');
                }
            }
        }
        //细节
    } else {
        if ($actionType == 'detail') {
            $GLOBALS['glb_locationType'] = 'detail';
            $rsObj = $GLOBALS['conn']->query('Select * from ' . $GLOBALS['db_PREFIX'] . 'articledetail where id=' . RParam($action, 'id'));
            if (@mysql_num_rows($rsObj) != 0) {
                $rs = mysql_fetch_array($rsObj);
                $GLOBALS['glb_columnName'] = getColumnName($rs['parentid']);
                $GLOBALS['glb_detailTitle'] = $rs['title'];
                $GLOBALS['glb_flags'] = $rs['flags'];
                $GLOBALS['glb_isonhtml'] = $rs['isonhtml'];
                //是否生成静态网页
                $GLOBALS['glb_id'] = $rs['id'];
                //文章ID
                if ($GLOBALS['isMakeHtml'] == true) {
                    $GLOBALS['glb_url'] = getHandleRsUrl($rs['filename'], $rs['customaurl'], '/detail/detail' . $rs['id']);
                } else {
                    $GLOBALS['glb_url'] = handleWebUrl('?act=detail&id=' . $rs['id']);
                }
                if ($rs['webtitle'] != '') {
                    $GLOBALS['cfg_webTitle'] = $rs['webtitle'];
                    //网址标题
                }
                if ($rs['webkeywords'] != '') {
                    $GLOBALS['cfg_webKeywords'] = $rs['webkeywords'];
                    //网站关键词
                }
                if ($rs['webdescription'] != '') {
                    $GLOBALS['cfg_webDescription'] = $rs['webdescription'];
                    //网站描述
                }
                //改进20160628
                $sortFieldName = 'id';
                $ascOrDesc = 'asc';
                $addsql = aspTrim(getWebColumnSortSql($rs['parentid']));
                if ($addsql != '') {
                    $sortFieldName = aspTrim(replace(replace(replace($addsql, 'order by', ''), ' desc', ''), ' asc', ''));
                    if (inStr($addsql, ' desc') > 0) {
                        $ascOrDesc = 'desc';
                    }
                }
                $GLOBALS['glb_artitleAuthor'] = $rs['author'];
                $GLOBALS['glb_artitleAdddatetime'] = $rs['adddatetime'];
                $GLOBALS['glb_upArticle'] = upArticle($rs['parentid'], $sortFieldName, $rs[$sortFieldName], $ascOrDesc);
                $GLOBALS['glb_downArticle'] = downArticle($rs['parentid'], $sortFieldName, $rs[$sortFieldName], $ascOrDesc);
                $GLOBALS['glb_aritcleRelatedTags'] = aritcleRelatedTags($rs['relatedtags']);
                $GLOBALS['glb_aritcleSmallImage'] = $rs['smallimage'];
                $GLOBALS['glb_aritcleBigImage'] = $rs['bigimage'];
                //文章内容
                //glb_bodyContent = "<div class=""articleinfowrap"">[$articleinfowrap$]</div>" & rs("bodycontent") & "[$relatedtags$]<ul class=""updownarticlewrap"">[$updownArticle$]</ul>"
                //上一篇文章,下一篇文章
                //glb_bodyContent = Replace(glb_bodyContent, "[$updownArticle$]", upArticle(rs("parentid"), "sortrank", rs("sortrank")) & downArticle(rs("parentid"), "sortrank", rs("sortrank")))
                //glb_bodyContent = Replace(glb_bodyContent, "[$articleinfowrap$]", "来源:" & rs("author") & " &nbsp; 发布时间:" & format_Time(rs("adddatetime"), 1))
                //glb_bodyContent = Replace(glb_bodyContent, "[$relatedtags$]", aritcleRelatedTags(rs("relatedtags")))
                $GLOBALS['glb_bodyContent'] = $rs['bodycontent'];
                //文章详细加控制
                if (@$_REQUEST['gl'] == 'edit') {
                    $GLOBALS['glb_bodyContent'] = '<span>' . $GLOBALS['glb_bodyContent'] . '</span>';
                }
                $url = WEB_ADMINURL . '?act=addEditHandle&actionType=ArticleDetail&lableTitle=分类信息&nPageSize=10&page=&parentid=&id=' . RParam($action, 'id') . '&n=' . getRnd(11);
                $GLOBALS['glb_bodyContent'] = handleDisplayOnlineEditDialog($url, $GLOBALS['glb_bodyContent'], '', 'span');
                if ($GLOBALS['templateName'] == '') {
                    if (aspTrim($rs['templatepath']) != '') {
                        $GLOBALS['templateName'] = $rs['templatepath'];
                    } else {
                        $GLOBALS['templateName'] = getDateilTemplate($rs['parentid'], 'Detail');
                    }
                }
            }
            //单页
        } else {
            if ($actionType == 'onepage') {
                $rsObj = $GLOBALS['conn']->query('Select * from ' . $GLOBALS['db_PREFIX'] . 'onepage where id=' . RParam($action, 'id'));
                if (@mysql_num_rows($rsObj) != 0) {
                    $rs = mysql_fetch_array($rsObj);
                    $GLOBALS['glb_detailTitle'] = $rs['title'];
                    $GLOBALS['glb_isonhtml'] = $rs['isonhtml'];
                    //是否生成静态网页
                    if ($GLOBALS['isMakeHtml'] == true) {
                        $GLOBALS['glb_url'] = getHandleRsUrl($rs['filename'], $rs['customaurl'], '/page/page' . $rs['id']);
                    } else {
                        $GLOBALS['glb_url'] = handleWebUrl('?act=detail&id=' . $rs['id']);
                    }
                    if ($rs['webtitle'] != '') {
                        $GLOBALS['cfg_webTitle'] = $rs['webtitle'];
                        //网址标题
                    }
                    if ($rs['webkeywords'] != '') {
                        $GLOBALS['cfg_webKeywords'] = $rs['webkeywords'];
                        //网站关键词
                    }
                    if ($rs['webdescription'] != '') {
                        $GLOBALS['cfg_webDescription'] = $rs['webdescription'];
                        //网站描述
                    }
                    //内容
                    $GLOBALS['glb_bodyContent'] = $rs['bodycontent'];
                    //文章详细加控制
                    if (@$_REQUEST['gl'] == 'edit') {
                        $GLOBALS['glb_bodyContent'] = '<span>' . $GLOBALS['glb_bodyContent'] . '</span>';
                    }
                    $url = WEB_ADMINURL . '?act=addEditHandle&actionType=ArticleDetail&lableTitle=分类信息&nPageSize=10&page=&parentid=&id=' . RParam($action, 'id') . '&n=' . getRnd(11);
                    $GLOBALS['glb_bodyContent'] = handleDisplayOnlineEditDialog($url, $GLOBALS['glb_bodyContent'], '', 'span');
                    if ($GLOBALS['templateName'] == '') {
                        if (aspTrim($rs['templatepath']) != '') {
                            $GLOBALS['templateName'] = $rs['templatepath'];
                        } else {
                            $GLOBALS['templateName'] = 'Main_Model.html';
                            //call echo(templateName,"templateName")
                        }
                    }
                }
                //搜索
            } else {
                if ($actionType == 'Search') {
                    $GLOBALS['templateName'] = 'Main_Model.html';
                    $serchKeyWordName = @$_REQUEST['keywordname'];
                    $parentid = @$_REQUEST['parentid'];
                    if ($serchKeyWordName == '') {
                        $serchKeyWordName = 'wd';
                    }
                    $GLOBALS['glb_searchKeyWord'] = replace(@$_REQUEST[$serchKeyWordName], '<', '&lt;');
                    $addSql = '';
                    if ($parentid != '') {
                        $addSql = ' where parentid=' . $parentid;
                    }
                    $addSql = getWhereAnd($addSql, ' where title like \'%' . $GLOBALS['glb_searchKeyWord'] . '%\'');
                    $npagesize = 20;
                    //call echo(npagesize, npage)
                    $GLOBALS['glb_bodyContent'] = getDetailList($action, defaultListTemplate($GLOBALS['glb_columnType'], $GLOBALS['glb_columnName']), 'ArticleDetail', '网站栏目', '*', $npagesize, $npage, $addSql);
                    $GLOBALS['positionEndStr'] = ' >> 搜索内容”' . $GLOBALS['glb_searchKeyWord'] . '“';
                    //加载等待
                } else {
                    if ($actionType == 'loading') {
                        rwEnd('页面正在加载中。。。');
                    }
                }
            }
        }
    }
    //模板为空,则用默认首页模板
    if ($GLOBALS['templateName'] == '') {
        $GLOBALS['templateName'] = 'Index_Model.html';
        //默认模板
    }
    //检测当前路径是否有模板
    if (inStr($GLOBALS['templateName'], '/') == false) {
        $GLOBALS['templateName'] = $GLOBALS['cfg_webTemplate'] . '/' . $GLOBALS['templateName'];
    }
    //call echo("templateName",templateName)
    if (CheckFile($GLOBALS['templateName']) == false) {
        Eerr('未找到模板文件', $GLOBALS['templateName']);
    }
    $GLOBALS['code'] = getFText($GLOBALS['templateName']);
    $GLOBALS['code'] = handleAction($GLOBALS['code']);
    //处理动作
    $GLOBALS['code'] = thisPosition($GLOBALS['code']);
    //位置
    $GLOBALS['code'] = replaceGlobleVariable($GLOBALS['code']);
    //替换全局标签
    $GLOBALS['code'] = handleAction($GLOBALS['code']);
    //处理动作    '再来一次,处理数据内容里动作
    $GLOBALS['code'] = handleAction($GLOBALS['code']);
    //处理动作
    $GLOBALS['code'] = handleAction($GLOBALS['code']);
    //处理动作
    $GLOBALS['code'] = thisPosition($GLOBALS['code']);
    //位置
    $GLOBALS['code'] = replaceGlobleVariable($GLOBALS['code']);
    //替换全局标签
    $GLOBALS['code'] = delTemplateMyNote($GLOBALS['code']);
    //删除无用内容
    //格式化HTML
    if (inStr($GLOBALS['cfg_flags'], '|formattinghtml|') > 0) {
        //code = HtmlFormatting(code)        '简单
        $GLOBALS['code'] = handleHtmlFormatting($GLOBALS['code'], false, 0, '删除空行');
        //自定义
        //格式化HTML第二种
    } else {
        if (inStr($GLOBALS['cfg_flags'], '|formattinghtmltow|') > 0) {
            $GLOBALS['code'] = htmlFormatting($GLOBALS['code']);
            //简单
            $GLOBALS['code'] = handleHtmlFormatting($GLOBALS['code'], false, 0, '删除空行');
            //自定义
            //压缩HTML
        } else {
            if (inStr($GLOBALS['cfg_flags'], '|ziphtml|') > 0) {
                $GLOBALS['code'] = zipHTML($GLOBALS['code']);
            }
        }
    }
    //闭合标签
    if (inStr($GLOBALS['cfg_flags'], '|labelclose|') > 0) {
        $GLOBALS['code'] = handleCloseHtml($GLOBALS['code'], true, '');
        //图片自动加alt  "|*|",
    }
    //在线编辑20160127
    if (rq('gl') == 'edit') {
        if (inStr($GLOBALS['code'], '</head>') > 0) {
            if (inStr(lCase($GLOBALS['code']), 'jquery.min.js') == false) {
                $GLOBALS['code'] = replace($GLOBALS['code'], '</head>', '<script src="/Jquery/jquery.Min.js"></script></head>');
            }
            $GLOBALS['code'] = replace($GLOBALS['code'], '</head>', '<script src="/Jquery/Callcontext_menu.js"></script></head>');
        }
        if (inStr($GLOBALS['code'], '<body>') > 0) {
            //Code = Replace(Code,"<body>", "<body onLoad=""ContextMenu.intializeContextMenu()"">")
        }
    }
    //call echo(templateName,templateName)
    $makeWebHtml = $GLOBALS['code'];
    return @$makeWebHtml;
}
Ejemplo n.º 4
0
function XY_ForArray($action)
{
    $arrayList = '';
    $splitStr = '';
    $defaultStr = '';
    $splStr = '';
    $forI = '';
    $title = '';
    $s = '';
    $c = '';
    $nloop = '';
    $arrayList = atRParam($action, 'arraylist');
    //atRParam获得结果处理动作,但不替换动作内容
    $splitStr = RParam($action, 'splitstr');
    $nloop = RParam($action, 'nloop');
    //循环数
    if ($arrayList == '') {
        $arrayList = copyStr('循环' . $splitStr, $nloop);
    }
    $defaultStr = getDefaultValue($action);
    $splStr = aspSplit($arrayList, $splitStr);
    for ($forI = 0; $forI <= uBound($splStr); $forI++) {
        $title = $splStr[$forI];
        if ($title != '') {
            $s = $defaultStr;
            $s = replaceValueParam($s, 'fortitle', $title);
            $s = replaceValueParam($s, 'forid', $forI + 1);
            $s = replaceValueParam($s, 'fori', $forI);
            $s = replaceValueParam($s, 'forcount', uBound($splStr) + 1);
            $c = $c . $s;
        }
    }
    $XY_ForArray = $c;
    return @$XY_ForArray;
}
Ejemplo n.º 5
0
function replaceValueParam($content, $paramName, $replaceStr)
{
    $startStr = '';
    $endStr = '';
    $labelStr = '';
    $tempLabelStr = '';
    $nLen = '';
    $nTimeFormat = '';
    $delHtmlYes = '';
    $funStr = '';
    $trimYes = '';
    $isEscape = '';
    $s = '';
    $i = '';
    $ifStr = '';
    //判断字符
    $elseIfStr = '';
    //第二判断字符
    $valueStr = '';
    //显示字符
    $elseStr = '';
    //否则字符
    $elseIfValue = '';
    $elseValue = '';
    //第二判断值
    $instrStr = '';
    $instr2Str = '';
    //查找字符
    $tempReplaceStr = '';
    //暂存
    //ReplaceStr = ReplaceStr & "这里面放上内容在这时碳呀。"
    //ReplaceStr = CStr(ReplaceStr)            '转成字符类型
    if (isNul($replaceStr) == true) {
        $replaceStr = '';
    }
    $tempReplaceStr = $replaceStr;
    //最多处理99个  20160225
    for ($i = 1; $i <= 999; $i++) {
        $replaceStr = $tempReplaceStr;
        //恢复
        $startStr = '[$' . $paramName;
        $endStr = '$]';
        //字段名称严格判断 20160226
        if (inStr($content, $startStr) > 0 && inStr($content, $endStr) > 0 && (inStr($content, $startStr . ' ') > 0 || inStr($content, $startStr . $endStr) > 0)) {
            //获得对应字段加强版20151231
            if (inStr($content, $startStr . $endStr) > 0) {
                $labelStr = $startStr . $endStr;
            } else {
                if (inStr($content, $startStr . ' ') > 0) {
                    $labelStr = StrCut($content, $startStr . ' ', $endStr, 1);
                } else {
                    $labelStr = StrCut($content, $startStr, $endStr, 1);
                }
            }
            $tempLabelStr = $labelStr;
            $labelStr = HandleInModule($labelStr, 'start');
            //删除Html
            $delHtmlYes = RParam($labelStr, 'delHtml');
            //是否删除Html
            if ($delHtmlYes == 'true') {
                $replaceStr = replace(delHtml($replaceStr), '<', '&lt;');
            }
            //HTML处理
            //删除两边空格
            $trimYes = RParam($labelStr, 'trim');
            //是否删除两边空格
            if ($trimYes == 'true') {
                $replaceStr = TrimVbCrlf($replaceStr);
            }
            //截取字符处理
            $nLen = RParam($labelStr, 'len');
            //字符长度值
            $nLen = handleNumber($nLen);
            //If nLen<>"" Then ReplaceStr = CutStr(ReplaceStr,nLen,"null")' Left(ReplaceStr,nLen)
            if ($nLen != '') {
                $replaceStr = CutStr($replaceStr, $nLen, '...');
            }
            //Left(ReplaceStr,nLen)
            //时间处理
            $nTimeFormat = RParam($labelStr, 'format_time');
            //时间处理值
            if ($nTimeFormat != '') {
                $replaceStr = Format_Time($replaceStr, $nTimeFormat);
            }
            //获得栏目名称
            $s = RParam($labelStr, 'getcolumnname');
            if ($s != '') {
                if ($s == '@ME') {
                    $s = $replaceStr;
                }
                $replaceStr = getColumnName($s);
            }
            //获得栏目URL
            $s = RParam($labelStr, 'getcolumnurl');
            if ($s != '') {
                if ($s == '@ME') {
                    $s = $replaceStr;
                }
                $replaceStr = getColumnUrl($s, 'id');
            }
            //是否为密码类型
            $s = RParam($labelStr, 'password');
            if ($s != '') {
                if ($s != '') {
                    $replaceStr = $s;
                }
            }
            $ifStr = RParam($labelStr, 'if');
            $elseIfStr = RParam($labelStr, 'elseif');
            $valueStr = RParam($labelStr, 'value');
            $elseifValue = RParam($labelStr, 'elseifvalue');
            $elseValue = RParam($labelStr, 'elsevalue');
            $instrStr = RParam($labelStr, 'instr');
            $instr2Str = RParam($labelStr, 'instr2');
            //call echo("ifStr",ifStr)
            //call echo("valueStr",valueStr)
            //call echo("elseStr",elseStr)
            //call echo("elseIfStr",elseIfStr)
            //call echo("replaceStr",replaceStr)
            if ($ifStr != '' || $instrStr != '') {
                if ($ifStr == cStr($replaceStr) && $ifStr != '') {
                    $replaceStr = $valueStr;
                } else {
                    if ($elseIfStr == cStr($replaceStr) && $elseIfStr != '') {
                        $replaceStr = $valueStr;
                        if ($elseifValue != '') {
                            $replaceStr = $elseifValue;
                        }
                    } else {
                        if (inStr(cStr($replaceStr), $instrStr) > 0 && $instrStr != '') {
                            $replaceStr = $valueStr;
                        } else {
                            if (inStr(cStr($replaceStr), $instr2Str) > 0 && $instr2Str != '') {
                                $replaceStr = $valueStr;
                                if ($elseifValue != '') {
                                    $replaceStr = $elseifValue;
                                }
                            } else {
                                if ($elseValue != '@ME') {
                                    $replaceStr = $elseValue;
                                }
                            }
                        }
                    }
                }
            }
            //函数处理20151231    [$title  function='left(@ME,40)'$]
            $funStr = RParam($labelStr, 'function');
            //函数
            if ($funStr != '') {
                $funStr = replace($funStr, '@ME', $replaceStr);
                $replaceStr = HandleContentCode($funStr, '');
            }
            //默认值
            $s = RParam($labelStr, 'default');
            if ($s != '' && $s != '@ME') {
                if ($replaceStr == '') {
                    $replaceStr = $s;
                }
            }
            //escape转码
            $isEscape = lCase(RParam($labelStr, 'escape'));
            if ($isEscape == '1' || $isEscape == 'true') {
                $replaceStr = escape($replaceStr);
            }
            //文本颜色
            $s = RParam($labelStr, 'fontcolor');
            //函数
            if ($s != '') {
                $replaceStr = '<font color="' . $s . '">' . $replaceStr . '</font>';
            }
            //call echo(tempLabelStr,replaceStr)
            $content = replace($content, $tempLabelStr, $replaceStr);
        } else {
            break;
        }
    }
    $replaceValueParam = $content;
    return @$replaceValueParam;
}