Initial Commit with ENVs, directory structures, cursor rules, etc
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/../config/config.php';
|
||||
|
||||
function sanitizeInput($input) {
|
||||
if (is_array($input)) {
|
||||
return array_map('sanitizeInput', $input);
|
||||
}
|
||||
return htmlspecialchars(trim($input), ENT_QUOTES, 'UTF-8');
|
||||
}
|
||||
|
||||
function formatDate($date) {
|
||||
return date('Y-m-d', strtotime($date));
|
||||
}
|
||||
|
||||
function generateExportFilename($type) {
|
||||
return $type . '_' . date('Y-m-d') . '.json';
|
||||
}
|
||||
|
||||
function ensureExportDirectory() {
|
||||
if (!file_exists(EXPORT_DESTINATION)) {
|
||||
mkdir(EXPORT_DESTINATION, 0755, true);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user