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"])) { 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") ." 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 = "Chat username is empty!"; } } else { $configerr = "Bot name is empty!"; } } else { $configerr = "Timezone formatted incorrectly!"; } } else { $configerr = "Cooldown is not a positive integer!"; } } $rowCount = mysql_num_rows(mysql_query("SELECT * FROM `navigate`")); include("header.php"); ?>