예제 #1
0
파일: URL.php 프로젝트: 313801120/AspPhpCms
function getCssLinkList($content)
{
    $startStr = '';
    $endStr = '';
    $splStr = '';
    $s = '';
    $c = '';
    $fileName = '';
    $startStr = '<link';
    $endStr = '/>';
    $content = GetArray($content, $startStr, $endStr, false, false);
    $splStr = aspSplit($content, '$Array$');
    foreach ($splStr as $key => $s) {
        if (inStr(lCase($s), 'stylesheet') > 0) {
            $fileName = StrCut($s, 'href="', '"', 2);
            aspEcho($fileName, $s);
            $c = $c . $fileName . vbCrlf();
        }
    }
    $getCssLinkList = $c;
    return @$getCssLinkList;
}
예제 #2
0
 function &GetAll($nRows = -1)
 {
     return GetArray($nRows);
 }
예제 #3
0
function handleAction($content)
{
    $startStr = '';
    $endStr = '';
    $ActionList = '';
    $splStr = '';
    $action = '';
    $s = '';
    $HandYes = '';
    $startStr = '{$';
    $endStr = '$}';
    $ActionList = GetArray($content, $startStr, $endStr, true, true);
    //Call echo("ActionList ", ActionList)
    $splStr = aspSplit($ActionList, '$Array$');
    foreach ($splStr as $key => $s) {
        $action = aspTrim($s);
        $action = HandleInModule($action, 'start');
        //处理\'替换掉
        if ($action != '') {
            $action = aspTrim(mid($action, 3, len($action) - 4)) . ' ';
            //call echo("s",s)
            $HandYes = true;
            //处理为真
            //{VB #} 这种是放在图片路径里,目的是为了在VB里不处理这个路径
            if (CheckFunValue($action, '# ') == true) {
                $action = '';
                //测试
            } else {
                if (CheckFunValue($action, 'GetLableValue ') == true) {
                    $action = XY_getLableValue($action);
                    //标题在搜索引擎里列表
                } else {
                    if (CheckFunValue($action, 'TitleInSearchEngineList ') == true) {
                        $action = XY_TitleInSearchEngineList($action);
                        //加载文件
                    } else {
                        if (CheckFunValue($action, 'Include ') == true) {
                            $action = XY_Include($action);
                            //栏目列表
                        } else {
                            if (CheckFunValue($action, 'ColumnList ') == true) {
                                $action = XY_AP_ColumnList($action);
                                //文章列表
                            } else {
                                if (CheckFunValue($action, 'ArticleList ') == true || CheckFunValue($action, 'CustomInfoList ') == true) {
                                    $action = XY_AP_ArticleList($action);
                                    //评论列表
                                } else {
                                    if (CheckFunValue($action, 'CommentList ') == true) {
                                        $action = XY_AP_CommentList($action);
                                        //搜索统计列表
                                    } else {
                                        if (CheckFunValue($action, 'SearchStatList ') == true) {
                                            $action = XY_AP_SearchStatList($action);
                                            //友情链接列表
                                        } else {
                                            if (CheckFunValue($action, 'Links ') == true) {
                                                $action = XY_AP_Links($action);
                                                //显示单页内容
                                            } else {
                                                if (CheckFunValue($action, 'GetOnePageBody ') == true || CheckFunValue($action, 'MainInfo ') == true) {
                                                    $action = XY_AP_GetOnePageBody($action);
                                                    //显示文章内容
                                                } else {
                                                    if (CheckFunValue($action, 'GetArticleBody ') == true) {
                                                        $action = XY_AP_GetArticleBody($action);
                                                        //显示栏目内容
                                                    } else {
                                                        if (CheckFunValue($action, 'GetColumnBody ') == true) {
                                                            $action = XY_AP_GetColumnBody($action);
                                                            //获得栏目URL
                                                        } else {
                                                            if (CheckFunValue($action, 'GetColumnUrl ') == true) {
                                                                $action = XY_GetColumnUrl($action);
                                                                //获得文章URL
                                                            } else {
                                                                if (CheckFunValue($action, 'GetArticleUrl ') == true) {
                                                                    $action = XY_GetArticleUrl($action);
                                                                    //获得单页URL
                                                                } else {
                                                                    if (CheckFunValue($action, 'GetOnePageUrl ') == true) {
                                                                        $action = XY_GetOnePageUrl($action);
                                                                        //------------------- 模板模块区 -----------------------
                                                                        //显示包裹块 作用不大
                                                                    } else {
                                                                        if (CheckFunValue($action, 'DisplayWrap ') == true) {
                                                                            $action = XY_DisplayWrap($action);
                                                                            //显示布局
                                                                        } else {
                                                                            if (CheckFunValue($action, 'Layout ') == true) {
                                                                                $action = XY_Layout($action);
                                                                                //显示模块
                                                                            } else {
                                                                                if (CheckFunValue($action, 'Module ') == true) {
                                                                                    $action = XY_Module($action);
                                                                                    //读模块内容
                                                                                } else {
                                                                                    if (CheckFunValue($action, 'ReadTemplateModule ') == true) {
                                                                                        $action = XY_ReadTemplateModule($action);
                                                                                        //获得内容模块 20150108
                                                                                    } else {
                                                                                        if (CheckFunValue($action, 'GetContentModule ') == true) {
                                                                                            $action = XY_ReadTemplateModule($action);
                                                                                            //读模板样式并设置标题与内容   软件里有个栏目Style进行设置
                                                                                        } else {
                                                                                            if (CheckFunValue($action, 'ReadColumeSetTitle ') == true) {
                                                                                                $action = XY_ReadColumeSetTitle($action);
                                                                                                //------------------- 其它区 -----------------------
                                                                                                //显示JS渲染ASP/PHP/VB等程序的编辑器
                                                                                            } else {
                                                                                                if (CheckFunValue($action, 'displayEditor ') == true) {
                                                                                                    $action = displayEditor($action);
                                                                                                    //Js版网站统计
                                                                                                } else {
                                                                                                    if (CheckFunValue($action, 'JsWebStat ') == true) {
                                                                                                        $action = XY_JsWebStat($action);
                                                                                                        //------------------- 链接区 -----------------------
                                                                                                        //普通链接A
                                                                                                    } else {
                                                                                                        if (CheckFunValue($action, 'HrefA ') == true) {
                                                                                                            $action = XY_HrefA($action);
                                                                                                            //栏目菜单(引用后台栏目程序)
                                                                                                        } else {
                                                                                                            if (CheckFunValue($action, 'ColumnMenu ') == true) {
                                                                                                                $action = XY_AP_ColumnMenu($action);
                                                                                                                //------------------- 循环处理 -----------------------
                                                                                                                //For循环处理
                                                                                                            } else {
                                                                                                                if (CheckFunValue($action, 'ForArray ') == true) {
                                                                                                                    $action = XY_ForArray($action);
                                                                                                                    //------------------- 待分区 -----------------------
                                                                                                                    //网站底部
                                                                                                                } else {
                                                                                                                    if (CheckFunValue($action, 'WebSiteBottom ') == true || CheckFunValue($action, 'WebBottom ') == true) {
                                                                                                                        $action = XY_AP_WebSiteBottom($action);
                                                                                                                        //显示网站栏目 20160331
                                                                                                                    } else {
                                                                                                                        if (CheckFunValue($action, 'DisplayWebColumn ') == true) {
                                                                                                                            $action = XY_DisplayWebColumn($action);
                                                                                                                            //URL加密
                                                                                                                        } else {
                                                                                                                            if (CheckFunValue($action, 'escape ') == true) {
                                                                                                                                $action = XY_escape($action);
                                                                                                                                //URL解密
                                                                                                                            } else {
                                                                                                                                if (CheckFunValue($action, 'unescape ') == true) {
                                                                                                                                    $action = XY_unescape($action);
                                                                                                                                    //asp与php版本
                                                                                                                                } else {
                                                                                                                                    if (CheckFunValue($action, 'EDITORTYPE ') == true) {
                                                                                                                                        $action = XY_EDITORTYPE($action);
                                                                                                                                        //获得网址
                                                                                                                                    } else {
                                                                                                                                        if (CheckFunValue($action, 'getUrl ') == true) {
                                                                                                                                            $action = XY_getUrl($action);
                                                                                                                                            //暂时不屏蔽
                                                                                                                                        } else {
                                                                                                                                            if (CheckFunValue($action, 'copyTemplateMaterial ') == true) {
                                                                                                                                                $action = '';
                                                                                                                                            } else {
                                                                                                                                                if (CheckFunValue($action, 'clearCache ') == true) {
                                                                                                                                                    $action = '';
                                                                                                                                                } else {
                                                                                                                                                    $HandYes = false;
                                                                                                                                                    //处理为假
                                                                                                                                                }
                                                                                                                                            }
                                                                                                                                        }
                                                                                                                                    }
                                                                                                                                }
                                                                                                                            }
                                                                                                                        }
                                                                                                                    }
                                                                                                                }
                                                                                                            }
                                                                                                        }
                                                                                                    }
                                                                                                }
                                                                                            }
                                                                                        }
                                                                                    }
                                                                                }
                                                                            }
                                                                        }
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
            //注意这样,有的则不显示 晕 And IsNul(action)=False
            if (isNul($action) == true) {
                $action = '';
            }
            if ($HandYes == true) {
                $content = replace($content, $s, $action);
            }
        }
    }
    $handleAction = $content;
    return @$handleAction;
}
예제 #4
0
function getCssListUrlList($content)
{
    $startStr = '';
    $endStr = '';
    $ImgList = '';
    $splStr = '';
    $c = '';
    $CssUrl = '';
    $CssStr = '';
    $urlList = '';
    $startStr = '<link ';
    $CssStr = '';
    $endStr = '>';
    $ImgList = GetArray($content, $startStr, $endStr, false, false);
    //Call RwEnd(ImgList)
    $splStr = aspSplit($ImgList, '$Array$');
    foreach ($splStr as $key => $CssUrl) {
        if ($CssUrl != '' && inStr(lCase($CssUrl), 'stylesheet') > 0) {
            //获得Css加强版,改于20141125
            $CssUrl = lCase(replace(replace(replace($CssUrl, '"', ''), '\'', ''), '>', ' ')) . ' ';
            $startStr = 'href=';
            $endStr = ' ';
            if (inStr($CssUrl, $startStr) > 0 && inStr($CssUrl, $endStr) > 0) {
                $CssUrl = StrCut($CssUrl, $startStr, $endStr, 2);
            }
            if (inStr(vbCrlf() . $urlList . vbCrlf(), vbCrlf() . $CssUrl . vbCrlf()) == false) {
                if ($urlList != '') {
                    $urlList = $urlList . vbCrlf();
                }
                $urlList = $urlList . $CssUrl . vbCrlf();
            }
        }
    }
    $getCssListUrlList = $urlList;
    return @$getCssListUrlList;
}
예제 #5
0
function delTemplateMyNote($code)
{
    $startStr = '';
    $endStr = '';
    $i = '';
    $s = '';
    $handleNumb = '';
    $splStr = '';
    $Block = '';
    $id = '';
    $content = '';
    $DragSortCssStr = '';
    $DragSortStart = '';
    $DragSortEnd = '';
    $DragSortValue = '';
    $c = '';
    $lableName = '';
    $lableStartStr = '';
    $lableEndStr = '';
    $handleNumb = 99;
    //这里定义很重要
    //加强版  对这个也可以<!--#aaa start#--><!--#aaa end#-->
    $startStr = '<!--#';
    $endStr = '#-->';
    for ($i = 1; $i <= $handleNumb; $i++) {
        if (inStr($code, $startStr) > 0 && inStr($code, $endStr) > 0) {
            $lableName = StrCut($code, $startStr, $endStr, 2);
            if (inStr($lableName, ' start') > 0) {
                $lableName = mid($lableName, 1, len($lableName) - 6);
            }
            $s = $startStr . $lableName . $endStr;
            $lableStartStr = $startStr . $lableName . ' start' . $endStr;
            $lableEndStr = $startStr . $lableName . ' end' . $endStr;
            if (inStr($code, $lableStartStr) > 0 && inStr($code, $lableEndStr) > 0) {
                $s = StrCut($code, $lableStartStr, $lableEndStr, 1);
                //call echo(">>",s)
            }
            $code = replace($code, $s, '');
            //call echo("s",s)
            //call echo("lableName",lableName)
            //call echo("lableStartStr",replace(lableStartStr,"<","&lt;"))
            //call echo("lableEndStr",replace(lableEndStr,"<","&lt;"))
        } else {
            break;
        }
    }
    //清除ReadBlockList读出块列表内容  不过有个不足的地方,读出内容可以从外部读出内容,这个以后考虑
    //Call Eerr("ReadBlockList",ReadBlockList)
    //写于20141118
    //splStr = Split(ReadBlockList, vbCrLf)                 '不用这种,复杂了
    //修改于20151230
    for ($i = 1; $i <= $handleNumb; $i++) {
        $startStr = '<R#读出内容';
        $endStr = ' start#>';
        $Block = StrCut($code, $startStr, $endStr, 2);
        if ($Block != '') {
            $startStr = '<R#读出内容' . $Block . ' start#>';
            $endStr = '<R#读出内容' . $Block . ' end#>';
            if (inStr($code, $startStr) > 0 && inStr($code, $endStr) > 0) {
                $s = StrCut($code, $startStr, $endStr, 1);
                $code = replace($code, $s, '');
                //移除
            }
        } else {
            break;
        }
    }
    //删除翻页配置20160309
    $startStr = '<!--#list start#-->';
    $endStr = '<!--#list end#-->';
    if (inStr($code, $startStr) > 0 && inStr($code, $endStr) > 0) {
        $s = StrCut($code, $startStr, $endStr, 2);
        $code = replace($code, $s, '');
    }
    if (@$_REQUEST['gl'] == 'yun') {
        $content = getFText('/Jquery/dragsort/Config.html');
        $content = getFText('/Jquery/dragsort/模块拖拽.html');
        //Css样式
        $startStr = '<style>';
        $endStr = '</style>';
        if (inStr($content, $startStr) > 0 && inStr($content, $endStr) > 0) {
            $DragSortCssStr = StrCut($content, $startStr, $endStr, 1);
        }
        //开始部分
        $startStr = '<!--#top start#-->';
        $endStr = '<!--#top end#-->';
        if (inStr($content, $startStr) > 0 && inStr($content, $endStr) > 0) {
            $DragSortStart = StrCut($content, $startStr, $endStr, 2);
        }
        //结束部分
        $startStr = '<!--#foot start#-->';
        $endStr = '<!--#foot end#-->';
        if (inStr($content, $startStr) > 0 && inStr($content, $endStr) > 0) {
            $DragSortEnd = StrCut($content, $startStr, $endStr, 2);
        }
        //显示块内容
        $startStr = '<!--#value start#-->';
        $endStr = '<!--#value end#-->';
        if (inStr($content, $startStr) > 0 && inStr($content, $endStr) > 0) {
            $DragSortValue = StrCut($content, $startStr, $endStr, 2);
        }
        //控制处理
        $startStr = '<dIv datid=\'';
        $endStr = '</dIv>';
        $content = GetArray($code, $startStr, $endStr, false, false);
        $splStr = aspSplit($content, '$Array$');
        foreach ($splStr as $key => $s) {
            $startStr = '【DatId】\'';
            $id = mid($s, 1, inStr($s, $startStr) - 1);
            $s = mid($s, inStr($s, $startStr) + len($startStr), -1);
            //C=C & "<li><div title='"& Id &"'>" & vbcrlf & "<div " & S & "</div>"& vbcrlf &"<div class='clear'></div></div><div class='clear'></div></li>"
            $s = '<div' . $s . '</div>';
            //Call Die(S)
            $c = $c . replace(replace($DragSortValue, '{$value$}', $s), '{$id$', $id);
        }
        $c = replace($c, '【换行】', vbCrlf());
        $c = $DragSortStart . $c . $DragSortEnd;
        $code = mid($code, 1, inStr($code, '<body>') - 1);
        $code = replace($code, '</head>', $DragSortCssStr . '</head></body>' . $c . '</body></html>');
    }
    //删除VB软件生成的垃圾代码
    $startStr = '<dIv datid=\'';
    $endStr = '【DatId】\'';
    for ($i = 1; $i <= $handleNumb; $i++) {
        if (inStr($code, $startStr) > 0 && inStr($code, $endStr) > 0) {
            $id = StrCut($code, $startStr, $endStr, 2);
            $code = replace2($code, $startStr . $id . $endStr, '<div ');
        } else {
            break;
        }
    }
    $code = replace($code, '</dIv>', '</div>');
    //替换成这个结束div
    //最外围清除
    $startStr = '<!--#dialogteststart#-->';
    $endStr = '<!--#dialogtestend#-->';
    $code = replace($code, '<!--#dialogtest start#-->', $startStr);
    $code = replace($code, '<!--#dialogtest end#-->', $endStr);
    for ($i = 1; $i <= $handleNumb; $i++) {
        if (inStr($code, $startStr) > 0 && inStr($code, $endStr) > 0) {
            $s = StrCut($code, $startStr, $endStr, 1);
            $code = replace2($code, $s, '');
        } else {
            break;
        }
    }
    //内转清除
    $startStr = '<!--#teststart#-->';
    $endStr = '<!--#testend#-->';
    $code = replace($code, '<!--#del start#-->', $startStr);
    //与下面一样
    $code = replace($code, '<!--#del end#-->', $endStr);
    //与下面一样 多样式
    $code = replace($code, '<!--#test start#-->', $startStr);
    $code = replace($code, '<!--#test end#-->', $endStr);
    for ($i = 1; $i <= $handleNumb; $i++) {
        if (inStr($code, $startStr) > 0 && inStr($code, $endStr) > 0) {
            $s = StrCut($code, $startStr, $endStr, 1);
            $code = replace2($code, $s, '');
        } else {
            break;
        }
    }
    //删除注释的span
    $code = replace($code, '<sPAn class="testspan">', '');
    //测试Span
    $code = replace($code, '<sPAn class="testhidde">', '');
    //隐藏Span
    $code = replace($code, '</sPAn>', '');
    //delTemplateMyNote = Code:Exit Function
    $startStr = '<!--#';
    $endStr = '#-->';
    for ($i = 1; $i <= $handleNumb; $i++) {
        if (inStr($code, $startStr) > 0 && inStr($code, $endStr) > 0) {
            $s = StrCut($code, $startStr, $endStr, 1);
            $code = replace2($code, $s, '');
        } else {
            break;
        }
    }
    $delTemplateMyNote = $code;
    return @$delTemplateMyNote;
}