Code cleanup
This commit is contained in:
parent
31c0bda8cb
commit
cb22029f7e
1
.idea/inspectionProfiles/Project_Default.xml
generated
1
.idea/inspectionProfiles/Project_Default.xml
generated
@ -7,6 +7,7 @@
|
|||||||
</Languages>
|
</Languages>
|
||||||
</inspection_tool>
|
</inspection_tool>
|
||||||
<inspection_tool class="HtmlUnknownTarget" enabled="true" level="INFORMATION" enabled_by_default="true" />
|
<inspection_tool class="HtmlUnknownTarget" enabled="true" level="INFORMATION" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="PhpIllegalPsrClassPathInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
<inspection_tool class="PhpUnhandledExceptionInspection" enabled="true" level="INFORMATION" enabled_by_default="true" />
|
<inspection_tool class="PhpUnhandledExceptionInspection" enabled="true" level="INFORMATION" enabled_by_default="true" />
|
||||||
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
|
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
|
||||||
<option name="processCode" value="true" />
|
<option name="processCode" value="true" />
|
||||||
|
2
.idea/php.xml
generated
2
.idea/php.xml
generated
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="PhpProjectSharedConfiguration" php_language_level="7.2" />
|
<component name="PhpProjectSharedConfiguration" php_language_level="8.1" />
|
||||||
</project>
|
</project>
|
@ -25,10 +25,10 @@ $std = shell_exec("ncc_upload " . '"' . $tmppath . '" "' . $reltarget . '" 2>&1'
|
|||||||
|
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
|
|
||||||
$content = "REQUEST: " . $uri . "\r\n\r\n" .
|
$content = "REQUEST: " . $uri . "\n\n" .
|
||||||
"IP: " . get_client_ip() . "\r\n\r\n" .
|
"IP: " . get_client_ip() . "\n\n" .
|
||||||
"TARGET: " . $reltarget . "\r\n\r\n" .
|
"TARGET: " . $reltarget . "\n\n" .
|
||||||
"OUTPUT: " . $std . "\r\n\r\n";
|
"OUTPUT: " . $std . "\n\n";
|
||||||
|
|
||||||
sendMail("Fileupload to '$folder' triggered", $content, 'virtualadmin@mikescher.de', 'webserver-info@mikescher.com');
|
sendMail("Fileupload to '$folder' triggered", $content, 'virtualadmin@mikescher.de', 'webserver-info@mikescher.com');
|
||||||
|
|
||||||
|
@ -25,10 +25,10 @@ else
|
|||||||
|
|
||||||
$std = shell_exec($cmd);
|
$std = shell_exec($cmd);
|
||||||
|
|
||||||
$content = "REQUEST: " . $uri . "\r\n\r\n" .
|
$content = "REQUEST: " . $uri . "\n\n" .
|
||||||
"IP: " . get_client_ip() . "\r\n\r\n" .
|
"IP: " . get_client_ip() . "\n\n" .
|
||||||
"TARGET: " . $hook . "\r\n\r\n" .
|
"TARGET: " . $hook . "\n\n" .
|
||||||
"OUTPUT: " . $std . "\r\n\r\n";
|
"OUTPUT: " . $std . "\n\n";
|
||||||
|
|
||||||
sendMail("Webhook '$hook' triggered", $content, 'virtualadmin@mikescher.de', 'webserver-info@mikescher.com');
|
sendMail("Webhook '$hook' triggered", $content, 'virtualadmin@mikescher.de', 'webserver-info@mikescher.com');
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ function queryStatus(appendix, secret)
|
|||||||
success: function(result)
|
success: function(result)
|
||||||
{
|
{
|
||||||
let ajaxOutput = $('#egg_ajaxOutput');
|
let ajaxOutput = $('#egg_ajaxOutput');
|
||||||
ajaxOutput.val(result + '\r\n' + appendix);
|
ajaxOutput.val(result + '\n' + appendix);
|
||||||
ajaxOutput.scrollTop(ajaxOutput[0].scrollHeight);
|
ajaxOutput.scrollTop(ajaxOutput[0].scrollHeight);
|
||||||
},
|
},
|
||||||
async: true
|
async: true
|
||||||
@ -27,7 +27,7 @@ function startAjaxRefresh(secret)
|
|||||||
error: function( jqXHR, textStatus, errorThrown)
|
error: function( jqXHR, textStatus, errorThrown)
|
||||||
{
|
{
|
||||||
clearInterval(val);
|
clearInterval(val);
|
||||||
queryStatus('AN ERROR OCCURED:' + '\r\n' + textStatus, secret);
|
queryStatus('AN ERROR OCCURED:' + '\n' + textStatus, secret);
|
||||||
},
|
},
|
||||||
async: true
|
async: true
|
||||||
});
|
});
|
||||||
@ -48,7 +48,7 @@ function startAjaxRedraw(secret)
|
|||||||
error: function( jqXHR, textStatus, errorThrown)
|
error: function( jqXHR, textStatus, errorThrown)
|
||||||
{
|
{
|
||||||
clearInterval(val);
|
clearInterval(val);
|
||||||
queryStatus('AN ERROR OCCURED:' + '\r\n' + textStatus, secret);
|
queryStatus('AN ERROR OCCURED:' + '\n' + textStatus, secret);
|
||||||
},
|
},
|
||||||
async: true
|
async: true
|
||||||
});
|
});
|
||||||
|
4
www/extern/egg/Logger.php
vendored
4
www/extern/egg/Logger.php
vendored
@ -84,7 +84,7 @@ class SessionLogger implements ILogger
|
|||||||
{
|
{
|
||||||
if (session_status() === PHP_SESSION_DISABLED) return;
|
if (session_status() === PHP_SESSION_DISABLED) return;
|
||||||
|
|
||||||
$_SESSION[$this->sessionvar] .= $text . "\r\n";
|
$_SESSION[$this->sessionvar] .= $text . "\n";
|
||||||
session_commit();
|
session_commit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -96,7 +96,7 @@ class OutputLogger implements ILogger
|
|||||||
if ($text !== '') $text = '[' . date('H:i:s') . '] ' . $text;
|
if ($text !== '') $text = '[' . date('H:i:s') . '] ' . $text;
|
||||||
|
|
||||||
print $text;
|
print $text;
|
||||||
print "\r\n";
|
print "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -88,27 +88,27 @@ $problems = $SITE->modules->Euler()->listAll();
|
|||||||
<?php
|
<?php
|
||||||
foreach ($problems as $problem)
|
foreach ($problems as $problem)
|
||||||
{
|
{
|
||||||
echo '<tr class="PEB_tablerowProblems">' . "\r\n";
|
echo '<tr class="PEB_tablerowProblems">' . "\n";
|
||||||
|
|
||||||
echo '<td class="PEB_tablecellProblems PEB_TC_Number">';
|
echo '<td class="PEB_tablecellProblems PEB_TC_Number">';
|
||||||
echo '<a href="' . $problem['url'] . '">';
|
echo '<a href="' . $problem['url'] . '">';
|
||||||
echo $problem['number'];
|
echo $problem['number'];
|
||||||
echo '</a>';
|
echo '</a>';
|
||||||
echo '</td>' . "\r\n";
|
echo '</td>' . "\n";
|
||||||
|
|
||||||
echo '<td class="PEB_tablecellProblems PEB_TC_Title">';
|
echo '<td class="PEB_tablecellProblems PEB_TC_Title">';
|
||||||
echo '<a href="' . $problem['url'] . '">';
|
echo '<a href="' . $problem['url'] . '">';
|
||||||
echo htmlspecialchars($problem['title']);
|
echo htmlspecialchars($problem['title']);
|
||||||
echo '</a>';
|
echo '</a>';
|
||||||
echo '</td>' . "\r\n";
|
echo '</td>' . "\n";
|
||||||
|
|
||||||
echo '<td class="PEB_tablecellProblems PEB_TC_Rating">';
|
echo '<td class="PEB_tablecellProblems PEB_TC_Rating">';
|
||||||
echo '<a href="' . $problem['url'] . '">';
|
echo '<a href="' . $problem['url'] . '">';
|
||||||
echo '<div class="PEB_TC_Time PEB_TC_Timelevel_' . $problem['rating'] . '">';
|
echo '<div class="PEB_TC_Time PEB_TC_Timelevel_' . $problem['rating'] . '">';
|
||||||
echo formatMilliseconds($problem['time']) . "</div></td>\r\n";
|
echo formatMilliseconds($problem['time']) . "</div></td>\n";
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
echo '</a>';
|
echo '</a>';
|
||||||
echo '</td>' . "\r\n";
|
echo '</td>' . "\n";
|
||||||
|
|
||||||
echo '<td class="PEB_tablecellProblems PEB_TC_Size">';
|
echo '<td class="PEB_tablecellProblems PEB_TC_Size">';
|
||||||
echo '<a href="' . $problem['url'] . '">';
|
echo '<a href="' . $problem['url'] . '">';
|
||||||
@ -117,13 +117,13 @@ $problems = $SITE->modules->Euler()->listAll();
|
|||||||
echo ($problem['is93'] ? 'Bef-93' : 'Bef-93+');
|
echo ($problem['is93'] ? 'Bef-93' : 'Bef-93+');
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
echo '</a>';
|
echo '</a>';
|
||||||
echo '</td>' . "\r\n";
|
echo '</td>' . "\n";
|
||||||
|
|
||||||
echo '<td class="PEB_tablecellProblems PEB_TC_Value">';
|
echo '<td class="PEB_tablecellProblems PEB_TC_Value">';
|
||||||
echo number_format($problem['value'], 0, null, ',');
|
echo number_format($problem['value'], 0, null, ',');
|
||||||
echo '</td>' . "\r\n";
|
echo '</td>' . "\n";
|
||||||
|
|
||||||
echo "</tr>\r\n";
|
echo "</tr>\n";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -102,9 +102,9 @@ try
|
|||||||
catch (exception $e)
|
catch (exception $e)
|
||||||
{
|
{
|
||||||
$content =
|
$content =
|
||||||
"REQUEST: " . var_export($_REQUEST) . "\r\n\r\n" .
|
"REQUEST: " . var_export($_REQUEST) . "\n\n" .
|
||||||
"IP: " . get_client_ip() . "\r\n\r\n" .
|
"IP: " . get_client_ip() . "\n\n" .
|
||||||
"ERROR: " . $e . "\r\n\r\n";
|
"ERROR: " . $e . "\n\n";
|
||||||
|
|
||||||
if ($SITE->isProd()) sendMail("Website API call failed", $content, 'virtualadmin@mikescher.de', 'webserver-info@mikescher.com');
|
if ($SITE->isProd()) sendMail("Website API call failed", $content, 'virtualadmin@mikescher.de', 'webserver-info@mikescher.com');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user