/** * list mysql table data * @param $data */ function listacc_dbtable_data($data) { $table = _post('table'); $subdomain = _post('subdomain'); $res = $data->upload_wptool($data->acc_id, $subdomain); ajax_output($res); //run this file $url = rtrim(_domain($data->domain, $subdomain), '/') . '/' . HW_WP_TOOL_FILE . '?do=list_dbtable_data&acc=' . $data->acc_id; $data = array('table' => $table); $res = curl_post($url, $data); ajax_output($res); }
/** * import sql to db * @param $cp */ function import_db($cp) { $file = _post('file'); if ($file) { $subdomain = _post('subdomain'); //upload .sql or sql compress file $result = array(); $res = $cp->upload_wptool(0, $subdomain, $file); $result[] = (array) json_decode($res); //upload hw tool for wp $res = $cp->upload_wptool(0, $subdomain); $result[] = (array) json_decode($res); //run this file $url = rtrim(_domain($cp->domain, $subdomain), '/') . '/' . HW_WP_TOOL_FILE . '?do=import_sql&acc=' . $cp->acc_id; $res = curl_post($url, array('file' => basename($file), 'dbname' => _post('dbname'))); $result[] = (array) json_decode($res); ajax_output($result); } }
/** * list all repositories * @param $cp */ function svn_list_repositories($cp) { $subdomain = _post('subdomain'); $update_repo_db = _post('update_repo_db'); //upload hw wp tool $res = $cp->upload_wptool(0, $subdomain); ajax_output($res); //run this file $url = rtrim(_domain($cp->domain, $subdomain), '/') . '/' . HW_WP_TOOL_FILE . '?do=svn_list_repositories&acc=' . $cp->acc_id; $data = array('update_repo_db' => $update_repo_db); $res = curl_post($url, $data); ajax_output($res); }