<?php
/*   __________________________________________________
    |  Obfuscated by YAK Pro - Php Obfuscator  2.0.17  |
    |              on 2026-04-17 06:44:02              |
    |    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 QMH_h; X6S9A: $r = array("status" => "error", "error" => mysqli_error($con), "query" => $query); goto kG8F6; n12Nl: $r = array(); goto sw6Dw; EB5_k: bNoul: goto TMLWu; QMH_h: $con = getConnection(); goto q09fl; kG8F6: goto WYW_i; goto EB5_k; y_4Kc: $r = array("status" => "ok", "result" => $res, "id" => $id); goto gVuZR; yvYvM: if (!$is_insert) { goto gbOcN; } goto A8buc; TMLWu: $id = "-1"; goto yvYvM; gVuZR: WYW_i: goto qHQ6y; G_gNT: gbOcN: goto y_4Kc; A8buc: $id = mysqli_insert_id($con); goto G_gNT; qHQ6y: sv_mysqli_close($con); goto NdXgl; NdXgl: return $r; goto h6fav; sw6Dw: if ($res) { goto bNoul; } goto X6S9A; q09fl: $res = sv_mysqli_query($con, $query); goto n12Nl; h6fav: } public static function simpleSelect($fields = "", $table = "", $conditions = "", $skip = 0, $limit = 15, $group = "") { goto auzCB; wXUMq: goto lE76h; goto ep2yx; tZm1F: $query .= " LIMIT {$limit} "; goto hVEDD; mkHwQ: $query .= " WHERE {$conditions} "; goto LLS8Q; JHBXa: SuRyh: goto LNDhl; XWMf2: if ($limit > 0) { goto RAYPZ; } goto J6QrG; uHz4F: $query .= " OFFSET {$skip} "; goto NYtpH; ep2yx: RAYPZ: goto tZm1F; J6QrG: if (!($skip > 0)) { goto GGC04; } goto uHz4F; vY16J: if (!($conditions !== "")) { goto tuMxD; } goto mkHwQ; D5LyV: EImx5: goto sAiPe; LNDhl: $query .= " LIMIT {$skip}, {$limit} "; goto rJTeh; sAiPe: return $query; goto v0OMV; hVEDD: lE76h: goto GKv1D; NYtpH: GGC04: goto wXUMq; LLS8Q: tuMxD: goto UGWFo; auzCB: $query = "SELECT {$fields} FROM {$table}"; goto vY16J; rJTeh: yEEeg: goto t3Hgk; t3Hgk: if (!($group !== "")) { goto EImx5; } goto QjxdB; GKv1D: goto yEEeg; goto JHBXa; UGWFo: if ($limit > 0 && $skip > 0) { goto SuRyh; } goto XWMf2; QjxdB: $query .= " GROUP BY {$group}"; goto D5LyV; v0OMV: } public static function insert($table = "", $values = array()) { goto taCcD; taCcD: $str_fields = ""; goto W2f18; ailcg: return "INSERT INTO {$table} ({$str_fields}) VALUES ({$str_values})"; goto uxz0L; uSOED: y1ZJH: goto ailcg; W2f18: $str_values = ""; goto LA83c; LA83c: foreach ($values as $field => $value) { goto NU1uL; kt3nr: OF5cP: goto OXml4; PEjJt: if ($str_values === "") { goto gzqXo; } goto BpWOV; gmuPz: x0EOE: goto QQsgI; Ld4mZ: $str_fields .= ",{$field}"; goto en0mZ; SXqJR: $str_values .= "'" . limpia($value) . "'"; goto WZESu; bWWvA: if ($str_values === "") { goto sBP0C; } goto qkBqf; xssuH: goto bwmqA; goto ekn_o; rmlQa: lyKCG: goto gmuPz; ekn_o: gzqXo: goto SXqJR; en0mZ: goto OF5cP; goto UWvJR; m3A6e: $str_fields .= $field; goto kt3nr; X0uR2: goto lyKCG; goto QFduY; BpWOV: $str_values .= ",'" . limpia($value) . "'"; goto xssuH; WZESu: bwmqA: goto rmlQa; V0R5_: goto aKcAE; goto L4ZUg; OXml4: if (is_string($value)) { goto mOZ0G; } goto bWWvA; QFduY: mOZ0G: goto PEjJt; qkBqf: $str_values .= ",{$value}"; goto V0R5_; NU1uL: if ($str_fields === "") { goto oIZua; } goto Ld4mZ; L4ZUg: sBP0C: goto Bwe68; UWvJR: oIZua: goto m3A6e; eqrBb: aKcAE: goto X0uR2; Bwe68: $str_values .= $value; goto eqrBb; QQsgI: } goto uSOED; uxz0L: } public static function update($table = "", $values = array(), $conditions = "") { goto TuZlW; Zf9m_: if (!($conditions !== "")) { goto E9x55; } goto hZXGx; hZXGx: $query .= " WHERE {$conditions} "; goto CSxq2; PU50z: BaEVX: goto AQOqQ; fnP6m: return $query; goto MAkGF; TuZlW: $str_values = ""; goto p_cox; p_cox: foreach ($values as $field => $value) { goto AIqOY; M72iH: if (is_string($value)) { goto q3sH1; } goto e2hGr; U2YVt: $str_values .= "{$field} = '" . limpia($value) . "'"; goto kqGyd; mJ8gQ: QnGiy: goto U2YVt; jtmsV: dj6x0: goto xtGst; wI5mm: goto N17qF; goto sN5KG; sN5KG: q3sH1: goto NN107; e2hGr: $str_values .= ",{$field} = {$value}"; goto wI5mm; zLIAb: goto tEFaV; goto mJ8gQ; xtGst: if (is_string($value)) { goto QnGiy; } goto WYn4f; NN107: $str_values .= ",{$field} = '" . limpia($value) . "'"; goto Hu7Bf; kqGyd: tEFaV: goto icrCD; WYn4f: $str_values .= "{$field} = {$value}"; goto zLIAb; sdD3i: ThtjR: goto zMWhg; icrCD: sV48i: goto sdD3i; AIqOY: if ($str_values === "") { goto dj6x0; } goto M72iH; Hu7Bf: N17qF: goto XifMI; XifMI: goto sV48i; goto jtmsV; zMWhg: } goto PU50z; CSxq2: E9x55: goto fnP6m; AQOqQ: $query = "UPDATE {$table} SET {$str_values} "; goto Zf9m_; MAkGF: } }