2024-06-14 15:55:36 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use src\debug\Debug;
|
|
|
|
use src\Information;
|
|
|
|
use src\Processing;
|
|
|
|
|
|
|
|
require_once "vendor/autoload.php";
|
|
|
|
|
|
|
|
$rep = new \src\file_db_driver\FileDatabaseDriver();
|
|
|
|
$rep->connect(__DIR__ . "/Information.txt");
|
|
|
|
|
|
|
|
$columnKeys = $rep->getHeadKeys();
|
2024-06-26 11:10:17 +03:00
|
|
|
//$columnValues = $rep->getHeadValues();
|
|
|
|
$columnValues = ['id','Фамилия','Имя','Отчество','Дата рождения','Пол','Код страны','Номер телефона','Email','Статус'];
|
2024-06-14 15:55:36 +03:00
|
|
|
|
|
|
|
$columns = array_combine($columnKeys, $columnValues);
|
|
|
|
|
|
|
|
//$res = $rep->find([$_REQUEST['key'] => $_REQUEST['result_search']])->limit(7)->all();
|
2024-06-26 11:10:17 +03:00
|
|
|
|
|
|
|
//$res = $rep->find($_REQUEST)->limit(10)->all();
|
|
|
|
$res = $rep->find(['name' => ['Станислав', 'Анастасия', 'Анжела'], 'status' => ['0']])->limit(10)->all();
|
2024-06-14 15:55:36 +03:00
|
|
|
|
|
|
|
$rep->close();
|
|
|
|
|
|
|
|
$infArr = [];
|
|
|
|
foreach ($res as $key){
|
|
|
|
$inf = new Information();
|
|
|
|
$inf->load($key);
|
|
|
|
$infArr[] = $inf;
|
|
|
|
}
|
|
|
|
|
|
|
|
$json = new Processing();
|
|
|
|
$infArr = $json->createJsonArray($columns, $infArr, "form1");
|
|
|
|
|
|
|
|
$table = new \Itguild\Tables\ListJsonTable($infArr);
|
|
|
|
$table->create();
|
|
|
|
$table->render();
|