Do not use PHP's error control operator
parent
9954f31721
commit
e2795e99b9
|
@ -224,10 +224,10 @@
|
||||||
$this->FertigesHTML = str_replace("%%datum%%", date("Y-m-dTH:i+2"), $this->FertigesHTML);
|
$this->FertigesHTML = str_replace("%%datum%%", date("Y-m-dTH:i+2"), $this->FertigesHTML);
|
||||||
|
|
||||||
//Der Counter wird in den HTML Quellcode eingef<65>gt.
|
//Der Counter wird in den HTML Quellcode eingef<65>gt.
|
||||||
$this->FertigesHTML = str_replace("%%GET_SITE%%", @$_GET['seite'], $this->FertigesHTML);
|
$this->FertigesHTML = str_replace("%%GET_SITE%%", isset($_GET['seite']) ? $_GET['seite'] : ' ', $this->FertigesHTML);
|
||||||
|
|
||||||
//Die IP Adresse wird in den HTML Quellcode eingef<65>gt.
|
//Die IP Adresse wird in den HTML Quellcode eingef<65>gt.
|
||||||
$this->FertigesHTML = str_replace("%%GET_IP%%", @$_SERVER["REMOTE_ADDR"], $this->FertigesHTML);
|
$this->FertigesHTML = str_replace("%%GET_IP%%", isset($_SERVER["REMOTE_ADDR"]) ? $_SERVER['REMOTE_ADDR'] : ' ', $this->FertigesHTML);
|
||||||
|
|
||||||
// Add CSRF token
|
// Add CSRF token
|
||||||
$this->FertigesHTML = str_replace("%%CSRF%%", '<input type="hidden" name="csrf" value="'.(isset($_SESSION['csrf']) ? $_SESSION['csrf'] : '').'">', $this->FertigesHTML);
|
$this->FertigesHTML = str_replace("%%CSRF%%", '<input type="hidden" name="csrf" value="'.(isset($_SESSION['csrf']) ? $_SESSION['csrf'] : '').'">', $this->FertigesHTML);
|
||||||
|
|
|
@ -25,9 +25,9 @@ function getDataFromHTTP($URL, $contend = "", $requestTyp = "application/text")
|
||||||
{
|
{
|
||||||
if($contend != "")
|
if($contend != "")
|
||||||
{
|
{
|
||||||
return @file_get_contents($URL, true, stream_context_create(array('http' => array('header' => 'Content-type: '.$requestTyp, 'method' => 'POST', 'timeout' => 0.5, 'content' => $contend))));
|
return file_get_contents($URL, true, stream_context_create(array('http' => array('header' => 'Content-type: '.$requestTyp, 'method' => 'POST', 'timeout' => 0.5, 'content' => $contend))));
|
||||||
}else{
|
}else{
|
||||||
return @file_get_contents($URL);
|
return file_get_contents($URL);
|
||||||
}
|
}
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
echo "(HTTP REQUEST) error while conntect to remote server. : ".$URL;
|
echo "(HTTP REQUEST) error while conntect to remote server. : ".$URL;
|
||||||
|
|
|
@ -16,10 +16,21 @@ while($row = $statement->fetch())
|
||||||
//$fileNameParts['Time'] = time();
|
//$fileNameParts['Time'] = time();
|
||||||
$fileNameParts['UUID'] = $row['id'];
|
$fileNameParts['UUID'] = $row['id'];
|
||||||
$fileNameParts['FilePath'] = "/data/assets/base/".$fileNameParts[0]."/".$fileNameParts[1]."/".$fileNameParts[2]."/".$fileNameParts[3]."/".$fileNameParts[4];
|
$fileNameParts['FilePath'] = "/data/assets/base/".$fileNameParts[0]."/".$fileNameParts[1]."/".$fileNameParts[2]."/".$fileNameParts[3]."/".$fileNameParts[4];
|
||||||
$fileNameParts['FileSize'] = @filesize($fileNameParts['FilePath']);
|
|
||||||
|
if(file_exists($fileNameParts['FilePath'])) {
|
||||||
|
$filesize = filesize($fileNameParts['FilePath']);
|
||||||
|
if($filesize === false) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$filesize = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
$fileNameParts['FileSize'] = $filesize;
|
||||||
$fileNameParts['Count'] = $count++;
|
$fileNameParts['Count'] = $count++;
|
||||||
|
|
||||||
if($fileNameParts['FileSize'] == 0 || !file_exists($fileNameParts['FilePath']))
|
if($fileNameParts['FileSize'] == 0)
|
||||||
{
|
{
|
||||||
$add = $RUNTIME['PDO']->prepare('DELETE FROM fsassets WHERE hash = :fileHash');
|
$add = $RUNTIME['PDO']->prepare('DELETE FROM fsassets WHERE hash = :fileHash');
|
||||||
$add->execute(['fileHash' => $row['hash']]);
|
$add->execute(['fileHash' => $row['hash']]);
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
while($row = $statement->fetch())
|
while($row = $statement->fetch())
|
||||||
{
|
{
|
||||||
$result = @file_get_contents($row['serverURI']."jsonSimStats", false, $ctx);
|
$result = file_get_contents($row['serverURI']."jsonSimStats", false, $ctx);
|
||||||
|
|
||||||
if($result == FALSE || $result == "")
|
if($result == FALSE || $result == "")
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
if(@$_SESSION['LEVEL'] < 100)
|
if(!isset($_SESSION['LOGIN']) || !isset($_SESSION['LEVEL']) || $_SESSION['LEVEL'] < 100)
|
||||||
{
|
{
|
||||||
$HTML->setHTMLTitle("Kein Zugriff");
|
$HTML->setHTMLTitle("Kein Zugriff");
|
||||||
$HTML->SetSeitenInhalt("Dazu hast du keine Rechte!");
|
$HTML->SetSeitenInhalt("Dazu hast du keine Rechte!");
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
$HTML->setHTMLTitle("Passwort ändern");
|
$HTML->setHTMLTitle("Passwort ändern");
|
||||||
$HTML->importSeitenInhalt("profile.html");
|
$HTML->importSeitenInhalt("profile.html");
|
||||||
|
|
||||||
if(isset($_REQUEST['oldPassword']) || @$_REQUEST['oldPassword'] != "")
|
if(isset($_REQUEST['oldPassword']) || $_REQUEST['oldPassword'] != "")
|
||||||
{
|
{
|
||||||
$OLDPassword = trim($_REQUEST['oldPassword']);
|
$OLDPassword = trim($_REQUEST['oldPassword']);
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
if($NewPassword != "")
|
if($NewPassword != "")
|
||||||
{
|
{
|
||||||
if(isset($_REQUEST['newPasswordRepeate']) || @$_REQUEST['newPasswordRepeate'] != "")
|
if(isset($_REQUEST['newPasswordRepeate']) || $_REQUEST['newPasswordRepeate'] != "")
|
||||||
{
|
{
|
||||||
$NewPasswordRepeate = trim($_REQUEST['newPasswordRepeate']);
|
$NewPasswordRepeate = trim($_REQUEST['newPasswordRepeate']);
|
||||||
|
|
||||||
|
|
|
@ -135,7 +135,7 @@
|
||||||
$allUsers = "";
|
$allUsers = "";
|
||||||
while($row = $statementLocalUsers->fetch())
|
while($row = $statementLocalUsers->fetch())
|
||||||
{
|
{
|
||||||
$name = '"'.@$row['FirstName']." ".@$row['LastName'].'"';
|
$name = '"'.$row['FirstName']." ".$row['LastName'].'"';
|
||||||
|
|
||||||
if($allUsers != "")
|
if($allUsers != "")
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
<?php
|
<?php
|
||||||
$HTML = new HTML();
|
$HTML = new HTML();
|
||||||
if(@$_SESSION['LOGIN'] == 'true')
|
if(isset($_SESSION['LOGIN']))
|
||||||
{
|
{
|
||||||
$HTML->importHTML("dashboard.html");
|
$HTML->importHTML("dashboard.html");
|
||||||
|
|
||||||
if(@$_SESSION['LEVEL'] > 100)
|
if(isset($_SESSION['LEVEL']) && $_SESSION['LEVEL'] > 100) {
|
||||||
$HTML->importHTML("dashboard-admin.html");
|
$HTML->importHTML("dashboard-admin.html");
|
||||||
|
}
|
||||||
|
|
||||||
$HTML->ReplaceLayoutInhalt("%%USERNAME%%", htmlspecialchars(@$_SESSION['DISPLAYNAME']));
|
$HTML->ReplaceLayoutInhalt("%%USERNAME%%", isset($_SESSION['DISPLAYNAME']) ? htmlspecialchars($_SESSION['DISPLAYNAME']) : '');
|
||||||
}
|
}
|
||||||
?>
|
?>
|
Loading…
Reference in New Issue