An error occurred while loading the file. Please try again.
-
Christoph Zysik authored
some changes to reload tables, may change, sql / install not updated yet. do not use this code in production anyway until some sort of stable tag
5d4505d1
Forked from
Eric Laufer / VMS-SUEE_2.0
89 commits behind, 27 commits ahead of the upstream repository.
ads.php 1.23 KiB
<?php
ini_set('display_errors', '1');
require ('../../lib/datenbank.inc.php');
require ('../../lib/functions.lib.php');
require ('../../lib/session.lib.php');
userstatus();
$sperre_sql = "SELECT `forced_sperre` FROM `".$db_prefix."_kontodaten` WHERE `uid` = ".$_SESSION['uid'];
$sperre_res = db_query($sperre_sql);
$sperre = mysqli_fetch_assoc( $sperre_res );
if( 0 == $sperre['forced_sperre'] )
{
$result = array( 'count' => 0, 'data' => array() );
if( isset($_POST['action']) )
{
switch( $_POST['action'] )
{
case 'getNewAdData':
$ptc->invalidateAlreadyRunningAd( $_SESSION['uid'], $ip );
if( isset($_POST['adArt']) )
{
$result = $campaigns->getNewAdData( $_POST['adArt'], $_SESSION['uid'], $ip );
}
break;
case 'checkAdOk':
if( isset( $_SESSION['current_ad']['id'] ) )
$result = $ptc->checkAdOkAndPay( $_SESSION['current_ad']['id'], $_SESSION['uid'], $ip );
break;
case 'invalidateAd':
$result = invalidateAlreadyRunningAd( $_SESSION['uid'], $ip );
break;
}
}
echo json_encode($result);
}