// Find out if this user has done this recently... $request = db_query(" SELECT action FROM {$db_prefix}log_karma WHERE ID_TARGET = $_REQUEST[uid] AND ID_EXECUTOR = $ID_MEMBER LIMIT 1", __FILE__, __LINE__); if (mysql_num_rows($request) > 0) list ($action) = mysql_fetch_row($request); mysql_free_result($request);
// Find out if this user has done this recently... $request = db_query(" SELECT action, logTime FROM {$db_prefix}log_karma WHERE ID_TARGET = $_REQUEST[uid] AND ID_EXECUTOR = $ID_MEMBER LIMIT 1", __FILE__, __LINE__); if (mysql_num_rows($request) > 0) list ($action, $time) = mysql_fetch_row($request); mysql_free_result($request);
// If you are gonna try to repeat.... don't allow it. if ($action == $dir) fatal_error($txt['smf62'] . ' ' . $modSettings['karmaWaitTime'] . ' ' . $txt[578] . '.', false);
// If you are gonna try to repeat.... don't allow it. if ($action == $dir) { // How much longer do they have to wait (in minutes)? Round to the nearest integer... $waittime = round($modSettings['karmaWaitTime'] * 60) - ((time() - $time) / 60)); fatal_error($txt['smf62'] . ' ' . $modSettings['karmaWaitTime'] . ' ' . $txt[578] . ' (' . $waittime . ' more ' . $txt['totaltimelogged4'] . ')', false); }