Uname:Linux ip-11-115-0-196 6.8.0-1039-aws #41~22.04.1-Ubuntu SMP Thu Sep 11 10:54:48 UTC 2025 x86_64

403WebShell
403Webshell
Server IP : 13.126.101.145  /  Your IP : 216.73.217.50
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux ip-11-115-0-196 6.8.0-1039-aws #41~22.04.1-Ubuntu SMP Thu Sep 11 10:54:48 UTC 2025 x86_64
User : www-data ( 33)
PHP Version : 8.3.17
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/rentals_updated/wp-content/plugins/equipments/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/rentals_updated/wp-content/plugins/equipments/init.php
<?php
/*
Plugin Name: Equipments List
Description: Equipments List
Version: 1
Author: Saravana Kumar
Author URI: https://bsaravanan88.blogspot.com/
*/
// function to create the DB / Options / Defaults					
function equipments_options_install() {

    global $wpdb;

    $table_name = "wp_equipments";
    $charset_collate = $wpdb->get_charset_collate();
    $sql = "CREATE TABLE $table_name (
            `id` varchar(3) CHARACTER SET utf8 NOT NULL AUTO_INCREMENT,
            `name` varchar(50) CHARACTER SET utf8 NOT NULL,
            PRIMARY KEY (`id`)
          ) $charset_collate; ";

    require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
    dbDelta($sql);
}

// run the install scripts upon plugin activation
register_activation_hook(__FILE__, 'equipments_options_install');

//menu items
add_action('admin_menu','equipments_modifymenu');
function equipments_modifymenu() {
	
	//this is the main item for the menu
	add_menu_page('Accessories', //page title
	'Accessories', //menu title
	'manage_options', //capabilities
	'equipments_list', //menu slug
	'equipments_list' //function
	);
	
	//this is a submenu
	add_submenu_page('equipments_list', //parent slug
	'Add New Equipment', //page title
	'Add New', //menu title
	'manage_options', //capability
	'equipments_create', //menu slug
	'equipments_create'); //function
	
	//this submenu is HIDDEN, however, we need to add it anyways
	add_submenu_page(null, //parent slug
	'Update Equipment', //page title
	'Update', //menu title
	'manage_options', //capability
	'equipments_update', //menu slug
	'equipments_update'); //function
	
	//this submenu is HIDDEN, however, we need to add it anyways
	add_submenu_page(null, //parent slug
	'Delete Equipment', //page title
	'Delete', //menu title
	'manage_options', //capability
	'equipments_delete', //menu slug
	'equipments_delete'); //function
}
define('ROOTDIR', plugin_dir_path(__FILE__));
require_once(ROOTDIR . 'equipments-list.php');
require_once(ROOTDIR . 'equipments-create.php');
require_once(ROOTDIR . 'equipments-update.php');
require_once(ROOTDIR . 'equipments-delete.php');

Youez - 2016 - github.com/yon3zu
LinuXploit