Creata pagina con "<html> <!-- 🔧 DASHBOARD OPERATIVA – MASTICATIONPEDIA --> <h2>🔧 Dashboard Operativa – Masticationpedia</h2> <p><em>Centro di comando per progetti, API, file e backup</em></p> <!-- 🔘 Pulsanti di navigazione --> <div style="margin: 2rem 0; display: flex; flex-wrap: wrap; gap: 1rem;"> <button class="dashboard-toggle" onclick="toggleDashboardBox('api-settings')">⚙️ Connessione API</button> <button class="dashboard-toggle" onclick="toggleDashboardBox('ser..."
 
Nessun oggetto della modifica
(5 versioni intermedie di uno stesso utente non sono mostrate)
Riga 12: Riga 12:
</div>
</div>
<button class="dashboard-toggle" onclick="toggleDashboardBox('activity-log')">📘 Registro Attività</button>
<button class="dashboard-toggle" onclick="toggleDashboardBox('activity-log')">📘 Registro Attività</button>
<button class="dashboard-toggle" onclick="uploadToOpenAI()">📤 Carica in OpenAI</button>




Riga 26: Riga 30:
   <pre id="api-result" style="background:#f0f0f0; padding:1rem; border:1px solid #ccc; margin-top:1rem; white-space:pre-wrap;"></pre>
   <pre id="api-result" style="background:#f0f0f0; padding:1rem; border:1px solid #ccc; margin-top:1rem; white-space:pre-wrap;"></pre>
</div>
</div>


<!-- 📦 Box: Accesso File Server -->
<!-- 📦 Box: Accesso File Server -->
<div id="server-files" style="display:none; padding:1rem; border:1px solid #ccc; border-radius:8px; background:#f9f9f9; margin-bottom:1rem;">
<div style="margin-top: 2rem; padding: 1rem; border: 1px solid #ccc; background: #f9f9f9; border-radius: 8px;">
   <strong>File Server:</strong> Accesso ai file CSS, JS, configurazioni.<br><br>
   <h3 style="margin-top: 0;">📂 Accesso File Server</h3>
   <select id="fileSelect" style="margin-bottom:0.5rem;">
  <p>Inserisci il nome completo del file MediaWiki che desideri leggere, ad esempio: <code>MediaWiki:Common.css</code></p>
    <option value="common.css">common.css</option>
 
    <option value="common.js">common.js</option>
   <input id="readFileName" type="text" style="width: 100%; padding: 8px; font-family: monospace; font-size: 14px;" placeholder="MediaWiki:CommonDashboard.js">
    <option value="LocalSettings.php">LocalSettings.php</option>
 
  </select><br>
  <button id="readFileBtn" class="mw-ui-button" style="margin-top: 10px;">📂 Leggi file</button>
   <textarea id="fileContent" rows="10" style="width:100%; display:none;"></textarea><br>
 
   <button onclick="saveMockFile()" style="display:none;" id="saveBtn">📀 Salva</button>
   <div id="readFileResult" style="margin-top: 1rem; border: 1px solid #ddd; padding: 1rem; background: #fff; font-family: monospace; font-size: 14px; white-space: pre-wrap; max-height: 400px; overflow: auto;">
    <em>📄 Il contenuto del file verrà mostrato qui...</em>
   </div>
</div>
</div>
<script>
document.querySelector('#readFileBtn')?.addEventListener('click', async () => {
  const filenameInput = document.querySelector('#readFileName');
  const fileContentDiv = document.querySelector('#readFileResult');
  const filename = filenameInput.value.trim();
  if (!filename) {
    fileContentDiv.innerHTML = '<span style="color:red;">⚠️ Inserisci un nome di file.</span>';
    return;
  }
  try {
    const response = await fetch('/wiki/dashboard/api/read_file.php?filename=' + encodeURIComponent(filename));
    const data = await response.json();
    if (data.status === 'success') {
      fileContentDiv.innerHTML = `<pre style="background:#f4f4f4;border:1px solid #ccc;padding:8px;max-height:400px;overflow:auto;font-size:14px;">${data.content}</pre>`;
    } else {
      fileContentDiv.innerHTML = `<span style="color:red;">❌ Errore: ${data.message}</span>`;
    }
  } catch (error) {
    fileContentDiv.innerHTML = `<span style="color:red;">❌ Errore di connessione.</span>`;
    console.error('Errore JS:', error);
  }
});
</script>


<!-- 📦 Box: Stato Progetti -->
<!-- 📦 Box: Stato Progetti -->

Versione delle 18:51, 31 lug 2025

🔧 Dashboard Operativa – Masticationpedia

Centro di comando per progetti, API, file e backup

📂 Accesso File Server

Inserisci il nome completo del file MediaWiki che desideri leggere, ad esempio: MediaWiki:Common.css

📄 Il contenuto del file verrà mostrato qui...
📜 Registro attività:
Registro avviato...