> Private Msg";
if(isset($section) && $section != "") $where .= " > ".ucfirst($section);
include "header.php";
if(is_logged_in($user_env, $pass_env, $power_env, $id_env)) {
if($section == "" || !isset($section)) {
echo "
$skin_tableheading$skin_tablefooter";
} elseif($section == "inbox") {
$upb["def"] = "./db/pms/inbox";
$file_pm = "./db/pms/".$id_env."_inbox";
$file_users = "./db/users";
$file_block = "./db/pms/".$id_env."_block.dat";
if($action == "Delete PMs") {
$num = 0;
$all = listall($file_pm);
$count = count($all);
for($i=0;$i<$count;$i++) {
$rec = def($all[$i], $upb["def"]);
$del = $rec[id]."_del";
if(isset($$del)) {
@edit($rec[id], "", $file_pm, "yes");
$num++;
}
unset($rec, $del);
}
if($num > 0) {
echo "Successfully Deleted $num Private Msg(s)
";
} else {
echo "No Private Msg(s) Successfully Deleted...
";
}
unset($all, $count, $num);
}
echo "$skin_tableheading
| |
Delete Message |
Block User |
Title: |
By: |
You are not allowed to block Administrators/Moderators";
echo " |
$skin_tablefooter";
} elseif($section == "outbox") {
$upb["def"] = "./db/pms/outbox";
$file_pm = "./db/pms/".$id_env."_outbox";
$file_users = "./db/users";
$file_block = "./db/pms/".$id_env."_block.dat";
$none = 0;
$all = listall($file_pm);
$count = count($all);
echo "$skin_tableheading
| Title: |
By: |
";
for($i=0;$i<$count;$i++) {
if($all[$i] != "") {
$rec = def($all[$i], $upb["def"]);
echo "
$rec[subject] |
Sent to $rec[to] on $rec[date] |
";
unset($rec);
} else {
$none++;
}
unset($rec);
}
if($none == $count) {
echo "| No Messages in your Inbox |
";
$disable = "DISABLED";
}
echo "
$skin_tablefooter";
} else {
redirect("pmsystem.php", "0");
}
} else {
echo "You are not logged in.";
}
include "footer.php";
?>