<?php
/*   __________________________________________________
    |  Obfuscated by YAK Pro - Php Obfuscator  2.0.17  |
    |              on 2026-04-17 05:58:42              |
    |    GitHub: https://github.com/pk-fr/yakpro-po    |
    |__________________________________________________|
*/
 require_once RUTA_APP . 'Conexion.php'; class SimpleQuery { public static function exec($query, $is_insert = FALSE) { goto fg7Yl; R1Azm: sv_mysqli_close($con); goto WxHHj; QDraA: $r = array("status" => "error", "error" => mysqli_error($con), "query" => $query); goto Ehh1z; c6God: $r = array(); goto PvdwE; g8jSV: sMV_f: goto WH1Ii; Z0IWi: vPxV_: goto R1Azm; CTAHg: $id = mysqli_insert_id($con); goto g8jSV; b3jTS: TgpZl: goto KreB8; WxHHj: return $r; goto vXSMk; PvdwE: if ($res) { goto TgpZl; } goto QDraA; ugPue: if (!$is_insert) { goto sMV_f; } goto CTAHg; fg7Yl: $con = getConnection(); goto qic0v; WH1Ii: $r = array("status" => "ok", "result" => $res, "id" => $id); goto Z0IWi; KreB8: $id = "-1"; goto ugPue; qic0v: $res = sv_mysqli_query($con, $query); goto c6God; Ehh1z: goto vPxV_; goto b3jTS; vXSMk: } public static function simpleSelect($fields = "", $table = "", $conditions = "", $skip = 0, $limit = 15, $group = "") { goto Fq1oB; vGcRP: $query .= " WHERE {$conditions} "; goto f1IyW; AoEjJ: x8Wyw: goto sYBmY; fNJXa: oUr_S: goto v0Ggr; UK6KA: goto jge4M; goto fNJXa; IY0WF: jge4M: goto D69KM; hDqGh: $query .= " LIMIT {$skip}, {$limit} "; goto bWKGq; aS_WW: if ($limit > 0 && $skip > 0) { goto gJU72; } goto tYZ3O; v0Ggr: $query .= " LIMIT {$limit} "; goto IY0WF; Fq1oB: $query = "SELECT {$fields} FROM {$table}"; goto HBG5E; D69KM: goto JB9_0; goto V9zaM; V9zaM: gJU72: goto hDqGh; HBG5E: if (!($conditions !== "")) { goto a9T3e; } goto vGcRP; djQYy: $query .= " OFFSET {$skip} "; goto LX2vQ; bWKGq: JB9_0: goto f8evQ; f1IyW: a9T3e: goto aS_WW; q8j4H: $query .= " GROUP BY {$group}"; goto AoEjJ; azOkW: if (!($skip > 0)) { goto OwNcS; } goto djQYy; f8evQ: if (!($group !== "")) { goto x8Wyw; } goto q8j4H; tYZ3O: if ($limit > 0) { goto oUr_S; } goto azOkW; LX2vQ: OwNcS: goto UK6KA; sYBmY: return $query; goto BpkEs; BpkEs: } public static function insert($table = "", $values = array()) { goto nQ_rP; nQ_rP: $str_fields = ""; goto FJLbW; FJLbW: $str_values = ""; goto qF7Mk; dsv5G: return "INSERT INTO {$table} ({$str_fields}) VALUES ({$str_values})"; goto DC7E9; qF7Mk: foreach ($values as $field => $value) { goto SXq3H; PgOCZ: if ($str_values === "") { goto zp2Wv; } goto YPg2B; Rn2CH: dO1L9: goto VffpQ; ixZul: g1lL7: goto Rn2CH; YPg2B: $str_values .= ",'" . limpia($value) . "'"; goto zCpuu; ygQfG: $str_values .= $value; goto C7LAg; vvpFu: QhZUd: goto ygQfG; iLJC7: q2RbD: goto ofFSf; SXq3H: if ($str_fields === "") { goto q2RbD; } goto RrFuO; SJB2a: if ($str_values === "") { goto QhZUd; } goto l2sY8; RrFuO: $str_fields .= ",{$field}"; goto vSRVB; q5S2W: ApK2f: goto fjHIO; C7LAg: KQOZq: goto ucD6w; vSRVB: goto ApK2f; goto iLJC7; ucD6w: goto dO1L9; goto OLijV; l2sY8: $str_values .= ",{$value}"; goto l0qK9; tIUrc: zp2Wv: goto ytq0e; ofFSf: $str_fields .= $field; goto q5S2W; zCpuu: goto g1lL7; goto tIUrc; ytq0e: $str_values .= "'" . limpia($value) . "'"; goto ixZul; fjHIO: if (is_string($value)) { goto Aceki; } goto SJB2a; VffpQ: x2DPN: goto GGdOy; OLijV: Aceki: goto PgOCZ; l0qK9: goto KQOZq; goto vvpFu; GGdOy: } goto s9vA_; s9vA_: UGLbo: goto dsv5G; DC7E9: } public static function update($table = "", $values = array(), $conditions = "") { goto dIzo1; NQbql: return $query; goto kD1Ay; mLQPQ: $query .= " WHERE {$conditions} "; goto bc96a; OWnJa: if (!($conditions !== "")) { goto BeLJX; } goto mLQPQ; fQRoQ: $query = "UPDATE {$table} SET {$str_values} "; goto OWnJa; bc96a: BeLJX: goto NQbql; dIzo1: $str_values = ""; goto RAnel; ooH5X: X4Mum: goto fQRoQ; RAnel: foreach ($values as $field => $value) { goto wPVlC; yZPSk: goto DCl3o; goto ZyAou; bT1GE: lxvJS: goto eTgW7; z6jKO: $str_values .= ",{$field} = '" . limpia($value) . "'"; goto rJuwA; dGNCG: $str_values .= ",{$field} = {$value}"; goto yZPSk; ukZwL: gyeXu: goto SGGkL; u9KbE: ILdBS: goto MEOsl; QnCM1: B5pzn: goto y_kB7; TfNSD: $str_values .= "{$field} = {$value}"; goto t15Wn; t15Wn: goto gyeXu; goto bT1GE; ZyAou: ntypc: goto z6jKO; MEOsl: if (is_string($value)) { goto lxvJS; } goto TfNSD; SGGkL: G8r9e: goto QnCM1; luCNK: if (is_string($value)) { goto ntypc; } goto dGNCG; rJuwA: DCl3o: goto QHavH; QHavH: goto G8r9e; goto u9KbE; wPVlC: if ($str_values === "") { goto ILdBS; } goto luCNK; eTgW7: $str_values .= "{$field} = '" . limpia($value) . "'"; goto ukZwL; y_kB7: } goto ooH5X; kD1Ay: } }