parse error, unexpected T_IF
- $edited_sql = // BEGIN Remove Edited By for ADMINs 1.0.0 (http://www.phpBBDoctor.com);
if ($userdata['user_level'] == ADMIN)
{
$edited_sql = '';
}
// END Remove Edited By for ADMINs 1.0.0 (http://www.phpBBDoctor.com);
Code: Selecteer alles
if (intval($row['last_post_time']) > 0 && ($current_time - intval($row['last_post_time'])) < intval($board_config['flood_interval']))
{
message_die(GENERAL_MESSAGE, $lang['Flood_Error']);
}
}
}
}
if ($mode == 'editpost')
{
remove_search_post($post_id);
}
if ($mode == 'newtopic' || ($mode == 'editpost' && $post_data['first_post']))
{
$topic_vote = (!empty($poll_title) && count($poll_options) >= 2) ? 1 : 0;
$sql = ($mode != "editpost") ? "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote)" : "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_type = $topic_type " . (($post_data['edit_vote'] || !empty($poll_title)) ? ", topic_vote = " . $topic_vote : "") . " WHERE topic_id = $topic_id";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
}
if ($mode == 'newtopic')
{
$topic_id = $db->sql_nextid();
}
}
$edited_sql = // BEGIN Remove Edited By for ADMINs 1.0.0 (www.phpBBDoctor.com);
if ($userdata['user_level'] == ADMIN)
{
$edited_sql = '';
}
// END Remove Edited By for ADMINs 1.0.0 (www.phpBBDoctor.com);
($mode == 'editpost' && !$post_data['last_post'] && $post_data['poster_post']) ? ", post_edit_time = $current_time, post_edit_count = post_edit_count + 1 " : "";
$sql = ($mode != "editpost") ? "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, post_username, post_time, poster_ip, enable_bbcode, enable_html, enable_smilies, enable_sig) VALUES ($topic_id, $forum_id, " . $userdata['user_id'] . ", '$post_username', $current_time, '$user_ip', $bbcode_on, $html_on, $smilies_on, $attach_sig)" : "UPDATE " . POSTS_TABLE . " SET post_username = '$post_username', enable_bbcode = $bbcode_on, enable_html = $html_on, enable_smilies = $smilies_on, enable_sig = $attach_sig" . $edited_sql . " WHERE post_id = $post_id";
if (!$db->sql_query($sql, BEGIN_TRANSACTION))
{
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
}
if ($mode != 'editpost')
{
$post_id = $db->sql_nextid();
}
$sql = ($mode != 'editpost') ? "INSERT INTO " . POSTS_TEXT_TABLE . " (post_id, post_subject, bbcode_uid, post_text) VALUES ($post_id, '$post_subject', '$bbcode_uid', '$post_message')" : "UPDATE " . POSTS_TEXT_TABLE . " SET post_text = '$post_message', bbcode_uid = '$bbcode_uid', post_subject = '$post_subject' WHERE post_id = $post_id";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
}
add_search_words('single', $post_id, stripslashes($post_message), stripslashes($post_subject));
// Start Edit Notes MOD
if ( count($edit_notes) > 0 && $mode == 'editpost' )
{
while ( list($edit_note_id, $note) = each($edit_notes) )
{
// New edit note
if ( $edit_note_id == 0 )
{
$sql = 'INSERT INTO ' . EDIT_NOTES_TABLE . " (topic_id, post_id, user_id, note, ip, edit_note_time) VALUES ($topic_id, $post_id, {$userdata['user_id']}, '$note', '$user_ip', $current_time)";
$sql_mode = 'adding';
}
// Update edit note
else
{
// If edit note is blank, delete it
if ( $note == '' )
{
$sql = 'DELETE FROM ' . EDIT_NOTES_TABLE . " WHERE edit_note_id = $edit_note_id LIMIT 1";
$sql_mode = 'deleting';
}
else
{
$sql = 'UPDATE ' . EDIT_NOTES_TABLE . " SET note = '$note' WHERE edit_note_id = $edit_note_id LIMIT 1";
$sql_mode = 'updating';
}
}
if ( !($db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Error in $sql_mode this edit note", '', __LINE__, __FILE__, $sql);
}
}
}
// End Edit Notes MOD
Code: Selecteer alles
$edited_sql = // BEGIN Remove Edited By for ADMINs 1.0.0 (www.phpBBDoctor.com);
if ($userdata['user_level'] == ADMIN)
{
$edited_sql = '';
}
// END Remove Edited By for ADMINs 1.0.0 (www.phpBBDoctor.com);
($mode == 'editpost' && !$post_data['last_post'] && $post_data['poster_post']) ? ", post_edit_time = $current_time, post_edit_count = post_edit_count + 1 " : "";
$sql = ($mode != "editpost") ? "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, post_username, post_time, poster_ip, enable_bbcode, enable_html, enable_smilies, enable_sig) VALUES ($topic_id, $forum_id, " . $userdata['user_id'] . ", '$post_username', $current_time, '$user_ip', $bbcode_on, $html_on, $smilies_on, $attach_sig)" : "UPDATE " . POSTS_TABLE . " SET post_username = '$post_username', enable_bbcode = $bbcode_on, enable_html = $html_on, enable_smilies = $smilies_on, enable_sig = $attach_sig" . $edited_sql . " WHERE post_id = $post_id";
Code: Selecteer alles
$edited_sql = ($mode == 'editpost' && !$post_data['last_post'] && $post_data['poster_post']) ? ", post_edit_time = $current_time, post_edit_count = post_edit_count + 1 " : "";
$sql = ($mode != "editpost") ? "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, post_username, post_time, poster_ip, enable_bbcode, enable_html, enable_smilies, enable_sig) VALUES ($topic_id, $forum_id, " . $userdata['user_id'] . ", '$post_username', $current_time, '$user_ip', $bbcode_on, $html_on, $smilies_on, $attach_sig)" : "UPDATE " . POSTS_TABLE . " SET post_username = '$post_username', enable_bbcode = $bbcode_on, enable_html = $html_on, enable_smilies = $smilies_on, enable_sig = $attach_sig" . $edited_sql . " WHERE post_id = $post_id";
// BEGIN Remove Edited By for ADMINs 1.0.0 (www.phpBBDoctor.com);
if ($userdata['user_level'] == ADMIN)
{
$edited_sql = '';
}
// END Remove Edited By for ADMINs 1.0.0 (www.phpBBDoctor.com);