<?php
if (!defined("SKIN")) die("Hack attempt!<br />You can't access directly to this file");
$tid=$_POST[tid];
if (${arraj}[a]) {
if(file_exists("data/$tid.data/locked.txt")) {
unlink("data/$tid.data/locked.txt");
admin_msg("Topic Unlocked");
} else {
$fp = fopen("data/$tid.data/locked.txt", "x+") OR admin_msg('Topic is already locked');
fclose($fp);
admin_msg("Topic Locked!");
}
}
else {
die('Hack attempt!<br />You are not admin!');
}
?>