-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathuploadImg.php
46 lines (44 loc) · 1.88 KB
/
uploadImg.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
require_once __DIR__ . DIRECTORY_SEPARATOR . "toolkit.php";
if (session_status() == PHP_SESSION_NONE){
session_start();
}
checkLoggedAdmin();
$content = file_get_contents(__("struttura.html"));
if (isset($_SESSION['language']) && $_SESSION['language']=='en'){
setTitle($content, "Upload an instrumentation picture");
}else{
setTitle($content, "Carica un'immagine di strumentazione");
}
initBreadcrumbs($content, "Home", "index.php");
if (isset($_SESSION['language']) && $_SESSION['language']=='en'){
addBreadcrumb($content, "Admin Panel", "admin.php");
addBreadcrumb($content, "Upload a picture", "");
}else{
addBreadcrumb($content, "Pannello Amministrativo", "admin.php");
addBreadcrumb($content, "Carica un'immagine", "");
}
setUserStatus($content);
setupMenu($content, -1);
setAdminArea($content);
setLangArea($content, $_SERVER['PHP_SELF']);
setContentFromFile($content, __("contenuto_upload.html"));
$status = "";
if (isset($_SESSION['statussuccess'])){
if ($_SESSION['statussuccess']){
$status = "<div class='statussuccess'>";
}else{
$status = "<div class='statusfailed'>";
}
$status = $status . $_SESSION['statusmessage'] . "</div>";
unset($_SESSION['statussuccess']);
unset($_SESSION['statusmessage']);
}
$content = str_replace("<!--STATUS-->", $status, $content);
$xml = new DOMDocument();
$xml->loadHTML($content);
setHTMLNameSpaces($xml);
$content = $xml->saveXML($xml->documentElement);
addXHTMLdtd($content);
echo($content);
?>