Hy Guys
As i previously mentioned i run a PPD site, but i notice i have a huge error. Every time when the members of my site ready to download a file they get the following message (please see picture)
Picture
I attach here the defailt.php code so you can have a look that line 51. I tried to put the obl start obl flush but its just not work. I checked on the begining its no space or blank line, so i tottaly lost because i dont know what the cause of it. Please help if you can
<?php ob_start(); ?>
<?php
global $user , $tpl , $db , $c , $page;
if( $data = $db->row("select f.*,(select count(1) from `download` where `fid`=f.id) as downloads from `file` f where f.global='{$c->global_id}' and f.status=1") and $data['status']==1 ){
js::$i->put('js/dsession.js','dsession',false);
page::$i->setTitle( $data['name'] );
if(!isset($_SESSION['file_session'][$data['id']])){
$_SESSION['file_session'][$data['id']] = md5( microtime(true) . $_SERVER['REMOTE_ADDR'] );
}
$ssFileString = $_SESSION['file_session'][$data['id']].'|'.$data['id'].'|'.$_SERVER['REMOTE_ADDR'];
// CPALead
if($data['cpalead']) js::$i->put(('http://www.cpalead.com/show_cu.js?pub=' . config::read('cpalead','pub') . '&subid=' . $ssFileString ),'cpalead_loader',false);
//-->
// AdWorkMedia
if($data['adworkmedia']==1) js::$i->put('http://www.adworkmedia.com/gLoader.php?test=true&GID='.config::read('adworkmedia','gid').'&pubID='.config::read('adworkmedia','pubid').'&sid='. $ssFileString,'adworkmedia_loader',false);
//-->
// AdsCendmedia
if($data['adscendmedia']==1){
page::$i->head = '<script type="text/javascript">var gwloaded = false;</script>';
js::$i->put('http://adscendmedia.com/gwjs.php?aff='.config::read('adscendmedia','aff').'&prf='.config::read('adscendmedia','prf').'&sid=' . $_SESSION['file_session'][$data['id']],'adscendmedia',false);
}
// AD Gate Media
//if($data['adgatemedia']==1) js::$i->put('http://gateway.adgatemedia.com/'.config::read('adgatemedia','aff').'-' . config::read('adgatemedia','gtw'),'adgatemedia_loader',false);
//-->
if( $file_session = $db->row("select * from `file_session` where `fid`='{$data['id']}' and `key`='".esc($_SESSION['file_session'][$data['id']])."'") ){
if($file_session['status']==1){
// File type
//header('Content-type: MIMETYPE');
// Download
if(file_exists( $data['file'] )){
header('Content-Disposition: attachment; filename="'.$data['name'].'"');
// Plik do pobrania
readfile( $data['file'] );
die();
} else page::setError('Action Success, but file not exists! Contact with administrator');
}
} else $db->insert('file_session',array(
'fid'=>$data['id'],
'key'=>$_SESSION['file_session'][$data['id']],
'crt'=>date("Y-m-d H:i:s"),
'ip'=>$_SERVER['REMOTE_ADDR'],
'status'=>0
));
if($data['cpalead']){
$GeneralButton = ("startGateway('".config::read('cpalead','gateway')."');");
} else {
if($data['adworkmedia']){
$GeneralButton = ("javascript:gLoad_".config::read('adworkmedia','gid')."(); return false;");
} else {
$GeneralButton = ("javascript:initGateway(); return false;");
}
}
$tpl->assign(array(
'GeneralButton' => $GeneralButton,
'data' => $data,
'file_session' => $_SESSION['file_session'][$data['id']]
));
module::$i->on();
} else page::$i->val('<div id="header"><div id="header-wrapper"><div class="user-error tac">Sorry<br /><strong style="font-size:20px">File not found!!</strong></div></div></div>');
?>
<?php ob_flush(); ?>