diff --git a/src/admin/page_example_graph.php b/src/admin/page_example_graph.php index be0a927..399792c 100644 --- a/src/admin/page_example_graph.php +++ b/src/admin/page_example_graph.php @@ -1,6 +1,7 @@ \ No newline at end of file diff --git a/src/admin/page_saved_graph.php b/src/admin/page_saved_graph.php index afd55c4..ff7a4cd 100644 --- a/src/admin/page_saved_graph.php +++ b/src/admin/page_saved_graph.php @@ -1,5 +1,6 @@ 12; + }; + + $examples = getAllExampleGraphs(); + + $msg = "Deleted files: "; + $deletedCount = 0; + + $ageDelActionCallback = function(&$ageCount, $file) use($examples, &$msg, &$deletedCount) + { + // Ignory examples. + foreach ($examples as $item) + { + if (strpos ($file, $item["id"]) !== FALSE) + { + return; + } + } + + if (unlink($file)) + { + $msg = $msg . $file . ", "; + $deletedCount = $deletedCount + 1; + } + }; + + processFiles($g_config['graphSavePath'] . "*.png", $totalImages, $totalImagesSize, $ageImage, $age1yMoreCallback, $ageDelActionCallback); + + $msg = $msg . "
" . "Total: $deletedCount"; +} + + +$ageActionCallback = function(&$ageCount, $file) +{ + $ageCount = $ageCount + 1; +}; + +processFiles($g_config['graphSavePath'] . "*.xml", $totalGraphCount, $totalGraphSize, $ageGraph, $age6mLessCallback, $ageActionCallback); +processFiles($g_config['graphSavePath'] . "*.png", $totalImages, $totalImagesSize, $ageImage, $age6mLessCallback, $ageActionCallback); $totalGraphSize = intval($totalGraphSize); $totalImagesSize = intval($totalImagesSize); diff --git a/src/graphs_examples.php b/src/graphs_examples.php index ca8b9ec..f7c63a1 100644 --- a/src/graphs_examples.php +++ b/src/graphs_examples.php @@ -1,21 +1,13 @@ \ No newline at end of file diff --git a/tpl/admin/page_saved_graph.php b/tpl/admin/page_saved_graph.php index f514194..c42e8ed 100644 --- a/tpl/admin/page_saved_graph.php +++ b/tpl/admin/page_saved_graph.php @@ -14,21 +14,13 @@
-
- -
-
-
- -
- " placeholder="Только маленькие латинские буквы и цифры"> -
-
-
-
- +
+ +
+

+
\ No newline at end of file