--- includes/functions_post.php.orig 2006-11-03 16:25:28.000000000 +0300 +++ includes/functions_post.php 2007-05-28 13:19:51.000000000 +0400 @@ -1,4 +1,7 @@ 0) + $BBCLinkQty = $m_test; + + $m_test = preg_match_all("/http:\/\/|https:\/\//i", $post_message, $Matches); + if($m_test > 0) + $HTMLLinkQty = $m_test; + + $TotalLinksQty = $BBCLinkQty + $HTMLLinkQty; + + if(UPOST_TEST_MODE === true){ + $MessageAddition = sprintf("
TEST_MODE

TotalLinksQty - %d

", $TotalLinksQty); + } + + if($TotalLinksQty > MAX_URL_COUNT_IN_MESSAGE){ + message_die(GENERAL_MESSAGE, $lang['Rupoisk_Spam'].$MessageAddition); + } + if($TotalLinksQty > 0){ + if($userdata['user_id'] == ANONYMOUS){ + message_die(GENERAL_MESSAGE, $lang['GuestsAndNewUsersCondition'].$MessageAddition); + }else{ + $sql = sprintf("select user_posts from %s where user_id=%d", + USERS_TABLE, + $userdata['user_id']); + if ($result = $db->sql_query($sql)){ + if ($row = $db->sql_fetchrow($result)){ + if (intval($row['user_posts']) < POSTS_QTY_FOR_ALLOW_LINKS){ + message_die(GENERAL_MESSAGE, $lang['GuestsAndNewUsersCondition'].$MessageAddition); + } + } + } + } + } + /* =============================== */ } if ($mode == 'editpost')