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 XY_Include($action) { $templateFilePath = ''; $Block = ''; $startStr = ''; $endStr = ''; $content = ''; $templateFilePath = lCase(RParam($action, 'File')); $Block = lCase(RParam($action, 'Block')); $findstr = ''; $replaceStr = ''; //查找字符,替换字符 $findstr = moduleFindContent($action, 'findstr'); //先找块 $replaceStr = moduleFindContent($action, 'replacestr'); //先找块 $templateFilePath = handleFileUrl($templateFilePath); //处理文件路径 if (CheckFile($templateFilePath) == false) { $templateFilePath = $GLOBALS['webTemplate'] . $templateFilePath; } $content = getFText($templateFilePath); if ($Block != '') { $startStr = '<!--#' . $Block . ' start#-->'; $endStr = '<!--#' . $Block . ' end#-->'; if (inStr($content, $startStr) > 0 && inStr($content, $endStr) > 0) { $content = StrCut($content, $startStr, $endStr, 2); } } //替换读出来的内容 if ($findstr != '') { $content = replace($content, $findstr, $replaceStr); } $XY_Include = $content; return @$XY_Include; }
function findFileRepeatFunction($filePath) { $findFileRepeatFunction = handleContentRepeatFunction(getFText('FilePath'), 2); return @$findFileRepeatFunction; }
function setRParam($ConfigPath, $paramName, $paramValue, $isNoAdd) { $content = ''; $startStr = ''; $endStr = ''; $s = ''; $content = PHPTrim(getFText($ConfigPath)); $startStr = $paramName . '=\''; $endStr = '\''; if (inStr($content, $startStr) > 0 && inStr($content, $endStr) > 0) { $s = StrCut($content, $startStr, $endStr, 2); $content = replace($content, $startStr . $s . $endStr, $startStr . $paramValue . $endStr); createFile($ConfigPath, $content); } else { if (aspTrim($isNoAdd) == '1') { CreateAddFile($ConfigPath, $startStr . $paramValue . $endStr); } } }
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; }
require_once './Common.php'; require_once './Cai.php'; //更新网址 http://127.0.0.1/phpAccess.asp $conn = OpenConn(); $mydbcharset = 'utf8'; //编码 gbk $DB_PREFIX = @$_REQUEST['db_PREFIX']; //表前面的前缀 $char = ' ENGINE=MyISAM DEFAULT CHARSET=' . $mydbcharset; $sqlTables = array("{$DB_PREFIX}admin" => "CREATE TABLE `{$DB_PREFIX}admin` (\n`id` int(5) unsigned NOT NULL auto_increment,\n`username` varchar(255) NOT NULL default '',\n`pwd` varchar(255) NOT NULL default '',\n`pseudonym` varchar(255) NOT NULL default '',\n`adddatetime` varchar(250) NOT NULL default '',\n`updatetime` varchar(250) NOT NULL default '',\n`regip` varchar(255) NOT NULL default '',\n`upip` varchar(255) NOT NULL default '',\n`quanxian` mediumtext,\n`verificationmode` int(8) NOT NULL default '0',\n`adminlevel` varchar(255) NOT NULL default '',\n`channel` varchar(255) NOT NULL default '',\n`mtest` tinyint(1) NOT NULL default '0',\n`flags` mediumtext,\n`bodycontent` mediumtext,\nPRIMARY KEY (`Id`)\n){$char};", "{$DB_PREFIX}articledetail" => "CREATE TABLE `{$DB_PREFIX}articledetail` (\n`id` int(5) unsigned NOT NULL auto_increment,\n`parentid` int(8) NOT NULL default '0',\n`sortrank` int(8) NOT NULL default '0',\n`views` int(8) NOT NULL default '0',\n`adminid` int(8) NOT NULL default '0',\n`smallimage` varchar(255) NOT NULL default '',\n`bigimage` varchar(255) NOT NULL default '',\n`bannerimage` varchar(255) NOT NULL default '',\n`downloadfile` varchar(255) NOT NULL default '',\n`smallimagealt` varchar(255) NOT NULL default '',\n`bigimagealt` varchar(255) NOT NULL default '',\n`bannerimagealt` varchar(255) NOT NULL default '',\n`title` varchar(255) NOT NULL default '',\n`titlecolor` varchar(255) NOT NULL default '',\n`titlealt` varchar(255) NOT NULL default '',\n`labletitle` varchar(255) NOT NULL default '',\n`isthrough` tinyint(1) NOT NULL default '0',\n`adddatetime` varchar(250) NOT NULL default '',\n`updatetime` varchar(250) NOT NULL default '',\n`occasions` varchar(255) NOT NULL default '',\n`hotline` varchar(255) NOT NULL default '',\n`model` varchar(255) NOT NULL default '',\n`author` varchar(255) NOT NULL default '',\n`articlesource` varchar(255) NOT NULL default '',\n`price` float(8) NOT NULL default '0',\n`newprice` float(8) NOT NULL default '0',\n`memberprice` float(8) NOT NULL default '0',\n`sold` int(8) NOT NULL default '0',\n`membertype` varchar(255) NOT NULL default '',\n`memberuser` varchar(255) NOT NULL default '',\n`hits` int(8) NOT NULL default '0',\n`productabout` mediumtext,\n`articledescription` mediumtext,\n`httpurl` varchar(255) NOT NULL default '',\n`recordurl` varchar(255) NOT NULL default '',\n`webtitle` varchar(255) NOT NULL default '',\n`webkeywords` varchar(255) NOT NULL default '',\n`webdescription` mediumtext,\n`foldername` varchar(255) NOT NULL default '',\n`filename` varchar(255) NOT NULL default '',\n`templatepath` varchar(255) NOT NULL default '',\n`target` varchar(255) NOT NULL default '',\n`customaurl` varchar(255) NOT NULL default '',\n`fontcolor` varchar(255) NOT NULL default '',\n`nofollow` int(8) NOT NULL default '0',\n`flags` varchar(255) NOT NULL default '',\n`ishtml` tinyint(1) NOT NULL default '0',\n`isonhtml` tinyint(1) NOT NULL default '0',\n`articleinfostyle` varchar(255) NOT NULL default '',\n`articleinfophotowidth` varchar(255) NOT NULL default '',\n`articleinfophotoheight` varchar(255) NOT NULL default '',\n`relatedtags` varchar(255) NOT NULL default '',\n`weight` int(8) NOT NULL default '0',\n`notebody` mediumtext,\n`aboutcontent` mediumtext,\n`temptxt1` mediumtext,\n`temptxt2` mediumtext,\n`bodycontent` mediumtext,\nPRIMARY KEY (`Id`)\n){$char};", "{$DB_PREFIX}bidding" => "CREATE TABLE `{$DB_PREFIX}bidding` (\n`id` int(5) unsigned NOT NULL auto_increment,\n`searchwords` varchar(255) NOT NULL default '',\n`webkeywords` varchar(255) NOT NULL default '',\n`showreason` varchar(255) NOT NULL default '',\n`ncomputersearch` int(8) NOT NULL default '0',\n`nmobliesearch` int(8) NOT NULL default '0',\n`ncountsearch` int(8) NOT NULL default '0',\n`nwordprice` int(8) NOT NULL default '0',\n`ndegree` int(8) NOT NULL default '0',\n`sortrank` int(8) NOT NULL default '0',\n`adddatetime` varchar(250) NOT NULL default '',\n`updatetime` varchar(250) NOT NULL default '',\n`bodycontent` mediumtext,\nPRIMARY KEY (`Id`)\n){$char};", "{$DB_PREFIX}caiconfig" => "CREATE TABLE `{$DB_PREFIX}caiconfig` (\n`id` int(5) unsigned NOT NULL auto_increment,\n`bigclassname` varchar(255) NOT NULL default '',\n`stype` varchar(255) NOT NULL default '',\n`saction` varchar(255) NOT NULL default '',\n`startstr` varchar(255) NOT NULL default '',\n`endstr` varchar(255) NOT NULL default '',\n`startaddstr` varchar(255) NOT NULL default '',\n`endaddstr` varchar(255) NOT NULL default '',\n`fieldname` varchar(255) NOT NULL default '',\n`fieldcheck` int(8) NOT NULL default '0',\n`sortrank` int(8) NOT NULL default '0',\n`adddatetime` varchar(250) NOT NULL default '',\n`updatetime` varchar(250) NOT NULL default '',\n`ip` varchar(255) NOT NULL default '',\n`isthrough` tinyint(1) NOT NULL default '0',\n`bodycontent` mediumtext,\nPRIMARY KEY (`Id`)\n){$char};", "{$DB_PREFIX}caidata" => "CREATE TABLE `{$DB_PREFIX}caidata` (\n`id` int(5) unsigned NOT NULL auto_increment,\n`bigclassname` varchar(255) NOT NULL default '',\n`columnname` varchar(255) NOT NULL default '',\n`stype` varchar(255) NOT NULL default '',\n`value1` mediumtext,\n`value2` mediumtext,\n`value3` mediumtext,\n`value4` mediumtext,\n`value5` mediumtext,\n`value6` mediumtext,\n`fieldname1` varchar(255) NOT NULL default '',\n`fieldname2` varchar(255) NOT NULL default '',\n`fieldname3` varchar(255) NOT NULL default '',\n`fieldname4` varchar(255) NOT NULL default '',\n`fieldname5` varchar(255) NOT NULL default '',\n`fieldname6` varchar(255) NOT NULL default '',\n`fieldcheck1` varchar(255) NOT NULL default '',\n`fieldcheck2` varchar(255) NOT NULL default '',\n`fieldcheck3` varchar(255) NOT NULL default '',\n`fieldcheck4` varchar(255) NOT NULL default '',\n`fieldcheck5` varchar(255) NOT NULL default '',\n`fieldcheck6` varchar(255) NOT NULL default '',\n`sortrank` int(8) NOT NULL default '0',\n`adddatetime` varchar(250) NOT NULL default '',\n`updatetime` varchar(250) NOT NULL default '',\n`ip` varchar(255) NOT NULL default '',\n`isthrough` tinyint(1) NOT NULL default '0',\n`bodycontent` mediumtext,\nPRIMARY KEY (`Id`)\n){$char};", "{$DB_PREFIX}caiweb" => "CREATE TABLE `{$DB_PREFIX}caiweb` (\n`id` int(5) unsigned NOT NULL auto_increment,\n`bigclassname` varchar(255) NOT NULL default '',\n`columnname` varchar(255) NOT NULL default '',\n`httpurl` varchar(255) NOT NULL default '',\n`morepageurl` varchar(255) NOT NULL default '',\n`charset` varchar(255) NOT NULL default '',\n`thispage` int(8) NOT NULL default '0',\n`countpage` int(8) NOT NULL default '0',\n`stype` varchar(255) NOT NULL default '',\n`sortrank` int(8) NOT NULL default '0',\n`adddatetime` varchar(250) NOT NULL default '',\n`updatetime` varchar(250) NOT NULL default '',\n`ip` varchar(255) NOT NULL default '',\n`bodycontent` mediumtext,\nPRIMARY KEY (`Id`)\n){$char};", "{$DB_PREFIX}feedback" => "CREATE TABLE `{$DB_PREFIX}feedback` (\n`id` int(5) unsigned NOT NULL auto_increment,\n`columnid` varchar(255) NOT NULL default '',\n`title` varchar(255) NOT NULL default '',\n`feedbacktype` varchar(255) NOT NULL default '',\n`guestname` varchar(255) NOT NULL default '',\n`tel` varchar(255) NOT NULL default '',\n`fax` varchar(255) NOT NULL default '',\n`email` varchar(255) NOT NULL default '',\n`mobile` varchar(255) NOT NULL default '',\n`qq` varchar(255) NOT NULL default '',\n`msn` varchar(255) NOT NULL default '',\n`company` varchar(255) NOT NULL default '',\n`address` varchar(255) NOT NULL default '',\n`postcode` varchar(255) NOT NULL default '',\n`ip` varchar(255) NOT NULL default '',\n`webtitle` varchar(255) NOT NULL default '',\n`webkeywords` varchar(255) NOT NULL default '',\n`webdescription` mediumtext,\n`foldername` varchar(255) NOT NULL default '',\n`filename` varchar(255) NOT NULL default '',\n`customaurl` varchar(255) NOT NULL default '',\n`templatepath` varchar(255) NOT NULL default '',\n`target` varchar(255) NOT NULL default '',\n`fontcolor` varchar(255) NOT NULL default '',\n`adddatetime` varchar(250) NOT NULL default '',\n`updatetime` varchar(250) NOT NULL default '',\n`isthrough` int(8) NOT NULL default '0',\n`reply` mediumtext,\n`replyip` mediumtext,\n`replydatetime` mediumtext,\n`notebody` mediumtext,\n`aboutcontent` mediumtext,\n`bodycontent` mediumtext,\nPRIMARY KEY (`Id`)\n){$char};", "{$DB_PREFIX}friendlink" => "CREATE TABLE `{$DB_PREFIX}friendlink` (\n`id` int(5) unsigned NOT NULL auto_increment,\n`adminid` int(8) NOT NULL default '0',\n`title` varchar(255) NOT NULL default '',\n`titlecolor` varchar(255) NOT NULL default '',\n`labletitle` varchar(255) NOT NULL default '',\n`httpurl` varchar(255) NOT NULL default '',\n`sortrank` int(8) NOT NULL default '0',\n`titlealt` varchar(255) NOT NULL default '',\n`smallimage` varchar(255) NOT NULL default '',\n`smallimagealt` varchar(255) NOT NULL default '',\n`isthrough` tinyint(1) NOT NULL default '0',\n`adddatetime` varchar(250) NOT NULL default '',\n`updatetime` varchar(250) NOT NULL default '',\n`webtitle` varchar(255) NOT NULL default '',\n`webkeywords` varchar(255) NOT NULL default '',\n`webdescription` mediumtext,\n`foldername` varchar(255) NOT NULL default '',\n`filename` varchar(255) NOT NULL default '',\n`templatepath` varchar(255) NOT NULL default '',\n`target` varchar(255) NOT NULL default '',\n`customaurl` varchar(255) NOT NULL default '',\n`fontcolor` varchar(255) NOT NULL default '',\n`nofollow` int(8) NOT NULL default '0',\n`flags` varchar(255) NOT NULL default '',\n`ishtml` tinyint(1) NOT NULL default '0',\n`isonhtml` tinyint(1) NOT NULL default '0',\n`weight` int(8) NOT NULL default '0',\n`notebody` mediumtext,\n`aboutcontent` mediumtext,\n`bodycontent` mediumtext,\nPRIMARY KEY (`Id`)\n){$char};", "{$DB_PREFIX}guestbook" => "CREATE TABLE `{$DB_PREFIX}guestbook` (\n`id` int(5) unsigned NOT NULL auto_increment,\n`columnid` varchar(255) NOT NULL default '',\n`parentid` int(8) NOT NULL default '0',\n`title` varchar(255) NOT NULL default '',\n`guestname` varchar(255) NOT NULL default '',\n`tel` varchar(255) NOT NULL default '',\n`fax` varchar(255) NOT NULL default '',\n`email` varchar(255) NOT NULL default '',\n`mobile` varchar(255) NOT NULL default '',\n`qq` varchar(255) NOT NULL default '',\n`msn` varchar(255) NOT NULL default '',\n`company` varchar(255) NOT NULL default '',\n`address` varchar(255) NOT NULL default '',\n`postcode` varchar(255) NOT NULL default '',\n`ip` varchar(255) NOT NULL default '',\n`webtitle` varchar(255) NOT NULL default '',\n`webkeywords` varchar(255) NOT NULL default '',\n`webdescription` mediumtext,\n`foldername` varchar(255) NOT NULL default '',\n`filename` varchar(255) NOT NULL default '',\n`customaurl` varchar(255) NOT NULL default '',\n`templatepath` varchar(255) NOT NULL default '',\n`target` varchar(255) NOT NULL default '',\n`fontcolor` varchar(255) NOT NULL default '',\n`adddatetime` varchar(250) NOT NULL default '',\n`updatetime` varchar(250) NOT NULL default '',\n`isthrough` int(8) NOT NULL default '0',\n`reply` mediumtext,\n`replyip` mediumtext,\n`replydatetime` mediumtext,\n`notebody` mediumtext,\n`aboutcontent` mediumtext,\n`bodycontent` mediumtext,\nPRIMARY KEY (`Id`)\n){$char};", "{$DB_PREFIX}job" => "CREATE TABLE `{$DB_PREFIX}job` (\n`id` int(5) unsigned NOT NULL auto_increment,\n`title` varchar(255) NOT NULL default '',\n`sex` varchar(255) NOT NULL default '',\n`age` varchar(255) NOT NULL default '',\n`education` varchar(255) NOT NULL default '',\n`workarea` varchar(255) NOT NULL default '',\n`monthly` varchar(255) NOT NULL default '',\n`startdatetime` varchar(255) NOT NULL default '',\n`enddatetime` varchar(255) NOT NULL default '',\n`webtitle` varchar(255) NOT NULL default '',\n`webkeywords` varchar(255) NOT NULL default '',\n`webdescription` mediumtext,\n`foldername` varchar(255) NOT NULL default '',\n`filename` varchar(255) NOT NULL default '',\n`templatepath` varchar(255) NOT NULL default '',\n`target` varchar(255) NOT NULL default '',\n`fontcolor` varchar(255) NOT NULL default '',\n`nofollow` int(8) NOT NULL default '0',\n`flags` varchar(255) NOT NULL default '',\n`sortrank` int(8) NOT NULL default '0',\n`titlealt` varchar(255) NOT NULL default '',\n`smallimage` varchar(255) NOT NULL default '',\n`smallimagealt` varchar(255) NOT NULL default '',\n`isthrough` int(8) NOT NULL default '0',\n`ishtml` tinyint(1) NOT NULL default '0',\n`isonhtml` tinyint(1) NOT NULL default '0',\n`adddatetime` varchar(250) NOT NULL default '',\n`updatetime` varchar(250) NOT NULL default '',\n`notebody` mediumtext,\n`aboutcontent` mediumtext,\n`bodycontent` mediumtext,\nPRIMARY KEY (`Id`)\n){$char};", "{$DB_PREFIX}lineqq" => "CREATE TABLE `{$DB_PREFIX}lineqq` (\n`id` int(5) unsigned NOT NULL auto_increment,\n`bigclassname` varchar(255) NOT NULL default '',\n`title` varchar(255) NOT NULL default '',\n`qq` varchar(255) NOT NULL default '',\n`isonlinechat` tinyint(1) NOT NULL default '0',\n`isaddfriend` tinyint(1) NOT NULL default '0',\n`adddatetime` varchar(250) NOT NULL default '',\n`updatetime` varchar(250) NOT NULL default '',\n`bodycontent` mediumtext,\nPRIMARY KEY (`Id`)\n){$char};", "{$DB_PREFIX}linevote" => "CREATE TABLE `{$DB_PREFIX}linevote` (\n`id` int(5) unsigned NOT NULL auto_increment,\n`title` varchar(255) NOT NULL default '',\n`option1` varchar(255) NOT NULL default '',\n`option2` varchar(255) NOT NULL default '',\n`option3` varchar(255) NOT NULL default '',\n`option4` varchar(255) NOT NULL default '',\n`option5` varchar(255) NOT NULL default '',\n`option6` varchar(255) NOT NULL default '',\n`num1` int(8) NOT NULL default '0',\n`num2` int(8) NOT NULL default '0',\n`num3` int(8) NOT NULL default '0',\n`num4` int(8) NOT NULL default '0',\n`num5` int(8) NOT NULL default '0',\n`num6` int(8) NOT NULL default '0',\n`isdisplay` tinyint(1) NOT NULL default '0',\n`webtitle` varchar(255) NOT NULL default '',\n`webkeywords` varchar(255) NOT NULL default '',\n`webdescription` mediumtext,\n`foldername` varchar(255) NOT NULL default '',\n`filename` varchar(255) NOT NULL default '',\n`banner` varchar(255) NOT NULL default '',\n`templatepath` varchar(255) NOT NULL default '',\n`target` varchar(255) NOT NULL default '',\n`fontcolor` varchar(255) NOT NULL default '',\n`fontb` tinyint(1) NOT NULL default '0',\n`onhtml` tinyint(1) NOT NULL default '0',\n`adddatetime` varchar(250) NOT NULL default '',\n`updatetime` varchar(250) NOT NULL default '',\n`votetype` tinyint(1) NOT NULL default '0',\nPRIMARY KEY (`Id`)\n){$char};", "{$DB_PREFIX}listmenu" => "CREATE TABLE `{$DB_PREFIX}listmenu` (\n`id` int(5) unsigned NOT NULL auto_increment,\n`title` varchar(255) NOT NULL default '',\n`parentid` int(8) NOT NULL default '0',\n`sortrank` int(8) NOT NULL default '0',\n`lablename` varchar(255) NOT NULL default '',\n`customaurl` varchar(255) NOT NULL default '',\n`adddatetime` varchar(250) NOT NULL default '',\n`updatetime` varchar(250) NOT NULL default '',\n`isdisplay` tinyint(1) NOT NULL default '0',\n`bodycontent` mediumtext,\nPRIMARY KEY (`Id`)\n){$char};", "{$DB_PREFIX}member" => "CREATE TABLE `{$DB_PREFIX}member` (\n`id` int(5) unsigned NOT NULL auto_increment,\n`usertype` varchar(255) NOT NULL default '',\n`username` varchar(255) NOT NULL default '',\n`pwd` varchar(255) NOT NULL default '',\n`yunpwd` varchar(255) NOT NULL default '',\n`sex` varchar(255) NOT NULL default '',\n`age` int(8) NOT NULL default '0',\n`tel` varchar(255) NOT NULL default '',\n`phone` varchar(255) NOT NULL default '',\n`fax` varchar(255) NOT NULL default '',\n`email` varchar(255) NOT NULL default '',\n`postcode` varchar(255) NOT NULL default '',\n`address` varchar(255) NOT NULL default '',\n`company` varchar(255) NOT NULL default '',\n`regip` varchar(255) NOT NULL default '',\n`loginip` varchar(255) NOT NULL default '',\n`logincount` int(8) NOT NULL default '0',\n`logintime` varchar(250) NOT NULL default '',\n`lastlogintime` varchar(250) NOT NULL default '',\n`openid` varchar(255) NOT NULL default '',\n`accesstoken` varchar(255) NOT NULL default '',\n`nickname` varchar(255) NOT NULL default '',\n`qqphoto` varchar(255) NOT NULL default '',\n`useryear` int(8) NOT NULL default '0',\n`province` varchar(255) NOT NULL default '',\n`city` varchar(255) NOT NULL default '',\n`area` varchar(255) NOT NULL default '',\n`adddatetime` varchar(250) NOT NULL default '',\n`updatetime` varchar(250) NOT NULL default '',\n`isthrough` int(8) NOT NULL default '0',\n`bodycontent` mediumtext,\nPRIMARY KEY (`Id`)\n){$char};", "{$DB_PREFIX}onepage" => "CREATE TABLE `{$DB_PREFIX}onepage` (\n`id` int(5) unsigned NOT NULL auto_increment,\n`title` varchar(255) NOT NULL default '',\n`displaytitle` varchar(255) NOT NULL default '',\n`adminid` int(8) NOT NULL default '0',\n`webtitle` varchar(255) NOT NULL default '',\n`webkeywords` varchar(255) NOT NULL default '',\n`webdescription` mediumtext,\n`foldername` varchar(255) NOT NULL default '',\n`filename` varchar(255) NOT NULL default '',\n`customaurl` varchar(255) NOT NULL default '',\n`templatepath` varchar(255) NOT NULL default '',\n`target` varchar(255) NOT NULL default '',\n`fontcolor` varchar(255) NOT NULL default '',\n`fontb` tinyint(1) NOT NULL default '0',\n`nofollow` int(8) NOT NULL default '0',\n`sortrank` int(8) NOT NULL default '0',\n`views` int(8) NOT NULL default '0',\n`isrecommend` tinyint(1) NOT NULL default '0',\n`labletitle` varchar(255) NOT NULL default '',\n`banner` varchar(255) NOT NULL default '',\n`ishtml` tinyint(1) NOT NULL default '0',\n`isonhtml` tinyint(1) NOT NULL default '0',\n`adddatetime` varchar(250) NOT NULL default '',\n`updatetime` varchar(250) NOT NULL default '',\n`notebody` mediumtext,\n`aboutcontent` mediumtext,\n`bodycontent` mediumtext,\nPRIMARY KEY (`Id`)\n){$char};", "{$DB_PREFIX}payment" => "CREATE TABLE `{$DB_PREFIX}payment` (\n`id` int(5) unsigned NOT NULL auto_increment,\n`username` varchar(255) NOT NULL default '',\n`memberid` varchar(255) NOT NULL default '',\n`sex` varchar(255) NOT NULL default '',\n`age` int(8) NOT NULL default '0',\n`tel` varchar(255) NOT NULL default '',\n`phone` varchar(255) NOT NULL default '',\n`fax` varchar(255) NOT NULL default '',\n`email` varchar(255) NOT NULL default '',\n`postcode` varchar(255) NOT NULL default '',\n`address` varchar(255) NOT NULL default '',\n`company` varchar(255) NOT NULL default '',\n`qqmsn` varchar(255) NOT NULL default '',\n`ip` varchar(255) NOT NULL default '',\n`adddatetime` varchar(250) NOT NULL default '',\n`updatetime` varchar(250) NOT NULL default '',\n`isthrough` int(8) NOT NULL default '0',\nPRIMARY KEY (`Id`)\n){$char};", "{$DB_PREFIX}previeworder" => "CREATE TABLE `{$DB_PREFIX}previeworder` (\n`id` int(5) unsigned NOT NULL auto_increment,\n`memberid` varchar(255) NOT NULL default '',\n`orderid` varchar(255) NOT NULL default '',\n`productid` varchar(255) NOT NULL default '',\n`title` varchar(255) NOT NULL default '',\n`total` varchar(255) NOT NULL default '',\n`price` int(8) NOT NULL default '0',\n`productsum` varchar(255) NOT NULL default '',\n`adddatetime` varchar(250) NOT NULL default '',\n`updatetime` varchar(250) NOT NULL default '',\n`isthrough` tinyint(1) NOT NULL default '0',\nPRIMARY KEY (`Id`)\n){$char};", "{$DB_PREFIX}productcomment" => "CREATE TABLE `{$DB_PREFIX}productcomment` (\n`id` int(5) unsigned NOT NULL auto_increment,\n`username` varchar(255) NOT NULL default '',\n`title` varchar(255) NOT NULL default '',\n`pid` int(8) NOT NULL default '0',\n`ptitle` varchar(255) NOT NULL default '',\n`bodycontent` mediumtext,\n`sort` int(8) NOT NULL default '0',\n`ip` varchar(255) NOT NULL default '',\n`adddatetime` varchar(250) NOT NULL default '',\n`updatetime` varchar(250) NOT NULL default '',\n`isthrough` tinyint(1) NOT NULL default '0',\nPRIMARY KEY (`Id`)\n){$char};", "{$DB_PREFIX}searchstat" => "CREATE TABLE `{$DB_PREFIX}searchstat` (\n`id` int(5) unsigned NOT NULL auto_increment,\n`title` varchar(255) NOT NULL default '',\n`isthrough` tinyint(1) NOT NULL default '0',\n`webtitle` varchar(255) NOT NULL default '',\n`webkeywords` varchar(255) NOT NULL default '',\n`webdescription` mediumtext,\n`foldername` varchar(255) NOT NULL default '',\n`filename` varchar(255) NOT NULL default '',\n`customaurl` varchar(255) NOT NULL default '',\n`templatepath` varchar(255) NOT NULL default '',\n`target` varchar(255) NOT NULL default '',\n`ishtml` tinyint(1) NOT NULL default '0',\n`isonhtml` tinyint(1) NOT NULL default '0',\n`views` int(8) NOT NULL default '0',\n`author` varchar(255) NOT NULL default '',\n`sortrank` int(8) NOT NULL default '0',\n`fontcolor` varchar(255) NOT NULL default '',\n`nofollow` int(8) NOT NULL default '0',\n`flags` varchar(255) NOT NULL default '',\n`adddatetime` varchar(250) NOT NULL default '',\n`updatetime` varchar(250) NOT NULL default '',\n`aboutcontent` mediumtext,\n`bodycontent` mediumtext,\nPRIMARY KEY (`Id`)\n){$char};", "{$DB_PREFIX}systemlog" => "CREATE TABLE `{$DB_PREFIX}systemlog` (\n`id` int(5) unsigned NOT NULL auto_increment,\n`msgstr` mediumtext,\n`tablename` varchar(255) NOT NULL default '',\n`url` mediumtext,\n`adminid` int(8) NOT NULL default '0',\n`adminname` varchar(255) NOT NULL default '',\n`ip` varchar(255) NOT NULL default '',\n`adddatetime` varchar(250) NOT NULL default '',\n`bodycontent` mediumtext,\nPRIMARY KEY (`Id`)\n){$char};", "{$DB_PREFIX}tablecomment" => "CREATE TABLE `{$DB_PREFIX}tablecomment` (\n`id` int(5) unsigned NOT NULL auto_increment,\n`userid` int(8) NOT NULL default '0',\n`itemid` int(8) NOT NULL default '0',\n`tablename` varchar(255) NOT NULL default '',\n`username` varchar(255) NOT NULL default '',\n`title` varchar(255) NOT NULL default '',\n`email` varchar(255) NOT NULL default '',\n`tel` varchar(255) NOT NULL default '',\n`ip` varchar(255) NOT NULL default '',\n`adddatetime` varchar(250) NOT NULL default '',\n`updatetime` varchar(250) NOT NULL default '',\n`reply` mediumtext,\n`notebody` mediumtext,\n`isthrough` int(8) NOT NULL default '0',\n`bodycontent` mediumtext,\nPRIMARY KEY (`Id`)\n){$char};", "{$DB_PREFIX}webcolumn" => "CREATE TABLE `{$DB_PREFIX}webcolumn` (\n`id` int(5) unsigned NOT NULL auto_increment,\n`columnname` varchar(255) NOT NULL default '',\n`columnenname` varchar(255) NOT NULL default '',\n`columntype` varchar(255) NOT NULL default '',\n`parentid` int(8) NOT NULL default '0',\n`sortrank` int(8) NOT NULL default '0',\n`views` int(8) NOT NULL default '0',\n`adminid` int(8) NOT NULL default '0',\n`isdisplay` tinyint(1) NOT NULL default '0',\n`smallimage` varchar(255) NOT NULL default '',\n`bigimage` varchar(255) NOT NULL default '',\n`bannerimage` varchar(255) NOT NULL default '',\n`flags` varchar(255) NOT NULL default '',\n`displaytitle` varchar(255) NOT NULL default '',\n`labletitle` varchar(255) NOT NULL default '',\n`webtitle` varchar(255) NOT NULL default '',\n`webkeywords` varchar(255) NOT NULL default '',\n`webdescription` mediumtext,\n`foldername` varchar(255) NOT NULL default '',\n`filename` varchar(255) NOT NULL default '',\n`customaurl` varchar(255) NOT NULL default '',\n`templatepath` varchar(255) NOT NULL default '',\n`target` varchar(255) NOT NULL default '',\n`nofollow` int(8) NOT NULL default '0',\n`fontcolor` varchar(255) NOT NULL default '',\n`fontb` tinyint(1) NOT NULL default '0',\n`ismakehtml` tinyint(1) NOT NULL default '0',\n`npagesize` int(8) NOT NULL default '0',\n`sortsql` varchar(255) NOT NULL default '',\n`ishtml` tinyint(1) NOT NULL default '0',\n`isonhtml` tinyint(1) NOT NULL default '0',\n`adddatetime` varchar(250) NOT NULL default '',\n`updatetime` varchar(250) NOT NULL default '',\n`notebody` mediumtext,\n`aboutcontent` mediumtext,\n`bodycontent` mediumtext,\nPRIMARY KEY (`Id`)\n){$char};", "{$DB_PREFIX}webdomain" => "CREATE TABLE `{$DB_PREFIX}webdomain` (\n`id` int(5) unsigned NOT NULL auto_increment,\n`bigclassname` varchar(255) NOT NULL default '',\n`website` varchar(255) NOT NULL default '',\n`webtitle` varchar(255) NOT NULL default '',\n`webkeywords` varchar(255) NOT NULL default '',\n`webdescription` mediumtext,\n`webstate` int(8) NOT NULL default '0',\n`openspeed` int(8) NOT NULL default '0',\n`charset` varchar(255) NOT NULL default '',\n`content_type` varchar(255) NOT NULL default '',\n`server_name` varchar(255) NOT NULL default '',\n`isasp` tinyint(1) NOT NULL default '0',\n`isaspx` tinyint(1) NOT NULL default '0',\n`isphp` tinyint(1) NOT NULL default '0',\n`isjsp` tinyint(1) NOT NULL default '0',\n`ishtm` tinyint(1) NOT NULL default '0',\n`ishtml` tinyint(1) NOT NULL default '0',\n`nlinks` int(8) NOT NULL default '0',\n`links` mediumtext,\n`homepagelist` varchar(255) NOT NULL default '',\n`flags` varchar(255) NOT NULL default '',\n`websize` int(8) NOT NULL default '0',\n`sortrank` int(8) NOT NULL default '0',\n`adddatetime` varchar(250) NOT NULL default '',\n`updatetime` varchar(250) NOT NULL default '',\n`isdomain` tinyint(1) NOT NULL default '0',\n`isthrough` tinyint(1) NOT NULL default '0',\nPRIMARY KEY (`Id`)\n){$char};", "{$DB_PREFIX}weblayout" => "CREATE TABLE `{$DB_PREFIX}weblayout` (\n`id` int(5) unsigned NOT NULL auto_increment,\n`layoutname` varchar(255) NOT NULL default '',\n`layoutlist` varchar(255) NOT NULL default '',\n`sourcestr` varchar(255) NOT NULL default '',\n`replacestr` varchar(255) NOT NULL default '',\n`actioncontent` mediumtext,\n`sortrank` int(8) NOT NULL default '0',\n`isdisplay` tinyint(1) NOT NULL default '0',\n`author` varchar(255) NOT NULL default '',\n`views` int(8) NOT NULL default '0',\n`adminid` int(8) NOT NULL default '0',\n`adddatetime` varchar(250) NOT NULL default '',\n`updatetime` varchar(250) NOT NULL default '',\n`aboutcontent` mediumtext,\n`bodycontent` mediumtext,\nPRIMARY KEY (`Id`)\n){$char};", "{$DB_PREFIX}webmodule" => "CREATE TABLE `{$DB_PREFIX}webmodule` (\n`id` int(5) unsigned NOT NULL auto_increment,\n`moduletype` varchar(255) NOT NULL default '',\n`modulename` varchar(255) NOT NULL default '',\n`title` varchar(255) NOT NULL default '',\n`sortrank` int(8) NOT NULL default '0',\n`isdisplay` tinyint(1) NOT NULL default '0',\n`author` varchar(255) NOT NULL default '',\n`views` int(8) NOT NULL default '0',\n`adminid` int(8) NOT NULL default '0',\n`adddatetime` varchar(250) NOT NULL default '',\n`updatetime` varchar(250) NOT NULL default '',\n`aboutcontent` mediumtext,\n`bodycontent` mediumtext,\nPRIMARY KEY (`Id`)\n){$char};", "{$DB_PREFIX}website" => "CREATE TABLE `{$DB_PREFIX}website` (\n`id` int(5) unsigned NOT NULL auto_increment,\n`websiteurl` varchar(255) NOT NULL default '',\n`websitebottom` mediumtext,\n`websiteflow` int(8) NOT NULL default '0',\n`websiteflowstyle` int(8) NOT NULL default '0',\n`websiteflowmedian` int(8) NOT NULL default '0',\n`productlist` varchar(255) NOT NULL default '',\n`newslist` varchar(255) NOT NULL default '',\n`newsdid` varchar(255) NOT NULL default '',\n`tz51la` varchar(255) NOT NULL default '',\n`useremail` varchar(255) NOT NULL default '',\n`productdid` varchar(255) NOT NULL default '',\n`templateindex` mediumtext,\n`templatehome` mediumtext,\n`templatemain` mediumtext,\n`templatemain2` mediumtext,\n`templatemain3` mediumtext,\n`usenumb` mediumtext,\n`webrecord` varchar(255) NOT NULL default '',\n`contentwebrecord` mediumtext,\n`usehttpurl` varchar(255) NOT NULL default '',\n`tempusehttpurl` mediumtext,\n`webdate` varchar(250) NOT NULL default '',\n`webtitle` varchar(255) NOT NULL default '',\n`webkeywords` varchar(255) NOT NULL default '',\n`webdescription` mediumtext,\n`webtemplate` varchar(255) NOT NULL default '',\n`webskins` varchar(255) NOT NULL default '',\n`webfoldername` varchar(255) NOT NULL default '',\n`webimages` varchar(255) NOT NULL default '',\n`webcss` varchar(255) NOT NULL default '',\n`webjs` varchar(255) NOT NULL default '',\n`addwebsite` tinyint(1) NOT NULL default '0',\n`updatehtml` tinyint(1) NOT NULL default '0',\n`ishtmlformatting` tinyint(1) NOT NULL default '0',\n`isweblabelclose` tinyint(1) NOT NULL default '0',\n`iscntoen` tinyint(1) NOT NULL default '0',\n`flags` varchar(255) NOT NULL default '',\n`moduleskins` varchar(255) NOT NULL default '',\n`findtpl` varchar(255) NOT NULL default '',\n`replacetpl` varchar(255) NOT NULL default '',\n`webcodefindtpl` varchar(255) NOT NULL default '',\n`webcodereplacetpl` varchar(255) NOT NULL default '',\n`adddatetime` varchar(250) NOT NULL default '',\n`updatetime` varchar(250) NOT NULL default '',\n`webhtml` varchar(255) NOT NULL default '',\nPRIMARY KEY (`Id`)\n){$char};", "{$DB_PREFIX}websitestat" => "CREATE TABLE `{$DB_PREFIX}websitestat` (\n`id` int(5) unsigned NOT NULL auto_increment,\n`visiturl` mediumtext,\n`viewurl` mediumtext,\n`browser` varchar(255) NOT NULL default '',\n`operatingsystem` varchar(255) NOT NULL default '',\n`screenwh` varchar(255) NOT NULL default '',\n`moreinfo` mediumtext,\n`viewdatetime` varchar(250) NOT NULL default '',\n`ip` varchar(255) NOT NULL default '',\n`dateclass` varchar(255) NOT NULL default '',\n`adddatetime` varchar(250) NOT NULL default '',\n`updatetime` varchar(250) NOT NULL default '',\n`isthrough` int(8) NOT NULL default '0',\n`noteinfo` mediumtext,\n`bodycontent` mediumtext,\nPRIMARY KEY (`Id`)\n){$char};", "{$DB_PREFIX}weburlscan" => "CREATE TABLE `{$DB_PREFIX}weburlscan` (\n`id` int(5) unsigned NOT NULL auto_increment,\n`bigclassname` varchar(255) NOT NULL default '',\n`linktype` varchar(255) NOT NULL default '',\n`website` varchar(255) NOT NULL default '',\n`title` varchar(255) NOT NULL default '',\n`httpurl` varchar(255) NOT NULL default '',\n`totitle` varchar(255) NOT NULL default '',\n`tohttpurl` varchar(255) NOT NULL default '',\n`webstate` int(8) NOT NULL default '0',\n`openspeed` int(8) NOT NULL default '0',\n`charset` varchar(255) NOT NULL default '',\n`content_type` varchar(255) NOT NULL default '',\n`link_count` int(8) NOT NULL default '0',\n`websize` int(8) NOT NULL default '0',\n`sortrank` int(8) NOT NULL default '0',\n`adddatetime` varchar(250) NOT NULL default '',\n`updatetime` varchar(250) NOT NULL default '',\n`isthrough` tinyint(1) NOT NULL default '0',\nPRIMARY KEY (`Id`)\n){$char};"); //表前缀不为空 则修改config.php配置文件 if ($DB_PREFIX != '') { $configPath = handlePath("./config.php"); if (checkfile($configPath) == true) { require_once './Cai.php'; $content = getFText($configPath); $s = strCut($content, '; $db_PREFIX= \'', '\'', 1); $content = replace($content, $s, '; $db_PREFIX= \'' . $DB_PREFIX . '\''); createFile($configPath, $content); echo '修改config.php配置文件完成<hr>'; } } foreach ($sqlTables as $tableName => $tableSql) { $conn->query("DROP TABLE IF EXISTS {$tableName}"); //为删除表 $conn->query($tableSql); //为创建表 echo "创建数据表 {$tableName} 成功>><br>"; } echo '<a href="../admin/index.php" target="_blank">登录后台</a>'; echo ' | <a href="../admin/index.php?act=setAccess&webdataDir=/Templates2015/sharembweb/WebData&login=out" target="_blank">导入默认数据</a>';
function readTemplateFileSource($templateFilePath, $id) { $startStr = ''; $endStr = ''; $s = ''; $c = ''; $startStr = '<!--#sourceHtml' . replace($id, '.html', '') . 'Start#-->'; $endStr = '<!--#sourceHtml' . replace($id, '.html', '') . 'End#-->'; $s = readTemplateFileModular($templateFilePath, $startStr, $endStr); if ($s == '[$NO$]') { //加一个读取本文本里配置列表(20150815) $c = getStrCut($GLOBALS['pubCode'], $startStr, $endStr, 2); if ($c != '') { $readTemplateFileSource = $c; //call rwend(c) return @$readTemplateFileSource; } $c = getFText($templateFilePath); //存在 <!--#TemplateSplitStart#--> 就返回当前全部内容 if (inStr($c, '<!--#DialogStart#-->') > 0) { $readTemplateFileSource = $c; return @$readTemplateFileSource; } $s = '模板资源ID[' . $id . ']不存在,路径TemplateFilePath=' . HandlePath($templateFilePath); } $readTemplateFileSource = $s; return @$readTemplateFileSource; }
function displayLayout() { $content = ''; $lableTitle = ''; $templateFile = ''; $lableTitle = @$_REQUEST['lableTitle']; $templateFile = @$_REQUEST['templateFile']; handlePower('显示' . $lableTitle); //管理权限处理 $content = getTemplateContent(@$_REQUEST['templateFile']); $content = replace($content, '[$position$]', $lableTitle); $content = replaceValueParam($content, 'lableTitle', $lableTitle); //Robots.txt文件创建 if ($templateFile == 'layout_makeRobots.html') { $content = replace($content, '[$bodycontent$]', getFText('/robots.txt')); //后台菜单地图 } else { if ($templateFile == 'layout_adminMap.html') { $content = replaceValueParam($content, 'adminmapbody', getAdminMap()); //管理模板 } else { if ($templateFile == 'layout_manageTemplates.html') { $content = displayTemplatesList($content); //生成html } else { if ($templateFile == 'layout_manageMakeHtml.html') { $content = replaceValueParam($content, 'columnList', getMakeColumnList()); } } } } $content = handleDisplayLanguage($content, 'handleDisplayLanguage'); //语言处理 Rw($content); }
function handleReadCssContent($cssFilePath, $LabelName, $isHandleCss) { $c = ''; $startStr = ''; $endStr = ''; $c = getFText($cssFilePath); //截取CSS $startStr = '/*CssCodeStart*/'; $endStr = '/*CssCodeEnd*/'; if (inStr($c, $startStr) > 0 && inStr($c, $endStr) > 0) { $c = StrCut($c, $startStr, $endStr, 2); } //处理CSS if ($isHandleCss == true) { $c = cssCompression($c, 0); } if ($LabelName != '') { $c = '/*' . $LabelName . ' start*/' . $c . '/*' . $LabelName . ' end*/'; } $handleReadCssContent = $c; return @$handleReadCssContent; }
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 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 addEditFile($dir, $fileName) { $filePath = ''; $promptMsg = ''; if (right(lCase($fileName), 5) != '.html' && @$_SESSION['adminusername'] != 'ASPPHPCMS') { $fileName = $fileName . '.html'; } $filePath = $dir . '/' . $fileName; if (CheckFile($filePath) == false) { handlePower('添加模板文件'); //管理权限处理 } else { handlePower('修改模板文件'); //管理权限处理 } //保存内容 if (@$_REQUEST['issave'] == 'true') { createFile($filePath, @$_REQUEST['content']); $promptMsg = '保存成功'; } ?> <form name="form1" method="post" action="?act=addEditFile&issave=true"> <table width="99%" border="0" cellspacing="0" cellpadding="0" class="tableline"> <tr> <td height="30">目录<?php echo $dir; ?> <br> <input name="dir" type="hidden" id="dir" value="<?php echo $dir; ?> " /></td> </tr> <tr> <td>文件名称 <input name="fileName" type="text" id="fileName" value="<?php echo $fileName; ?> " size="40"> <input type="submit" name="button" id="button" value=" 保存 " /><?php echo $promptMsg; ?> <br> <textarea name="content" style="width:99%;height:480px;"id="content"><?php Rw(getFText($filePath)); ?> </textarea></td> </tr> </table> </form> <?php }
function getFTextUTF($file) { return toUTFChar(getFText($file)); }
function delTemplateMyNote($code) { $startStr = ''; $endStr = ''; $i = ''; $s = ''; $handleNumb = ''; $splStr = ''; $Block = ''; $id = ''; $content = ''; $DragSortCssStr = ''; $DragSortStart = ''; $DragSortEnd = ''; $DragSortValue = ''; $c = ''; $lableName = ''; $lableStartStr = ''; $lableEndStr = ''; $handleNumb = 99; //这里定义很重要 //加强版 对这个也可以<!--#aaa start#--><!--#aaa end#--> $startStr = '<!--#'; $endStr = '#-->'; for ($i = 1; $i <= $handleNumb; $i++) { if (inStr($code, $startStr) > 0 && inStr($code, $endStr) > 0) { $lableName = StrCut($code, $startStr, $endStr, 2); if (inStr($lableName, ' start') > 0) { $lableName = mid($lableName, 1, len($lableName) - 6); } $s = $startStr . $lableName . $endStr; $lableStartStr = $startStr . $lableName . ' start' . $endStr; $lableEndStr = $startStr . $lableName . ' end' . $endStr; if (inStr($code, $lableStartStr) > 0 && inStr($code, $lableEndStr) > 0) { $s = StrCut($code, $lableStartStr, $lableEndStr, 1); //call echo(">>",s) } $code = replace($code, $s, ''); //call echo("s",s) //call echo("lableName",lableName) //call echo("lableStartStr",replace(lableStartStr,"<","<")) //call echo("lableEndStr",replace(lableEndStr,"<","<")) } else { break; } } //清除ReadBlockList读出块列表内容 不过有个不足的地方,读出内容可以从外部读出内容,这个以后考虑 //Call Eerr("ReadBlockList",ReadBlockList) //写于20141118 //splStr = Split(ReadBlockList, vbCrLf) '不用这种,复杂了 //修改于20151230 for ($i = 1; $i <= $handleNumb; $i++) { $startStr = '<R#读出内容'; $endStr = ' start#>'; $Block = StrCut($code, $startStr, $endStr, 2); if ($Block != '') { $startStr = '<R#读出内容' . $Block . ' start#>'; $endStr = '<R#读出内容' . $Block . ' end#>'; if (inStr($code, $startStr) > 0 && inStr($code, $endStr) > 0) { $s = StrCut($code, $startStr, $endStr, 1); $code = replace($code, $s, ''); //移除 } } else { break; } } //删除翻页配置20160309 $startStr = '<!--#list start#-->'; $endStr = '<!--#list end#-->'; if (inStr($code, $startStr) > 0 && inStr($code, $endStr) > 0) { $s = StrCut($code, $startStr, $endStr, 2); $code = replace($code, $s, ''); } if (@$_REQUEST['gl'] == 'yun') { $content = getFText('/Jquery/dragsort/Config.html'); $content = getFText('/Jquery/dragsort/模块拖拽.html'); //Css样式 $startStr = '<style>'; $endStr = '</style>'; if (inStr($content, $startStr) > 0 && inStr($content, $endStr) > 0) { $DragSortCssStr = StrCut($content, $startStr, $endStr, 1); } //开始部分 $startStr = '<!--#top start#-->'; $endStr = '<!--#top end#-->'; if (inStr($content, $startStr) > 0 && inStr($content, $endStr) > 0) { $DragSortStart = StrCut($content, $startStr, $endStr, 2); } //结束部分 $startStr = '<!--#foot start#-->'; $endStr = '<!--#foot end#-->'; if (inStr($content, $startStr) > 0 && inStr($content, $endStr) > 0) { $DragSortEnd = StrCut($content, $startStr, $endStr, 2); } //显示块内容 $startStr = '<!--#value start#-->'; $endStr = '<!--#value end#-->'; if (inStr($content, $startStr) > 0 && inStr($content, $endStr) > 0) { $DragSortValue = StrCut($content, $startStr, $endStr, 2); } //控制处理 $startStr = '<dIv datid=\''; $endStr = '</dIv>'; $content = GetArray($code, $startStr, $endStr, false, false); $splStr = aspSplit($content, '$Array$'); foreach ($splStr as $key => $s) { $startStr = '【DatId】\''; $id = mid($s, 1, inStr($s, $startStr) - 1); $s = mid($s, inStr($s, $startStr) + len($startStr), -1); //C=C & "<li><div title='"& Id &"'>" & vbcrlf & "<div " & S & "</div>"& vbcrlf &"<div class='clear'></div></div><div class='clear'></div></li>" $s = '<div' . $s . '</div>'; //Call Die(S) $c = $c . replace(replace($DragSortValue, '{$value$}', $s), '{$id$', $id); } $c = replace($c, '【换行】', vbCrlf()); $c = $DragSortStart . $c . $DragSortEnd; $code = mid($code, 1, inStr($code, '<body>') - 1); $code = replace($code, '</head>', $DragSortCssStr . '</head></body>' . $c . '</body></html>'); } //删除VB软件生成的垃圾代码 $startStr = '<dIv datid=\''; $endStr = '【DatId】\''; for ($i = 1; $i <= $handleNumb; $i++) { if (inStr($code, $startStr) > 0 && inStr($code, $endStr) > 0) { $id = StrCut($code, $startStr, $endStr, 2); $code = replace2($code, $startStr . $id . $endStr, '<div '); } else { break; } } $code = replace($code, '</dIv>', '</div>'); //替换成这个结束div //最外围清除 $startStr = '<!--#dialogteststart#-->'; $endStr = '<!--#dialogtestend#-->'; $code = replace($code, '<!--#dialogtest start#-->', $startStr); $code = replace($code, '<!--#dialogtest end#-->', $endStr); for ($i = 1; $i <= $handleNumb; $i++) { if (inStr($code, $startStr) > 0 && inStr($code, $endStr) > 0) { $s = StrCut($code, $startStr, $endStr, 1); $code = replace2($code, $s, ''); } else { break; } } //内转清除 $startStr = '<!--#teststart#-->'; $endStr = '<!--#testend#-->'; $code = replace($code, '<!--#del start#-->', $startStr); //与下面一样 $code = replace($code, '<!--#del end#-->', $endStr); //与下面一样 多样式 $code = replace($code, '<!--#test start#-->', $startStr); $code = replace($code, '<!--#test end#-->', $endStr); for ($i = 1; $i <= $handleNumb; $i++) { if (inStr($code, $startStr) > 0 && inStr($code, $endStr) > 0) { $s = StrCut($code, $startStr, $endStr, 1); $code = replace2($code, $s, ''); } else { break; } } //删除注释的span $code = replace($code, '<sPAn class="testspan">', ''); //测试Span $code = replace($code, '<sPAn class="testhidde">', ''); //隐藏Span $code = replace($code, '</sPAn>', ''); //delTemplateMyNote = Code:Exit Function $startStr = '<!--#'; $endStr = '#-->'; for ($i = 1; $i <= $handleNumb; $i++) { if (inStr($code, $startStr) > 0 && inStr($code, $endStr) > 0) { $s = StrCut($code, $startStr, $endStr, 1); $code = replace2($code, $s, ''); } else { break; } } $delTemplateMyNote = $code; return @$delTemplateMyNote; }