Skip to content
Snippets Groups Projects
Commit 219caef8 authored by Christoph Zysik's avatar Christoph Zysik
Browse files

names ...

parent 29617b1e
Branches
No related merge requests found
......@@ -12,7 +12,7 @@ class Campaigns
$this->database = $database;
}
public function decreaseAmountById( $id, $value = 1 )
public function decreaseAvailCountById( $id, $value = 1 )
{
$sql = 'UPDATE `'. DB_PREFIX . '_gebuchte_werbung` SET `menge` = `menge` - :value WHERE `id`= :id';
$sql_params = array(
......
......@@ -51,7 +51,7 @@ if ( $_GET['auszahlen'] == 'true' && $force_error != 'true' && $_GET['puk'] == m
$new_reload = $zeit + $kampdaten->reload;
db_query("INSERT INTO " . $db_prefix . "_reloads (ip,uid,tan,bis) VALUES ('" . $ip . "'," . $_SESSION['uid'] . ",'" . $kampdaten->tan . "'," . $new_reload . ")");
$campaigns->decreaseAmountById( $kampdaten->id );
$campaigns->decreaseAvailCountById( $kampdaten->id, 1 );
$_SESSION['earlies_payout' . $_GET['tan']] = '';
$headmsg = $kampdaten->verdienst . ' ' . $pageconfig['waehrung'] . ' erhalten!';
......
......@@ -50,7 +50,7 @@ if ( $_GET['auszahlen'] == 'true' && $force_error != 'true' && $_GET['puk'] == m
$new_reload = $zeit+$kampdaten->reload;
db_query("INSERT INTO ".$db_prefix."_reloads (ip,uid,tan,bis) VALUES ('" . $ip . "','" . $_SESSION['uid'] . "','" . $kampdaten->tan . "','" . $new_reload . "')");
$campaigns->decreaseAmountById( $kampdaten->id );
$campaigns->decreaseAvailCountById( $kampdaten->id, 1 );
db_query("UPDATE ".$db_prefix."_kontodaten SET textlinks = textlinks + 1, tlv = tlv + ". $kampdaten->verdienst ." WHERE uid = '".$_SESSION['uid']."'");
$_SESSION['earlies_payout' . $_GET['tan']] = '';
$headmsg = $kampdaten->verdienst . ' '. $pageconfig['waehrung'].' erhalten!';
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment