batch 1 update style & dahsboard for rec.nurinda.co.id

This commit is contained in:
dirga committed 2026-10-14 13:52:12 +07:00
1 parent 9107ffb158
commit f39aa60384
18485 files changed
+843 -2881869

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
<?php
if(PHP_SAPI!=='cli') { http_response_code(404); exit; }
if(strpos(file_get_contents(__DIR__.'/../includes/conn.php'), '.local/db.php')===false) exit("Setup dibatalkan: conn.php harus memakai database lokal.\n");
require __DIR__.'/../dashboard/bootstrap.php';
db()->query(file_get_contents(__DIR__.'/../dashboard/migrations/001_admin.sql'));
if(one("SHOW COLUMNS FROM rec_admin LIKE 'name'")) db()->query(file_get_contents(__DIR__.'/../dashboard/migrations/002_admin_identity.sql'));
if(!one('SELECT id FROM rec_admin WHERE email=?','s',[getenv('LOCAL_ADMIN_EMAIL')])) query('INSERT INTO rec_admin(email,nama_de,nama_be,idkar,password_hash) VALUES(?,?,?,?,?)','sssss',[getenv('LOCAL_ADMIN_EMAIL'),'Admin','Nurinda','LOCAL-001',password_hash(getenv('LOCAL_ADMIN_PASSWORD'),PASSWORD_DEFAULT)]);
foreach (array_filter(array_map("trim", explode(";", file_get_contents(__DIR__."/../dashboard/migrations/003_exam_attempts.sql")))) as $sql) db()->query($sql);