}
    if (strpos($categorie->Proprietati, "xb") !== false) {
        $xb = 1;
    }
    if (strpos($categorie->Proprietati, "xc") !== false) {
        $xc = 1;
    }
    if (strpos($categorie->Proprietati, "xt") !== false) {
        $xt = 1;
    }
    if (strpos($categorie->Proprietati, "xs") !== false) {
        $xs = 1;
    }
}
if (isset($_POST['submit'])) {
    $categorie = Categoriedotari::find_by_id($_POST['id']);
    $categorie->Descriere = $_POST['Descriere'];
    $categorie->TipProprietate = $_POST['TipProprietate'];
    $categorie->TipControl = $_POST['TipControl'];
    $categorie->Prioritate = $_POST['Prioritate'];
    if (isset($_POST['Privat'])) {
        $categorie->Privat = $_POST['Privat'];
    } else {
        $categorie->Privat = 0;
    }
    $categorie->Proprietati = "";
    if (isset($_POST['xa'])) {
        $xa = 1;
        $categorie->Proprietati = $categorie->Proprietati . "xa";
    }
    if (isset($_POST['xb'])) {
<?php

require_once ".././include/initialize.php";
if (!$session->is_logged_in()) {
    redirect_to("login.php");
}
$CatDot = Categoriedotari::find_by_id($_GET['id']);
$CatDot->delete();
redirect_to("categoriedotare_list.php");