function errorText($Refresh, $str, $url) { if ($Refresh != '') { Rw('<meta http-equiv="refresh" content="' . $Refresh . ';URL=' . $url . '""">') . vbCrlf(); } Rw('<fieldset>') . vbCrlf(); //rw("<legend></legend>") & vbCrLf Rw('<div style="padding-left:20px;padding-top:10px;color:red;font-weight:bold;text-align:center;">' . $str . '</div>') . vbCrlf(); Rw('<div style="height:200p;text-align:center;"><P>') . vbCrlf(); Rw('<a href="' . $url . '">如果您的游览器没有自动跳转,请点这里>></a><P>') . vbCrlf(); Rw('</div></fieldset>'); die; }
function testGetPY() { $c = ''; $splStr = ''; $i = ''; $s = ''; $cn = ''; $en = ''; $splStr = aspSplit(getFText('1.txt'), 'End If'); for ($i = 0; $i <= uBound($splStr); $i++) { $s = $splStr[$i]; if (inStr($s, '=') > 0) { $cn = mid($s, inStr($s, '"') + 1, -1); $cn = mid($cn, 1, inStr($cn, ' ') - 3); $en = mid($s, inStr($s, '=') + 1, -1); $en = mid($en, 3, inStr($en, vbCrlf()) - 4); $c = 'PY(' . $i . ')="' . $cn . '_' . $en . '"'; Rw($c); } } }
function adminIndex() { $c = ''; loadWebConfig(); $c = getTemplateContent('adminIndex.html'); $c = replace($c, '[$adminonemenulist$]', getAdminOneMenuList()); $c = replace($c, '[$adminmenulist$]', getAdminMenuList()); $c = replace($c, '[$officialwebsite$]', getOfficialWebsite()); //获得官方信息 $c = replaceValueParam($c, 'title', ''); //给手机端用的20160330 $c = handleDisplayLanguage($c, 'loginok'); Rw($c); }
function webStat($folderPath) { $dateTime = ''; $content = ''; $splStr = ''; $thisUrl = ''; $goToUrl = ''; $caiShu = ''; $c = ''; $fileName = ''; $co = ''; $ie = ''; $xp = ''; $goToUrl = serverVariables('HTTP_REFERER'); $thisUrl = 'http://' . serverVariables('HTTP_HOST') . serverVariables('SCRIPT_NAME'); $caiShu = serverVariables('QUERY_STRING'); if ($caiShu != '') { $thisUrl = $thisUrl . '?' . $caiShu; } $goToUrl = @$_REQUEST['GoToUrl']; $thisUrl = @$_REQUEST['ThisUrl']; $co = @$_GET['co']; $dateTime = now(); $content = serverVariables('HTTP_USER_AGENT'); $content = replace($content, 'MSIE', 'Internet Explorer'); $content = replace($content, 'NT 5.0', '2000'); $content = replace($content, 'NT 5.1', 'XP'); $content = replace($content, 'NT 5.2', '2003'); $splStr = aspSplit($content . ';;;;', ';'); $ie = $splStr[1]; $xp = aspTrim($splStr[2]); if (right($xp, 1) == ')') { $xp = mid($xp, 1, len($xp) - 1); } $c = '来访' . $goToUrl . vbCrlf(); $c = $c . '当前:' . $thisUrl . vbCrlf(); $c = $c . '时间:' . $dateTime . vbCrlf(); $c = $c . 'IP:' . getIP() . vbCrlf(); $c = $c . 'IE:' . getBrType('') . vbCrlf(); $c = $c . 'Cookies=' . $co . vbCrlf(); $c = $c . 'XP=' . $xp . vbCrlf(); $c = $c . 'Screen=' . @$_REQUEST['screen'] . vbCrlf(); //屏幕分辨率 $c = $c . '用户信息=' . serverVariables('HTTP_USER_AGENT') . vbCrlf(); //用户信息 $c = $c . '-------------------------------------------------' . vbCrlf(); //c=c & "CaiShu=" & CaiShu & vbcrlf $fileName = $folderPath . Format_Time(now(), 2) . '.txt'; CreateAddFile($fileName, $c); $c = $c . vbCrlf() . $fileName; $c = replace($c, vbCrlf(), '\\n'); $c = replace($c, '"', '\\"'); //Response.Write("eval(""var MyWebStat=\""" & C & "\"""")") $splxx = ''; $nIP = ''; $nPV = ''; $ipList = ''; $s = ''; $ip = ''; //判断是否显示回显记录 if (@$_REQUEST['stype'] == 'display') { $content = getFText($fileName); $splxx = aspSplit($content, vbCrlf() . '-------------------------------------------------' . vbCrlf()); $nIP = 0; $nPV = 0; $ipList = ''; foreach ($splxx as $key => $s) { if (inStr($s, '当前:') > 0) { $s = vbCrlf() . $s . vbCrlf(); $ip = ADSql(getStrCut($s, vbCrlf() . 'IP:', vbCrlf(), 0)); $nPV = $nPV + 1; if (inStr(vbCrlf() . $ipList . vbCrlf(), vbCrlf() . $ip . vbCrlf()) == false) { $ipList = $ipList . $ip . vbCrlf(); $nIP = $nIP + 1; } } } Rw('document.write(\'网长统计 | 今日IP[' . $nIP . '] | 今日PV[' . $nPV . '] \')'); } $webStat = $c; return @$webStat; }
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 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 runScanWebUrl() { $nSetTime = ''; $setCharSet = ''; $httpUrl = ''; $url = ''; $selectWeb = ''; $nThis = ''; $nCount = ''; $startTime = ''; $setCharSet = 'gb2312'; //gb2312 //http://www.dfz9.com/ //http://www.maiside.net/ //http://sharembweb.com/ //http://www.ufoer.com/ $httpUrl = 'http://sharembweb.com/'; //selectWeb="ufoer" if ($selectWeb == 'ufoer') { $httpUrl = 'http://www.ufoer.com/'; $setCharSet = 'utf-8'; } $nThis = @$_REQUEST['nThis']; if ($nThis == '') { $nThis = 0; } else { $nThis = cint($nThis); } $GLOBALS['conn='] = OpenConn(); $rsObj = $GLOBALS['conn']->query('select * from ' . $GLOBALS['db_PREFIX'] . 'weburlscan'); $nCount = @$_REQUEST['nCount']; if ($nCount == '') { $nCount = @mysql_num_rows($rsObj); } if (@mysql_num_rows($rsObj) == 0) { connexecute('insert into ' . $GLOBALS['db_PREFIX'] . 'weburlscan(httpurl,title,isthrough,charset) values(\'' . $httpUrl . '\',\'home\',true,\'' . $setCharSet . '\')'); } //循环 $rsxObj = $GLOBALS['conn']->query('select * from ' . $GLOBALS['db_PREFIX'] . 'weburlscan where isThrough=true'); if (@mysql_num_rows($rsxObj) != 0) { $rsx = mysql_fetch_array($rsxObj); $nThis = $nThis + 1; aspEcho($nThis, $rsx['httpurl']); doEvents(); $nSetTime = scanUrl($rsx['httpurl'], $rsx['title'], $rsx['charset']); //这样写是给转PHP时方便 connexecute('update ' . $GLOBALS['db_PREFIX'] . 'weburlscan set isthrough=false where id=' . $rsx['id'] . ''); $startTime = @$_REQUEST['startTime']; if ($startTime == '') { $startTime = now(); } VBRunTimer($startTime); $url = getUrlAddToParam(getThisUrl(), '?nThis=' . $nThis . '&nCount=' . $nCount . '&startTime=' . $startTime . '&N=' . getRnd(11), 'replace'); Rw(jsTiming($url, $nSetTime)); die; } aspEcho('操作完成', '<a href=\'?act=dispalyManageHandle&actionType=WebUrlScan&addsql=order by id desc&lableTitle=网址扫描\'>OK,共(' . $nThis . ')条</a>'); //输入报告 $rsObj = $GLOBALS['conn']->query('select * from ' . $GLOBALS['db_PREFIX'] . 'weburlscan where webstate=404'); while ($rs = $GLOBALS['conn']->fetch_array($rsObj)) { aspEcho('<a href=\'' . $rs['httpurl'] . '\' target=\'_blank\'>' . $rs['httpurl'] . '</a>', '<a href=\'' . $rs['tohttpurl'] . '\' target=\'_blank\'>' . $rs['tohttpurl'] . '</a>'); } }
function displayTemplateDirDialog($dir) { $folderPath = ''; ?> <form name="form2" method="post" action="?act=templateFileList"> <table width="99%" border="0" cellspacing="0" cellpadding="0" class="tableline"> <tr> <td height="30"><input name="dir" type="text" id="dir" value="<?php echo $dir; ?> " size="60" /> <input type="submit" name="button2" id="button2" value=" 进入 " /><?php $folderPath = $dir . '/images/column/'; if (CheckFolder($folderPath)) { Rw('面板样式' . displayPanelList($folderPath)); } $folderPath = $dir . '/images/nav/'; if (CheckFolder($folderPath)) { Rw('导航样式' . displayPanelList($folderPath)); } ?> </td> </tr> </table> </form> <?php }