Esempio n. 1
0
 static function test_me()
 {
     $cn = new Database(dossier::id());
     $a = new Acc_Report($cn);
     print_r($a->get_list());
     $array = array("text0" => "test1", "form0" => "7%", "text1" => "test2", "form1" => "6%", "fr_id" => 110, "form_nom" => "Tableau");
     $a->from_array($array);
     print_r($a);
     echo '<form method="post">';
     echo $a->form(10);
     echo HtmlInput::submit('update', 'Enregistre');
     /* Add a line should be a javascript see comptanalytic */
     //  $r.= '<INPUT TYPE="submit" value="Ajoute une ligne" name="add_line">';
     echo HtmlInput::submit('del_form', 'Efface ce rapport');
     echo HtmlInput::hidden('test_select', $_REQUEST['test_select']);
     echo "</FORM>";
     if (isset($_POST['update'])) {
         $b = new Acc_Report($cn);
         $b->from_array($_POST);
         echo '<hr>';
         print_r($b);
     }
 }
Esempio n. 2
0
    die('Appel direct ne sont pas permis');
}
include_once "class_acc_report.php";
include_once "ac_common.php";
require_once NOALYSS_INCLUDE . '/class_database.php';
include_once "class_impress.php";
require_once NOALYSS_INCLUDE . '/class_user.php';
require_once NOALYSS_INCLUDE . '/header_print.php';
require_once NOALYSS_INCLUDE . '/class_dossier.php';
require_once NOALYSS_INCLUDE . '/class_acc_report.php';
require_once NOALYSS_INCLUDE . '/class_pdf.php';
$gDossier = dossier::id();
$cn = new Database($gDossier);
extract($_GET);
$ret = "";
$Form = new Acc_Report($cn, $form_id);
$Libelle = sprintf("%s ", $Form->get_name());
$pdf = new PDF($cn);
$pdf->setDossierInfo($Libelle);
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetAuthor('NOALYSS');
$pdf->setTitle("Rapport " . $Libelle, true);
// Step ??
//--
$step = HtmlInput::default_value_get("p_step", 0);
if ($step == 0) {
    // No step asked
    //--
    if ($_GET['type_periode'] == 0) {
        $array = $Form->get_row($_GET['from_periode'], $_GET['to_periode'], $_GET['type_periode']);
Esempio n. 3
0
				 0
			<?php 
}
?>
			</td>
		</tr>
	</table>
</div>

<!-- Mini rapport -->
<?php 
/*
 * Mini Report
 */
$report = $g_user->get_mini_report();
$rapport = new Acc_Report($cn);
$rapport->id = $report;
if ($rapport->exist() == false) {
    $g_user->set_mini_report(0);
    $report = 0;
}
if ($report != 0) {
    ?>
<div id="report_div" class="box"><?php 
    echo HtmlInput::title_box($rapport->get_name(), 'report_div', 'none');
    $exercice = $g_user->get_exercice();
    if ($exercice == 0) {
        alert(_('Aucune periode par defaut'));
    } else {
        $periode = new Periode($cn);
        $limit = $periode->limit_year($exercice);
Esempio n. 4
0
if (!defined('ALLOWED')) {
    die('Appel direct ne sont pas permis');
}
require_once NOALYSS_INCLUDE . '/ac_common.php';
require_once NOALYSS_INCLUDE . '/class_database.php';
require_once NOALYSS_INCLUDE . '/class_user.php';
require_once NOALYSS_INCLUDE . '/class_acc_report.php';
require_once NOALYSS_INCLUDE . '/class_impress.php';
header('Pragma: public');
header('Content-type: application/csv');
header('Content-Disposition: attachment;filename="rapport.csv"', FALSE);
require_once NOALYSS_INCLUDE . '/class_dossier.php';
$gDossier = dossier::id();
/* Admin. Dossier */
$cn = new Database($gDossier);
$Form = new Acc_Report($cn, $_GET['form_id']);
$Form->get_name();
// Step ?
//--
$step = HtmlInput::default_value_get("p_step", 0);
if ($step == 0) {
    if ($_GET['type_periode'] == 0) {
        $array = $Form->get_row($_GET['from_periode'], $_GET['to_periode'], $_GET['type_periode']);
    } else {
        $array = $Form->get_row($_GET['from_date'], $_GET['to_date'], $_GET['type_periode']);
    }
    if (count($Form->row) == 0) {
        exit;
    }
    echo "\"Description\";" . "\"Montant\"\n";
    foreach ($Form->row as $op) {
Esempio n. 5
0
    			</SELECT>

    		    </td>
    		</tr>
		    <?php 
}
?>
	    </table>
	</fieldset>
	<?php 
if ($inside_dossier) {
    /* Pref for welcome page */
    echo '<fieldset style="margin: 1%">';
    echo '<legend>' . _('Options pour la page d\'accueil') . '</legend>';
    echo _('Mini-Rapport : ');
    $rapport = new Acc_Report($cn);
    $aRapport = $rapport->make_array();
    $aRapport[] = array("value" => 0, "label" => _('Aucun mini rapport'));
    $wRapport = new ISelect();
    $wRapport->name = "minirap";
    $wRapport->selected = $g_user->get_mini_report();
    $wRapport->value = $aRapport;
    echo $wRapport->input();
    echo '<span class="notice">' . _('Le mini rapport est un rapport qui s\'affiche  sur votre page d\'accueil') . '</span>';
    echo '</fieldset>';
}
echo '<fieldset  style="margin: 1%">';
echo '<legend>' . _('Langue') . '</legend>';
echo _('Selectionnez votre langue');
$aLang = array(array(_('Français'), 'fr_FR.utf8'), array(_('Anglais'), 'en_US.utf8'), array(_('Néerlandais'), 'nl_NL.utf8'));
echo '<select name="lang" id="l">';
*/
// Copyright Author Dany De Bontridder danydb@aevalys.eu
/*!\file
 * \brief export definition of a report
 */
if (!defined('ALLOWED')) {
    die('Appel direct ne sont pas permis');
}
require_once NOALYSS_INCLUDE . '/constant.php';
require_once NOALYSS_INCLUDE . '/class_database.php';
require_once NOALYSS_INCLUDE . '/user_common.php';
require_once NOALYSS_INCLUDE . '/class_dossier.php';
require_once NOALYSS_INCLUDE . '/class_acc_report.php';
require_once NOALYSS_INCLUDE . '/class_user.php';
if (!isset($_GET['gDossier']) || !isset($_GET['f'])) {
    $a = 'Paramètre manquant';
    header("Content-type: text/html; charset: utf8", true);
    print $a;
    exit;
}
$gDossier = dossier::id();
if (!is_dir('tmp')) {
    mkdir('tmp');
}
$cn = new Database($gDossier);
$rap = new Acc_Report($cn, $_GET['f']);
$file = fopen('php://output', "a+");
header('Pragma: public');
header('Content-type: application/bin');
header('Content-Disposition: attachment;filename="export.bin"', FALSE);
$rap->export_csv($file);
Esempio n. 7
0
require_once NOALYSS_INCLUDE . '/ac_common.php';
require_once NOALYSS_INCLUDE . '/user_menu.php';
require_once NOALYSS_INCLUDE . '/class_ifile.php';
require_once NOALYSS_INCLUDE . '/class_ibutton.php';
require_once NOALYSS_INCLUDE . '/class_acc_report.php';
require_once NOALYSS_INCLUDE . '/class_dossier.php';
require_once NOALYSS_INCLUDE . '/class_database.php';
require_once NOALYSS_INCLUDE . '/class_user.php';
require_once NOALYSS_INCLUDE . '/user_menu.php';
require_once NOALYSS_INCLUDE . '/class_ipopup.php';
$gDossier = dossier::id();
$str_dossier = dossier::get();
/* Admin. Dossier */
$rep = new Database($gDossier);
$cn = new Database($gDossier);
$rap = new Acc_Report($cn);
$menu = 0;
if (isset($_POST["del_form"])) {
    $rap->id = $_POST['fr_id'];
    $rap->delete();
    $menu = 1;
}
if (isset($_POST["record"])) {
    $rap->from_array($_POST);
    $rap->save();
    $menu = 1;
}
if (isset($_POST['update'])) {
    $rap->from_array($_POST);
    $rap->save($_POST);
    $menu = 1;