📄 install.php
字号:
cid int(10) unsigned NOT NULL auto_increment,
cname varchar(75) NOT NULL default '',
PRIMARY KEY (cid)
) TYPE=MyISAM;
CREATE TABLE cjrule (
id int(10) unsigned NOT NULL auto_increment,
cid int(10) NOT NULL default '0',
name varchar(75) NOT NULL default '',
index_type int(10) NOT NULL default '1',
onepage varchar(150) NOT NULL default '',
manypage text NOT NULL,
oneurl text NOT NULL,
url_start varchar(10) NOT NULL default '0',
url_end varchar(10) NOT NULL default '0',
link_rule text NOT NULL,
jclinks varchar(200) NOT NULL default '',
body_rule text NOT NULL,
author text NOT NULL,
source text NOT NULL,
formss int(1) NOT NULL default '1',
form_code text NOT NULL,
form_next text NOT NULL,
cookie text NOT NULL,
PRIMARY KEY (id),
KEY name (name),
KEY cid (cid)
) TYPE=MyISAM;
CREATE TABLE datas (
id int(10) unsigned NOT NULL auto_increment,
link_id int(10) unsigned NOT NULL default '0',
cjrule int(10) unsigned NOT NULL default '0',
title varchar(150) NOT NULL default '',
body text NOT NULL,
author text NOT NULL,
source text NOT NULL,
url varchar(150) NOT NULL default '',
date int(20) NOT NULL default '0',
PRIMARY KEY (id),
KEY cjrule (cjrule)
) TYPE=MyISAM;
CREATE TABLE export (
id int(10) unsigned NOT NULL auto_increment,
rules text NOT NULL,
name varchar(200) NOT NULL default '',
host varchar(200) NOT NULL default '',
user varchar(200) NOT NULL default '',
password varchar(200) NOT NULL default '',
db_name varchar(200) NOT NULL default '',
article_table varchar(200) NOT NULL default '',
field_list tinytext NOT NULL,
value_list tinytext NOT NULL,
date int(10) unsigned NOT NULL default '0',
newnum text NOT NULL,
PRIMARY KEY (id)
) TYPE=MyISAM;
CREATE TABLE links (
id int(10) unsigned NOT NULL auto_increment,
title varchar(150) NOT NULL default '',
url varchar(150) NOT NULL default '',
rules int(8) unsigned NOT NULL default '0',
date int(10) unsigned NOT NULL default '0',
adopt int(1) unsigned NOT NULL default '1',
import int(1) unsigned NOT NULL default '0',
PRIMARY KEY (id),
KEY url (url,adopt,import),
KEY adopt (adopt),
KEY import (import),
KEY rules (rules)
) TYPE=MyISAM;
INSERT INTO cjrule VALUES (2, 1, '17173美眉动态', 3, '', '', 'http://mm.17173.com/mmnews/news.php?find=&page=[分页]', '1', '24', '<a href=\'[连接]\' target=\'_blank\'>[标题]</a>', '', '<table width="100%" border="0" cellspacing="0" cellpadding="00" >[内容]<td height="40" valign="bottom"><div align="center"><font color="#e1139e">', '', '', 0, '', '', '');
INSERT INTO cjrule VALUES (4, 1, '网易首页 > 娱乐中心 > 过往娱乐热点新闻检索', 3, '', '', 'http://ent.163.com/special/00031HI0/entnews[分页].html', '2', '5', '<li><a href="[连接]">[标题]</a></li>', '', '<!-- main -->[内容]<!-- page -->', '', '', 1, '<div id="main" style="background:#F9FCFE;">\r\n<div class="page">[分页区域]</div>\r\n<div id="text">', '', '');
INSERT INTO cjrule VALUES (5, 1, '美眉频道 > 游戏美眉> 游戏COS', 3, '', '', 'http://mm.17173.com/show/cosplay.php?find=&page=[分页]', '1', '13', '<a href=\'[连接]\' target=\'_blank\'>[标题]</a>', '', '<table width="100%" border="0" cellspacing="0" cellpadding="00" >[内容]<td height="40" valign="bottom"><div align="center"><font color="#e1139e">', '', '', 0, '', '', '');
INSERT INTO cjrule VALUES (13, 1, 'howaa', 3, '', '', 'http://www.howaa.com/pics/gril/class_gril.asp?page=[分页]', '1', '250', ' <a target="_blank" href="[连接]">[标题]</a></div>', '', '<script src="/JS/AdsJs/bwtextAD.js"></script><br>[内容]<div align="center" style="margin:0 0 30 0">', '', 'howaa', 0, '', '', '');
INSERT INTO cjrule VALUES (21, 1, '新浪 > 新闻中心 > 国际新闻', 3, '', '', 'http://news.sina.com.cn/photo/w/14[分页].shtml ', '300', '421', '<p><a href=[连接] target=_blank>[标题]</a><FONT', '', '<tr><td class=l17><font id="zoom" class=f14>[内容]</font>\r\n <br clear=all>\r\n </td></tr>\r\n \r\n </table>\r\n\r\n </div>\r\n\r\n<SCRIPT>', '', '', 0, '', '', '');
INSERT INTO cjrule VALUES (22, 1, 'TOM动画频道', 3, '', '', 'http://flash.ent.tom.com/flash_pic_list.php?categoryid=35&action=Search&stype=User&perpage=12&colcount=1&order_rule=CreateTime&page=[分页]', '1', '52', '<A HREF="[连接]" TARGET="_blank"><IMG WIDTH="135" HEIGHT="90" BORDER="0" SRC="[变数]"></A></TD>\r\n </TR> \r\n </TABLE><!--flash图片和链接--></TD><TD><TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0" BGCOLOR="#FFFFFF"> \r\n<TR> <TD> <TABLE WIDTH="100%" BORDER="0" CELLSPACING="1" CELLPADDING="1"> <TR BGCOLOR="#E6E6E6"> \r\n<TD> 推荐星级:<!--flash星级-->[变数]<!--flash星级--> 名称:<!--flash名称-->[标题]<!--flash名称-->', '', '</TABLE><!--flash名称开始--> <BR>[内容]<tr height=30> <td align=center width=300><nobr></td><td align=center width=300><B>', '', '', 0, '', '', '');
INSERT INTO cjrule VALUES (15, 1, '美丽先锋 >> 时尚彩妆', 3, '', '', 'http://www.fadmy.com/Class/mlxf_sscz/mlxf_sscz0[分页].asp', '1', '26', '·<a href=[连接] target=_blank>[标题]</a>', '', '<table width="98%" border="0" cellspacing="0" cellpadding="0" height="100%">[内容]<td height="35"><p align="right">转自', '', '', 1, '<hr noshade color=#C0C0C0 size=1>[分页区域]</tr>\r\n<tr>\r\n<td height="35"><p align="right">', '', '');
INSERT INTO cjrule VALUES (16, 1, '服饰 > 时尚先锋', 3, '', '', 'http://www.pclady.com.cn/dress/ssxf/index_[分页].html', '1', '20', '<a href="[连接]" target="_blank">[标题]</a><BR>', '', 'http://www.pclady.com.cn/dress/nq/0508/pic/20060126banner01.jpg" border=0>[内容]<br><TABLE cellSpacing=1 cellPadding=0 width=500 align=center bgColor=#ffcdcd border=0>', '', '', 1, '<BR CLEAR=all> <DIV ALIGN=center>[分页区域]<div id=demo style=overflow:hidden;height:140;width:496;>', '', '');
INSERT INTO cjrule VALUES (19, 1, 'pconline', 2, '', 'http://www.pconline.com.cn/mobile/news/hgxz/index_1.html', '', '', '', '<a href="[连接]" target="_blank" class=iblue>[标题]</a> <BR>', '', '<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">[内容]<td width="546" colspan="3" align="CENTER"', '', '', 2, '', '<a href="[上下页]" >[下一页]</a>', '');
INSERT INTO export VALUES (21, '', 'ecms(免费版)', 'localhost', 'root', '', 'ecms', 'phome_ecms_news', 'id|classid|newspath|userid|username|checked|truetime|dokey|filename|newstempid|checkuser|docheckuser|viewcheckuser|notdocheckuser|totaldown|title|newstime|befrom|newstext', '|1|[时间格式:Y-m-d]|1|hmj采集器|1|1137066547|1|[随机:5,4]|1|,|,|,|0|1|[标题]|[采集时间格式:Y-m-d]|17173|[内容]', 1140684122, '');
INSERT INTO export VALUES (26, '', 'pw', '127.0.0.1', 'root', '', 'phpwind', 'pw_threads|pw_tmsgs', 'tid|fid|author|authorid|subject|ifcheck|postdate|lastpost|lastposter#tid|ifsign|content', '[文章编号]|5|huangmingj|1|[标题]|1|[时间]|[时间]|huangmingj#[文章编号]|3|[内容]', 1140691276, 'pw_forums|topic|[加][导出总数]|WHERE fid =5\r\npw_forums|article|[加][导出总数]|WHERE fid =5');
INSERT INTO export VALUES (49, '4', 'dz 3.0', '127.0.0.1', 'root', '', 'dbdz', 'cdb_posts|cdb_threads', 'fid|tid|first|author|authorid|subject|dateline|message#tid|fid|author|authorid|subject|dateline', '1|[文章编号]|1|huangmingj|1|[标题]|[时间]|[内容] #[文章编号]|1|huangmingj|1|[标题]|[时间]', 1140685721, ' 发 ');
INSERT INTO export VALUES (30, '', 'nc', '127.0.0.1', 'root', '', 'get', 'datas', 'id|link_id|rules|title|body|author|url|date', '|[文章编号]|10|[标题]|[内容]|[作者]|[网址]|[采集时间] ', 1140685603, '');
INSERT INTO export VALUES (50, '', 'pw432', '127.0.0.1', 'root', '', 'pw_432', 'pw_threads|pw_tmsgs', 'tid|fid|author|authorid|subject|ifcheck|postdate|lastpost|lastposter#tid|ifsign|content', '[文章编号]|2|huangmingj|1|[标题]|1|[时间]|[时间]|huangmingj#[文章编号]|3|[内容]', 1140832843, 'pw_forumdata|tpost|[加][导出总数]|WHERE fid = 2\r\npw_forumdata|topic|[加][导出总数]|WHERE fid = 2\r\npw_forumdata|article|[加][导出总数]|WHERE fid = 2');
sql;
$result = '';
$a_query = explode(";",$mysql_data);
while (list(,$query) = each($a_query)) {
$query = trim($query);
if ($query) {
if (strstr($query,'CREATE TABLE')) {
ereg('CREATE TABLE ([^ ]*)',$query,$regs);
if ($_POST['delete_existing'] == 1) {
@mysql_query("DROP TABLE IF EXISTS $regs[1]");
}
$result .= "<p>正在建立表: ".$regs[1]." …… ";
@mysql_query($query);
if ($query)
{
$result .= "成功</p>\n";
} else {
$result .= "失败</p>\n";
}
} else {
@mysql_query($query);
}
}
}
$pages .= $result;
$steps = 5;
$next = '下一步 >';
}
//---------5-----
if($step == 5 )
{
$pages = <<<PAGE2
<tr>
<td noWrap width="30%" style="font-family: Verdana, Tahoma, 宋体; font-size: 12px; line-height: 100%">管理账号:</td>
<td style="font-family: Verdana, Tahoma, 宋体; font-size: 12px; line-height: 100%">
<input class="formfield" value="" name="name"></td>
</tr>
<tr>
<td noWrap width="30%" style="font-family: Verdana, Tahoma, 宋体; font-size: 12px; line-height: 100%">
管理密码:</td>
<td style="font-family: Verdana, Tahoma, 宋体; font-size: 12px; line-height: 100%">
<input class="formfield" name="pass"></td>
</tr>
<tr>
PAGE2;
$title = '建立管理账号';
$steps = 6;
$next = '下一步 >';
}
//---------6-----
if($step == "6" )
{
$contents = "";
$file = "config.php";
$fp = @fopen($file,"rb");
$contents .= @fread($fp, filesize ($file));
if (preg_match ("/\$user(.*)/i", $contents)) {
$contents = preg_replace("/\$user(.*)/is", "", $contents);
}
$contents .= "
\$user = '$name';
\$pass = '$pass';
?>";
$fp = @fopen($file,"wb+");
fwrite($fp,$contents);
fclose($fp);
$contents = "";
$pages = <<<PAGE2
<p>安装程序已经顺利执行完毕,请尽快删除 install.php,以免被他人恶意利用。</p>
<p>感谢您使用hmj采集器.</p>
<p></p>
<p><li><a href="index.php">进入采集器</a>
PAGE2;
$title = '完成';
$next = '';
}
$show = <<<EOT
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style>
<!--
TD {
FONT-SIZE: 9pt; COLOR: #444444; ; FONT-FAMILY: tahoma, arial, helvetica, sans-serif
}
A:active {
COLOR: #444444
}
A:visited {
COLOR: #444444; TEXT-DECORATION: none
}
A:hover {
COLOR: #444444; TEXT-DECORATION: underline
}
A:link {
COLOR: #444444; TEXT-DECORATION: none
}
BODY {
SCROLLBAR-FACE-COLOR: #336699; FONT-WEIGHT: normal; FONT-SIZE: 14px; MARGIN: 10px; TEXT-DECORATION: none ;margin-top: 0px;
}
-->
</style>
<title>hmj采集器 V 1.0 安装页面</title>
<style>
</style>
</head>
<body>
<div align="center">
<FORM action="" method="post">
<table border="2" width="608" height="433" style="border-collapse: collapse" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#D6D3CE" valign="top">
<table border="0" width="100%" style="border-collapse: collapse" height="18" cellpadding="0">
<tr>
<td background="image/install.gif">
<p dir="ltr">
<font color="#ffffff"><strong>hmj采集器 V 1.0</strong></font></td>
</tr>
</table>
<table border="0" width="100%" cellpadding="2">
<tr>
<td><b>{$title}</b> <br>
{$pages}
</td>
</tr>
</table>
<table border="0" width="604" height="27" cellpadding="10">
<tr>
<td width="273">
<p dir="ltr"><a href="install.php?upgrade=1.1">已安装过的必须升级数据库,请确认config.php配备正确点击这里升级到1.1</a></td>
<td width="315" align="right"><INPUT type="hidden" value="{$steps}" name="step"><input type="submit" value="{$next}"></td>
</tr>
</table>
</td>
</tr>
</table>
</FORM>
</div>
</body>
</html>
EOT;
echo $show;
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -