function getRandColor() { $splStr = ''; $splStr = aspSplit('#990000,#999900,#333366,#663300,#669966,#FF6600,#CC33CC,#993366,#FF0099,#669900,#336699,#99CCCC,#CC3366,#FF9900,#9933FF,#669900,#6699FF,#333366,#99CC66,#996600,#000033,#003300,#330000,#660000,#000099,#330099,#6600FF,#990000,#CC0000,#FF0000,#990066,#FF0066,#CC00CC', ','); $getRandColor = $splStr[pHPRand(0, uBound($splStr))]; return @$getRandColor; }
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; }
function batchReplaceL($content, $str) { $splstr = ''; $s = ''; $i = ''; $splstr = aspSplit($str, '|*|'); for ($i = 0; $i <= uBound($splstr); $i++) { $s = $splstr[$i]; if ($s != '') { $content = replaceL($content, $s); } } $batchReplaceL = $content; return @$batchReplaceL; }
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; }
function XY_ReadTemplateModule($action) { $moduleId = ''; $filePath = ''; $c = ''; $i = ''; $sourceList = ''; //源内容列表 20150109 $replaceList = ''; //替换内容列表 $splSource = ''; $splReplace = ''; $sourceStr = ''; $replaceStr = ''; $filePath = RParam($action, 'File'); $moduleId = RParam($action, 'ModuleId'); $sourceList = RParam($action, 'SourceList'); $replaceList = RParam($action, 'ReplaceList'); //Call Echo(SourceList,ReplaceList) if ($moduleId == '') { $moduleId = RParam($action, 'ModuleName'); } //用块名称 $filePath = $filePath . '.html'; //Call Echo("FilePath",FilePath) //Call Echo("ModuleId",ModuleId) $c = readTemplateModuleStr($filePath, '', $moduleId); //加替换于20160331 if ($sourceList != '' && $replaceList != '') { $splSource = aspSplit($sourceList, '[Array]'); $splReplace = aspSplit($replaceList, '[Array]'); for ($i = 0; $i <= uBound($splSource); $i++) { $sourceStr = $splSource[$i]; $replaceStr = $splReplace[$i]; $c = replace($c, $sourceStr, $replaceStr); } } $XY_ReadTemplateModule = $c; return @$XY_ReadTemplateModule; }
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; }
function addIndent($content, $IndentStr) { $splStr = ''; $s = ''; $c = ''; $c = ''; $splStr = aspSplit($content, vbCrlf()); foreach ($splStr as $key => $s) { $c = $c . $IndentStr . $s . vbCrlf(); } $addIndent = TrimVbCrlf($c); return @$addIndent; }
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; }
function getPostSql($id, $tableName, $fieldNameList) { $valueStr = ''; $editValueStr = ''; $sql = ''; $splStr = ''; $splxx = ''; $s = ''; $fieldList = ''; $fieldName = ''; $defaultFieldValue = ''; //字段名称 $fieldSetType = ''; //字段设置类型 $fieldValue = ''; //字段值 $systemFieldList = ''; //表字段列表 $systemFieldList = getHandleFieldList($GLOBALS['db_PREFIX'] . $tableName, '字段配置列表'); $postFieldList = ''; //post字段列表 $splPost = ''; $fieldContent = ''; $fieldConfig = ''; $postFieldList = getFormFieldList(); //以后再把下面与上面这两种处理方法事成一种看看行不行 $splPost = aspSplit($postFieldList, '|'); foreach ($splPost as $key => $fieldName) { $fieldContent = @$_POST[$fieldName]; if (inStr($systemFieldList, ',' . $fieldName . '|') > 0 && inStr(',' . $fieldList . ',', ',' . $fieldName . ',') == false) { //为自定义的 if (inStr($fieldNameList, ',' . $fieldName . '|') > 0) { $fieldConfig = mid($fieldNameList, inStr($fieldNameList, ',' . $fieldName . '|') + 1, -1); } else { $fieldConfig = mid($systemFieldList, inStr($systemFieldList, ',' . $fieldName . '|') + 1, -1); } $fieldConfig = mid($fieldConfig, 1, inStr($fieldConfig, ',') - 1); //call echo("config",fieldConfig) //call echo(fieldName,fieldContent) //call echo("fieldConfig",fieldConfig) $splxx = aspSplit($fieldConfig . '|||', '|'); $fieldName = $splxx[0]; //字段名称 $fieldSetType = $splxx[1]; //字段设置类型 $defaultFieldValue = $splxx[2]; //默认字段值 $fieldValue = ADSqlRf($fieldName); //代替上面,因为它处理了'符号 //call echo("fieldValue",fieldValue) //排序密码不处理 if ($fieldValue != '#NO******NO#') { //md5加密 if ($fieldSetType == 'md5') { $fieldValue = myMD5($fieldValue); } if ($fieldSetType == 'yesno') { if ($fieldValue == '') { $fieldValue = $defaultFieldValue; } //不为数字类型加单引号 } else { if ($fieldSetType == 'numb') { if ($fieldValue == '') { $fieldValue = $defaultFieldValue; } } else { if ($fieldName == 'flags') { //PHP里用法 if (EDITORTYPE == 'php') { if ($fieldValue != '') { $fieldValue = '|' . arrayToString($fieldValue, '|'); } } else { $fieldValue = '|' . arrayToString(aspSplit($fieldValue, ', '), '|'); } $fieldValue = '\'' . $fieldValue . '\''; //为时间 } else { if ($fieldSetType == 'time' || $fieldSetType == 'now') { if ($fieldValue == '') { $fieldValue = now(); } $fieldValue = '\'' . $fieldValue . '\''; //为时期 } else { if ($fieldSetType == 'date') { if ($fieldValue == '') { $fieldValue = aspDate(); } $fieldValue = '\'' . $fieldValue . '\''; } else { $fieldValue = '\'' . $fieldValue . '\''; } } } } } $fieldValue = unescape($fieldValue); //解码20160418 if ($valueStr != '') { $valueStr = $valueStr . ','; $editValueStr = $editValueStr . ','; } $valueStr = $valueStr . $fieldValue; $editValueStr = $editValueStr . $fieldName . '=' . $fieldValue; } if ($fieldList != '') { $fieldList = $fieldList . ','; } $fieldList = $fieldList . $fieldName; } } //自定义字段是否需要写入默认值 有的 $splStr = aspSplit($fieldNameList, ','); foreach ($splStr as $key => $s) { if (inStr($s, '|') > 0) { $splxx = aspSplit($s . '|||', '|'); $fieldName = $splxx[0]; //字段名称 $fieldSetType = $splxx[1]; //字段设置类型 $fieldValue = $splxx[2]; //默认字段值 if (inStr($systemFieldList, ',' . $fieldName . '|') > 0 && inStr(',' . $fieldList . ',', ',' . $fieldName . ',') == false) { if ($fieldSetType == 'date' && $fieldValue == '') { $fieldValue = aspDate(); } else { if (($fieldSetType == 'time' || $fieldSetType == 'now') && $fieldValue == '') { $fieldValue = now(); } } if ($fieldSetType != 'yesno' && $fieldSetType != 'numb') { $fieldValue = '\'' . $fieldValue . '\''; } if ($fieldList != '') { $fieldList = $fieldList . ','; $valueStr = $valueStr . ','; $editValueStr = $editValueStr . ','; } $fieldList = $fieldList . $fieldName; $valueStr = $valueStr . $fieldValue; $editValueStr = $editValueStr . $fieldName . '=' . $fieldValue; //call echo(fieldName,fieldSetType) } } } if ($id == '') { $sql = 'insert into ' . $GLOBALS['db_PREFIX'] . '' . $tableName . ' (' . $fieldList . ',updatetime) values(' . $valueStr . ',\'' . now() . '\')'; } else { $sql = 'update ' . $GLOBALS['db_PREFIX'] . '' . $tableName . ' set ' . $editValueStr . ',updatetime=\'' . now() . '\' where id=' . $id; } $getPostSql = $sql; return @$getPostSql; }
function showSelectDirList($folderPath, $valueStr) { $splStr = ''; $c = ''; $fileName = ''; $sel = ''; $splStr = aspSplit(getDirFileSort($folderPath), vbCrlf()); foreach ($splStr as $key => $fileName) { if ($fileName != '') { $sel = IIF($valueStr == $fileName, ' selected', ''); $c = $c . '<option value="' . $folderPath . $fileName . '" ' . $sel . '>' . $fileName . '</option>' . vbCrlf(); } } $showSelectDirList = $c; return @$showSelectDirList; }
function delJsNote($content) { $splstr = ''; $s = ''; $c = ''; $isMultiLineNote = ''; $s2 = ''; $isMultiLineNote = false; //多行注释默认为假 $splstr = aspSplit($content, vbCrlf()); foreach ($splstr as $key => $s) { $s2 = PHPTrim($s); if ($isMultiLineNote == true) { if (len($s2) >= 2) { if (right($s2, 2) == '*/') { $isMultiLineNote = false; } } $s = ''; } else { if (left($s2, 2) == '/*') { if (right($s2, 2) != '*/') { $isMultiLineNote = true; } $s = ''; } else { if (left($s2, 2) == '//') { $s = ''; } } } $c = $c . $s . vbCrlf(); } $delJsNote = $c; return @$delJsNote; }
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; }
function handleSplitArray($content, $SplOneType, $SplTowType) { $SplA = ''; $SplB = ''; $splStr = ''; $splxx = ''; $i = ''; $s = ''; $c = ''; $j = ''; $t = ''; $SplType = ''; $SplType = '[|Array|]'; $splStr = aspSplit($content, $SplOneType); for ($i = 0; $i <= uBound($splStr); $i++) { if ($splStr[$i] != '') { $splxx = aspSplit($splStr[$i], $SplTowType); $SplA = $SplA . $splxx[0] . $SplType; $SplB = $SplB . $splxx[1] . $SplType; } } if ($SplA != '') { $SplA = left($SplA, len($SplA) - len($SplType)); } if ($SplB != '') { $SplB = left($SplB, len($SplB) - len($SplType)); } $SplA = aspSplit($SplA, $SplType); $SplB = aspSplit($SplB, $SplType); $splStr[uBound($SplA)][uBound($SplB)]; for ($i = 0; $i <= uBound($SplA); $i++) { $splStr[$i][0] = $SplA[$i]; $splStr[$i][1] = $SplB[$i]; } $handleSplitArray = $splStr; return @$handleSplitArray; }
function handleTransferChinese($content, $sType) { $zd = ''; $s = ''; $splstr = ''; $splxx = ''; $zd = '�I|��,��|�},��|�@,��|�K,��|��,��|�a,��|�\\,��|�W,��|��,��|�T,��|�[,��|��,��|�C,��|�k,��|�O,��|��,��|��,��|�^,��|�r,��|��,��|�,��|��,��|��,��|�U,��|݅,��|ؐ,��|�^,��|�N,��|��,��|�v,��|��,��|�P,��|��,��|��,��|��,��|�],��|߅,��|��,��|�H,��|׃,��|�q,��|�p,��|��,��|�M,��|�e,��|�T,��|�l,��|�I,��|�e,��|�P,��|�,��|��,��|��,��|�K,��|�g,��|�a,��|ؔ,��|��,��|�Q,��|��,��|�M,��|�K,��|�N,��|�n,��|œ,��|�},��|��,��|��,��|��,��|��,��|�y,��|��,��|Ԍ,��|�v,��|��,��|�s,��|�,��|,��|�p,��|�P,��|�a,��|�U,��|�,��|��,��|�L,��|�L,��|��,��|�c,��|�S,��|��,��|�n,��|܇,��|��,��|�m,��|�,��|�r,��|��,��|�Q,��|��,��|�\\,��|�G,��|�V,��|�t,��|�Y,��|�u,��|�X,��|��,��|�_,��|�x,��|��,��|��,��|�P,��|�I,��|�I,��|��,��|�N,��|�z,��|�r,��|�A,��|��,��|�|,��|̎,��|��,��|��,��|�J,��|��,��|�N,��|��,��|�b,��|�o,��|�~,��|�n,��|,��|�[,��|��,��|��,��|��,��|��,��|�f,��|�Z,��|�e,��|�_,��|��,��|�J,��|��,��|��,��|��,��|đ,��|��,��|�Q,��|��,��|��,��|��,��|�h,��|ʎ,��|�n,��|�v,��|�u,��|�\\,��|��,��|�I,��|��,��|��,��|��,��|��,��|�f,��|��,��|�,��|�c,��|�|,��|�,��|�,��|�{,��|ՙ,��|�B,��|�,��|�,��|�V,��|ӆ,��|�G,��|�|,��|��,��|��,��|��,��|��,��|��,��|�x,��|ـ,��|�,��|�,��|��,��|��,��|��,��|�,��|��,��|��,��|�D,��|�g,��|�Z,��|��,��|�Z,��|�~,��|Ӟ,��|��,��|�I,��|��,��|��,��|�D,��|�E,��|�l,��|�y,��|�m,��|�\\,��|�C,��|��,��|,��|�,��|�L,��|��,��|�w,��|�u,��|�U,��|�M,��|��,��|��,��|�^,��|��,��|�S,��|�S,��|��,��|�h,��|�L,��|��,��|�T,��|�p,��|�S,��|�P,��|�w,��|ݗ,��|��,��|�o,��|�x,��|��,��|ؓ,��|Ӈ,��|�D,��|�`,��|ԓ,��|�},��|�w,��|�U,��|�s,��|��,��|�M,��|��,��|��,��|�,��|�V,��|��,��|�,��|�R,��|��,��|�w,��|�t,��|��,��|�o,��|��,��|�m,��|�,��|ؕ,��|�^,��|��,��|ƈ,��|��,��|ُ,��|��,��|�M,��|�,��|��,��|��,��|�P,��|�^,��|�^,��|�T,��|؞,��|�V,��|Ҏ,��|�w,��|��,��|�|,��|܉,��|Ԏ,��|�F,��|��,��|݁,��|�L,��|�,��|��,��|�^,��|�,��|�n,��|�h,��|̖,��|�u,��|�Q,��|�R,��|�M,��|�Z,��|��,��|�t,��|��,��|�o,��|��,��|��,��|�W,��|�A,��|��,��|��,��|Ԓ,��|��,��|��,��|�g,��|�h,��|߀,��|��,��|�Q,��|��,��|��,��|��,��|�o,��|�S,��|�e,��|�],��|�x,��|��,��|�V,��|�x,��|��,��|�Z,��|�R,��|�M,��|�d,��|�L,��|ȝ,��|��,��|�@,��|؛,��|��,��|��,��|�C,��|�e,��|��,��|�E,��|�I,��|�u,��|��,��|��,��|�O,��|,��|��,��|�D,��|��,��|�E,��|��,��|��,��|Ӌ,��|ӛ,��|�H,��|�^,��|�o,��|�A,��|�v,��|�a,��|�Z,��|�,��|�r,��|�{,��|��,��|�O,��|��,��|�{,��|�g,��|�D,��|�},��|�O,��|�z,��|�A,��|�|,��|��,��|��,��|��,��|��,��|�p,��|�],��|��,��|�b,��|�`,��|�v,��|Ҋ,��|�I,��|Ş,��|��,��|�T,��|�u,��|�R,��|��,��|��,��|�{,��|�Y,��|��,��|��,��|�v,��|�u,��|�z,��|��,��|�,��|��,��|��,��|�q,��|�C,��|�e,��|�_,��|�,��|�U,��|�g,��|�I,��|�^,��|�A,��|��,��|��,��|�Y,��|�],��|��,��|�o,��|�\\,��|�H,��|֔,��|�M,��|�x,��|�a,��|�M,��|��,��|�G,��|�o,��|�L,��|�@,��|��,��|�i,��|�o,��|�R,��|��,��|�d,��|��,��|��,��|�m,��|��,��|�f,��|�x,��|�e,��|��,��|�,��|��,��|��,��|�N,��|��,��|�X,��|�Q,��|�E,��|�^,��|�x,��|܊,��|�E,��|�_,��|�P,��|�w,��|��,��|�n,��|��,��|��,��|��,��|��,��|ѝ,��|�K,��|�~,��|��,��|�V,��|��,��|�r,��|̝,��|�h,��|�Q,��|��,��|��,��|�U,��|�,��|Ϟ,��|�D,��|�R,��|��,��|ه,��|�{,��|��,��|�r,��|�@,��|�@,��|�m,��|��,��|,��|��,��|�[,��|��,��|�|,��|��,��|�E,��|��,��|��,��|��,��|��,��|��,��|�D,��|��,��|�,��|�I,��|�h,��|,��|�x,��|��,��|�Y,��|��,��|��,��|��,��|�[,��|�v,��|�r,��|�`,��|�z,��|,��|ɏ,��|�B,��|�,��|�z,��|�i,��|��,��|��,��|Ę,��|�,��|��,��|��,��|��,��|�Z,��|��,��|��,��|�v,��|Տ,��|��,��|�|,��|�,��|�C,��|�R,��|��,��|�[,��|�C,��|�U,��|�g,��|�,��|�`,��|�X,��|�I,��|�s,��|��,��|��,��|�@,��|��,��|�\\,¢|��,¤|�],¥|��,¦|��,§|��,¨|�t,«|�J,¬|�R,|�B,®|�],¯|�t,°|��,±|�u,²|̔,³|��,¸|�T,»|��,¼|�,½|�,¿|�H,��|��,��|�X,��|�H,��|��,��|�|,��|�],��|�V,��|�G,��|�n,��|��,��|�\\,��|��,��|�y,��|��,��|݆,��|��,��|��,��|�S,��|�],��|Փ,��|�},��|�_,��|߉,��|�,��|�j,��|�,��|�,��|�j,��|��,��|��,��|�a,��|Λ,��|�R,��|�R,��|��,��|�I,��|��,��|�u,��|�~,��|�},��|�m,��|�z,��|�U,��|�M,á|֙,è|؈,ê|�^,í|�T,ó|�Q,û|�],þ|�V,��|�T,��|��,��|��,��|�i,��|��,��|�[,��|�i,��|��,��|Ғ,��|��,��|�d,��|��,��|�R,��|��,��|��,��|�},��|�Q,��|�,��|և,ı|�\\,Ķ|��,��|��,��|�c,��|�{,��|�y,��|��,��|�X,��|��,��|�[,��|�H,��|��,��|�M,��|ā,��|�f,��|�,��|�B,��|,��|��,��|�,��|�,��|��,��|��,��|��,š|�Q,Ţ|��,ť|�o,Ŧ|�~,ŧ|ē,Ũ|��,ũ|�r,ű|��,ŵ|�Z,ŷ|�W,Ÿ|�t,Ź|��,Ż|�I,Ž|�a,��|�P,��|��,��|��,��|�r,��|��,��|�i,ƭ|�_,Ʈ|�h,Ƶ|�l,ƶ|ؚ,ƻ|�O,ƾ|�{,��|�u,��|��,��|�H,��|��,��|�,��|��,��|�V,��|��,��|Ě,��|�R,��|�T,��|�M,��|��,��|��,��|��,��|ә,ǣ|��,ǥ|�F,Ǧ|�U,Ǩ|�w,ǩ|��,ǫ|�t,Ǯ|�X,ǯ|�Q,DZ|��,dz|�\\,Ǵ|�l,ǵ|�q,ǹ|��,Ǻ|��,ǽ|��,Ǿ|�N,ǿ|��,��|��,��|�@,��|��,��|��,��|�S,��|�N,��|�[,��|�`,��|�J,��|�H,��|��,��|�p,��|��,��|�A,��|�,��|Ո,��|�c,��|��,��|�F,��|څ,��|�^,��|�|,��|�,ȣ|�x,ȧ|�E,Ȩ|��,Ȱ|��,ȴ|�s,ȵ|�o,ȷ|�_,��|,��|��,��|�_,��|�@,��|��,��|�g,��|�J,��|�x,��|�s,��|�q,��|ܛ,��|�J,��|�c,��|��,��|��,��|�_,��|�w,��|ِ,ɡ|��,ɥ|��,ɧ|�},ɨ|��,ɬ|��,ɱ|��,ɲ|�x,ɴ|��,ɸ|�Y,ɹ|��,ɾ|�h,��|�W,��|�,��|٠,��|��,��|��,��|��,��|�p,��|��,��|�B,��|�d,��|�z,��|��,��|�O,��|��,��|��,��|��,��|�I,��|�B,��|,��|�K,ʤ|��,ʦ|��,ʨ|�{,ʪ|��,ʫ|Ԋ,ʱ|�r,ʴ|�g,ʵ|��,ʶ|�R,ʻ|�,��|��,��|�m,��|�,��|�,��|ҕ,��|ԇ,��|��,��|�F,��|��,��|ݔ,��|��,��|�H,��|��,��|�g,��|��,��|�Q,��|��,˧|��,˫|�p,˭|�l,˰|��,˳|�,˵|�f,˶|�T,˸|�q,˿|�z,��|�,��|,��|�Z,��|�,��|�A,��|�b,��|�\\,��|�K,��|�V,��|�C,��|�m,��|�S,��|��,��|�q,��|�O,��|�p,��|�S,��|�s,��|��,��|�i,̡|�H,̢|��,̨|�_,̬|�B,̯|��,̰|؝,̱|�c,̲|��,̳|��,̷|�T,̸|Մ,̾|�@,��|��,��|�C,��|��,��|�{,��|ӑ,��|�v,��|�`,��|�R,��|�},��|�w,��|��,��|�l,��|�N,��|�F,��|�d,��| ,��|�N,ͭ|�~,ͳ|�y,ͷ|�^,ͺ|�d,ͼ|�D,��|�F,��|�j,��|͑,��|Ó,��|�r,��|�W,��|�,��|�E,��|�m,��|��,��|��,��|�B,��|�f,��|�W,Τ|�f,Υ|�`,Χ|��,Ϊ|��,Ϋ|�H,ά|�S,έ|Ȕ,ΰ|��,α|��,γ|��,ν|�^,��|�l,��|��,��|,��|�y,��|��,��|��,��|�Y,��|��,��|,��|�u,��|�C,��|�P,��|��,��|�u,��|��,��|�_,��|�o,��|ʏ,��|��,��|�],��|�F,��|��,��|�`,��|�a,��|��,Ϯ|�u,ϰ|��,ϳ|�,Ϸ|��,ϸ|��,Ϻ|�r,Ͻ|ݠ,Ͽ|�{,��|�b,��|�M,��|�B,��|��,��|�r,��|�w,��|�t,��|�,��|�e,��|�@,��|�U,��|�F,��|�I,��|�h,��|�W,��|�w,��|��,��|��,��|��,��|�,��|�l,��|Ԕ,��|�,��|�,��|ʒ,��|��,��|�N,��|��,Х|�[,Э|�f,Ю|��,Я|�y,в|�{,г|�C,д|��,к|�a,л|�x,п|�\\,��|�,��|�d,��|��,��|��,��|�P,��|�C,��|̓,��|�u,��|�,��|�S,��|��,��|�w,��|�m,��|,��|��,ѡ|�x,Ѣ|�_,Ѥ|�k,ѧ|�W,ѫ|��,ѯ|ԃ,Ѱ|��,ѱ|�Z,ѵ|Ӗ,Ѷ|Ӎ,ѷ|�d,ѹ|��,ѻ|�f,Ѽ|��,��|��,��|��,��|Ӡ,��|�,��|��,��|�},��|��,��|�r,��|�,��|�,��|�G,��|��,��|��,��|��,��|�V,��|�,��|��,��|��,��|�P,��|��,��|�,��|�W,��|�B,��|��,��|��,ҡ|�u,Ң|��,ң|�b,Ҥ|�G,ҥ|�{,ҩ|ˎ,ү|��,ҳ|�,ҵ|�I,Ҷ|�~,ҽ|�t,ҿ|�,��|�U,��|�z,��|�x,��|ρ,��|ˇ,��|�|,��|��,��|�x,��|Ԅ,��|�h,��|�x,��|�g,��|��,��|�[,��|�a,��|�,��|�y,��|�,��|�[,ӣ|��,Ӥ|��,ӥ|��,Ӧ|��,ӧ|�t,Ө|��,ө|Ξ,Ӫ|�I,ӫ|��,Ӭ|ω,Ӯ|�A,ӱ|�f,Ӵ|��,ӵ|��,Ӷ|��,Ӹ|�b,ӻ|�x,ӽ|ԁ,��|��,��|�n,��|�],��|�,��|�q,��|�T,��|ݛ,��|�~,��|�O,��|��,��|�c,��|�Z,��|�Z,��|�z,��|�u,Ԥ|�A,Ԧ|�S,ԧ|�x,Ԩ|�Y,ԯ|�@,|�@,Ա|�T,Բ|�A,Ե|��,Զ|�h,Լ|�s,Ծ|�S,Կ|�,��|��,��|��,��|�,��|�y,��|��,��|�E,��|�\\,��|�N,��|�j,��|��,��|�,��|�s,��|��,��|�d,��|��,��|��,��|ٝ,��|�E,��|�K,��|�,��|��,��|؟,��|��,��|�t,��|��,��|�\\,��|ٛ,��|܈,ա|�,բ|�l,դ|��,թ|�p,ի|�S,ծ|��,ձ|��,յ|�K,ն|��,շ|ݚ,ո|��,ջ|��,ս|��,��|�`,��|��,��|�q,��|��,��|�~,��|Û,��|�w,��|�U,��|�H,��|�N,��|�@,��|ؑ,��|�,��|��,��|�\\,��|�,��|�,��|��,��|��,��|�b,��|��,֡|��,֢|�Y,֣|��,֤|�C,֯|��,ְ|,ִ|��,ֽ|��,ֿ|��,��|�S,��|��,��|�|,��|��,��|�,��|�K,��|�N,��|�[,��|��,��|�a,��|�S,��|��,��|��,��|�E,��|�i,��|�T,��|�D,��|�T,��|��,��|��,��|�A,��|�T,פ|�v,ר|��,ש|�u,ת|�D,|ٍ,|��,ׯ|�f,װ|�b,ױ|�y,׳|��,״|��,|�F,|٘,|��,|�Y,|Ձ,|��,��|��,��|��,��|Ɲ,��|�Y,��|�n,��|ۙ,��|�C,��|��,��|�v,��|�u,��|�{,��|�M,��|�@,ب|��,غ|�G,��|�d,��|��,��|��,��|��,��|�P,��|�v,��|�I,��|�Q,��|�T,��|ّ,��|�q,��|��,��|��,��|��,��|�t,��|��,��|��,٭|��,ٯ|�z,ٱ|��,ٲ|��,ٳ|��,ٶ|�R,��|�f,��|��,��|�E,��|��,��|��,��|��,��|�L,��|�e,��|�Z,��|��,��|�D,��|��,��|Ж,��|�C,��|�L,��|�A,ڦ|ӓ,ڧ|ӏ,ڨ|Ә,ک|֎,ڪ|�n,ګ|�G,ڬ|�b,ڭ|�X,ڮ|�g,گ|�t,ڰ|�x,ڱ|�r,ڲ|�E,ڳ|�C,ڴ|ԟ,ڵ|ԑ,ڶ|Ԝ,ڷ|Ԗ,ڸ|ԍ,ڹ|ԏ,ں|Պ,ڻ|՟,ڼ|Ԃ,ڽ|�V,ھ|�a,ڿ|�N,��|�O,��|Ռ,��|Վ,��|Ն,��|,��|Ք,��|�~,��|�r,��|�R,��|�G,��|�o,��|�],��|�@,��|�I,��|�X,��|�O,��|�B,��|�J,��|՛,��|փ,��|ו,��|�q,��|�u,��|�k,��|ֆ,��|�P,��|�S,��|�H,��|ח,��|�d,��|,��|��,��|�,��|�,��|��,��|�w,��|��,ۣ|�P,ۦ|��,۩|�i,۪|�B,ۻ|�c,ۼ|�J,۽|��,��|��,��|��,��|��,��|��,��|��,��|��,��|�N,��|�s,��|�P,��|��,��|�_,ܳ|�H,ܼ|�G,ܿ|�|,��|˞,��|�{,��|�O,��|ɐ,��|�S,��|�r,��|�d,��|�\\,��|�L,��|��,��|ʁ,��|ɜ,��|�w,��|�C,��|�j,��|��,��|��,ݡ|�n,ݣ|�|,ݥ|�p,ݦ|ȇ,ݪ|�P,ݫ|�n,ݰ|�W,ݲ|�W,ݵ|�~,ݺ|�L,��|�M,��|�r,��|ʉ,��|�V,��|�,��|�y,��|�v,��|ʚ,��|�`,��|�A,ޭ|�I,|˒,|�\\,��|�Y,��|�Y,��|��,��|��,��|��,��|��,��|��,��|��,��|��,��|�d,��|�t,ߢ|�X,ߣ|�],ߥ|�x,ߦ|�{,߱|�s,ߴ|�\\,|�`,߽|��,߿|��,��|�h,��|�J,��|��,��|�},��|�^,��|��,��|��,��|��,��|��,��|��,��|�O,��|�Z,��|��,��|�K,��|��,�|�D,�|��,�|��,��|��,��|�\\,��|��,��|��,��|��,��|��,��|��,��|��,��|��,�|��,�|�s,�|��,�|��,�|�F,�|��,�|��,��|��,��|��,��|�V,��|��,��|��,��|�p,��|��,��|�E,��|��,��|�s,��|��,�|�M,�|�J,�|�h,�|�,�|�q,�|�,��|�,��|�,��|�,��|�A,��|�G,��|�Q,��|�t,��|�x,��|�},��|�~,��|��,��|�T,��|�s,��|�[,��|��,��|��,��|�Y,��|��,��|��,��|��,��|��,��|�Q,��|��,��|��,��|��,�|��,�|�a,�|��,�|�C,�|�|,��|�V,��|�Z,��|�,��|�b,��|�h,��|�`,��|�Y,��|�,��|�,��|�b,��|�,��|�,��|�,��|�],��|�,��|�,��|�,��|�,��|�,��|�H,��|�D,��|�I,��|�R,��|��,��|��,��|�{,��|�o,��|�T,��|��,�|��,�|��,�|��,�|�g,�|�G,�|��,�|�Z,�|��,��|�^,��|��,��|�c,��|�O,��|��,��|�],��|��,��|�u,��|�t,��|��,��|�|,�|��,�|�q,��|߃,��|ޟ,��|ߊ,��|��,��|��,��|��,��|��,�|��,�|�I,�|��,�|�D,�|�z,�|��,�|��,��|��,��|��,��|��,��|��,��|��,��|�z,��|�,��|�,��|�|,��|�A,��|�w,��|�~,��|�,��|�,��|�,��|�P,��|�U,��|�S,��|�K,��|�,��|�s,��|�\\,��|�,��|�t,��|�~,��|�,��|�,��|�,��|�K,��|�J,��|�u,��|�q,��|�v,��|�w,��|�k,�|��,�|��,�|��,�|�C,�|��,�|��,�|�U,�|�E,�|�I,�|�H,�|�W,�|�{,�|��,�|��,�|��,�|�c,�|�_,�|�p,�|�i,�|�E,�|�R,�|�^,�|�J,�|�U,�|�l,�|�~,�|�|,�|��,�|��,��|�D,��|��,��|��,��|��,��|�P,��|��,��|�N,��|�b,��|�d,��|�c,��|�r,��|�O,��|�V,��|�_,��|�~,��|�z,��|�w,��|��,��|��,��|�i,��|��,��|��,��|�\\,��|�`,��|�R,��|�Q,��|�y,��|�^,��|�|,��|�k,��|��,��|�,��|�t,��|�q,��|�I,�|�a,�|��,�|��,�|�t,�|�y,�|�w,�|�q,��|��,��|��,��|��,��|�n,��|��,��|��,��|��,��|�d,��|��,��|�f,��|��,��|��,��|�E,��|��,��|��,��|�u,��|��,��|��,��|��,��|��,�|��,�|��,�|��,�|��,�|��,�|��,��|��,��|��,��|�{,��|��,��|��,��|�_,��|�{,��|��,��|��,��|��,��|��,��|��,��|ܐ,��|ܗ,��|�V,��|�_,��|�T,��|�W,��|�F,��|�],��|�U,��|�Y,��|�e,��|�b,��|�`,��|�m,��|݂,��|�y,�|�z,�|�w,�|ݏ,�|�A,�|�O,�|��,�|��,�|��,�|�T,�|��,��|��,��|��,��|��,��|�S,��|�B,��|�L,��|�O,��|ٗ,��|�D,��|�W,��|�B,��|�c,��|�l,��|�g,��|�y,��|َ,��|җ,��|�J,��|Ҡ,��|�],��|�D,��|�M,��|�P,��|�U,�|��,�|��,�|��,�|��,�|��,��|�V,��|�F,��|Ä,��|Ē,��|�T,��|�t,��|�e,��|Ĝ,�|�e,�|�R,�|�S,�|�Z,�|�`,�|�j,�|ݞ,�|�W,�|��,�|��,�|��,��|��,��|��,��|��,��|�F,��|�c,��|�[,��|��,��|�U,�|��,�|��,�|��,�|��,�|��,�|��,�|�X,�|��,��|�Z,��|�a,��|��,��|��,��|��,��|�~,��|��,��|�{,��|�A,��|��,��|Ï,�|��,�|�`,�|�b,��|�,��|�,��|�,��|�,��|�,��|�Q,��|�A,��|�,��|�{,��|�O,��|�S,��|�,��|�,��|�k,��|�j,��|�[,��|�,��|�^,��|�,��|�Z,��|�,��|�`,��|�,��|�,��|�,��|�,��|�X,��|�f,��|�g,��|�,��|�p,��|�,��|�C,��|�B,��|�G,��|�,��|�,��|�I,��|�D,��|�,��|�s,��|�B,��|�,��|�e,��|�t,��|�K,��|�,��|�z,��|�,��|�b,��|�A,��|�f,��|�,��|�x,�|�|,�|�,�|�P,�|�C,�|�|,�|�|,�|�@,�|�,�|�,�|�n,�|�,�|�H,�|�,�|�,�|�~,�|�S,�|�s,�|�Z,�|�u,�|�|,�|�H,�|�,�|�Q,�|�,�|�K,��|�d,��|�,��|�U,��|�O,��|�,��|�|,��|�J,��|�,��|�,��|�},��|�D,��|�U,��|�I,��|�,��|�,��|�k,��|�,��|�y,��|�,��|�,��|�\\,��|�S,��|�M,��|�N,��|�,��|�O,��|�,��|�,��|�C,��|�,��|�h,��|�,��|�|,��|�,��|�j,��|�,��|�Z,��|�C,��|�O,��|�s,��|�R,�|�w,�|�F,�|�S,�|�d,�|�c,�|��,�|��,�|�R,�|�z,�|�|,�|��,�|��,�|�v,�|��,�|��,�|�[,�|�P,�|�Z,��|�],��|�O,��|��,��|�Y,��|�^,��|�g,��|�l,��|��,��|��,��|��,��|�\\,��|�F,��|�_,��|�Y,��|�W,��|�p,��|�w,��|��,��|��,��|��,��|��,��|��,��|�X,��|�X,��|�O,��|��,��|�A,��|�B,��|�D,��|��,��|��,�|�`,�|�a,�|�],�|�d,�|�],��|�M,��|�d,��|ў,��|�c,��|�@,��|�h,��|��,��|�e,��|,��|,��|�,��|�,��|�@,�|�R,�|�M,�|�},�|�W,�|�h,�|�,�|�,�|�D,�|�,�|�,�|�,�|�A,�|�l,�|ϊ,�|͘,�|ϖ,��|Ϡ,��|�|,��|͐,��|�u,��|·,��|ϓ,��|�X,��|ϔ,��|�N,�|��,��|�V,��|�a,��|�e,��|�`,��|�~,��|�j,��|�D,��|�X,��|��,��|��,��|��,��|�f,��|�[,��|Ŝ,��|�A,��|�U,��|�u,��|�i,��|�c,��|�g,��|�R,��|�{,��|��,��|ڎ,��|�,��|�,��|�z,��|�O,��|ۄ,��|�V,��|�E,��|ۋ,��|�],��|�Q,��|�W,��|�U,��|�b,��|ۘ,��|�X,��|�k,��|�g,��|�x,��|�z,��|�n,��|�Z,��|�V,��|�\\,��|�Z,��|�e,��|�_,��|�f,��|�b,��|�l,��|�r,��|�p,��|�},��|�w,��|�x,��|��,��|�h,��|ׇ,��|�,��|�Y,��|��,��|��,��|�|,��|�d,��|�V,��|�c,��|�T,��|�q,��|�^,��|�n,��|�b,��|�q,��|�o,��|�\\,��|��,��|�~,��|��,��|��,��|��,��|��,��|��,��|��,��|��,��|�a,��|��,��|�N,��|�O,��|�E,��|�H,��|�K,��|�F,��|�T,��|��,��|��,��|�l,��|�{,��|�q,��|�v,��|�m,��|��,��|��,��|��,��|��,��|��,��|��,��|�B,��|�L,��|��,��|�Z,��|�X,��|�V,��|�k,��|�^,��|�d,��|�X,��|�t,��|�y,��|�x,��|�|,��|�u,��|��,��|�,��|�W,��|�N,��|�t,��|�o,��|�B'; $splstr = aspSplit($zd, ','); foreach ($splstr as $key => $s) { if (inStr($s, '|') > 0) { $splxx = aspSplit($s, '|'); if ($sType == 1) { $content = replace($content, $splxx[1], $splxx[0]); } else { $content = replace($content, $splxx[0], $splxx[1]); } } } $handleTransferChinese = $content; return @$handleTransferChinese; }
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']); //系统日志 }
function getHttpUrlState($httpurl) { $arr = @get_headers($httpurl, 1); if (!empty($arr)) { if (is_array($arr[0])) { $s = $arr[0][0]; } else { $s = $arr[0]; } $splstr = aspSplit($s, " "); $s = intval($splstr[1]); return $s; } else { return -1; } }
function getSplitCount($content, $splStr) { $splxx = ''; $splxx = aspSplit($content, $splStr); $getSplitCount = uBound($splxx); if (getSplitCount > 0) { $getSplitCount = getSplitCount + 1; } //不为空加一 return @$getSplitCount; }
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; }
function getYMDHMS($timeStr, $sType) { $splstr = ""; $timeStr = replace(replace(replace(replace(replace(replace($timeStr, "年", "-"), "月", "-"), "日", "-"), "时", "-"), "分", "-"), "秒", "-"); $timeStr = replace(replace(replace(replace(replace($timeStr, " ", "-"), ":", "-"), "/", "-"), "--", "-"), "--", "-") . "------"; $splstr = aspSplit($timeStr, "-"); $nYear = $splstr[0]; $nMonth = $splstr[1]; $nDay = $splstr[2]; $nHour = $splstr[3]; $nMinute = $splstr[4]; $nSecond = $splstr[5]; if (len($nYear) == 1) { $nYear = "0" . $nYear; } if (len($nMonth) == 1) { $nMonth = "0" . $nMonth; } if (len($nDay) == 1) { $nDay = "0" . $nDay; } if (len($nHour) == 1) { $nHour = "0" . $nHour; } if (len($nMinute) == 1) { $nMinute = "0" . $nMinute; } if (len($nSecond) == 1) { $nSecond = "0" . $nSecond; } if ($nHour == "") { $nHour = "00"; } if ($nMinute == "") { $nMinute = "00"; } if ($nSecond == "") { $nSecond = "00"; } $sType = CStr($sType); if ($sType == "年" || $sType == "0") { $getYMDHMS = $nYear; } else { if ($sType == "月" || $sType == "1") { $getYMDHMS = $nMonth; } else { if ($sType == "日" || $sType == "2") { $getYMDHMS = $nDay; } else { if ($sType == "时" || $sType == "3") { $getYMDHMS = $nHour; } else { if ($sType == "分" || $sType == "4") { $getYMDHMS = $nMinute; } else { if ($sType == "秒" || $sType == "5") { $getYMDHMS = $nSecond; } } } } } } return @$getYMDHMS; }
function replaceContentRowModule($content, $searchValue, $ReplaceValue, $ReplaceType) { $splStr = ''; $splxx = ''; $i = ''; $splType = ''; $valueList = ''; $sourceValueList = ''; $sourceValue = ''; $newReplaceValue = ''; $newSearchValue = ''; $splType = '$Array$'; for ($i = 1; $i <= 99; $i++) { if (inStr($content, $searchValue) > 0) { $newSearchValue = getEachStrAddValue($searchValue, '|*|'); if (inStr($splType . $valueList . $splType, $splType . $newSearchValue . $splType) == false) { if ($valueList != '') { $valueList = $valueList . $splType; } $valueList = $valueList . $newSearchValue; if ($sourceValueList != '') { $sourceValueList = $sourceValueList . $splType; } $sourceValueList = $sourceValueList . $searchValue; } if ($ReplaceType == '追加在前') { $newReplaceValue = $ReplaceValue . $newSearchValue; } else { if ($ReplaceType == '追加在后' || $ReplaceType == '追加') { $newReplaceValue = $newSearchValue . $ReplaceValue; } else { $newReplaceValue = $ReplaceValue; } } $content = replace($content, $searchValue, $newReplaceValue); } else { break; } } //call rwend(content) $splStr = aspSplit($valueList, $splType); $splxx = aspSplit($sourceValueList, $splType); for ($i = 0; $i <= uBound($splStr); $i++) { $sourceValue = $splStr[$i]; $ReplaceValue = $splxx[$i]; $content = replace($content, $sourceValue, $ReplaceValue); } $replaceContentRowModule = $content; return @$replaceContentRowModule; }
*/ $splstr = ''; $s = ''; $conn = OpenConn(); $parentid = ''; $title = ''; $lableName = ''; $content = ''; $tempS = ''; $url = ''; $isdisplay = ''; $nCount = ''; //echo('path='.handlePath('./../admin/后台菜单配置.ini')); $content = getftext(handlePath('./../admin/后台菜单配置.ini')); $content = Replace($content, "\t", ' '); $splStr = aspSplit($content, chr(10)); //不用vbCrlf() 是因为在上传到GitHut上去,下载下来它会把后台菜单配置.ini文件编码转成utf-8 20160409 $nCount = 0; foreach ($splStr as $s) { $tempS = $s; $s = AspTrim($s); if ($tempS != '' && substr(phptrim($s) . ' ', 0, 1) != '#') { $nCount = $nCount + 1; //总数 if (substr($tempS, 0, 4) == ' ') { } else { $parentid = '-1'; } if (trim(LCase($tempS)) == 'end') { break; } else {
function getStrIntContentNumb($content, $findStr) { $splStr = ''; if (inStr($content, $findStr) > 0) { $splStr = aspSplit($content, $findStr); $getStrIntContentNumb = uBound($splStr); } else { $getStrIntContentNumb = 0; } return @$getStrIntContentNumb; }
function setHtmlParam($content, $ParamList) { $splStr = ''; $startStr = ''; $endStr = ''; $c = ''; $paramValue = ''; $ReplaceStartStr = ''; $endStr = '\''; $splStr = aspSplit($ParamList, '|'); foreach ($splStr as $key => $startStr) { $startStr = aspTrim($startStr); if ($startStr != '') { //替换开始字符 因为开始字符类型可变 不同 $ReplaceStartStr = $startStr; if (left($ReplaceStartStr, 3) == 'img') { $ReplaceStartStr = mid($ReplaceStartStr, 4, -1); } else { if (left($ReplaceStartStr, 1) == 'a') { $ReplaceStartStr = mid($ReplaceStartStr, 2, -1); } else { if (inStr('|ul|li|', '|' . left($ReplaceStartStr, 2) . '|') > 0) { $ReplaceStartStr = mid($ReplaceStartStr, 3, -1); } } } $ReplaceStartStr = ' ' . $ReplaceStartStr . '=\''; $startStr = ' ' . $startStr . '=\''; if (inStr($content, $startStr) > 0 && inStr($content, $endStr) > 0) { $paramValue = StrCut($content, $startStr, $endStr, 2); $paramValue = HandleInModule($paramValue, 'end'); //处理内部模块 $c = $c . $ReplaceStartStr . $paramValue . $endStr; } } } $setHtmlParam = $c; return @$setHtmlParam; }
function unHTMLToAscChr($content) { $i = ''; $s = ''; $c = ''; $splStr = ''; $temp = ''; $c = $content; $temp = ''; $c = replace($c, 'Chr(', ''); $c = replace($c, ')&', ' '); $c = replace($c, ')', ' '); $splStr = aspSplit($c, ' '); for ($i = 0; $i <= uBound($splStr) - 1; $i++) { $s = $splStr[$i]; $temp = $temp . chr($s); } $unHTMLToAscChr = $temp; return @$unHTMLToAscChr; }
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))); } }
function displayPanelList($dir) { $content = ''; $splstr = ''; $s = ''; $c = ''; $content = getDirFolderNameList($dir); $splstr = aspSplit($content, vbCrlf()); $c = '<select name=\'selectLeftStyle\'>'; foreach ($splstr as $key => $s) { $s = '<option value=\'\'>' . $s . '</option>'; $c = $c . $s . vbCrlf(); } $displayPanelList = $c . '</select>'; return @$displayPanelList; }
function removeBlankLines($content) { $s = ''; $c = ''; $splStr = ''; $splStr = aspSplit($content, vbCrlf()); foreach ($splStr as $key => $s) { if (replace(replace($s, vbTab(), ''), ' ', '') != '') { if ($c != '') { $c = $c . vbCrlf(); } $c = $c . $s; } } $removeBlankLines = $c; return @$removeBlankLines; }
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; }
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; }
function handleDisplayOnlineEditDialog($url, $content, $cssStyle, $replaceStr) { $controlStr = ''; $splStr = ''; $s = ''; $addOK = ''; if (@$_REQUEST['gl'] == 'edit') { if (inStr($url, '&') > 0) { $url = $url . '&vbgl=true'; } $addOK = false; //添加默认为假 $controlStr = getControlStr($url) . '"' . $cssStyle; if ($replaceStr != '') { $splStr = aspSplit($replaceStr, '|'); foreach ($splStr as $key => $s) { if ($s != '' && inStr($content, $s) > 0) { $content = replace2($content, $s, $s . $controlStr); $addOK = true; break; } } } if ($addOK == false) { //第一种 //C = "<div "& ControlStr &">" & vbCrlf //C=C & Content & vbCrlf //C = C & "</div>" & vbCrlf //Content = C //第二种 $content = htmlAddAction($content, $controlStr); //Content = "<div "& ControlStr &">" & Content & "</div>" } } $handleDisplayOnlineEditDialog = $content; return @$handleDisplayOnlineEditDialog; }