$ipbanInfo = $ipbanObj->get_info(); if (time() < $ipbanInfo['exptime'] or $ipbanInfo['exptime'] == 0) { die("<script type='text/javascript'>window.location = '" . $MAIN_ROOT . "banned.php';</script>"); } else { $ipbanObj->delete(); } } // Start Page $PAGE_NAME = $customPageInfo['name'] . " - "; $dispBreadCrumb = ""; include $prevFolder . "themes/" . $THEME . "/_header.php"; $breadcrumbObj->setTitle($customPageInfo['name']); $breadcrumbObj->addCrumb("Home", $MAIN_ROOT); $breadcrumbObj->addCrumb($customPageInfo['name']); include $prevFolder . "include/breadcrumb.php"; $arrComponents = $customFormObj->getComponents(); $dispError = ""; $countErrors = 0; if ($_POST['submit']) { // Check for multi submissions $result = $mysqli->query("SELECT * FROM " . $dbprefix . "customform_submission WHERE ipaddress = '" . $IP_ADDRESS . "' ORDER BY submitdate DESC LIMIT 1"); if ($result->num_rows > 0) { $row = $result->fetch_assoc(); if (time() - $row['submitdate'] < 120) { $countErrors++; $dispError .= " <b>·</b> To prevent abuse you must wait 2 minutes before submitting again.<br>"; } } if ($countErrors == 0) { $arrColumns = array("submitdate", "ipaddress", "customform_id"); $arrValues = array(time(), $IP_ADDRESS, $customPageInfo['customform_id']);