Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
MetaGer
Commits
8cab1f5b
Commit
8cab1f5b
authored
May 02, 2018
by
Dominik Hebeler
Browse files
Bugs behoben. Zeitliche Löschung aber noch nicht eingebaut. Das kommt bald.
parent
10563bef
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/Http/Middleware/HumanVerification.php
View file @
8cab1f5b
...
@@ -38,7 +38,7 @@ class HumanVerification
...
@@ -38,7 +38,7 @@ class HumanVerification
DB
::
table
(
'humanverification'
)
->
insert
(
DB
::
table
(
'humanverification'
)
->
insert
(
[
'id'
=>
$id
,
'unusedResultPages'
=>
1
,
'locked'
=>
false
,
'updated_at'
=>
now
()]
[
'id'
=>
$id
,
'unusedResultPages'
=>
1
,
'locked'
=>
false
,
'updated_at'
=>
now
()]
);
);
$user
=
DB
::
table
(
'humanverification'
)
->
where
(
$
id
,
$id
)
->
first
();
$user
=
DB
::
table
(
'humanverification'
)
->
where
(
'
id
'
,
$id
)
->
first
();
}
else
if
(
$user
->
locked
!==
"1"
){
}
else
if
(
$user
->
locked
!==
"1"
){
$unusedResultPages
=
intval
(
$user
->
unusedResultPages
);
$unusedResultPages
=
intval
(
$user
->
unusedResultPages
);
$unusedResultPages
++
;
$unusedResultPages
++
;
...
...
database/migrations/2018_04_26_114745_create_humanverification_table.php
View file @
8cab1f5b
...
@@ -14,10 +14,10 @@ class CreateHumanverificationTable extends Migration
...
@@ -14,10 +14,10 @@ class CreateHumanverificationTable extends Migration
public
function
up
()
public
function
up
()
{
{
Schema
::
create
(
'humanverification'
,
function
(
Blueprint
$table
)
{
Schema
::
create
(
'humanverification'
,
function
(
Blueprint
$table
)
{
$table
->
string
(
'id'
);
$table
->
string
(
'id'
)
->
unique
()
;
$table
->
integer
(
'unusedResultPages'
);
$table
->
integer
(
'unusedResultPages'
);
$table
->
boolean
(
'locked'
);
$table
->
boolean
(
'locked'
);
$table
->
date
(
'updated_at'
);
$table
->
timestamp
(
'updated_at'
);
});
});
}
}
...
...
resources/assets/js/scriptResultPage.js
View file @
8cab1f5b
...
@@ -134,7 +134,25 @@ function clickLog () {
...
@@ -134,7 +134,25 @@ function clickLog () {
function
botProtection
()
{
function
botProtection
()
{
$
(
"
.result
"
).
find
(
"
a
"
).
click
(
function
(){
$
(
"
.result
"
).
find
(
"
a
"
).
click
(
function
(){
$
.
post
(
'
/img/cat.jpg
'
,
{
mm
:
$
(
"
meta[name=mm]
"
).
attr
(
"
content
"
)});
var
link
=
$
(
this
).
attr
(
"
href
"
);
var
newtab
=
false
;
if
(
$
(
this
).
attr
(
"
target
"
)
==
"
_blank
"
){
newtab
=
true
;
}
$
.
ajax
({
url
:
'
/img/cat.jpg
'
,
type
:
"
post
"
,
data
:
{
mm
:
$
(
"
meta[name=mm]
"
).
attr
(
"
content
"
)},
timeout
:
2000
})
.
always
(
function
(){
if
(
!
newtab
)
document
.
location
.
href
=
link
;
});
if
(
!
newtab
)
return
false
;
else
return
true
;
});
});
}
}
...
...
Write
Preview
Supports
Markdown
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