<?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); }