天霜 寫:請列出\r
posting.php 第 212 行上下十行
$is_auth = array();
switch( $mode )
{
case 'newtopic':
if ( $topic_type == POST_ANNOUNCE )
{
$is_auth_type = 'auth_announce';
}
else if ( $topic_type == POST_STICKY )
{
$is_auth_type = 'auth_sticky';
}
else
{
$is_auth_type = 'auth_post';
}
break;
case 'reply':
case 'quote':
$is_auth_type = 'auth_reply';
break;
case 'editpost':
$is_auth_type = 'auth_edit';
break;
case 'delete':
case 'poll_delete':
$is_auth_type = 'auth_delete';
break;
case 'vote':
$is_auth_type = 'auth_vote';
break;
case 'topicreview':
$is_auth_type = 'auth_read';
break;
default:
message_die(GENERAL_MESSAGE, $lang['No_post_mode']);
break;
}
//
// Here we do various lookups to find topic_id, forum_id, post_id etc.
// Doing it here prevents spoofing (eg. faking forum_id, topic_id or
post_id
//
$error_msg = ''; (posting.php 第 212 行)
$post_data = array();
switch ( $mode )
{
case 'newtopic':
if ( empty($forum_id) )
{
message_die(GENERAL_MESSAGE,
$lang['Forum_not_exist']);
}
$sql = "SELECT *
FROM " . FORUMS_TABLE . "
WHERE forum_id = $forum_id";
break;
case 'reply': \r
case 'vote':
if ( empty( $topic_id) )
{
message_die(GENERAL_MESSAGE,
$lang['No_topic_id']);
}
$sql = "SELECT f.*, t.topic_status, t.topic_title , t.topic_poster
FROM " . FORUMS_TABLE . " f, " . TOPICS_TABLE .
" t
WHERE t.topic_id = $topic_id
AND f.forum_id = t.forum_id";
break;
case 'quote':
case 'editpost':
case 'delete':
case 'poll_delete':
if ( empty($post_id) )
{
message_die(GENERAL_MESSAGE,