<?
require_once './include/common.inc.php';
$query = $db->query("SELECT * FROM {$tablepre}posts where first = 1");
while($post = $db -> fetch_array($query)) {
$tid = $post['tid'];
$fid = $post['fid'];
$readperm = 0;
$price = 0;
$iconid = 0;
$typeid = 0;
$author = $post['author'];
$discuz_uid = $post['authorid'];
$subject = addslashes($post['subject']);
$timestamp = $post['dateline'];
$timestamp1 = $post['dateline'];
$author = $post['author'];
$displayorder = 0;
$digest = 0;
$blog = 0;
$special = 0;
$attachment = $post['attachment'];
$subscribed = 0;
$moderated = 0;
$supe_pushstatus = 0;
$threadquery = $db->query("select tid from {$tablepre}threads where tid=$tid");
if(!$tidarray = $db->fetch_array($threadquery)){
$db->query("INSERT INTO {$tablepre}threads (tid, fid, readperm, price, iconid, typeid, author, authorid, subject, dateline, lastpost, lastposter, displayorder, digest, blog, special, attachment, subscribed, moderated, supe_pushstatus)
VALUES ('$tid', '$fid', '$readperm', '$price', '$iconid', '$typeid', '$author', '$discuz_uid', '$subject', '$timestamp', '$timestamp1', '$author', '$displayorder', '$digest', '$blog', '$special', '$attachment', '$subscribed', '$moderated', '$supe_pushstatus')");
}else{
echo "已经存在
";
}
}
echo '完毕';
?>
要修改哪里吗?我不是很懂哈。呵呵 |