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>
|
<title>Upload de Arquivos</title>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<?php
|
<?php
|
||||||
// Verificação de autenticação
|
// Verificação de folhas de estilo previamente aplicadas
|
||||||
$isAuthenticated = true; // Substitua isso pela sua lógica de autenticação
|
$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>
|
echo '<style>
|
||||||
body {
|
body {
|
||||||
font-family: Arial, sans-serif;
|
font-family: Arial, sans-serif;
|
||||||
|
|||||||
Reference in new issue
Block a user