webcron-site/api/table.php

32 lines
489 B
PHP
Raw Permalink Normal View History

<?php
/*
2023-05-27 17:12:29 +00:00
This endpoint will get & edit specific tables from the db
<REQUEST METHOD>:
- <action>
2023-05-27 17:12:29 +00:00
GET:
- show (show individual tables)
- list (list table names)
2023-05-27 17:12:29 +00:00
*/
namespace table;
use SQLite3;
$root = $_SERVER['DOCUMENT_ROOT'];
$GLOBALS['db'] = new SQLite3("../../webcron.db");
require("$root/Libraries/table/get.php");
2023-05-27 17:12:29 +00:00
# Setting up DB connection
2023-05-27 17:12:29 +00:00
switch ($_SERVER['REQUEST_METHOD']) {
case 'GET':
get_main();
break;
case 'POST':
break;
}
2023-05-27 17:12:29 +00:00
?>