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
a90896e8
Commit
a90896e8
authored
Jul 08, 2023
by
Franco (nextime) Lanza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix query filters on video categories
parent
120d4bcb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
11 deletions
+14
-11
class-query.php
includes/class-query.php
+9
-6
class-widgets.php
includes/class-widgets.php
+5
-5
No files found.
includes/class-query.php
View file @
a90896e8
...
@@ -264,15 +264,17 @@ if(!class_exists('SH_Query')) {
...
@@ -264,15 +264,17 @@ if(!class_exists('SH_Query')) {
// XXX TODO This filtering using a $_GET in the query class is SHIT.
// XXX TODO This filtering using a $_GET in the query class is SHIT.
// Move it in the gallery interface, and pass a fucking argument
// Move it in the gallery interface, and pass a fucking argument
$filter
=
false
;
$filter
=
false
;
if
(
isset
(
$_GET
[
's
exhack_vselect
'
]))
if
(
isset
(
$_GET
[
's
hvs
'
]))
{
{
switch
(
$_GET
[
's
exhack_vselect
'
])
switch
(
$_GET
[
's
hvs
'
])
{
{
case
'premium'
:
case
'premium'
:
case
'members'
:
case
'members'
:
case
'public'
:
case
'public'
:
$filter
=
"hls_"
.
$_GET
[
'shvs'
];
break
;
case
'preview'
:
case
'preview'
:
$filter
=
$_GET
[
's
exhack_vselect
'
];
$filter
=
$_GET
[
's
hvs
'
];
break
;
break
;
}
}
}
}
...
@@ -280,6 +282,7 @@ if(!class_exists('SH_Query')) {
...
@@ -280,6 +282,7 @@ if(!class_exists('SH_Query')) {
$results
=
array
();
$results
=
array
();
//$sql = $wpdb->prepare("SELECT * from {$wpdb->prefix}{$prefix}videos");
//$sql = $wpdb->prepare("SELECT * from {$wpdb->prefix}{$prefix}videos");
$sql
=
"SELECT * FROM
{
$wpdb
->
prefix
}
"
.
SH_PREFIX
.
"videos"
;
$sql
=
"SELECT * FROM
{
$wpdb
->
prefix
}
"
.
SH_PREFIX
.
"videos"
;
if
(
$filter
)
$sql
.=
" WHERE "
.
$filter
.
"!=''"
;
$dbres
=
$wpdb
->
get_results
(
$sql
,
ARRAY_A
);
$dbres
=
$wpdb
->
get_results
(
$sql
,
ARRAY_A
);
sexhack_log
(
$dbres
);
sexhack_log
(
$dbres
);
foreach
(
$dbres
as
$row
)
foreach
(
$dbres
as
$row
)
...
@@ -421,15 +424,15 @@ if(!class_exists('SH_Query')) {
...
@@ -421,15 +424,15 @@ if(!class_exists('SH_Query')) {
public
static
function
get_Products
(
$vcat
=
false
)
public
static
function
get_Products
(
$vcat
=
false
)
{
{
$filter
=
false
;
$filter
=
false
;
if
(
isset
(
$_GET
[
's
exhack_vselect
'
]))
if
(
isset
(
$_GET
[
's
hvs
'
]))
{
{
switch
(
$_GET
[
's
exhack_vselect
'
])
switch
(
$_GET
[
's
hvs
'
])
{
{
case
'premium'
:
case
'premium'
:
case
'members'
:
case
'members'
:
case
'public'
:
case
'public'
:
case
'preview'
:
case
'preview'
:
$filter
=
$_GET
[
's
exhack_vselect
'
];
$filter
=
$_GET
[
's
hvs
'
];
break
;
break
;
}
}
}
}
...
...
includes/class-widgets.php
View file @
a90896e8
...
@@ -134,11 +134,11 @@ if(!class_exists('SH_GalleryWidget')) {
...
@@ -134,11 +134,11 @@ if(!class_exists('SH_GalleryWidget')) {
echo
$args
[
'before_title'
]
.
$title
.
$args
[
'after_title'
];
echo
$args
[
'before_title'
]
.
$title
.
$args
[
'after_title'
];
?>
?>
<ul>
<ul>
<li><a
href=
""
>
All videos
</a></li>
<li><a
href=
"
?shvs=all
"
>
All videos
</a></li>
<li><a
href=
"?s
exhack_vselect
=public"
>
Public videos
</a></li>
<li><a
href=
"?s
hvs
=public"
>
Public videos
</a></li>
<li><a
href=
"?s
exhack_vselect
=members"
>
Members videos
</a></li>
<li><a
href=
"?s
hvs
=members"
>
Members videos
</a></li>
<li><a
href=
"?s
exhack_vselect
=premium"
>
Premium videos
</a></li>
<li><a
href=
"?s
hvs
=premium"
>
Premium videos
</a></li>
<li><a
href=
"?s
exhack_vselect
=preview"
>
Previews videos
</a></li>
<li><a
href=
"?s
hvs
=preview"
>
Previews videos
</a></li>
</ul>
</ul>
<?php
<?php
echo
$args
[
'after_widget'
];
echo
$args
[
'after_widget'
];
...
...
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