Upload files to "system"

Signed-off-by: kevin <kevin@codelab.nestict.africa>
This commit is contained in:
2026-01-16 12:25:08 +01:00
parent c0a2ce105c
commit 4e0bf2408f
18 changed files with 4941 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
<?php
/**
* Install Cron Logs Table
* Run this script to create the cron logs table
*/
require_once dirname(__DIR__) . '/init.php';
echo "Installing Cron Logs Table...\n";
// Read the SQL file
$sqlFile = __DIR__ . '/create_cron_logs_table.sql';
if (!file_exists($sqlFile)) {
echo "Error: SQL file not found: $sqlFile\n";
exit(1);
}
$sql = file_get_contents($sqlFile);
// Execute the SQL
try {
ORM::raw_execute($sql);
echo "✓ Cron logs table created successfully!\n";
// Test the table
$test = ORM::for_table('tbl_cron_logs')->count();
echo "✓ Table test successful - found $test records\n";
echo "\nCron logs system is now ready!\n";
echo "You can view logs at: " . APP_URL . "/settings/cron-logs\n";
} catch (Exception $e) {
echo "✗ Error creating table: " . $e->getMessage() . "\n";
exit(1);
}
echo "\nInstallation completed successfully!\n";