model
This commit is contained in:
19
info.php
19
info.php
@ -1,25 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace src;
|
||||
|
||||
use src\debug\Debug;
|
||||
use src\dto\InformationDTO;
|
||||
use src\file_db_driver\FileDatabaseDriver;
|
||||
use src\models\UserModel;
|
||||
|
||||
require_once "vendor/autoload.php";
|
||||
|
||||
ini_set("display_errors", true);
|
||||
error_reporting(-1);
|
||||
|
||||
//$fileName = "Information.txt";
|
||||
//$fileModeOpen = "a";
|
||||
|
||||
$fullInformation = new InformationDTO();
|
||||
$fullInformation->load($_REQUEST);
|
||||
|
||||
$string = $fullInformation->toString();
|
||||
|
||||
$obj = new FileDatabaseDriver();
|
||||
$obj->connect(__DIR__ . "/Information.txt");
|
||||
//$obj->updateServiceInfo($string);
|
||||
$obj->save($string);
|
||||
$obj->close();
|
||||
$user = new UserModel();
|
||||
$user->load($_REQUEST);
|
||||
$user->save();
|
||||
|
||||
require "views/search.php";
|
Reference in New Issue
Block a user