Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 require_once '../include/constant.php';
00024 require_once('class_dossier.php');
00025 include_once("ac_common.php");
00026 include_once ("constant.php");
00027 require_once('class_acc_ledger.php');
00028 require_once('class_ipopup.php');
00029 html_page_start($_SESSION['g_theme']);
00030
00031 load_all_script();
00032
00033
00034 $gDossier=dossier::id();
00035
00036 require_once('class_database.php');
00037
00038
00039 $cn=new Database($gDossier);
00040 include_once ('class_user.php');
00041 global $g_user;
00042 $g_user=new User($cn);
00043 $g_user->Check();
00044 $act=$g_user->check_dossier($gDossier);
00045
00046 if ($act =='P')
00047 {
00048 redirect("extension.php?".dossier::get(),0);
00049 exit();
00050 }
00051 if ( $act=='X')
00052 {
00053 alert(_('Accès interdit'));
00054 exit();
00055 }
00056
00057
00058 $ledger=new Acc_Ledger($cn,0);
00059 $ledger->type='ALL';
00060 $search_box=$ledger->search_form('ALL',1);
00061 echo '<div class="content">';
00062
00063 echo '<form method="GET">';
00064 echo $search_box;
00065 echo HtmlInput::submit("viewsearch",_("Recherche"));
00066 ?>
00067 <input type="button" class="button" onclick="window.close()" value="<?php echo _('Fermer')?>">
00068
00069 <?php
00070 echo '</form>';
00071
00072
00073
00074
00075 if ( isset ($_GET['viewsearch']))
00076 {
00077
00078
00079 $step=$_SESSION['g_pagesize'];
00080 $page=(isset($_GET['offset']))?$_GET['page']:1;
00081 $offset=(isset($_GET['offset']))?$_GET['offset']:0;
00082 if (count ($_GET) == 0)
00083 $array=null;
00084 else
00085 $array=$_GET;
00086 $array['p_action']='ALL';
00087 list($sql,$where)=$ledger->build_search_sql($array);
00088
00089 $max_line=$cn->count_sql($sql);
00090
00091 list($count,$a)=$ledger->list_operation($sql,$offset,0);
00092 $bar=navigation_bar($offset,$max_line,$step,$page);
00093
00094 echo $bar;
00095 echo $a;
00096 echo $bar;
00097
00098
00099
00100 $r=HtmlInput::get_to_hidden(array('l','date_start','date_end','desc','amount_min','amount_max','qcode','accounting','unpaid','gDossier','ledger_type'));
00101 if (isset($_GET['r_jrn'])) {
00102 foreach ($_GET['r_jrn'] as $k=>$v)
00103 $r.=HtmlInput::hidden('r_jrn['.$k.']',$v);
00104 }
00105 echo '<form action="export.php" method="get">';
00106 echo $r;
00107 echo HtmlInput::hidden('act','CSV:histo');
00108 echo HtmlInput::submit('viewsearch','Export vers CSV');
00109 echo HtmlInput::hidden('p_action','ALL');
00110 ?>
00111 <input type="button" class="button" onclick="window.close()" value="<?php echo _('Fermer')?>">
00112
00113 <?php
00114 echo '</form>';
00115 }
00116 echo '</div>';
00117 ?>