|
@@ -7,6 +7,22 @@ class debug
|
|
|
private static $startTime;
|
|
private static $startTime;
|
|
|
private static $closeTime;
|
|
private static $closeTime;
|
|
|
|
|
|
|
|
|
|
+ public static function addFileSubmit()
|
|
|
|
|
+ {
|
|
|
|
|
+ $myfile = fopen(DOCUMENT_ROOT . FILE_DEBUG_SUBMIT, "w");
|
|
|
|
|
+ fclose($myfile);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public static function removeFileSubmit()
|
|
|
|
|
+ {
|
|
|
|
|
+ unlink(DOCUMENT_ROOT . FILE_DEBUG_SUBMIT);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public static function isSubmit()
|
|
|
|
|
+ {
|
|
|
|
|
+ return (file_exists(DOCUMENT_ROOT . FILE_DEBUG_SUBMIT)) ? TRUE : FALSE;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
public static function includeDebug()
|
|
public static function includeDebug()
|
|
|
{
|
|
{
|
|
|
if (core::isDebug()) {
|
|
if (core::isDebug()) {
|
|
@@ -145,11 +161,16 @@ class debug
|
|
|
public static function renderLogs()
|
|
public static function renderLogs()
|
|
|
{
|
|
{
|
|
|
//if (!empty(self::$logs)) {
|
|
//if (!empty(self::$logs)) {
|
|
|
|
|
+
|
|
|
echo "<div id='debugger-logs'>";
|
|
echo "<div id='debugger-logs'>";
|
|
|
|
|
|
|
|
echo "<div class='debug-renderLogs-header'>";
|
|
echo "<div class='debug-renderLogs-header'>";
|
|
|
- echo "PHP ". phpversion() . " | " . number_format(self::$closeTime, 4) . " secondes";
|
|
|
|
|
|
|
+ echo "PHP ". phpversion() . " | " . number_format(self::$closeTime, 4) . " secondes ";
|
|
|
echo "</div>";
|
|
echo "</div>";
|
|
|
|
|
+ echo "<div class=\"form-check form-switch\">
|
|
|
|
|
+ <input class=\"form-check-input\" type=\"checkbox\" id=\"checkIsSubmit\" " . core::checkboxSelecter(self::isSubmit(), 0) . " >
|
|
|
|
|
+ <label class=\"form-check-label\" for=\"checkIsSubmit\">Intercepter la validation</label>
|
|
|
|
|
+ </div>";
|
|
|
|
|
|
|
|
foreach (self::$logs as $log) {
|
|
foreach (self::$logs as $log) {
|
|
|
echo ($log != NULL) ? "<div class='debug-renderLogs-print'>".nl2br($log)."</div>" : NULL;
|
|
echo ($log != NULL) ? "<div class='debug-renderLogs-print'>".nl2br($log)."</div>" : NULL;
|
|
@@ -160,6 +181,11 @@ class debug
|
|
|
echo "
|
|
echo "
|
|
|
<script>
|
|
<script>
|
|
|
$(document).ready(function() {
|
|
$(document).ready(function() {
|
|
|
|
|
+
|
|
|
|
|
+ $('#checkIsSubmit').on('change', function() {
|
|
|
|
|
+ window.location.href = '/submit.php?from=parametres-debug-submit-activation&actif=' + $('#checkIsSubmit').prop('checked');
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
$('#toggle-logs').click(function() {
|
|
$('#toggle-logs').click(function() {
|
|
|
$('#debugger-logs').slideToggle();
|
|
$('#debugger-logs').slideToggle();
|
|
|
});
|
|
});
|