cleanup codeigniter code

This commit is contained in:
root
2026-06-04 02:55:19 -04:00
parent 4dde38004f
commit 1af02dadd3
31 changed files with 824 additions and 756 deletions
+24 -7
View File
@@ -1,14 +1,31 @@
<?php
/** Stub CI helper so the partial can be included standalone. */
function base_url(string $path = ''): string
{
$path = ltrim($path, '/');
return $path === '' ? '/' : '/' . $path;
$root = dirname(__DIR__);
$policyHtmlPath = '/Volumes/ExternalApps/Documents/alrahma_sunday_school_api/resources/policies/school_policy.html';
if (!is_file($policyHtmlPath)) {
fwrite(STDERR, "Policy source not found: {$policyHtmlPath}\n");
exit(1);
}
$root = dirname(__DIR__);
$data = include $root . '/../app_codeigniter/app/Views/policy/school_policy_partial.php';
$html = file_get_contents($policyHtmlPath);
if ($html === false) {
fwrite(STDERR, "Failed to read policy source\n");
exit(1);
}
$data = [
'title' => 'School Policy',
'sections' => [
[
'subsections' => [
[
'body' => $html,
],
],
],
],
];
$outDir = $root . '/public/policy';
if (!is_dir($outDir)) {