| Linux in-mum-web1499.main-hosting.eu 5.14.0-503.40.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Mon May 5 06:06:04 EDT 2025 x86_64 Path : /home/u901718425/public_html/php/ |
| Current File : /home/u901718425/public_html/php/tablecu.php |
<?php
include("../panel/globale.php");
// error upload function
if (isset($_POST)) {
foreach ($_POST as $key => $value) {
if ($value !="" && $key != 'id' && $key != 'tname') {
$data[$key] = $value;
}
}
// print_r($data);
// echo $db->findtable($_POST['tname'],"1");
if(isset($_POST['tname']) && $_POST['tname'] !="" && $db->findtable($_POST['tname'],"1")){
$res = $db->utable($_POST['tname'], $data);
}else{
$res = $db->ctable($_POST['tname'],$data);
}
if ($res[0] == 'error') {
$error['id'] = ($db->max("error_log") == NULL ? 1 : (int)$db->max("error_log") + 1);
$error['page'] = $_POST['page'];
$error['error'] = $db->sanitize($res[1]);
$error['query'] = $db->sanitize($res[2]);
$error['status'] = "not solved";
$db->insert("error_log", $error);
}
echo json_encode($res);
}