$ip = $_SERVER['REMOTE_ADDR']; if (strlen($q) > 20 && $row['last_moderation_ip'] != $ip) { $db->sql_query($q); $db->sql_query("UPDATE " . $prefix . "_pollcomments SET last_moderation_ip='{$ip}' WHERE tid='{$tdw}'"); } } } } } Header("Location: modules.php?name={$module_name}&op=results&pollID={$pollID}"); break; case "showreply": DisplayTopic($pollID, $pid, $tid, $mode, $order, $thold); break; default: global $module_name, $mode, $userinfo, $order, $thold; if (isset($tid) && !isset($pid)) { singlecomment($tid, $pollID, $mode, $order, $thold); } elseif (!isset($pid)) { Header("Location: modules.php?name={$module_name}&op=results&pollID={$pollID}&mode={$mode}&order={$order}&thold={$thold}"); } else { if (!isset($pid)) { $pid = 0; } if (!isset($tid)) { $tid = 0; } DisplayTopic($pollID, $pid, $tid, $mode, $order, $thold); } break; }
$q .= " score=score+1, reason={$emp['1']} where tid='{$tdw}'"; } elseif ($emp[1] < 5 && $emp[0] > -1) { $q .= " score=score-1, reason={$emp['1']} where tid='{$tdw}'"; } elseif ($emp[0] == -1 || $emp[0] == 5) { $q .= " reason={$emp['1']} where tid='{$tdw}'"; } if (strlen($q) > 20) { $db->sql_query($q); } } } } } Header("Location: modules.php?name={$module_name}&file=article&sid={$sid}&mode={$mode}&order={$order}&thold={$thold}"); break; case "showreply": DisplayTopic($sid, $pid, $tid, $mode, $order, $thold); break; default: if (isset($tid) && !isset($pid)) { singlecomment($tid, $sid, $mode, $order, $thold); } elseif ($mainfile xor $pid == 0 and !isset($pid)) { Header("Location: modules.php?name={$module_name}&file=article&sid={$sid}&mode={$mode}&order={$order}&thold={$thold}"); } else { if (!isset($pid)) { $pid = 0; } DisplayTopic($sid, $pid, $tid, $mode, $order, $thold); } break; }