\n");
printf(" %s | \n
%s | \n
%s | \n
%s | \n
%s | \n
%s | \n
%s | \n",
$myrow["pn_sid"],
$myrow["pn_title"],
$myrow["pn_time"],
$myrow["pn_hometext"],
$myrow["pn_bodytext"],
$myrow["pn_topic"],
$myrow["pn_counter"]);
// retreive all associated comments
$mysid = $myrow["pn_sid"];
mysql_select_db($sourcedb, $db_connect);
$comments = mysql_query("select * from nuke_comments where pn_sid = $mysid", $db_connect);
print "";
print "";
print "";
print " pn_tid | ";
print " pn_sid | ";
print " pn_date | ";
print " pn_name | ";
print " pn_email | ";
print " pn_url | ";
print " pn_host_name | ";
print " pn_subject | ";
print " pn_comment | ";
print "";
$comrownum = 0;
while ($comrow = mysql_fetch_array($comments))
{
$myname = mysql_escape_string($comrow['pn_name']);
$myemail = mysql_escape_string($comrow['pn_email']);
$myurl = mysql_escape_string($comrow['pn_url']);
$myIP = mysql_escape_string($comrow['pn_host_name']);
$mycomment = mysql_escape_string($comrow['pn_comment']);
$sql = "INSERT INTO `" . $desttable_prefix . "comments`
(
`comment_ID` ,
`comment_post_ID` ,
`comment_author` ,
`comment_author_email` ,
`comment_author_url` ,
`comment_author_IP` ,
`comment_date` ,
`comment_date_gmt` ,
`comment_content` ,
`comment_karma` ,
`comment_approved` ,
`user_id` )
VALUES
(
'',
'$currentID',
'$myname',
'$myemail',
'$myurl',
'$myIP',
'$comrow[pn_date]',
'0000-00-00 00:00:00',
'$mycomment',
'0',
'1',
'0'
);";
if ($submit)
{
mysql_select_db($destdb, $db_connect);
mysql_query($sql, $db_connect)
or die("Fatal Error: ".mysql_error());
}
if ($comrownum++ %2 == 0)
print "";
else
print " ";
printf(" %s |
%s |
%s |
%s |
%s |
%s |
%s |
%s |
%s | \n",
$comrow["pn_tid"],
$comrow["pn_sid"],
$comrow["pn_date"],
$comrow["pn_name"],
$comrow["pn_email"],
$comrow["pn_url"],
$comrow["pn_host_name"],
$comrow["pn_subject"],
$comrow["pn_comment"]);
}
print " \n";
print " | \n";
print "
\n";
}
?>