This code modyfication??
Code: [Download] [Hide] [Select]
if ($userdata['user_level'] <= USER) //Do not limit MODS and ADMINS in any way
{
$time_span = time() - 24*3600; //24 hours
$check_user_limit = 1; // 5 posts per day
$error_msg = $lang['Flood_error_1'];
$sql = "SELECT COUNT(pic_id) AS count
FROM " . ALBUM_TABLE . "
WHERE post_time > $time_span
AND user_id = " . $userdata['user_id'];
if ( $result = $db->sql_query($sql) )
{
$row = $db->sql_fetchrow($result);
$post_count = $row['post_count'];
if ($post_count >= $post_limit) message_die(GENERAL_MESSAGE, $error_msg);
}
{
$time_span = time() - 24*3600; //24 hours
$check_user_limit = 1; // 5 posts per day
$error_msg = $lang['Flood_error_1'];
$sql = "SELECT COUNT(pic_id) AS count
FROM " . ALBUM_TABLE . "
WHERE post_time > $time_span
AND user_id = " . $userdata['user_id'];
if ( $result = $db->sql_query($sql) )
{
$row = $db->sql_fetchrow($result);
$post_count = $row['post_count'];
if ($post_count >= $post_limit) message_die(GENERAL_MESSAGE, $error_msg);
}
please help im green