Petite correction

This commit is contained in:
Michael RICOIS 2011-05-17 15:22:26 +00:00
parent 04b1119398
commit 943b9c0ec3
2 changed files with 7 additions and 4 deletions

View File

@ -23,8 +23,8 @@ if($_REQUEST['upload'])
$file_put = str_replace('<a href', '<a title', $content);
$file_put = str_replace('logo_indiscore.png', '', $file_put);
ob_end_clean();
file_put_contents('../cache/pages/rapport-'.$siren.'.html', $file_put);
wkhtmltopdf('../cache/pages/rapport-'.$siren.'.html');
file_put_contents(PATH_SITE.'/cache/pages/rapport-'.$siren.'.html', $file_put);
wkhtmltopdf(PATH_SITE.'/cache/pages/rapport-'.$siren.'.html');
} else {
?>

View File

@ -0,0 +1,3 @@
$(document).ready(function()
{$('#customRapport').live('click',function(e){e.preventDefault();var url=$(this).attr('href');var title=$(this).attr('title');var dialogOpts={bgiframe:true,title:title,width:500,height:420,modal:true,open:function(event,ui){$(this).html('Chargement...');$(this).load(url);},buttons:{Valider:function(){formEnvoiCustomRapportSubmit();},Annuler:function(){$(this).dialog('close');}},close:function(){$('#dialogcustomrapport').remove();}};$('<div id="dialogcustomrapport"></div>').dialog(dialogOpts);return false;});});function formEnvoiCustomRapportSubmit(){var url=$('#formEnvoiCustomRapport').attr('action');$.post(url,$('#formEnvoiCustomRapport').serialize(),function(data,textStatus){if(textStatus!='success'){$('#dialogcustomrapport').html('Erreur');}else{$('#dialogcustomrapport').html(data);}});}