\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

  1. ( by at )
  2. ( by at )
  3. ( by at )

No comments

Submit

Text Image File Freehand
Name:
Comment:

Preview:

File:
Free hand:
Width: Height:
Black White Red Green Blue


    
    This BBS operates with ScienceBBS.