Non puoi selezionare più di 25 argomenti
Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
35 righe
1.2 KiB
35 righe
1.2 KiB
<? |
|
$error = true; |
|
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; |
|
include_once($configPath); |
|
if (isset($_SESSION["utente"]) && !empty($_GET["tipo"]) && !empty($_GET["riferimento"]) && tokenVerify($_GET["_token"])) { |
|
$editor = new editorManager($_GET["tipo"],$_GET["riferimento"]); |
|
if (!empty($editor)) { |
|
$versions = $editor->versions($_GET["version"] ?? null); |
|
$count = 0; |
|
if (!isset($_GET["version"])){ |
|
$error = false; |
|
foreach($versions AS $version) { |
|
if ($version["attivo"] == "N") { |
|
$queryString = $_GET; |
|
$queryString["version"] = $count; |
|
?> |
|
<button class="btn btn-block btn-primary" onclick="showModalWithURL('/backend/editor/versions.php?<?= http_build_query($queryString) ?>')"> |
|
<?= mysql2completedate($version["timestamp"]) ?> |
|
</button> |
|
<? |
|
$count++; |
|
} |
|
} |
|
} else if (isset($versions["content"])) { |
|
$error = false; |
|
editorManager::printEditor($versions["content"],"preview"); |
|
} |
|
} |
|
} |
|
if ($error) { |
|
header('HTTP/1.0 403 Forbidden'); |
|
die(); |
|
} |
|
|
|
?>
|