Estiliza pagina de upload externo - responsiva (novo4)
This commit is contained in:
1 parent
b804d0535e
commit
ed09d5736c
1 file changed
+23
-3
+23
-3
@@ -5,10 +5,30 @@
|
||||
<title>Upload de Arquivos</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<?php
|
||||
// Verificação de autenticação
|
||||
$isAuthenticated = true; // Substitua isso pela sua lógica de autenticação
|
||||
// Verificação de folhas de estilo previamente aplicadas
|
||||
$hasStylesheet = false;
|
||||
|
||||
if (!$isAuthenticated) {
|
||||
// Verificar se há elementos <link> ou <style> no documento
|
||||
ob_start();
|
||||
?>
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
var hasStylesheet = document.querySelector('link[rel="stylesheet"], style') !== null;
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open("POST", "", true);
|
||||
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
|
||||
xhr.send("hasStylesheet=" + hasStylesheet);
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
$script = ob_get_clean();
|
||||
echo $script;
|
||||
|
||||
if (isset($_POST['hasStylesheet']) && $_POST['hasStylesheet'] === 'true') {
|
||||
$hasStylesheet = true;
|
||||
}
|
||||
|
||||
if (!$hasStylesheet) {
|
||||
echo '<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
|
||||
Reference in new issue
Block a user