Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
W
WordPress_SexHackMe_Plugin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SexHackMe
WordPress_SexHackMe_Plugin
Commits
994df8aa
Commit
994df8aa
authored
Jul 17, 2022
by
Franco (nextime) Lanza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Intentation!
parent
57ba6bb2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
87 additions
and
87 deletions
+87
-87
sexhackme.php
sexhackme.php
+87
-87
No files found.
sexhackme.php
View file @
994df8aa
...
@@ -152,108 +152,108 @@ if(!class_exists('SexHackMe_Plugin')) {
...
@@ -152,108 +152,108 @@ if(!class_exists('SexHackMe_Plugin')) {
}
}
/*
/*
* Create or update the database tables needed for the plugin to work
* Create or update the database tables needed for the plugin to work
* as needed
* as needed
*
*
*/
*/
public
function
create_tables
()
{
public
function
create_tables
()
{
global
$wpdb
;
global
$wpdb
;
// Add / Update the tables as needed
// Add / Update the tables as needed
$charset_collate
=
$wpdb
->
get_charset_collate
();
$charset_collate
=
$wpdb
->
get_charset_collate
();
$sql_query
=
"CREATE TABLE
{
$wpdb
->
prefix
}{
$this
->
prefix
}
videos (
$sql_query
=
"CREATE TABLE
{
$wpdb
->
prefix
}{
$this
->
prefix
}
videos (
id bigint(20) AUTO_INCREMENT NOT NULL,
id bigint(20) AUTO_INCREMENT NOT NULL,
user_id bigint(20) NOT NULL,
user_id bigint(20) NOT NULL,
status ENUM('creating', 'uploading', 'queue', 'processing', 'ready','published','error') NOT NULL DEFAULT 'creating',
status ENUM('creating', 'uploading', 'queue', 'processing', 'ready','published','error') NOT NULL DEFAULT 'creating',
private ENUM('Y', 'N') NOT NULL DEFAULT 'N',
private ENUM('Y', 'N') NOT NULL DEFAULT 'N',
visible ENUM('Y', 'N') NOT NULL DEFAULT 'Y',
visible ENUM('Y', 'N') NOT NULL DEFAULT 'Y',
title varchar(256) NOT NULL,
title varchar(256) NOT NULL,
description varchar(1024) NOT NULL,
description varchar(1024) NOT NULL,
uploaded datetime DEFAULT NULL,
uploaded datetime DEFAULT NULL,
slug varchar(256) NOT NULL,
slug varchar(256) NOT NULL,
product_id bigint(20) NOT NULL DEFAULT '0',
product_id bigint(20) NOT NULL DEFAULT '0',
price float(10) NOT NULL DEFAULT '0',
price float(10) NOT NULL DEFAULT '0',
video_type ENUM('FLAT','VR') NOT NULL DEFAULT 'FLAT',
video_type ENUM('FLAT','VR') NOT NULL DEFAULT 'FLAT',
vr_projection ENUM('VR180_LR', 'VR360_LR') NOT NULL DEFAULT 'VR180_LR',
vr_projection ENUM('VR180_LR', 'VR360_LR') NOT NULL DEFAULT 'VR180_LR',
preview varchar(1024) DEFAULT NULL,
preview varchar(1024) DEFAULT NULL,
hls_public varchar(1024) DEFAULT NULL,
hls_public varchar(1024) DEFAULT NULL,
hls_members varchar(1024) DEFAULT NULL,
hls_members varchar(1024) DEFAULT NULL,
hls_premium varchar(1024) DEFAULT NULL,
hls_premium varchar(1024) DEFAULT NULL,
thumbnail varchar(1024) DEFAULT NULL,
thumbnail varchar(1024) DEFAULT NULL,
gif varchar(1024) DEFAULT NULL,
gif varchar(1024) DEFAULT NULL,
download_public varchar(1024) DEFAULT NULL,
download_public varchar(1024) DEFAULT NULL,
download_members varchar(1024) DEFAULT NULL,
download_members varchar(1024) DEFAULT NULL,
download_premium varchar(1024) DEFAULT NULL,
download_premium varchar(1024) DEFAULT NULL,
size_public varchar(256) DEFAULT NULL,
size_public varchar(256) DEFAULT NULL,
size_members varchar(256) DEFAULT NULL,
size_members varchar(256) DEFAULT NULL,
size_premium varchar(256) DEFAULT NULL,
size_premium varchar(256) DEFAULT NULL,
format_public varchar(256) DEFAULT NULL,
format_public varchar(256) DEFAULT NULL,
format_members varchar(256) DEFAULT NULL,
format_members varchar(256) DEFAULT NULL,
format_premium varchar(256) DEFAULT NULL,
format_premium varchar(256) DEFAULT NULL,
duration_public varchar(256) DEFAULT NULL,
duration_public varchar(256) DEFAULT NULL,
duration_members varchar(256) DEFAULT NULL,
duration_members varchar(256) DEFAULT NULL,
duration_premiunt varchar(256) DEFAULT NULL,
duration_premiunt varchar(256) DEFAULT NULL,
resolution_public varchar(256) DEFAULT NULL,
resolution_public varchar(256) DEFAULT NULL,
resolution_members varchar(256) DEFAULT NULL,
resolution_members varchar(256) DEFAULT NULL,
resolution_premium varchar(256) DEFAULT NULL,
resolution_premium varchar(256) DEFAULT NULL,
views_public bigint(32) NOT NULL DEFAULT '0',
views_public bigint(32) NOT NULL DEFAULT '0',
views_members bigint(32) NOT NULL DEFAULT '0',
views_members bigint(32) NOT NULL DEFAULT '0',
views_premium bigint(32) NOT NULL DEFAULT '0',
views_premium bigint(32) NOT NULL DEFAULT '0',
sells bigint(32) NOT NULL DEFAULT '0',
sells bigint(32) NOT NULL DEFAULT '0',
PRIMARY KEY (id),
PRIMARY KEY (id),
KEY user_id (user_id),
KEY user_id (user_id),
KEY slug (slug),
KEY slug (slug),
KEY price (price),
KEY price (price),
KEY video_type (video_type),
KEY video_type (video_type),
KEY product_id (product_id)
KEY product_id (product_id)
)
{
$charset_collate
}
;
)
{
$charset_collate
}
;
CREATE TABLE
{
$wpdb
->
prefix
}{
$this
->
prefix
}
video_meta (
CREATE TABLE
{
$wpdb
->
prefix
}{
$this
->
prefix
}
video_meta (
meta_id bigint(20) AUTO_INCREMENT NOT NULL,
meta_id bigint(20) AUTO_INCREMENT NOT NULL,
video_id bigint(20) NOT NULL DEFAULT '0',
video_id bigint(20) NOT NULL DEFAULT '0',
meta_key varchar(191),
meta_key varchar(191),
meta_value longtext,
meta_value longtext,
PRIMARY KEY (meta_id),
PRIMARY KEY (meta_id),
KEY video_id (video_id),
KEY video_id (video_id),
KEY meta_key (meta_key)
KEY meta_key (meta_key)
)
{
$charset_collate
}
;
)
{
$charset_collate
}
;
CREATE TABLE
{
$wpdb
->
prefix
}{
$this
->
prefix
}
videotags (
CREATE TABLE
{
$wpdb
->
prefix
}{
$this
->
prefix
}
videotags (
id bigint(20) AUTO_INCREMENT NOT NULL,
id bigint(20) AUTO_INCREMENT NOT NULL,
tag varchar(32) NOT NULL,
tag varchar(32) NOT NULL,
PRIMARY KEY (id),
PRIMARY KEY (id),
KEY tag (tag)
KEY tag (tag)
)
{
$charset_collate
}
;
)
{
$charset_collate
}
;
CREATE TABLE
{
$wpdb
->
prefix
}{
$this
->
prefix
}
videoguests_assoc (
CREATE TABLE
{
$wpdb
->
prefix
}{
$this
->
prefix
}
videoguests_assoc (
id bigint(20) AUTO_INCREMENT NOT NULL,
id bigint(20) AUTO_INCREMENT NOT NULL,
user_id bigint(20) NOT NULL,
user_id bigint(20) NOT NULL,
PRIMARY KEY (id),
PRIMARY KEY (id),
KEY user_id (user_id)
KEY user_id (user_id)
)
{
$charset_collate
}
;
)
{
$charset_collate
}
;
CREATE TABLE
{
$wpdb
->
prefix
}{
$this
->
prefix
}
videocategory_assoc (
CREATE TABLE
{
$wpdb
->
prefix
}{
$this
->
prefix
}
videocategory_assoc (
id bigint(20) AUTO_INCREMENT NOT NULL,
id bigint(20) AUTO_INCREMENT NOT NULL,
user_id bigint(20) NOT NULL,
user_id bigint(20) NOT NULL,
PRIMARY KEY (id),
PRIMARY KEY (id),
KEY user_id (user_id)
KEY user_id (user_id)
)
{
$charset_collate
}
;
)
{
$charset_collate
}
;
CREATE TABLE
{
$wpdb
->
prefix
}{
$this
->
prefix
}
videoaccess_assoc (
CREATE TABLE
{
$wpdb
->
prefix
}{
$this
->
prefix
}
videoaccess_assoc (
id bigint(20) AUTO_INCREMENT NOT NULL,
id bigint(20) AUTO_INCREMENT NOT NULL,
user_id bigint(20) NOT NULL,
user_id bigint(20) NOT NULL,
PRIMARY KEY (id),
PRIMARY KEY (id),
KEY user_id (user_id)
KEY user_id (user_id)
)
{
$charset_collate
}
;
)
{
$charset_collate
}
;
CREATE TABLE
{
$wpdb
->
prefix
}{
$this
->
prefix
}
videotags_assoc (
CREATE TABLE
{
$wpdb
->
prefix
}{
$this
->
prefix
}
videotags_assoc (
id bigint(20) AUTO_INCREMENT NOT NULL,
id bigint(20) AUTO_INCREMENT NOT NULL,
video_id bigint(20) NOT NULL,
video_id bigint(20) NOT NULL,
PRIMARY KEY (id),
PRIMARY KEY (id),
KEY video_id (video_id)
KEY video_id (video_id)
)
{
$charset_collate
}
;"
;
)
{
$charset_collate
}
;"
;
require_once
(
ABSPATH
.
'/wp-admin/includes/upgrade.php'
);
require_once
(
ABSPATH
.
'/wp-admin/includes/upgrade.php'
);
dbDelta
(
$sql_query
);
dbDelta
(
$sql_query
);
}
}
/*
/*
* Function that schedules a hook to be executed daily (cron job)
* Function that schedules a hook to be executed daily (cron job)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment