\n");
fwrite($rssxml, "\n");
fwrite($rssxml, " \n");
fwrite($rssxml, " BBS\n");
fwrite($rssxml, " " . $thisurl . "\n");
fwrite($rssxml, " \n");
fwrite($rssxml, " - \n");
fwrite($rssxml, " " . $name . " wrote a comment\n");
fwrite($rssxml, " " . $thisurl . "\n");
fwrite($rssxml, " " . $thisurl . "#". $submitid . "\n");
fwrite($rssxml, " \n");
fwrite($rssxml, " " . $submittime . "\n");
fwrite($rssxml, "
\n");
fwrite($rssxml, " \n");
fwrite($rssxml, "\n");
fclose($rssxml);
}
if ($submittype === 'text') {
$comment = $_POST['comment'];
fputcsv($fp, [$name, $comment, $submittype, $submittime, $submitid]);
}
elseif ($submittype === 'file' or $submittype === 'image') {
$uploadfile = $submitid . "_" . $_FILES['avatar']['name'];
$tmp_name = $_FILES['avatar']['tmp_name'];
fputcsv($fp, [$name, $uploadfile, $submittype, $submittime, $submitid, $tmp_name]);
move_uploaded_file($tmp_name, $uploadfile);
chmod($uploadfile, 0777);
}
elseif ($submittype === 'freehand') {
$canvas = $_POST['comment'];
$canvas = base64_decode($canvas);
$image = imagecreatefromstring($canvas);
$uploadfile = date("U") . ".png";
imagesavealpha($image, TRUE);
imagepng($image , $uploadfile);
fputcsv($fp, [$name, $uploadfile, $submittype, $submittime, $submitid]);
chmod($uploadfile, 0777);
}
rewind($fp);
}
while ($row = fgetcsv($fp)) {
$rows[] = $row;
}
fclose($fp);
?>
BBS
BBS
Comments
- =$row[1]?> (=$row[2]?> by =$row[0]?> at =$row[3]?>)
- (=$row[2]?> by =$row[0]?> at =$row[3]?>)
- =$row[1]?> (=$row[2]?> by =$row[0]?> at =$row[3]?>)
No comments
Submit
Free hand:
Width:
Height:
This BBS operates with ScienceBBS.