<?php
/*
Generated by OutputBooks Team
*/

if (!defined("\x42\x41\x53\105\120\x41\x54\x48")) {
    exit("\x4e\x6f\x20\144\x69\162\145\143\x74\x20\163\143\162\151\160\164\40\x61\x63\x63\x65\x73\163\40\x61\x6c\154\x6f\x77\x65\x64");
}
class MY_Form_validation extends CI_Form_validation
{
    public function __construct($rules = array())
    {
        parent::__construct($rules);
        $this->set_error_delimiters('', '');
    }
    public function is_unique($str, $field)
    {
        goto TVUs5;
        N8KlH:
        return $query->num_rows() === 0;
        goto PFImO;
        FSqZp:
        $q = $this->CI->db->query("\123\110\x4f\x57\40\113\x45\x59\123\40\x46\122\x4f\115\40" . $this->CI->db->dbprefix($table) . "\x20\x57\x48\105\x52\105\x20\113\145\x79\x5f\x6e\x61\155\x65\x20\x3d\40\x27\x50\122\111\115\101\122\131\x27")->row();
        goto QyFDX;
        bJGK1:
        if ($pri_val > 0) {
            $query = $this->CI->db->limit(1)->get_where($table, array($field => $str, $primary_key . "\x20\41\75" => $pri_val));
        } else {
            $query = $this->CI->db->limit(1)->get_where($table, array($field => $str));
        }
        goto N8KlH;
        odD4V:
        $pri_val = $this->CI->input->post($primary_key);
        goto bJGK1;
        TVUs5:
        $this->CI->form_validation->set_message("\x69\x73\137\165\156\x69\161\x75\x65", "\45\163\40\141\x6c\x72\x65\141\144\171\40\145\170\151\163\x74\163\x2e");
        goto yQSXy;
        yQSXy:
        list($table, $field) = explode("\56", $field);
        goto FSqZp;
        QyFDX:
        $primary_key = $q->Column_name;
        goto odD4V;
        PFImO:
    }
    public function uniquee_to_company($str, $field)
    {
        goto M3eG0;
        HUEJp:
        if (!empty($primary_key) && $this->CI->input->post($primary_key)) {
            $where[$primary_key . "\40\x21\x3d"] = $this->CI->input->post($primary_key);
        }
        goto j2sQE;
        SCkvt:
        list($table, $field) = explode("\56", $field);
        goto k6ouQ;
        K98DO:
        $primary_key = $q->Column_name;
        goto Bp2BZ;
        wYYP4:
        $query = $this->CI->db->select(!empty($primary_key) ? $primary_key : "\52")->limit(1)->get_where($table, $where);
        goto SUEyv;
        j2sQE:
        if ($table == "\143\x6f\x6e\164\x61\143\x74\x73") {
            $where["\143\163\x54\171\160\145\40\x21\75"] = "\x45";
            if ($sharedcIds = get_company("\163\x68\x61\x72\x65\144\x63\x49\x64\x73")) {
                unset($where["\143\x49\x64"]);
                $this->CI->db->where_in("\143\111\x64", $sharedcIds);
            }
        }
        goto wYYP4;
        Bp2BZ:
        $where = array($field => $str, "\143\x49\x64" => get_company("\151\144"));
        goto HUEJp;
        M3eG0:
        $this->CI->form_validation->set_message("\165\156\x69\x71\x75\x65\x65\x5f\x74\x6f\x5f\143\x6f\155\x70\141\156\171", "\45\163\40\x61\x6c\162\x65\x61\144\x79\40\x65\170\x69\x73\x74\163\56");
        goto SCkvt;
        SUEyv:
        return $query->num_rows() === 0;
        goto ncFSY;
        k6ouQ:
        $q = $this->CI->db->query("\123\110\x4f\127\40\113\105\x59\x53\40\x46\122\x4f\115\40" . $this->CI->db->dbprefix($table) . "\x20\127\110\x45\122\105\40\x4b\145\171\x5f\x6e\x61\x6d\145\40\75\40\x27\x50\x52\x49\x4d\x41\122\131\x27")->row();
        goto K98DO;
        ncFSY:
    }
    public function valid_email($str)
    {
        return (bool) filter_var($str, FILTER_VALIDATE_EMAIL);
    }
}
