printf( _("Mass Message to %u user(s)!"), $n_pms) ?>
|
} else { //////// PM //
$receiver = (int) $_GET["receiver"];
if (!is_valid_id($receiver))
stderr( _("Error"), _("Unknown id") );
$replyto = (int) $_GET["replyto"];
if ($replyto && !is_valid_id($replyto))
stderr( _("Error"), _("Unknown id") );
$auto = $_GET["auto"];
$std = $_GET["std"];
if (($auto || $std ) && get_user_class() < UC_MODERATOR)
stderr( _("Error"), _("Permission denied."));
$res = do_mysql_query("SELECT * FROM users WHERE id=$receiver") or die(mysql_error());
$user = mysql_fetch_assoc($res);
if (!$user)
stderr( _("Error"), _("No user with that ID.") );
if ($auto)
$body = $pm_std_reply[$auto];
if ($std)
$body = $pm_template[$std][1];
if ($replyto)
{
$res = do_mysql_query("SELECT * FROM messages WHERE id=$replyto") or sqlerr();
$msga = mysql_fetch_assoc($res);
if ($msga["receiver"] != $CURUSER["id"])
stderr( _("Error"), _("Permission denied."));
$res = do_mysql_query("SELECT username FROM users WHERE id=" . $msga["sender"]) or sqlerr();
$usra = mysql_fetch_assoc($res);
$body .= "\n\n\n-------- $usra[username] ". _('wrote').": --------\n$msga[msg]\n";
}
stdhead( _("Send message") , false);
?>
if (get_user_class() >= UC_MODERATOR)
{
?>
}
?>
|
}
stdfoot();
?>