<?php
/**
 *      [eminer] (C)20013-2099 eminer Inc.
 *      This is NOT a freeware, use is subject to license terms
 *      $Id: eminerdb.class.php  September 5, 2014, 8:28 am Hogan $
 */
if(!defined('eminerINC')) { exit("Request Error!"); } class e1b75ee07{ var $eaab9e1de, $e567904ef = '', $e70a17ffa = '', $ed05b6ed7 = '*', $eaa9f73ee = '', $eac5c74b6, $ed77d5e50; var $eb92f3b97; function __construct($eaab9e1de){ global $e43e5a962; $this->eaab9e1de = '#@__'.$eaab9e1de; $this->ed77d5e50 = $e43e5a962; } function efdadbbfb($eaab9e1de){ $this->__construct($eaab9e1de); } function eea170e2c(){ $this->eac5c74b6 = 'SELECT '.$this->ed05b6ed7.' FROM `'.$this->eaab9e1de.'`'.$this->e567904ef.$this->e70a17ffa; $e3a2d7564 = $this->ed77d5e50->e36bcdd05($this->eac5c74b6); return $e3a2d7564; } function ee2942a04(){ $this->ed05b6ed7 = "count({$this->ed05b6ed7}) as num"; $e3a2d7564 = $this->eea170e2c(); return $e3a2d7564['num']; } function e99938282(){ $this->eac5c74b6 = 'SELECT '.$this->ed05b6ed7.' FROM `'.$this->eaab9e1de.'`'.$this->e567904ef.$this->e70a17ffa.$this->eaa9f73ee; $e9dbeecf4 = array(); $this->ed77d5e50->eec0cd3cb('me',$this->eac5c74b6); while($e3a2d7564 = $this->ed77d5e50->e74fa4f14()){ $e9dbeecf4[] = $e3a2d7564; } return $e9dbeecf4; } function e3ac34083($e8d777f38){ if(empty($this->e567904ef)) return false; $ed05b6ed7 = $this->e580722a7(); $e30993907 = array(); foreach($e8d777f38 as $e8ce4b16b => $e9e3669d1){ if(isset($ed05b6ed7[$e8ce4b16b])){ $e30993907[] = "`$e8ce4b16b`='".addslashes($e9e3669d1)."'"; } } $e30993907 = join(',',$e30993907); $this->eac5c74b6 = 'UPDATE `'.$this->eaab9e1de.'` SET '.$e30993907.$this->e567904ef; return $this->ed77d5e50->ecfbde28c($this->eac5c74b6); } function e099af53f(){ $this->eac5c74b6 = 'DELETE FROM `'.$this->eaab9e1de.'`'.$this->e567904ef; return $this->ed77d5e50->ecfbde28c($this->eac5c74b6); } function ee0df5f3d($e8d777f38,$e783804ed=false){ $ed05b6ed7 = $this->e580722a7(); $e06e3d36f = $e2063c160 = ''; foreach($e8d777f38 as $e8ce4b16b => $e9e3669d1){ if(isset($ed05b6ed7[$e8ce4b16b])){ $e06e3d36f .= "`$e8ce4b16b`,"; $e2063c160 .= "'".addslashes($e9e3669d1)."',"; } } $this->eac5c74b6 = 'INSERT INTO'.' `'.$this->eaab9e1de.'` ('.trim($e06e3d36f,',').') VALUES ('.trim($e2063c160,',').')'; $e3a2d7564 = $this->ed77d5e50->ecfbde28c($this->eac5c74b6); return $e783804ed?$this->ed77d5e50->ef9f379df():$e3a2d7564; } function e567904ef($e567904ef){ $this->e567904ef = ' WHERE '.(is_array($e567904ef)?$this->e6305e936($e567904ef):$e567904ef); return $this; } function e70a17ffa($e70a17ffa){ $this->e70a17ffa = ' ORDER BY '.$e70a17ffa; return $this; } function ed05b6ed7($ed05b6ed7){ $this->ed05b6ed7 = $ed05b6ed7; return $this; } function eaa9f73ee($eaa9f73ee){ $this->eaa9f73ee = ' LIMIT '.$eaa9f73ee; return $this; } function e6305e936($e567904ef){ $eac5c74b6 = ''; foreach ($e567904ef as $e3c6e0b8a=>$e3a6d0284){ $e3a6d0284 = addslashes($e3a6d0284); $eac5c74b6 .= $eac5c74b6 ? " AND `$e3c6e0b8a` = '$e3a6d0284' " : " `$e3c6e0b8a` = '$e3a6d0284'"; } return $eac5c74b6; } function e580722a7(){  $this->ed77d5e50->eec0cd3cb('me' , "show create table `{$this->eaab9e1de}`"); $r = $this->ed77d5e50->e74fa4f14('me'); $e1cb251ec = $r['Create Table']; $e2db95e8e = explode('PRIMARY KEY',$e1cb251ec); preg_match_all('/`[a-z0-9_]*?`[^`]*?,[\r\n]/i',$e2db95e8e[0],$e710998fd); $ed05b6ed7 = array(); foreach($e710998fd[0] as $r){ preg_match('/`([a-z0-9_]*)`/i',$r,$e3a2d7564); $ed05b6ed7[$e3a2d7564[1]] = $r; }  return $ed05b6ed7; } } if (!function_exists('ed3adf7ac')) { function ed3adf7ac($eaab9e1de){ return new e1b75ee07($eaab9e1de); } } ?>