poster_id!=$current_user){ msg("What if someone did that to you?"); header("Location: /forum/post/?post=".$_GET["post"]); } $datediff = time() - strtotime($post->date); $mins = round($datediff / (60)); if($mins > 5){ msg("You can't edit that post."); header("Location: /forum/post/?post=".$_GET["post"]); } function checked($type, $value){ return $GLOBALS["post"]->$type==$value?"checked":""; } $imgArray = $post->image==NULL?"":"\"".str_replace(",", "\", \"",substr($post->image,0,-1))."\""; ?>
content?>
image != NULL){ echo " "; $i=1; foreach(explode(",", substr($post->image, 0, -1)) as $file){ //substr gets rid of the last comma, explode makes the array $exType = substr($file, strpos($file, '.')+1); $docFiles = ["doc", "docx", "pdf"]; $imgFiles = ["jpg", "jpeg", "png"]; //image stuff if(in_array($exType, $docFiles)){ echo ""; // }else if(in_array($exType, $imgFiles)){ echo ""; } } } ?>

Subject

"; $num++; } ?> >

Post type

> > > > >

Rules:

style="display:none;">