$error = true; } } if ($gameq != "") { if (!preg_match("/^[a-zA-Z0-9\\s]+\$/", $gameq)) { $msg = _templates_gameq_error . "<br>"; $error = true; } } if ($type == "steamcmd") { } elseif ($type == "image") { } else { $error = true; $msg = _templates_invalid_type; } if (exists_entry("name", "templates", "name", $name) == true) { $error = true; $msg = _template_exists; } if ($error == false) { $stmt = $mysqli->prepare("INSERT INTO templates(name,type,type_name,name_internal,map_path,gameq,app_set_config,appid) VALUES (?, ?, ?, ? ,? ,?, ? ,?)"); $stmt->bind_param('sssssssi', $name, $type, $type_name, $internal, $map_path, $gameq, $app_set_config, $appid); $stmt->execute(); $stmt->close(); msg_okay(_template_added); } else { msg_error('Something went wrong, ' . $msg); } } } ?>
$error = true; $msg = _templates_invalid_type; } if (isValidIP($ip) == false) { $error = true; $msg = _dedicated_message_ip_invalid; } if (!preg_match("/^[0-9]+\$/", $port)) { $msg = _dedicated_message_port_invalid . "<br>"; $error = true; } if (!preg_match("/^[a-zA-Z0-9._-]+\$/", $user)) { $msg = _gameserver_user_invalid . "<br>"; $error = true; } if (exists_entry("name", "backup_server", "name", $name) == true) { $error = true; $msg = _template_exists; } if ($error == false) { $stmt = $mysqli->prepare("INSERT INTO backup_server(name,type,ip,port,user,password) VALUES (?,?,?,?,?,?)"); $stmt->bind_param('sssiss', $name, $type, $ip, $port, $user, $password); $stmt->execute(); $stmt->close(); msg_okay(_backup_message_added); } else { msg_error('Something went wrong, ' . $msg); } } } ?>
$name = htmlentities($_POST['name']); $ip = htmlentities($_POST['ip']); $port = htmlentities($_POST['port']); $user = htmlentities($_POST['user']); $password = htmlentities($_POST['password']); $root = htmlentities($_POST['root']); $root_password = htmlentities($_POST['root_password']); $os = htmlentities($_POST['os']); $language = htmlentities($_POST['language']); $os_bit = "64"; $os_version = ""; if (exists_entry("name", "dedicated", "name", $name) == true) { $error = true; $msg = _dedicated_message_exists; } if (exists_entry("ip", "dedicated", "ip", $ip) == true) { $error = true; $msg = _dedicated_message_exists; } if (!preg_match("/^[a-zA-Z0-9._-]+\$/", $name)) { $msg = _dedicated_message_name_invalid . "<br>"; $error = true; } if (!preg_match("/^[a-zA-Z0-9]+\$/", $user)) { $msg = _dedicated_message_username_invalid . "<br>"; $error = true; } if (!preg_match("/^[a-zA-Z0-9]+\$/", $root)) { $msg = _dedicated_message_root_invalid . "<br>"; $error = true; }