" . (int) ($modSettings['karmaWaitTime'] * 3600), __FILE__, __LINE__); // Start off with no change in karma. $action = 0; // Not an administrator... or one who is restricted as well. if (!empty($modSettings['karmaTimeRestrictAdmins']) || !allowedTo('moderate_forum')) { // 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); } // They haven't, not before now, anyhow. if (empty($action) || empty($modSettings['karmaWaitTime'])) { // Put it in the log. db_query(" REPLACE INTO {$db_prefix}log_karma (action, ID_TARGET, ID_EXECUTOR, logTime) VALUES ($dir, $_REQUEST[uid], $ID_MEMBER, " . time() . ')', __FILE__, __LINE__); // Change by one. updateMemberData($_REQUEST['uid'], array($dir == 1 ? 'karmaGood' : 'karmaBad' => '+')); } else { // If you are gonna try to repeat.... don't allow it. if ($action == $dir) fatal_error($txt['smf62'] . ' ' . $modSettings['karmaWaitTime'] . ' ' . $txt[578] . '.', false); // You decided to go back on your previous choice? db_query(" UPDATE {$db_prefix}log_karma SET action = $dir, logTime = " . time() . " WHERE ID_TARGET = $_REQUEST[uid] AND ID_EXECUTOR = $ID_MEMBER LIMIT 1", __FILE__, __LINE__); // It was recently changed the OTHER way... so... reverse it! if ($dir == 1) updateMemberData($_REQUEST['uid'], array('karmaGood' => '+', 'karmaBad' => '-')); else updateMemberData($_REQUEST['uid'], array('karmaBad' => '+', 'karmaGood' => '-')); } // Figure out where to go back to.... the topic? if (!empty($topic)) redirectexit('topic=' . $topic . '.' . $_REQUEST['start'] . '#msg' . $_REQUEST['m']); // Hrm... maybe a personal message? elseif (isset($_REQUEST['f'])) redirectexit('action=pm;f=' . $_REQUEST['f'] . ';start=' . $_REQUEST['start'] . (isset($_REQUEST['l']) ? ';l=' . $_REQUEST['l'] : '') . (isset($_REQUEST['pm']) ? '#' . $_REQUEST['pm'] : '')); // JavaScript as a last resort. else { echo ' ... « '; obExit(false); } } // What's this? I dunno, what are you talking about? Never seen this before, nope. No siree. function BookOfUnknown() { global $context; if (strpos($_GET['action'], 'mozilla') !== false && !$context['browser']['is_gecko']) redirectexit('http://www.getfirefox.com/'); elseif (strpos($_GET['action'], 'mozilla') !== false) redirectexit('about:mozilla'); echo ' The Book of Unknown, ', @$_GET['verse'] == '2:18' ? '2:18' : '4:16', '
'; if (@$_GET['verse'] == '2:18') echo ' Woe, it was that his name wasn\'t known, that he came in mystery, and was recognized by none. And it became to be in those days something.  Something not yet unknown to mankind.  And thus what was to be known the secret project began into its existence.  Henceforth the opposition was only weary and fearful, for now their match was at arms against them.'; else echo ' And it came to pass that the unbelievers dwindled in number and saw rise of many proselytizers, and the opposition found fear in the face of the x and the j while those who stood with the something grew stronger and came together.  Still, this was only the beginning, and what lay in the future was unknown to all, even those on the right side.'; echo '
'; if (@$_GET['verse'] == '2:18') echo ' from The Book of Unknown, 2:18'; else echo ' from The Book of Unknown, 4:16'; echo '
'; obExit(false); } ?>