task#137 export history of card or account from an operation detail

This commit is contained in:
Dany De Bontridder 2010-11-14 15:29:57 +00:00
parent 28662a2079
commit 627a4501c4
2 changed files with 37 additions and 3 deletions

View file

@ -3,9 +3,42 @@
require_once('ac_common.php');
require_once('function_javascript.php');
require_once('class_html_input.php');
require_once('class_dossier.php');
require_once('class_database.php');
require_once('class_user.php');
require_once('class_periode.php');
html_page_start($_SESSION['g_theme']);
echo '<a class="button" href="javascript:window.print()">Imprimer cette page</a>';
if ( basename($_GET['ajax']) == 'ajax_history.php' )
{
$href=dossier::get();
$cn=new Database(dossier::id());
/* current year */
$user=new User($cn);
$exercice=$user->get_exercice();
/* get date limit */
$periode=new Periode($cn);
$limit=$periode->get_limit($exercice);
$from_periode='from_periode='.format_date($limit[0]->p_start);
$to_periode='to_periode='.format_date($limit[1]->p_end);
if (isset($_GET['pcm_val']) )
{
$href_csv="poste_csv.php?".$href.'&poste_id='.$_GET['pcm_val'].'&ople=0&type=poste&'.$from_periode.'&'.$to_periode;
$href_pdf="poste_pdf.php?".$href.'&poste_id='.$_GET['pcm_val'].'&ople=0&type=poste&'.$from_periode.'&'.$to_periode;
}
else
{
$href_csv="quick_code_csv.php?".$href.'&f_id='.$_GET['f_id'].'&ople=0&type=poste&'.$from_periode.'&'.$to_periode;
$href_pdf="quick_code_pdf.php?".$href.'&f_id='.$_GET['f_id'].'&ople=0&type=poste&'.$from_periode.'&'.$to_periode;
}
echo '<a class="button" href="'.$href_csv.'">Export CSV</a>';
echo '<a class="button" href="'.$href_pdf.'">Export PDF</a>';
}
echo HtmlInput::hidden('inpopup',1);
echo js_include('scripts.js');
echo js_include('prototype.js');

View file

@ -1,11 +1,12 @@
<div style="float:right;height:10px;margin-top:2;margin-right:2">
<?
if ($div != "popup") {
<?php
if ($div != "popup")
{
$callback=$_SERVER['PHP_SELF'];
$str=$_SERVER['QUERY_STRING']."&act=de&ajax=$callback";
echo '<A style="margin-right:5px;background-color:blue;color:white;text-decoration:none" HREF="javascript:void(0)" onclick="var a=window.open(\'popup.php?'.$str.'\',\'\',\'toolbar=0,width=600,height=400,scrollbars=yes,resizable=yes,status=0,location=0\'); a.focus();removeDiv(\''.$div.'\')">
!pop me up ! </A>';
echo '<A style="background-color:blue;color:white;text-decoration:none" HREF="javascript:void(0)" onclick="removeDiv(\''.$div.'\');">Fermer</A>';
}
}
?>
</div>