".$locale['BRS132']." ".$userdata['user_name']."

"; $aquery = dbquery("select * from ".DB_BANNER." WHERE status='1' AND cid='$userdata[user_id]'"); while($adata = dbarray($aquery)) { if($adata['impmade']==0) { $percent = 0; } else { $percent = substr(100 * $adata['clicks'] / $adata['impmade'], 0, 5); } if($adata['imptotal']==0) { $left = "Unlimited"; } else { $left = $adata['imptotal']-$adata['impmade']; } echo ' '; } echo '
".$locale['BRS133']." ".$locale['BRS134']." ".$locale['BRS135']." ".$locale['BRS136']." ".$locale['BRS137']." ".$locale['BRS138']." ".$locale['BRS139']."
'.$adata['bid'].' '.$adata['impmade'].' '.$adata['imptotal'].' '.$left.' '.$adata['clicks'].' '.$percent.'% '.$locale['BRS140'].'


'.$locale['BRS101'].''; $bquery = dbquery("select * from ".DB_BANNER." where cid='$userdata[user_id]'"); while($bdata = dbarray($bquery)) { $numrows = dbrows($bquery); if ($numrows>1) { echo ""; } echo '
'.$locale['BRS104'].': '.$bdata['bid'].'
'; echo "
"; echo ""; echo '


'.$locale['BRS102'].'

'; } echo "
"; echo "
"; // Finnished Banners echo "
".$locale['BRS106']." ".$userdata['user_name']."

"; $fquery = dbquery("select * from ".DB_BANNER." WHERE status='0' AND cid='$userdata[user_id]'"); while($fdata = dbarray($fquery)) { $percent = substr(100 * $fdata['clicks'] / $fdata['impmade'], 0, 5); $tag = substr("".$fdata[enddate]."", 8, 2); $monat = substr("".$fdata[enddate]."", 5, 2); $jahr = substr("".$fdata[enddate]."", 0, 4); $stunde = substr("".$fdata[enddate]."", 11, 2); $minute = substr("".$fdata[enddate]."", 14, 2); $sekunde = substr("".$fdata[enddate]."", 17, 2); $neuenddate =" $tag.$monat.$jahr, $stunde:$minute:$sekunde Uhr, "; $tag = substr("".$fdata[date]."", 8, 2); $monat = substr("".$fdata[date]."", 5, 2); $jahr = substr("".$fdata[date]."", 0, 4); $stunde = substr("".$fdata[date]."", 11, 2); $minute = substr("".$fdata[date]."", 14, 2); $sekunde = substr("".$fdata[date]."", 17, 2); $neustartdate =" $tag.$monat.$jahr, $stunde:$minute:$sekunde Uhr, "; echo " "; } echo '
".$locale['BRS133']." ".$locale['BRS107']." ".$locale['BRS137']." ".$locale['BRS138']." ".$locale['BRS108']." ".$locale['BRS109']."
$fdata[bid] $fdata[impmade] $fdata[clicks] $percent% $neustartdate $neuenddate
'; tablebreak(); opensidex($locale['BRS250']); echo '
'.$locale['BRS202'].'
'.$locale['BRS251'].' '.$locale['BRS252'].':
'.$locale['BRS253'].':
'.$locale['BRS254'].'
'; closesidex(); } else { echo $locale['BRS176']; } } } //Function to let the client E-mail his banner Stats function EmailStats($bid) { global $locale, $userdata, $bid, $settings; if ($userdata['user_email']=="") { echo "

".$locale['BRS110']. $bid .$locale['BRS111']. $userdata['user_name']."
".$locale['BRS112']."

".$locale['BRS113']."
"; } else { $result = dbquery("select bid, imptotal, impmade, clicks, code, date from ".DB_BANNER." where bid='$bid' and cid='$userdata[user_id]'"); list($bid, $imptotal, $impmade, $clicks, $code, $date) = dbarraynum($result); if($impmade==0) { $percent = 0; } else { $percent = substr(100 * $clicks / $impmade, 0, 5); } if($imptotal==0) { $left = "Unlimited"; $imptotal = "Unlimited"; } else { $left = $imptotal-$impmade; } $fecha = date("F jS Y, h:iA."); $subject = $locale['BRS114'] . $settings['sitename']; $message = $locale['BRS115'] . $settings['sitename']." \n

\n\n ".$locale['BRS116']." : ".$userdata['user_name']."
\n".$locale['BRS104']." : ".$bid."\n
Code : ".stripslashes($code)."\n
".$locale['BRS119']." : ".$imptotal."\n
".$locale['BRS120']." : ".$impmade."\n
".$locale['BRS121']." : ".$left."\n
".$locale['BRS122']." : ".$clicks."\n
".$locale['BRS123']." : ".$percent."%\n
\n".$locale['BRS124']." : ".$fecha; $from = $settings['sitename']; sendemail($userdata['user_name'],$userdata['user_email'],$settings['siteusername'],$settings['siteemail'],$subject,$message,'','',''); echo "

".$locale['BRS110']. $bid .$locale['BRS125']." ".$userdata['user_name']." (".$userdata['user_email'].")

".$locale['BRS113']."

"; } } //Function to let the client to change the url for his banner function change_banner_url_by_client($bid) { global $locale, $userdata; dbquery("update ".DB_BANNER." SET code='".addslashes($_POST['code'])."' WHERE bid='$bid'"); echo "

".$locale['BRS126']."

".$locale['BRS113']."
"; } function Neu(){ global $userdata; if(isset($_POST['code'])){ if($_POST['code']!='' && $_POST['campagne']!='' && is_numeric($_POST['imptotal']) && is_numeric($_POST['panel'])){ dbquery("INSERT INTO ".DB_BANNER." (cid , campagne, imptotal , impmade , clicks , code, date, enddate, status, panel)VALUES ('".$userdata['user_id']."', '".addslashes($_POST['campagne'])."', '".$_POST['imptotal']."', '0', '0', '".addslashes($_POST['code'])."', NOW( ),NOW( ),'0','".$_POST['panel']."');"); header("Location: ".FUSION_SELF); }else{ openside($locale['BRS257']); echo $locale['BRS256']; closeside(); } } } if(!isset($_GET['op'])){ $_GET['op']='';} switch($_GET['op']) { case "Ok": opentable($locale['BRS100']); bannerstats(); closetable(); break; case "Change": opentable($locale['BRS100']." ".$locale['BRS163']); change_banner_url_by_client($_GET['bid']); closetable(); break; case "EmailStats": opentable($locale['BRS100']." ".$locale['BRS139']); EmailStats($_GET['bid']); closetable(); break; case "Neu": Neu(); break; default: opentable($locale['BRS100']); bannerstats(); closetable(); break; } include ('footer.php'); ?>