Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: v0.9
Fetching contributors…

Cannot retrieve contributors at this time

executable file 24 lines (21 sloc) 0.663 kb
<?php
if (trim(stripslashes($_POST['name'])) == "")
{
header("Location: editTopic.php?topicId=".$_GET['topicId']."&error=1");
exit();
}
include_once("class.Post.php");
include_once("class.Topic.php");
include_once("class.Forum.php");
include_once("class.User.php");
session_start();
$fileC = file("db/Topics/".$_GET['topicId']."/topic.dat",FILE_IGNORE_NEW_LINES);
$fileC[5] = htmlentities(stripslashes($_POST['name']));
$str = "";
foreach ($fileC as $line)
{
$str .= $line."\n";
}
file_put_contents("db/Topics/".$_GET['topicId']."/topic.dat",$str);
header('Location: viewTopics.php?forumId='.$_GET['forumId']);
?>
Jump to Line
Something went wrong with that request. Please try again.