0 && $_POST["cooldown"]) { if(strlen($_POST["tzHour"]) == 2 && is_numeric($_POST["tzHour"]) && strlen($_POST["tzMins"]) == 2 && is_numeric($_POST["tzMins"]) && $_POST["tzHour"] && $_POST["tzMins"]) { if(trim($_POST["name"])) { if(trim($_POST["username"])) { if(is_numeric($_POST["buffsize"]) && $_POST["buffsize"] > 0 && $_POST["buffsize"]) { mysql_query("UPDATE `config` SET `cooldown`='". $_POST['cooldown'] ."', `name`='". mysql_real_escape_string(trim($_POST['name'])) ."', `username`='". mysql_real_escape_string(trim($_POST['username'])) ."', `dst`=". (($_POST['dst'])?"1":"0") .", `timezone`='". $_POST['tzSign'] . $_POST['tzHour'] .":". $_POST['tzMins'] ."', `parsechatbot`=". (($_POST['chatbot'])?"1":"0") .", `buffersize`=". $_POST['buffsize'] ." WHERE `id`=1") or die(mysql_error()); mysql_query("UPDATE `updater` SET `config`=1 WHERE `id`=1"); $config = mysql_fetch_object(mysql_query("SELECT * FROM `config` WHERE `id`=1")); } else { $configerr = "Buffer size is not a positive integer!"; } } else { $configerr = "Chat username is empty!"; } } else { $configerr = "Bot name is empty!"; } } else { $configerr = "Timezone formatted incorrectly!"; } } else { $configerr = "Cooldown is not a positive integer!"; } } function select() { echo "selected='selected'"; } if($_POST["updateNav"]) { mysql_query("TRUNCATE `navigate`"); mysql_query("ALTER TABLE `navigate` AUTO_INCREMENT=1"); for($rowCount = 0;;$rowCount++) { $r = $rowCount + 1; if(!isset($_POST["r".($rowCount+1)."c1"])) break; if($_POST['r'.$r.'c1'] == 0) { if(substr($_POST['r'.$r.'c2'], 0, 4) != "http") $_POST['r'.$r.'c2'] = "http://". $_POST['r'.$r.'c2']; } mysql_query("INSERT INTO `navigate` (`findtype`,`locator`,`action`,`parameter`) VALUES ( ". $_POST['r'.$r.'c1'] .", '". mysql_real_escape_string(trim($_POST['r'.$r.'c2'])) ."', '". $_POST['r'.$r.'c3'] ."', '". mysql_real_escape_string(trim($_POST['r'.$r.'c4'])) ."' )"); } } $rowCount = mysql_num_rows(mysql_query("SELECT * FROM `navigate`")); include("header.php"); ?>