Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
VMS-z
Manage
Activity
Members
Labels
Plan
Issues
6
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Christoph Zysik
VMS-z
Commits
bf2c99b8
Commit
bf2c99b8
authored
6 years ago
by
Christoph Zysik
Browse files
Options
Downloads
Patches
Plain Diff
fixed ptc functions to basically work again
parent
5d4505d1
Branches
Branches containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
adcheck.php
+1
-2
1 addition, 2 deletions
adcheck.php
adclick.php
+3
-3
3 additions, 3 deletions
adclick.php
class/campaigns.php
+1
-1
1 addition, 1 deletion
class/campaigns.php
class/ptc.php
+4
-4
4 additions, 4 deletions
class/ptc.php
with
9 additions
and
10 deletions
adcheck.php
+
1
−
2
View file @
bf2c99b8
...
...
@@ -4,7 +4,6 @@ if(!isset($_GET['data'])) exit;
require
(
'lib/datenbank.inc.php'
);
require
(
'lib/functions.lib.php'
);
require
(
'lib/session.lib.php'
);
require
(
'ext/ap/ads.inc.php'
);
list
(
$art
,
$tan
)
=
explode
(
'-'
,
$_GET
[
'data'
]);
// yeah sorry ;)
$art
=
base64_decode
(
$art
);
...
...
@@ -41,5 +40,5 @@ if( $tan == $_SESSION['current_ad']['tan'] &&
</body>
</html>
<?php
invalidateAlreadyRunningAd
();
$ptc
->
invalidateAlreadyRunningAd
(
$_SESSION
[
'uid'
],
$ip
);
?>
This diff is collapsed.
Click to expand it.
adclick.php
+
3
−
3
View file @
bf2c99b8
<?php
ini_set
(
'display_errors'
,
1
);
if
(
!
isset
(
$_GET
[
'data'
]))
exit
;
require
(
'lib/datenbank.inc.php'
);
require
(
'lib/functions.lib.php'
);
require
(
'lib/session.lib.php'
);
require
(
'ext/ap/ads.inc.php'
);
list
(
$art
,
$tan
)
=
explode
(
'-'
,
$_GET
[
'data'
]);
// yeah sorry ;)
$art
=
base64_decode
(
$art
);
...
...
@@ -12,8 +12,8 @@ $tan = base64_decode($tan);
$kampdaten
=
$campaigns
->
getByTanAndType
(
$tan
,
$art
);
// TODO prevent malicious ziel urls
invalidateAlreadyRunningAd
();
setCurrentRunningAd
(
$art
,
$tan
);
$ptc
->
invalidateAlreadyRunningAd
(
$_SESSION
[
'uid'
],
$ip
);
$ptc
->
setCurrentRunningAd
(
$art
,
$kampdaten
->
id
,
$tan
);
?><!DOCTYPE html>
<html>
<head>
...
...
This diff is collapsed.
Click to expand it.
class/campaigns.php
+
1
−
1
View file @
bf2c99b8
...
...
@@ -39,7 +39,7 @@ class Campaigns
)
WHERE
`t1`.`id` = :t1cid AND
`t2`.`id` IS NULL AND
`t2`.`
c
id` IS NULL AND
`t1`.`menge` >= 1 AND
`t1`.`status` = 1 AND
`t1`.`sponsor` != :t1uid
...
...
This diff is collapsed.
Click to expand it.
class/ptc.php
+
4
−
4
View file @
bf2c99b8
...
...
@@ -37,7 +37,7 @@ class Ptc
public
function
invalidateAlreadyRunningAd
(
$uid
,
$ip
)
{
$result
=
false
;
$zeit
=
time
();
if
(
isset
(
$_SESSION
[
'current_ad'
])
)
{
$tan
=
(
isset
(
$_SESSION
[
'current_ad'
][
'tan'
])
)
?
$_SESSION
[
'current_ad'
][
'tan'
]
:
false
;
...
...
@@ -46,10 +46,10 @@ class Ptc
if
(
0
!==
$id
)
{
$kamp
=
$this
->
campaigns
->
get
ById
(
$id
);
if
(
0
<
$kamp
[
'count'
]
)
$kamp
=
$this
->
campaigns
->
get
IsClickableById
(
$id
,
$ip
,
$uid
,
$zeit
);
if
(
false
!==
$kamp
)
{
$until
=
time
()
+
$kamp
[
'data'
]
->
reload
;
$until
=
$zeit
+
$kamp
->
reload
;
$this
->
addCampaignToReload
(
$id
,
$uid
,
$ip
,
$until
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment