diff --git a/vendor/view/users/users_form.php b/vendor/view/users/users_form.php index 4e8f528..696367e 100644 --- a/vendor/view/users/users_form.php +++ b/vendor/view/users/users_form.php @@ -2,32 +2,29 @@ /** Importação de classes */ use vendor\model\Users; -use vendor\model\Clients; -use vendor\model\Company; +use vendor\model\Companies; use vendor\controller\users\UsersValidate; use vendor\controller\company\CompanyValidate; -use vendor\controller\clients\ClientsValidate; +use vendor\controller\Companies\CompaniesValidate; /** Verifica se o token de acesso é válido */ if($Main->verifyToken()){ /** Instânciamento de classes */ $Users = new Users(); - $Clients = new clients(); - $Company = new Company(); + $Companies = new Companies(); $UsersValidate = new UsersValidate(); - $ClientsValidate = new ClientsValidate; + $CompaniesValidate = new CompaniesValidate; $CompanyValidate = new CompanyValidate(); /** Parametros de entrada */ $usersId = isset($_POST['users_id']) ? (int)filter_input(INPUT_POST, 'users_id', FILTER_SANITIZE_SPECIAL_CHARS) : 0; - $companyId = isset($_POST['company_id']) ? (int)filter_input(INPUT_POST, 'company_id', FILTER_SANITIZE_SPECIAL_CHARS) : 0; - $clientsId = isset($_POST['clients_id']) ? (int)filter_input(INPUT_POST, 'clients_id', FILTER_SANITIZE_NUMBER_INT) : 0; + $companiesId = isset($_POST['company_id']) ? (int)filter_input(INPUT_POST, 'company_id', FILTER_SANITIZE_NUMBER_INT) : 0; /** Validando os campos de entrada */ $UsersValidate->setUsersId($usersId); $CompanyValidate->setCompanyId($companyId); - $ClientsValidate->setClientsId($clientsId); + $ClientsValidate->setcompaniesId($companiesId); /** Verifica se o ID do usuário foi informado */ if ($UsersValidate->getUserId() > 0) { @@ -80,10 +77,10 @@ if($Main->verifyToken()){ getClientsId() > 0){ + if($ClientsValidate->getCompaniesId() > 0){ ?> -