Organize scattered PHP files into scripts/ and tests/ directories

This commit is contained in:
Edwin Noorlander 2025-11-12 08:34:20 +01:00
parent 0622f40004
commit 8f072292c1
28 changed files with 10 additions and 10 deletions

0
AGENTS.md Normal file → Executable file
View File

0
AGENTS.md~ Normal file → Executable file
View File

0
README.md Normal file → Executable file
View File

0
collections.sqlite Normal file → Executable file
View File

0
index.php Normal file → Executable file
View File

0
public/.htaccess Normal file → Executable file
View File

0
public/000-default.conf Normal file → Executable file
View File

0
public/index.php Normal file → Executable file
View File

0
public/uploads/69136d74d6b90_D_D.jpg Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 281 KiB

After

Width:  |  Height:  |  Size: 281 KiB

0
public/uploads/69136da8e5916_Edwin_Gabrielle.jpeg Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 218 KiB

After

Width:  |  Height:  |  Size: 218 KiB

0
public/uploads/691370c3b19f6_logo.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 361 KiB

After

Width:  |  Height:  |  Size: 361 KiB

0
public/uploads/691370ce4f27e_D_D.jpg Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 281 KiB

After

Width:  |  Height:  |  Size: 281 KiB

0
public/uploads/qr/03F784B2.svg Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

0
public/uploads/qr/DC9726D2.svg Normal file → Executable file
View File

0
add_col.php → scripts/add_col.php Normal file → Executable file
View File

0
add_col2.php → scripts/add_col2.php Normal file → Executable file
View File

0
add_col3.php → scripts/add_col3.php Normal file → Executable file
View File

4
add_columns.php → scripts/add_columns.php Normal file → Executable file
View File

@ -1,6 +1,6 @@
<?php <?php
require 'vendor/autoload.php'; require '../vendor/autoload.php';
require 'config.php'; require '../config.php';
= new PDO('sqlite:' . DB_PATH); = new PDO('sqlite:' . DB_PATH);
->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); ->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
try { try {

4
check_items.php → scripts/check_items.php Normal file → Executable file
View File

@ -1,6 +1,6 @@
<?php <?php
require 'vendor/autoload.php'; require '../vendor/autoload.php';
require 'config.php'; require '../config.php';
= App\Database\Database::getInstance(); = App\Database\Database::getInstance();
= ->query('SELECT id, name FROM items'); = ->query('SELECT id, name FROM items');
= ->fetchAll(PDO::FETCH_ASSOC); = ->fetchAll(PDO::FETCH_ASSOC);

4
fix_db.php → scripts/fix_db.php Normal file → Executable file
View File

@ -1,7 +1,7 @@
<?php <?php
require __DIR__ . '/vendor/autoload.php'; require __DIR__ . '/../vendor/autoload.php';
require __DIR__ . '/config.php'; require __DIR__ . '/../config.php';
use App\Database; use App\Database;
use App\Models\Category; use App\Models\Category;

4
migrate_db.php → scripts/migrate_db.php Normal file → Executable file
View File

@ -1,6 +1,6 @@
<?php <?php
require 'vendor/autoload.php'; require '../vendor/autoload.php';
require 'config.php'; require '../config.php';
use AppDatabaseDatabase; use AppDatabaseDatabase;
$db = App\Database\Database::getInstance(); $db = App\Database\Database::getInstance();
$db->exec('ALTER TABLE items ADD COLUMN id_code TEXT UNIQUE'); $db->exec('ALTER TABLE items ADD COLUMN id_code TEXT UNIQUE');

0
templates/overview.twig Normal file → Executable file
View File

0
templates/parts.twig Normal file → Executable file
View File

0
templates/print_qr.twig Normal file → Executable file
View File

View File

@ -1 +0,0 @@
<?php require "config.php"; global $translator; echo $translator->trans("Category not found");

0
public/test.php → tests/test.php Normal file → Executable file
View File

2
test_qr.php → tests/test_qr.php Normal file → Executable file
View File

@ -1,5 +1,5 @@
<?php$ <?php$
require 'vendor/autoload.php';$ require '../vendor/autoload.php';$
use chillerlan\QRCode\QRCode;$ use chillerlan\QRCode\QRCode;$
use chillerlan\QRCode\QROptions;$ use chillerlan\QRCode\QROptions;$
= new QROptions(['outputType' => QRCode::OUTPUT_MARKUP_SVG, 'eccLevel' => QRCode::ECC_L]);$ = new QROptions(['outputType' => QRCode::OUTPUT_MARKUP_SVG, 'eccLevel' => QRCode::ECC_L]);$

1
tests/test_trans.php Executable file
View File

@ -0,0 +1 @@
<?php require "../config.php"; global $translator; echo $translator->trans("Category not found");