<?php
/*   __________________________________________________
    |  Obfuscated by YAK Pro - Php Obfuscator  2.0.17  |
    |              on 2026-03-26 06:01:17              |
    |    GitHub: https://github.com/pk-fr/yakpro-po    |
    |__________________________________________________|
*/
 goto vUeS2; vUeS2: require_once 'Categoria.php'; goto et2b6; et2b6: require_once RUTA_APP . 'Conexion.php'; goto U2w18; U2w18: class CategoriaDatos { public static function getCategoriaById(int $id) : ?Categoria { goto MbceM; DWD0n: $result = sv_mysqli_query($con, $query); goto ZQvED; qeIkK: $query = "SELECT id, CRM, Nombre, Posicion, Visible,Contraido FROM dialvox_crm_categoria WHERE id = '" . limpia($id) . "'"; goto DWD0n; s1Q4R: $con = getConnection(); goto qeIkK; Ju5S_: YDL5P: goto SIqdK; hox4Z: $retorno = new Categoria($row["id"], CRMDatos::getCRMById($row["CRM"]), $row["Nombre"], $row["Posicion"], $row["Contraido"], $row["Visible"]); goto Ju5S_; SIqdK: sv_mysqli_close($con); goto htHFC; MbceM: $retorno = null; goto s1Q4R; htHFC: return $retorno; goto HpsY6; ZQvED: if (!($row = sv_mysqli_fetch_array($result))) { goto YDL5P; } goto hox4Z; HpsY6: } public static function addCategoria(Categoria $categoria) : int { goto PquqO; dVp0p: sv_mysqli_close($con); goto B2aw7; eKtuH: $retorno = mysqli_insert_id($con); goto XUUlk; PquqO: $retorno = 0; goto QW68b; QW68b: $con = getConnection(); goto EZvAM; b9fEg: if (!($result = sv_mysqli_query($con, $query))) { goto AcY9d; } goto eKtuH; B2aw7: return $retorno; goto L5A03; XUUlk: AcY9d: goto dVp0p; EZvAM: $query = "INSERT INTO dialvox_crm_categoria(CRM, Nombre, Posicion, Visible, Contraido) VALUES ('" . limpia($categoria->getCRM()->getId()) . "','" . limpia($categoria->getNombre()) . "','" . limpia($categoria->getPosicion()) . "','" . limpia($categoria->getVisible()) . "','" . limpia($categoria->getContraido()) . "')"; goto b9fEg; L5A03: } public static function updateCategoria(Categoria $categoria) : int { goto NXsBG; IQvb5: T2aFw: goto d_7Dn; d_7Dn: sv_mysqli_close($con); goto w0959; bS29i: $query = "UPDATE dialvox_crm_categoria SET Contraido = '" . limpia($categoria->getContraido()) . "',CRM='" . limpia($categoria->getCRM()->getId()) . "',Nombre='" . limpia($categoria->getNombre()) . "',Posicion='" . limpia($categoria->getPosicion()) . "',Visible='" . limpia($categoria->getVisible()) . "' WHERE id = '" . limpia($categoria->getId()) . "'"; goto QKvKa; QKvKa: if (!($result = sv_mysqli_query($con, $query))) { goto T2aFw; } goto qvvse; w0959: return $retorno; goto dgvxW; qvvse: $retorno = 1; goto IQvb5; NXsBG: $retorno = 0; goto RV_XQ; RV_XQ: $con = getConnection(); goto bS29i; dgvxW: } public static function deleteCategoria(Categoria $categoria) : int { goto Zk6wP; mjGrm: $query = "UPDATE dialvox_crm_categoria SET Visible = FALSE WHERE id = '" . limpia($categoria->getId()) . "'"; goto ep1GT; ep1GT: if (!($result = sv_mysqli_query($con, $query))) { goto oLWBR; } goto UiEH3; QFwBJ: sv_mysqli_close($con); goto SePr_; cFIkt: $con = getConnection(); goto mjGrm; Zk6wP: $retorno = 0; goto cFIkt; UiEH3: $retorno = 1; goto VU7P1; SePr_: return $retorno; goto dVaPK; VU7P1: oLWBR: goto QFwBJ; dVaPK: } public static function getCategoriasByCRM(CRM $crm) : array { goto x_bQz; Dplgd: $retorno[] = self::getCategoriaById($row["id"]); goto x9NPR; oxIW7: aYCsn: goto c_wlj; qqdns: $con = getConnection(); goto Pxm8a; hG6C7: return $retorno; goto OACLX; x9NPR: goto vobDi; goto hutnM; c_wlj: sv_mysqli_close($con); goto hG6C7; EvQbG: vobDi: goto fUy43; hutnM: Oi04V: goto oxIW7; glSTd: if (!($result = sv_mysqli_query($con, $query))) { goto aYCsn; } goto EvQbG; x_bQz: $retorno = array(); goto qqdns; fUy43: if (!($row = sv_mysqli_fetch_array($result))) { goto Oi04V; } goto Dplgd; Pxm8a: $query = "SELECT id FROM dialvox_crm_categoria WHERE CRM = '" . limpia($crm->getId()) . "' AND Visible = TRUE ORDER BY Posicion"; goto glSTd; OACLX: } public static function listCategoriasByCRM(CRM $crm) : array { goto YsP0X; UV_yC: $query = "SELECT id,Nombre FROM dialvox_crm_categoria WHERE CRM = '" . limpia($crm->getId()) . "' AND Visible = TRUE"; goto MtVOP; dyy0d: if (!($row = sv_mysqli_fetch_array($result))) { goto mbUhh; } goto vdpSY; xXfOh: O5lyR: goto TrO_O; YsP0X: $retorno = array(); goto EAFbN; oyl52: mbUhh: goto xXfOh; bqkhc: dNf3n: goto dyy0d; V1Ova: goto dNf3n; goto oyl52; EAFbN: $con = getConnection(); goto UV_yC; TrO_O: sv_mysqli_close($con); goto pUfoN; vdpSY: $retorno[] = new Categoria($row["id"], $crm, $row["Nombre"], -1, false, true); goto V1Ova; MtVOP: if (!($result = sv_mysqli_query($con, $query))) { goto O5lyR; } goto bqkhc; pUfoN: return $retorno; goto OnGn_; OnGn_: } public static function countCategoriasByCRM(CRM $crm) : int { $retorno = 0; return $retorno; } }