function saveData($sType) { if (@$_SESSION['yzm'] == '') { Eerr('提示', '验证码失效'); } //if instr("|"& getFormFieldList() &"|","|yzm|") then if (@$_SESSION['yzm'] != @$_POST['yzm']) { Eerr('提示', '验证码错误'); } @($_SESSION['yzm'] = ''); //清空验证码 //保存文章评论 if ($sType == 'articlecomment') { autoSavePostData('', 'tablecomment', 'tablename||ArticleDetail,adddatetime|now,itemid||' . @$_REQUEST['itemid'] . ',adddatetime,ip||' . getIP()); aspEcho('提示', '评论提交成功,等待管理员审核'); } else { if ($sType == 'feedback') { if (@$_POST['guestname'] == '') { Eerr('提示', '姓名为空'); } autoSavePostData('', 'feedback', 'isthrough|numb|0,adddatetime|now,ip||' . getIP() . ',columnid||' . @$_GET['columnid']); aspEcho('提示', '反馈提交成功,等待管理员审核'); } else { if ($sType == 'guestbook') { if (@$_POST['guestname'] == '') { Eerr('提示', '姓名为空'); } autoSavePostData('', 'guestbook', 'isthrough|numb|0,adddatetime|now,ip||' . getIP() . ',columnid||' . @$_GET['columnid']); aspEcho('提示', '留言提交成功,等待管理员审核'); } else { if ($sType == 'articledetail') { autoSavePostData('', 'articledetail', 'title|bodycontent,adddatetime|now,ip||' . getIP()); aspEcho('提示', '文章提交成功'); } } } } die; }
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; }
function handleHtmlFormatting($content, $isMsgBox, $nErrLevel, $action) { $splStr = ''; $s = ''; $tempS = ''; $lCaseS = ''; $c = ''; $left4Str = ''; $left5Str = ''; $left6Str = ''; $left7Str = ''; $left8Str = ''; $nLevel = ''; //级别 $elseS = ''; $elseLable = ''; $levelArray = aspArray(299); $keyWord = ''; $lableName = ''; //标签名称 $isJavascript = ''; //为javascript $isTextarea = ''; //为表单文本域<textarea $isPre = ''; //为pre $isJavascript = false; //默认javascript为假 $isTextarea = false; //表单文件域为假 $isPre = false; //默认pre为假 $nLevel = 0; //级别数 $action = '|' . $action . '|'; //动作 $splStr = aspSplit($content, vbCrlf()); foreach ($splStr as $key => $s) { $tempS = $s; $elseS = $s; $s = TrimVbCrlf($s); $lCaseS = lCase($s); //判断于20150710 if ((left($lCaseS, 8) == '<script ' || left($lCaseS, 8) == '<script>') && inStr($s, '</script>') == false && $isJavascript == false) { $isJavascript = true; $c = $c . PHPTrim($tempS) . vbCrlf(); } else { if ($isJavascript == true) { if (left($lCaseS, 9) == '</script>') { $isJavascript = false; $c = $c . PHPTrim($tempS) . vbCrlf(); //最后清除两边空格 } else { $c = $c . $tempS . vbCrlf(); //为js则显示原文本 不处理清空两边空格phptrim(tempS) } //表单文本域判断于20151019 } else { if ((left($lCaseS, 10) == '<textarea ' || left($lCaseS, 10) == '<textarea>') && inStr($s, '</textarea>') == false && $isTextarea == false) { $isTextarea = true; $c = $c . PHPTrim($tempS) . vbCrlf(); } else { if ($isTextarea == true) { $c = $c . PHPTrim($tempS) . vbCrlf(); if (left($lCaseS, 11) == '</textarea>') { $isTextarea = false; } //表单文本域判断于20151019 } else { if ((left($lCaseS, 5) == '<pre ' || left($lCaseS, 5) == '<pre>') && inStr($s, '</pre>') == false && $isPre == false) { $isPre = true; $c = $c . PHPTrim($tempS) . vbCrlf(); } else { if ($isPre == true) { $c = $c . $tempS . vbCrlf(); if (left($lCaseS, 6) == '</pre>') { $isPre = false; } } else { if ($s != '' && $isJavascript == false && $isTextarea == false) { $left4Str = '|' . left($lCaseS, 4) . '|'; $left5Str = '|' . left($lCaseS, 5) . '|'; $left6Str = '|' . left($lCaseS, 6) . '|'; $left7Str = '|' . left($lCaseS, 7) . '|'; $left8Str = '|' . left($lCaseS, 8) . '|'; $keyWord = ''; //关键词初始清空 $lableName = ''; //标签名称 if (inStr('|<ul>|<ul |<li>|<li |<dt>|<dt |<dl>|<dl |<dd>|<dd |<tr>|<tr |<td>|<td |', $left4Str) > 0) { $keyWord = $left4Str; $lableName = mid($left4Str, 3, 2); } else { if (inStr('|<div>|<div |', $left5Str) > 0) { $keyWord = $left5Str; $lableName = mid($left5Str, 3, 3); } else { if (inStr('|<span>|<span |<form>|<form |', $left6Str) > 0) { $keyWord = $left6Str; $lableName = mid($left6Str, 3, 4); } else { if (inStr('|<table>|<table |<tbody>|<tbody |', $left7Str) > 0) { $keyWord = $left7Str; $lableName = mid($left7Str, 3, 5); } else { if (inStr('|<center>|<center |', $left8Str) > 0) { $keyWord = $left8Str; $lableName = mid($left8Str, 3, 6); } } } } } $keyWord = aspTrim(replace(replace($keyWord, '<', ''), '>', '')); //call echo(KeyWord,lableName) //开始 if ($keyWord != '') { $s = copyStr(' ', $nLevel) . $s; if (right($lCaseS, 3 + len($lableName)) != '</' . $lableName . '>' && inStr($lCaseS, '</' . $lableName . '>') == false) { $nLevel = $nLevel + 1; if ($nLevel >= 0) { $levelArray[$nLevel] = $keyWord; } } } else { if (inStr('|</ul>|</li>|</dl>|</dt>|</dd>|</tr>|</td>|', '|' . left($lCaseS, 5) . '|') > 0 || inStr('|</div>|', '|' . left($lCaseS, 6) . '|') > 0 || inStr('|</span>|</form>|', '|' . left($lCaseS, 7) . '|') > 0 || inStr('|</table>|</tbody>|', '|' . left($lCaseS, 8) . '|') > 0 || inStr('|</center>|', '|' . left($lCaseS, 9) . '|') > 0) { $nLevel = $nLevel - 1; $s = copyStr(' ', $nLevel) . $s; } else { $s = copyStr(' ', $nLevel) . $s; //最后是结束标签则减一级 if (right($lCaseS, 6) == '</div>') { if (checkHtmlFormatting($lCaseS) == false) { $s = left($s, len($s) - 6); $nLevel = $nLevel - 1; $s = $s . vbCrlf() . copyStr(' ', $nLevel) . '</div>'; } } else { if (right($lCaseS, 7) == '</span>') { if (checkHtmlFormatting($lCaseS) == false) { $s = left($s, len($s) - 7); $nLevel = $nLevel - 1; $s = $s . vbCrlf() . copyStr(' ', $nLevel) . '</span>'; } } else { if (inStr('|</ul>|</dt>|<dl>|<dd>|', $left5Str) > 0) { $s = left($s, len($s) - 5); $nLevel = $nLevel - 1; $s = $s . vbCrlf() . copyStr(' ', $nLevel) . right($lCaseS, 5); } } } //对 aaa</li> 这种进处理 20160106 $elseS = PHPTrim(lCase($elseS)); if (inStr($elseS, '</') > 0) { $elseLable = mid($elseS, inStr($elseS, '</'), -1); if (inStr('|</ul>|</li>|</dl>|</dt>|</dd>|</tr>|</td>|</div>|</span>|<form>|', '|' . $elseLable . '|') > 0 && $nLevel > 0) { $nLevel = $nLevel - 1; } } //call echo("s",replace(s,"<","<")) } } //call echo("",ShowHtml(temps) $c = $c . $s . vbCrlf(); } else { if ($s == '') { if (inStr($action, '|delblankline|') == false && inStr($action, '|删除空行|') == false) { //删除空行 $c = $c . vbCrlf(); } } } } } } } } } } $handleHtmlFormatting = $c; $nErrLevel = $nLevel; //获得错误级别 if ($nLevel != 0 && (lCase($isMsgBox) == '1' || lCase($isMsgBox) == 'true')) { aspEcho('HTML标签有错误', $nLevel); } //Call Echo("nLevel",nLevel & "," & levelArray(nLevel)) '显示错误标题20150212 return @$handleHtmlFormatting; }
function XY_getLableValue($action) { $title = ''; $content = ''; $c = ''; //call echo("Action",Action) $title = RParam($action, 'title'); $content = RParam($action, 'content'); $c = $c . 'title=' . GetContentRunStr($title) . '<hr>'; $c = $c . 'content=' . GetContentRunStr($content) . '<hr>'; $XY_getLableValue = $c; aspEcho('title', $title); $XY_getLableValue = '【title=】【' . $title . '】'; return @$XY_getLableValue; }
function executeSQL() { $sqlvalue = ''; $sqlvalue = 'delete from ' . $GLOBALS['db_PREFIX'] . 'WebSiteStat'; if (@$_REQUEST['sqlvalue'] != '') { $sqlvalue = @$_REQUEST['sqlvalue']; $GLOBALS['conn='] = OpenConn(); //检测SQL if (checkSql($sqlvalue) == false) { errorLog('出错提示:<br>sql=' . $sqlvalue . '<br>'); return ''; } aspEcho('执行SQL语句成功', $sqlvalue); } if (@$_SESSION['adminusername'] == 'ASPPHPCMS') { Rw('<form id="form1" name="form1" method="post" action="?act=executeSQL" onSubmit="if(confirm(\'你确定要操作吗?\\n操作后将不可恢复\')){return true}else{return false}">SQL<input name="sqlvalue" type="text" id="sqlvalue" value="' . $sqlvalue . '" size="80%" /><input type="submit" name="button" id="button" value="执行" /></form>'); } else { Rw('你没有权限执行SQL语句'); } }
function saveSiteMap() { $isWebRunHtml = ''; //是否为html方式显示网站 $changefreg = ''; //更新频率 $priority = ''; //优先级 $s = ''; $c = ''; $url = ''; handlePower('修改生成SiteMap'); //管理权限处理 $changefreg = @$_REQUEST['changefreg']; $priority = @$_REQUEST['priority']; loadWebConfig(); //加载配置 //call eerr("cfg_flags",cfg_flags) if (inStr($GLOBALS['cfg_flags'], '|htmlrun|') > 0) { $isWebRunHtml = true; } else { $isWebRunHtml = false; } $c = $c . '<?xml version="1.0" encoding="UTF-8"?>' . vbCrlf(); $c = $c . vbTab() . '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' . vbCrlf(); //栏目 $rsxObj = $GLOBALS['conn']->query('select * from ' . $GLOBALS['db_PREFIX'] . 'webcolumn where isonhtml<>0 order by sortrank asc'); while ($rsx = $GLOBALS['conn']->fetch_array($rsxObj)) { if ($rsx['nofollow'] == false) { $c = $c . copyStr(vbTab(), 2) . '<url>' . vbCrlf(); if ($isWebRunHtml == true) { $url = getRsUrl($rsx['filename'], $rsx['customaurl'], '/nav' . $rsx['id']); $url = handleAction($url); } else { $url = escape('?act=nav&columnName=' . $rsx['columnname']); } $url = urlAddHttpUrl($GLOBALS['cfg_webSiteUrl'], $url); //call echo(cfg_webSiteUrl,url) $c = $c . copyStr(vbTab(), 3) . '<loc>' . $url . '</loc>' . vbCrlf(); $c = $c . copyStr(vbTab(), 3) . '<lastmod>' . Format_Time($rsx['updatetime'], 2) . '</lastmod>' . vbCrlf(); $c = $c . copyStr(vbTab(), 3) . '<changefreq>' . $changefreg . '</changefreq>' . vbCrlf(); $c = $c . copyStr(vbTab(), 3) . '<priority>' . $priority . '</priority>' . vbCrlf(); $c = $c . copyStr(vbTab(), 2) . '</url>' . vbCrlf(); aspEcho('栏目', '<a href="' . $url . '" target=\'_blank\'>' . $url . '</a>'); } } //文章 $rsxObj = $GLOBALS['conn']->query('select * from ' . $GLOBALS['db_PREFIX'] . 'articledetail where isonhtml<>0 order by sortrank asc'); while ($rsx = $GLOBALS['conn']->fetch_array($rsxObj)) { if ($rsx['nofollow'] == false) { $c = $c . copyStr(vbTab(), 2) . '<url>' . vbCrlf(); if ($isWebRunHtml == true) { $url = getRsUrl($rsx['filename'], $rsx['customaurl'], '/detail/detail' . $rsx['id']); $url = handleAction($url); } else { $url = '?act=detail&id=' . $rsx['id']; } $url = urlAddHttpUrl($GLOBALS['cfg_webSiteUrl'], $url); //call echo(cfg_webSiteUrl,url) $c = $c . copyStr(vbTab(), 3) . '<loc>' . $url . '</loc>' . vbCrlf(); $c = $c . copyStr(vbTab(), 3) . '<lastmod>' . Format_Time($rsx['updatetime'], 2) . '</lastmod>' . vbCrlf(); $c = $c . copyStr(vbTab(), 3) . '<changefreq>' . $changefreg . '</changefreq>' . vbCrlf(); $c = $c . copyStr(vbTab(), 3) . '<priority>' . $priority . '</priority>' . vbCrlf(); $c = $c . copyStr(vbTab(), 2) . '</url>' . vbCrlf(); aspEcho('文章', '<a href="' . $url . '">' . $url . '</a>'); } } //单页 $rsxObj = $GLOBALS['conn']->query('select * from ' . $GLOBALS['db_PREFIX'] . 'onepage where isonhtml<>0 order by sortrank asc'); while ($rsx = $GLOBALS['conn']->fetch_array($rsxObj)) { if ($rsx['nofollow'] == false) { $c = $c . copyStr(vbTab(), 2) . '<url>' . vbCrlf(); if ($isWebRunHtml == true) { $url = getRsUrl($rsx['filename'], $rsx['customaurl'], '/page/detail' . $rsx['id']); $url = handleAction($url); } else { $url = '?act=onepage&id=' . $rsx['id']; } $url = urlAddHttpUrl($GLOBALS['cfg_webSiteUrl'], $url); //call echo(cfg_webSiteUrl,url) $c = $c . copyStr(vbTab(), 3) . '<loc>' . $url . '</loc>' . vbCrlf(); $c = $c . copyStr(vbTab(), 3) . '<lastmod>' . Format_Time($rsx['updatetime'], 2) . '</lastmod>' . vbCrlf(); $c = $c . copyStr(vbTab(), 3) . '<changefreq>' . $changefreg . '</changefreq>' . vbCrlf(); $c = $c . copyStr(vbTab(), 3) . '<priority>' . $priority . '</priority>' . vbCrlf(); $c = $c . copyStr(vbTab(), 2) . '</url>' . vbCrlf(); aspEcho('单页', '<a href="' . $url . '">' . $url . '</a>'); } } $c = $c . vbTab() . '</urlset>' . vbCrlf(); loadWebConfig(); createFile('sitemap.xml', $c); aspEcho('生成sitemap.xml文件成功', '<a href=\'/sitemap.xml\' target=\'_blank\'>点击预览sitemap.xml</a>'); //判断是否生成sitemap.html if (@$_REQUEST['issitemaphtml'] == '1') { $c = ''; //第二种 //栏目 $rsxObj = $GLOBALS['conn']->query('select * from ' . $GLOBALS['db_PREFIX'] . 'webcolumn order by sortrank asc'); while ($rsx = $GLOBALS['conn']->fetch_array($rsxObj)) { if ($rsx['nofollow'] == false) { if ($isWebRunHtml == true) { $url = getRsUrl($rsx['filename'], $rsx['customaurl'], '/nav' . $rsx['id']); $url = handleAction($url); } else { $url = escape('?act=nav&columnName=' . $rsx['columnname']); } $url = urlAddHttpUrl($GLOBALS['cfg_webSiteUrl'], $url); //判断是否生成html if ($rsx['isonhtml'] == true) { $s = '<a href="' . $url . '">' . $rsx['columnname'] . '</a>'; } else { $s = '<span>' . $rsx['columnname'] . '</span>'; } $c = $c . '<li style="width:20%;">' . $s . vbCrlf() . '<ul>' . vbCrlf(); //文章 $rssObj = $GLOBALS['conn']->query('select * from ' . $GLOBALS['db_PREFIX'] . 'articledetail where parentId=' . $rsx['id'] . ' order by sortrank asc'); while ($rss = $GLOBALS['conn']->fetch_array($rssObj)) { if ($rss['nofollow'] == false) { if ($isWebRunHtml == true) { $url = getRsUrl($rss['filename'], $rss['customaurl'], '/detail/detail' . $rss['id']); $url = handleAction($url); } else { $url = '?act=detail&id=' . $rss['id']; } $url = urlAddHttpUrl($GLOBALS['cfg_webSiteUrl'], $url); //判断是否生成html if ($rss['isonhtml'] == true) { $s = '<a href="' . $url . '">' . $rss['title'] . '</a>'; } else { $s = '<span>' . $rss['title'] . '</span>'; } $c = $c . '<li style="width:20%;">' . $s . '</li>' . vbCrlf(); } } $c = $c . '</ul>' . vbCrlf() . '</li>' . vbCrlf(); } } //单面 $c = $c . '<li style="width:20%;"><a href="javascript:;">单面列表</a>' . vbCrlf() . '<ul>' . vbCrlf(); $rsxObj = $GLOBALS['conn']->query('select * from ' . $GLOBALS['db_PREFIX'] . 'onepage order by sortrank asc'); while ($rsx = $GLOBALS['conn']->fetch_array($rsxObj)) { if ($rsx['nofollow'] == false) { $c = $c . copyStr(vbTab(), 2) . '<url>' . vbCrlf(); if ($isWebRunHtml == true) { $url = getRsUrl($rsx['filename'], $rsx['customaurl'], '/page/detail' . $rsx['id']); $url = handleAction($url); } else { $url = '?act=onepage&id=' . $rsx['id']; } //判断是否生成html if ($rsx['isonhtml'] == true) { $s = '<a href="' . $url . '">' . $rsx['title'] . '</a>'; } else { $s = '<span>' . $rsx['title'] . '</span>'; } $c = $c . '<li style="width:20%;">' . $s . '</li>' . vbCrlf(); // target=""_blank"" 去掉 } } $c = $c . '</ul>' . vbCrlf() . '</li>' . vbCrlf(); $templateContent = ''; $templateContent = getFText($GLOBALS['adminDir'] . '/template_SiteMap.html'); $templateContent = replace($templateContent, '{$content$}', $c); $templateContent = replace($templateContent, '{$Web_Title$}', $GLOBALS['cfg_webTitle']); createFile('sitemap.html', $templateContent); aspEcho('生成sitemap.html文件成功', '<a href=\'/sitemap.html\' target=\'_blank\'>点击预览sitemap.html</a>'); } writeSystemLog('', '保存sitemap.xml'); //系统日志 }
function pinYin($content, $sType) { $py = aspArray(402); $splStr = ''; $en = ''; $s = ''; $c = ''; $i = ''; $j = ''; $c2 = ''; $C3 = ''; $C4 = ''; $En2 = ''; $En3 = ''; $En4 = ''; $sType = cStr($sType); //ת���ַ����� $py[0] = '����߹����煁�H_a'; $py[1] = '�������������������������������������������_ai'; $py[2] = '�����������������������������������_an'; $py[3] = '������_ang'; $py[4] = '�������������°ð���������������������������_ao'; $py[5] = '�ŰưǰȰɰʰ˰̰ͰΰϰаѰҰӰհ���������������_ba'; $py[6] = '�װذٰڰ۰ܰݰ�������_bai'; $py[7] = '�߰������������������������_ban'; $py[8] = '���������������������_bang'; $py[9] = '�����������������������������������������������_bao'; $py[10] = '�������������������������������������������������_bei'; $py[11] = '���������������_ben'; $py[12] = '�����±ñı����_beng'; $py[13] = '�ƱDZȱɱʱ˱̱ͱαϱбѱұӱԱձֱױرٱڱ��ɱܱ�ذ����ݩ�����������������������������������������_bi'; $py[14] = '�ޱ߱������������������������������������_bian'; $py[15] = '�����������������������_biao'; $py[16] = '�������_bie'; $py[17] = '������������������������������_bin'; $py[18] = '������������������������_bing'; $py[19] = '���������������������������������������������������������_bo'; $py[20] = '����������������������߲�����������_bu'; $py[21] = '������_ca'; $py[22] = '�²òIJŲƲDzȲɲʲ˲�_cai'; $py[23] = '�ͲβϲвѲҲ����������_can'; $py[24] = '�Բղֲײ�_cang'; $py[25] = '�ٲڲ۲ܲ��������_cao'; $py[26] = '�߲�����_ce'; $py[27] = '��_cen'; $py[28] = '�����_ceng'; $py[29] = '�����������������������������_cha'; $py[30] = '����٭�����_chai'; $py[31] = '����������������������������������������������_chan'; $py[32] = '�������������������������������������������������_chang'; $py[33] = '��������������������������_chao'; $py[34] = '���������������_che'; $py[35] = '���������������³ó������������������_chen'; $py[36] = '�ųƳdzȳɳʳ˳̳ͳγϳгѳҳ�ة�������������������_cheng'; $py[37] = '�Գճֳ׳سٳڳ۳ܳݳ߳��������ܯ��߳��������������������������������_chi'; $py[38] = '����������������_chong'; $py[39] = '�������������ٱ������_chou'; $py[40] = '��������������������������������ءۻ�������������������_chu'; $py[41] = '�����������_chuai'; $py[42] = '������������������������_chuan'; $py[43] = '��������������_chuang'; $py[44] = '��������������_chui'; $py[45] = '��������������ݻ����_chun'; $py[46] = '���������_chuo'; $py[47] = '�ôĴŴƴǴȴɴʴ˴̴ʹ�����������_ci'; $py[48] = '�ϴдѴҴӴ������������_cong'; $py[49] = '������_cou'; $py[50] = '�ִ״ش��������������_cu'; $py[51] = '�ڴ۴���ߥ����_cuan'; $py[52] = '�ݴߴ����������������_cui'; $py[53] = '��������_cun'; $py[54] = '����������������������_cuo'; $py[55] = '��������������������������_da'; $py[56] = '������������������������ܤ߰߾����������_dai'; $py[57] = '������������������������������������������������_dan'; $py[58] = '��������������������_dang'; $py[59] = '������������������������߶�������_dao'; $py[60] = '�µõ��_de'; $py[61] = '�ŵƵǵȵɵʵ������������_deng'; $py[62] = '�̵͵εϵеѵҵӵԵյֵصٵڵ۵ܵݵ�ص��ڮ��ۡݶ��������������������_di'; $py[63] = '��_dia'; $py[64] = '�ߵ�������������������������������_dian'; $py[65] = '��������������������_diao'; $py[66] = '����������������ܦ�����������_die'; $py[67] = '������������������������������������_ding'; $py[68] = '����_diu'; $py[69] = '����������������������������������_dong'; $py[70] = '��������������������_dou'; $py[71] = '�������������¶öĶŶƶǶȶɶ�ܶ�������������_du'; $py[72] = '�˶̶Ͷζ϶������_duan'; $py[73] = '�ѶҶӶ�������_dui'; $py[74] = '�նֶضٶڶ۶ܶ������������_dun'; $py[75] = '�߶�������������������������_duo'; $py[76] = '����������������ج������ݭ����������������������_e'; $py[77] = '��_ei'; $py[78] = '������_en'; $py[79] = '����������������٦���������_er'; $py[80] = '��������������������_fa'; $py[81] = '����������������������������������ެ����������_fan'; $py[82] = '���������������·÷ķ�������������_fang'; $py[83] = '�ƷǷȷɷʷ˷̷ͷηϷз�������������������������������_fei'; $py[84] = '�ҷӷԷշַطٷڷ۷ܷݷ߷����������_fen'; $py[85] = '����������������ٺۺ�������_feng'; $py[86] = '��_fo'; $py[87] = '���_fou'; $py[88] = '��������������������������������������������������������������������������������������������ۮܽ����ݳ��������������������������������������������������_fu'; $py[89] = '����٤���������_ga'; $py[90] = '�øĸŸƸǸ�ؤ�������_gai'; $py[91] = '�ɸʸ˸̸θϸиѸҸ�������ߦ���������������_gan'; $py[92] = '�Ըոָظٸڸ۸�����_gang'; $py[93] = '�ݸ߸�������غھ۬��������_gao'; $py[94] = '���������������������ت������ܪ������������������_ge'; $py[95] = '��_gei'; $py[96] = '����بݢ����_gen'; $py[97] = '���������������������_geng'; $py[98] = '�������������������������������������_gong'; $py[99] = '��������������������ڸ������������������_gou'; $py[100] = '�������������¹ùĹŹƹǹȹɹʹ˹̹���ڬ����������������������������������������_gu'; $py[101] = '�ιϹйѹҹ���ڴ�����_gua'; $py[102] = '�Թչ���_guai'; $py[103] = '�عٹڹ۹ܹݹ߹����ݸ������������_guan'; $py[104] = '������������_guang'; $py[105] = '��������������������������������������_gui'; $py[106] = '�������������_gun'; $py[107] = '�������������������������������_guo'; $py[108] = '����_ha'; $py[109] = '��������������������_hai'; $py[110] = '��������������������������������������������������������_han'; $py[111] = '�����������_hang'; $py[112] = '���������ºúĺź�������������_hao'; $py[113] = '�ǺȺɺʺ˺̺ͺκϺкѺҺӺԺպֺ�ڭ���������������_he'; $py[114] = '�ٺ�_hei'; $py[115] = '�ۺܺݺ�_hen'; $py[116] = '�ߺ��������_heng'; $py[117] = '��������������ڧݦޮް����_hong'; $py[118] = '��������ܩ��������������_hou'; $py[119] = '������������������������������������������������������������������������������_hu'; $py[120] = '�������������������������_hua'; $py[121] = '������������_huai'; $py[122] = '�������������������������»�ۨۼ��ߧ������������������_huan'; $py[123] = '�ĻŻƻǻȻɻʻ˻̻ͻλϻл��������������������_huang'; $py[124] = '�һӻԻջֻػٻڻۻܻݻ�������ڶ����ޥ����������������������_hui'; $py[125] = '�������ڻ������_hun'; $py[126] = '���������������߫������������_huo'; $py[127] = '�����������������������������������������������������������������������������������¼üļżƼǼȼɼʼ˼̼�آؽ����٥��ڵ��ܸ������ު��ߴ�������������������������������������������������������_ji'; $py[128] = '�μϼмѼҼӼԼռּؼټڼۼܼݼ�ۣ������������������������������_jia'; $py[129] = '��������������������������������������������������������������������������������������������������������������_jian'; $py[130] = '������������������������������������������_jiang'; $py[131] = '�������������������������½ýĽŽƽǽȽɽʽ˽̽ͽνϽн�ٮ��ܴ������������������������_jiao'; $py[132] = '�ҽӽԽսֽؽٽڽ۽ܽݽ߽������������������������ڦ����������_jie'; $py[133] = '�����������������������������������ݣ��������������������_jin'; $py[134] = '��������������������������������������������������������ݼ������������������_jing'; $py[135] = '��������_jiong'; $py[136] = '���������¾þľžƾǾȾɾʾ˾̾;�����������������_jiu'; $py[137] = '�ϾоѾҾӾԾվ־ؾپھ۾ܾݾ߾����������ڪ������������������������������������������_ju'; $py[138] = '��������۲�������������_juan'; $py[139] = '�����������������������ާ�����������������������_jue'; $py[140] = '������������������������������_jun'; $py[141] = '��������������_ka'; $py[142] = '�������������������������_kai'; $py[143] = '������������٩ݨ������_kan'; $py[144] = '��������������������_kang'; $py[145] = '����������������_kao'; $py[146] = '�����¿ÿĿſƿǿȿɿʿ˿̿Ϳ������������������������������_ke'; $py[147] = '�Ͽпѿ���_ken'; $py[148] = '�ӿ��_keng'; $py[149] = '�տֿ�������_kong'; $py[150] = '�ٿڿۿ���ޢߵ����_kou'; $py[151] = '�ݿ߿������ܥ����_ku'; $py[152] = '������٨_kua'; $py[153] = '�������ۦ������_kuai'; $py[154] = '�����_kuan'; $py[155] = '�����������ڲڿ��������������_kuang'; $py[156] = '����������������������ظ���������������������������_kui'; $py[157] = '��������������������_kun'; $py[158] = '����������_kuo'; $py[159] = '�����������������������_la'; $py[160] = '�����������������������_lai'; $py[161] = '����������������������������������������_lan'; $py[162] = '��������������ݹ����������_lang'; $py[163] = '���������������������������������_lao'; $py[164] = '������߷����_le'; $py[165] = '������������������������ڳ������������_lei'; $py[166] = '������ܨ�_leng'; $py[167] = '��������������������������������������������������������������������ٳٵ۪����ݰ��߿���������������������������������������������������������_li'; $py[168] = '��_lia'; $py[169] = '������������������������������������������������_lian'; $py[170] = '����������������������ܮ�����_liang'; $py[171] = '��������������������������ޤ������������_liao'; $py[172] = '�������������������������_lie'; $py[173] = '���������������������������������������������_lin'; $py[174] = '������������������������������۹����������������������_ling'; $py[175] = '��������������������������������������_liu'; $py[176] = '����������¡¢£¤���������������_long'; $py[177] = '¥¦§¨©ª�����������������_lou'; $py[178] = '«¬®¯°±²³´µ¶·¸¹º»¼½¾��ߣ����������������������������������_lu'; $py[179] = '��������������������_luan'; $py[180] = '����������������_lun'; $py[181] = '�����������������������������������������������_luo'; $py[182] = '¿�������������������������������������_lu'; $py[183] = '�����_lue'; $py[184] = '_m'; $py[185] = '����������������������_ma'; $py[186] = '������������۽ݤ����_mai'; $py[187] = '����������������áܬ��������������_man'; $py[188] = 'âãäåæç��������_mang'; $py[189] = 'èéêëìíîïðñòó���������������������_mao'; $py[190] = 'ô��_me'; $py[191] = 'õö÷øùúûüýþÿ����������ݮ���������������_mei'; $py[192] = '�������������_men'; $py[193] = '��������������������ޫ��������������_meng'; $py[194] = '����������������������������������������������������������_mi'; $py[195] = '������������������������������_mian'; $py[196] = '������������������������������_miao'; $py[197] = '����ؿ�����_mie'; $py[198] = '����������������������������_min'; $py[199] = '������������ڤ���������_ming'; $py[200] = '��_miu'; $py[201] = '��ġĢģĤĥĦħĨĩĪīĬĭĮįİ�������������������������_mo'; $py[202] = 'ıIJijٰ��������_mou'; $py[203] = 'ĴĵĶķĸĹĺĻļĽľĿ�����������������_mu'; $py[204] = '��_n'; $py[205] = '����������������������_na'; $py[206] = '����������ؾܵ����_nai'; $py[207] = '����������������_nan'; $py[208] = '��߭������_nang'; $py[209] = '����������ث������������_nao'; $py[210] = '��ګ_ne'; $py[211] = '����_nei'; $py[212] = '���_nen'; $py[213] = '��_neng'; $py[214] = '����������������������٣��������������_ni'; $py[215] = '��������������إ���������_nian'; $py[216] = '����_niang'; $py[217] = '������������_niao'; $py[218] = '������������������������_nie'; $py[219] = '��_nin'; $py[220] = '��������šŢ�������_ning'; $py[221] = 'ţŤťŦ�����_niu'; $py[222] = 'ŧŨũŪٯ��_nong'; $py[223] = '��_nou'; $py[224] = 'ūŬŭ��������_nu'; $py[225] = 'ů_nuan'; $py[226] = 'ŲųŴŵ�������_nuo'; $py[227] = 'Ů�����_nu'; $py[228] = 'Űű_nue'; $py[229] = 'Ŷ��_o'; $py[230] = 'ŷŸŹźŻżŽک�����_ou'; $py[231] = 'žſ��������������_pa'; $py[232] = '������������ٽ����_pai'; $py[233] = '�����������������������������_pan'; $py[234] = '���������������_pang'; $py[235] = '������������������������_pao'; $py[236] = '�����������������������������_pei'; $py[237] = '������_pen'; $py[238] = '����������������������������ܡ�����_peng'; $py[239] = '����������������ơƢƣƤƥƦƧƨƩا������ۯ����ܱ��ߨ����������������������_pi'; $py[240] = 'ƪƫƬƭ������������_pian'; $py[241] = 'ƮƯưƱ������������_piao'; $py[242] = 'ƲƳ���_pie'; $py[243] = 'ƴƵƶƷƸ��������_pin'; $py[244] = 'ƹƺƻƼƽƾƿ����ٷ�����_ping'; $py[245] = '������������������۶����������_po'; $py[246] = '������_pou'; $py[247] = '���������������������������������������������_pu'; $py[248] = '��������������������������������������������������������������������������ٹ��ܻ��ݽ����ޭ������������������������������������������膢_qi'; $py[249] = '��ǡǢ����_qia'; $py[250] = 'ǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴǵǶǷǸٻ����ܷ����ݡ���������������������_qian'; $py[251] = 'ǹǺǻǼǽǾǿ������������������������_qiang'; $py[252] = '��������������������������������ڽ����������������_qiao'; $py[253] = '����������ۧ��������_qie'; $py[254] = '������������������������������������������_qin'; $py[255] = '����������������������������������������������_qing'; $py[256] = '���������������_qiong'; $py[257] = '����������������ٴ������������������������_qiu'; $py[258] = '����������������ȡȢȣȤȥڰ۾ޡ������������������������_qu'; $py[259] = 'ȦȧȨȩȪȫȬȭȮȯȰڹ�������������_quan'; $py[260] = 'ȱȲȳȴȵȶȷȸ�����_que'; $py[261] = 'ȹȺ��_qun'; $py[262] = 'ȻȼȽȾ������_ran'; $py[263] = 'ȿ�����������_rang'; $py[264] = '�����������_rao'; $py[265] = '����_re'; $py[266] = '���������������������������������_ren'; $py[267] = '����_reng'; $py[268] = '��_ri'; $py[269] = '������������������������������_rong'; $py[270] = '������������_rou'; $py[271] = '����ų����������������������������_ru'; $py[272] = '������_ruan'; $py[273] = '��������ި����_rui'; $py[274] = '����_run'; $py[275] = '����ټ��_ruo'; $py[276] = '������ئ�������_sa'; $py[277] = '����������_sai'; $py[278] = '����ɡɢ�����_san'; $py[279] = 'ɣɤɥ�����_sang'; $py[280] = 'ɦɧɨɩܣ��������_sao'; $py[281] = 'ɪɫɬ����_se'; $py[282] = 'ɭ_sen'; $py[283] = 'ɮ_seng'; $py[284] = 'ɯɰɱɲɳɴɵɶɷ������������_sha'; $py[285] = 'ɸɹ��_shai'; $py[286] = 'ɺɻɼɽɾɿ��������������������ڨ۷������������������������_shan'; $py[287] = '�������������������������_shang'; $py[288] = '����������������������ۿ����������_shao'; $py[289] = '�����������������������������������_she'; $py[290] = '��������������������������������ڷ��ݷ�����������_shen'; $py[291] = '������������ʡʢʣʤʥ��������_sheng'; $py[292] = 'ʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼʽʾʿ����������������������������������������������ݪ��߱�������������������_shi'; $py[293] = '�������������������������_shou'; $py[294] = '����������������������������������������������������������������ˡٿ������������������_shu'; $py[295] = 'ˢˣ�_shua'; $py[296] = 'ˤ˥˦˧�_shuai'; $py[297] = '˨˩����_shuan'; $py[298] = '˪˫ˬ��_shuang'; $py[299] = '˭ˮ˯˰_shui'; $py[300] = '˱˲˳˴_shun'; $py[301] = '˵˶˷˸����������_shuo'; $py[302] = '˹˺˻˼˽˾˿������������������������������������������������_si'; $py[303] = '����������������ڡݿ����������_song'; $py[304] = '�����������������������_sou'; $py[305] = '���������������������������������������_su'; $py[306] = '�������_suan'; $py[307] = '������������������������ݴ��������_sui'; $py[308] = '������ݥ������_sun'; $py[309] = '�����������������������������_suo'; $py[310] = '����������̡̢̣̤�������������_ta'; $py[311] = '̧̨̥̦̩̪̫̬̭ۢ����������_tai'; $py[312] = '̴̵̶̷̸̮̯̰̱̲̳̹̺̻̼̽̾̿۰�������_tan'; $py[313] = '�����������������������������������������������_tang'; $py[314] = '����������������������ػ������_tao'; $py[315] = '��߯����_te'; $py[316] = '����������_teng'; $py[317] = '���������������������������������������������_ti'; $py[318] = '�������������������������_tian'; $py[319] = '����������٬���������������_tiao'; $py[320] = '����������_tie'; $py[321] = '������ͣͤͥͦͧ͢͡������������_ting'; $py[322] = 'ͨͩͪͫͬͭͮͯͰͱͲͳʹ١������������_tong'; $py[323] = '͵Ͷͷ����_tou'; $py[324] = 'ͺͻͼͽ;Ϳ��������ܢݱ������_tu'; $py[325] = '���������_tuan'; $py[326] = '��������������_tui'; $py[327] = '�������������_tun'; $py[328] = '����������������������ر٢��������������������_tuo'; $py[329] = '�������������������_wa'; $py[330] = '������_wai'; $py[331] = '������������������������������������ܹ������������_wan'; $py[332] = '���������������������������_wang'; $py[333] = '��ΡΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξο������������ޱ�����������������������������_wei'; $py[334] = '�����������������������������_wen'; $py[335] = '��������_weng'; $py[336] = '��������������������ݫ���������_wo'; $py[337] = '����������������������������������������������������������أ����������������������������������������������_wu'; $py[338] = '����������������������ϡϢϣϤϥϦϧϨϩϪϫϬϭϮϯϰϱϲϳϴϵ϶Ϸϸ������ۭݾ�������������������������������������������������������_xi'; $py[339] = 'ϹϺϻϼϽϾϿ���������������������������_xia'; $py[340] = '��������������������������������������������������������ݲ����������������������������_xian'; $py[341] = '����������������������������������������ܼ��������������_xiang'; $py[342] = '����������������������СТУФХЦЧ���������������������_xiao'; $py[343] = 'ШЩЪЫЬЭЮЯабвгдежзийклм��������ޯߢ����������������_xie'; $py[344] = 'ноп��������������ضܰ����_xin'; $py[345] = '������������������������������������ߩ���_xing'; $py[346] = '��������������ܺ_xiong'; $py[347] = '��������������������������������_xiu'; $py[348] = '��������������������������������������ڼ��ޣ���������������_xu'; $py[349] = '������������ѡѢѣѤ������������������������������_xuan'; $py[350] = 'ѥѦѧѨѩѪ�������_xue'; $py[351] = 'ѫѬѭѮѯѰѱѲѳѴѵѶѷѸ������ަ���������������_xun'; $py[352] = 'ѹѺѻѼѽѾѿ����������������������������������������_ya'; $py[353] = '������������������������������������������������������������������������ٲ������۱۳ܾ�������������������������������������_yan'; $py[354] = '������������������������������������������������_yang'; $py[355] = '��������ҡҢңҤҥҦҧҨҩҪҫزسߺ�����������������������_yao'; $py[356] = 'ҬҭҮүҰұҲҳҴҵҶҷҸҹҺ��������������_ye'; $py[357] = 'һҼҽҾҿ������������������������������������������������������������������������������������������������������٫ڱ����ܲ��������߽߮����������������������������������������������������������_yi'; $py[358] = '������������������������������ӡط۴��ܧ������������������_yin'; $py[359] = 'ӢӣӤӥӦӧӨөӪӫӬӭӮӯӰӱӲӳ��۫��ݺ��������������������������_ying'; $py[360] = 'Ӵ�_yo'; $py[361] = 'ӵӶӷӸӹӺӻӼӽӾӿ��������ٸ��ܭ�����������_yong'; $py[362] = '��������������������������������������������٧ݬݯݵ����������������������������_you'; $py[363] = '������������������������������������������������������������������������������ԡԢԣԤԥԦخع��ٶ���������������������������������������������������������������������������_yu'; $py[364] = 'ԧԨԩԪԫԬԭԮԯԱԲԳԴԵԶԷԸԹԺ��ܫ������������������_yuan'; $py[365] = 'ԻԼԽԾԿ������������������_yue'; $py[366] = '������������������������۩ܿ�����������_yun'; $py[367] = '����������_za'; $py[368] = '������������������_zai'; $py[369] = '�������������������_zan'; $py[370] = '�����������_zang'; $py[371] = '������������������������������_zao'; $py[372] = '�������������������������_ze'; $py[373] = '��_zei'; $py[374] = '����_zen'; $py[375] = '����������������_zeng'; $py[376] = '����������աբգդեզէըթ��߸������������_zha'; $py[377] = 'ժ��իլխծկ���_zhai'; $py[378] = 'հձղճմյնշոչպջռսվտ�������_zhan'; $py[379] = '��������������������������������۵��������_zhang'; $py[380] = '��������������������گ��������_zhao'; $py[381] = '����������������������ߡ��������������_zhe'; $py[382] = '���������������������������������������������������������_zhen'; $py[383] = '����������������������֢֣֤֡ں��������_zheng'; $py[384] = 'ְֱֲֳִֵֶַָֹֺֻּֽ֥֦֧֪֭֮֨֩֫֬֯־ֿ��������������������������������ش��ۤ�������������������������������������������������������������_zhi'; $py[385] = '����������������������ڣ�������_zhong'; $py[386] = '����������������������������ݧ������������_zhou'; $py[387] = '��������������������������������������������סעףפ��٪ۥ����������������������������������_zhu'; $py[388] = 'ץצ_zhua'; $py[389] = 'ק_zhuai'; $py[390] = 'רשת�����_zhuan'; $py[391] = 'ׯװױײ׳״��_zhuang'; $py[392] = '�����_zhui'; $py[393] = '���_zhun'; $py[394] = '����������������پ��ߪ���������_zhuo'; $py[395] = '��������������������������������������������������������������������_zi'; $py[396] = '��������������������_zong'; $py[397] = '������������۸����_zou'; $py[398] = '����������������������_zu'; $py[399] = '����߬����_zuan'; $py[400] = '��������ީ_zui'; $py[401] = '����ߤ����_zun'; $py[402] = '��������������������������_zuo'; if ($sType == 'ƴ��') { for ($i = 1; $i <= len($content); $i++) { $s = mid($content, $i, 1); if (inStr('0123456789_abcdefghijklmnopqrstuvwxyz', $s) == false) { for ($j = 0; $j <= uBound($py); $j++) { if (inStr($py[$j], $s) > 0) { $en = mid($py[$j], inStrRev($py[$j], '_') + 1, -1); $en = uCase(left($en, 1)) . right($en, len($en) - 1); $s = $en; break; } } } $c = $c . $s; } $pinYin = $c; return @$pinYin; } if (inStr('|����|���ִ�ӡ|', '|' . $sType . '|') > 0) { $content = lCase($content) . ' '; //���Ӹ��ո����һ����ת�����ˣ��� $splStr = aspSplit($content, ' '); foreach ($splStr as $key => $s) { if ($s != '') { for ($j = 0; $j <= uBound($py); $j++) { if (inStr($py[$j], '_' . $s) > 0) { $s = mid($py[$j], 1, 1); break; } } } $c = $c . $s; } if ($sType == '���ִ�ӡ') { aspEcho('ƴ��ת����', $c); } $pinYin = $c; } else { for ($i = 1; $i <= len($content); $i++) { $s = lCase(mid($content, $i, 1)); $En2 = ''; $En3 = $s; if (inStr('0123456789_abcdefghijklmnopqrstuvwxyz', $s) == false) { for ($j = 0; $j <= uBound($py); $j++) { if (inStr($py[$j], $s) > 0) { $en = mid($py[$j], inStrRev($py[$j], '_') + 1, -1); $En2 = uCase(left($en, 1)) . ' '; $En3 = uCase(left($en, 1)) . right($en, len($en) - 1); $En4 = $En3 . ' '; //�ӿո� $s = $en . ' '; break; } } } $c = $c . $s; $c2 = $c2 . $En2; $C3 = $C3 . $En3; $C4 = $C4 . $En4; } if ($sType == '1') { $pinYin = $c; } else { if ($sType == '2') { $pinYin = $c2; } else { if ($sType == '3') { $C3 = uCase(left($C3, 1)) . mid($C3, 2, -1); //����ĸ��д $pinYin = $C3; } else { if ($sType == '4') { $pinYin = $C4; } else { aspEcho('ת���ַ�', $content); aspEcho('ƴ��Сд', aspTrim($c)); aspEcho('����ĸ��д', aspTrim($C4)); aspEcho('ȡ����ĸ', aspTrim($c2)); aspEcho('��˾��', enToCompany($C4)); aspEcho('�ո�����ĸСд', aspTrim(replace($c, ' ', ''))); aspEcho('�ո�����ĸ��д', aspTrim(replace($C3, ' ', ''))); } } } } } return @$pinYin; }
function testTwoDimensionalArray() { $splStr = ''; $i = ''; $splStr = handleSplitArray('9-g|2-b|3-a|1-中', '|', '-'); for ($i = 0; $i <= uBound($splStr); $i++) { aspEcho($splStr[$i][1], $splStr[$i][0]); doEvents(); } aspEcho('', 'Adc'); twoDimensionalArrayAsc($splStr); //二维数组正排序 for ($i = 0; $i <= uBound($splStr); $i++) { aspEcho($splStr[$i][1], $splStr[$i][0]); doEvents(); } aspEcho('', 'Desc'); twoDimensionalArrayDesc($splStr); //二维数组倒排序 for ($i = 0; $i <= uBound($splStr); $i++) { aspEcho($splStr[$i][1], $splStr[$i][0]); doEvents(); } }
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 cutStrNOLU($content, $startStr, $endStr) { $s = ''; $LCaseContent = ''; $nStartLen = ''; $nEndLen = ''; $NewStartStr = ''; $startStr = lCase($startStr); $endStr = lCase($endStr); $LCaseContent = lCase($content); if (inStr($LCaseContent, $startStr) > 0) { $nStartLen = inStr($LCaseContent, $startStr); $s = mid($content, $nStartLen, -1); $LCaseContent = mid($s, len($startStr) + 1, -1); $NewStartStr = mid($s, 1, len($startStr) + 1); //获得开始字符 $LCaseContent = replace($LCaseContent, '<', '<'); //Call eerr("111",LCaseContent) $nEndLen = inStr($LCaseContent, $endStr); aspEcho('nEndLen', $nEndLen); $s = mid($content, $nStartLen, $nEndLen + len($startStr)); //Call Echo(nStartLen,nEndLen) //Call Echo("S",S) $cutStrNOLU = $s; } return @$cutStrNOLU; }
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 delTemplateFile($dir, $fileName) { $filePath = ''; handlePower('删除模板文件'); //管理权限处理 $filePath = $dir . '/' . $fileName; DeleteFile($filePath); aspEcho('删除文件', $filePath); }
function chkPost() { $Server_v1 = ''; $Server_v2 = ''; $chkPost = false; $Server_v1 = cStr(serverVariables('HTTP_REFERER')); $Server_v2 = cStr(serverVariables('SERVER_NAME')); aspEcho($Server_v1, $Server_v2); if (mid($Server_v1, 8, len($Server_v2)) != $Server_v2) { $chkPost = false; } else { $chkPost = true; } return @$chkPost; }