<?php
/*   __________________________________________________
    |  Obfuscated by YAK Pro - Php Obfuscator  2.0.17  |
    |              on 2026-04-17 05:58:44              |
    |    GitHub: https://github.com/pk-fr/yakpro-po    |
    |__________________________________________________|
*/
 goto iJmY7; ZLQqp: require_once RUTA_APP . 'Conexion.php'; goto KZSig; iJmY7: require_once 'Categoria.php'; goto ZLQqp; KZSig: class CategoriaDatos { public static function getCategoriaById(int $id) : ?Categoria { goto JWPjr; xTioG: $con = getConnection(); goto kQxB8; PimUQ: EZK4d: goto Okxp4; JWPjr: $retorno = null; goto xTioG; kQxB8: $query = "SELECT id, CRM, Nombre, Posicion, Visible,Contraido FROM dialvox_crm_categoria WHERE id = '" . limpia($id) . "'"; goto c0o3r; Dy1W3: return $retorno; goto yPPso; Okxp4: sv_mysqli_close($con); goto Dy1W3; MeXZ4: $retorno = new Categoria($row["id"], CRMDatos::getCRMById($row["CRM"]), $row["Nombre"], $row["Posicion"], $row["Contraido"], $row["Visible"]); goto PimUQ; c0o3r: $result = sv_mysqli_query($con, $query); goto SWyGM; SWyGM: if (!($row = sv_mysqli_fetch_array($result))) { goto EZK4d; } goto MeXZ4; yPPso: } public static function addCategoria(Categoria $categoria) : int { goto cLXfB; cLXfB: $retorno = 0; goto PmOXq; wH5Sk: if (!($result = sv_mysqli_query($con, $query))) { goto qsIQd; } goto qAD94; PmOXq: $con = getConnection(); goto HT8IF; QydGO: qsIQd: goto wwx4O; HT8IF: $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 wH5Sk; JTBD9: return $retorno; goto qtuWO; wwx4O: sv_mysqli_close($con); goto JTBD9; qAD94: $retorno = mysqli_insert_id($con); goto QydGO; qtuWO: } public static function updateCategoria(Categoria $categoria) : int { goto pLoY0; qcloL: czPx2: goto BoH5b; pLoY0: $retorno = 0; goto tK2Zn; cpXb1: $retorno = 1; goto qcloL; JdVLR: return $retorno; goto Sdy1P; hA2a4: $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 pS2wV; BoH5b: sv_mysqli_close($con); goto JdVLR; tK2Zn: $con = getConnection(); goto hA2a4; pS2wV: if (!($result = sv_mysqli_query($con, $query))) { goto czPx2; } goto cpXb1; Sdy1P: } public static function deleteCategoria(Categoria $categoria) : int { goto JCc1X; JCc1X: $retorno = 0; goto Ndp4K; ODVpM: $query = "UPDATE dialvox_crm_categoria SET Visible = FALSE WHERE id = '" . limpia($categoria->getId()) . "'"; goto l71Wx; TS20A: sv_mysqli_close($con); goto oF5d1; W3l5l: $retorno = 1; goto yLIyt; Ndp4K: $con = getConnection(); goto ODVpM; yLIyt: BXGmw: goto TS20A; l71Wx: if (!($result = sv_mysqli_query($con, $query))) { goto BXGmw; } goto W3l5l; oF5d1: return $retorno; goto IQ_UH; IQ_UH: } public static function getCategoriasByCRM(CRM $crm) : array { goto dNKiK; Hr5HC: $query = "SELECT id FROM dialvox_crm_categoria WHERE CRM = '" . limpia($crm->getId()) . "' AND Visible = TRUE ORDER BY Posicion"; goto MKCHn; dNKiK: $retorno = array(); goto LTXMw; GbAKO: KW8zO: goto Ihpra; GDCch: l0Iu0: goto dVat_; LTXMw: $con = getConnection(); goto Hr5HC; MKCHn: if (!($result = sv_mysqli_query($con, $query))) { goto l0Iu0; } goto GbAKO; MRBO3: goto KW8zO; goto IrBt_; IrBt_: VM6iz: goto GDCch; Ihpra: if (!($row = sv_mysqli_fetch_array($result))) { goto VM6iz; } goto uC1la; SOPV5: return $retorno; goto lHSgi; dVat_: sv_mysqli_close($con); goto SOPV5; uC1la: $retorno[] = self::getCategoriaById($row["id"]); goto MRBO3; lHSgi: } public static function listCategoriasByCRM(CRM $crm) : array { goto GIl4g; i30GX: if (!($result = sv_mysqli_query($con, $query))) { goto xve2A; } goto TMdr1; TMdr1: nM2l8: goto wDsHy; GIl4g: $retorno = array(); goto BalG_; A6TMi: goto nM2l8; goto RWAz0; h7r21: $query = "SELECT id,Nombre FROM dialvox_crm_categoria WHERE CRM = '" . limpia($crm->getId()) . "' AND Visible = TRUE"; goto i30GX; u6erU: $retorno[] = new Categoria($row["id"], $crm, $row["Nombre"], -1, false, true); goto A6TMi; RWAz0: LdEBk: goto yBz4E; rdnE_: sv_mysqli_close($con); goto VkpDd; BalG_: $con = getConnection(); goto h7r21; yBz4E: xve2A: goto rdnE_; VkpDd: return $retorno; goto FMhA2; wDsHy: if (!($row = sv_mysqli_fetch_array($result))) { goto LdEBk; } goto u6erU; FMhA2: } public static function countCategoriasByCRM(CRM $crm) : int { $retorno = 0; return $retorno; } }