Esempio n. 1
0
    $jrn_def_id = isset($_GET['jrn_def_id']) ? $_GET['jrn_def_id'] : 0;
    $per = new Periode($cn);
    $jrn_def_id = isset($_GET['jrn_def_id']) ? $_GET['jrn_def_id'] : 0;
    $per->set_jrn($jrn_def_id);
    $per->set_periode($_GET['p_per']);
    $per->reopen();
    $choose = "yes";
}
if ($choose == "yes") {
    echo '<p>';
    echo HtmlInput::button_anchor('Autre Journal ?', '?choose=no&ac=' . $_REQUEST['ac'] . '&gDossier=' . dossier::id());
    echo '</p>';
    $per = new Periode($cn);
    $jrn = isset($_GET['jrn_def_id']) ? $_GET['jrn_def_id'] : 0;
    $per->set_jrn($jrn);
    $per->display_form_periode();
    $nb_exercice = new ISelect("nb_exercice");
    $nb_exercice->value = array(array('value' => 12, 'label' => "12 périodes"), array('value' => 13, 'label' => "13 périodes"));
    require_once NOALYSS_INCLUDE . '/template/periode_add_exercice.php';
} else {
    echo '<form method="GET" >';
    echo dossier::hidden();
    $sel_jrn = $cn->make_array("select jrn_def_id, jrn_def_name from " . " jrn_def order by jrn_def_name");
    $sel_jrn[] = array('value' => 0, 'label' => 'Global : periode pour tous les journaux');
    $wSel = new ISelect();
    $wSel->value = $sel_jrn;
    $wSel->name = 'jrn_def_id';
    echo "Choisissez global ou uniquement le journal à fermer" . $wSel->input();
    echo HtmlInput::submit('choose', 'Valider');
    echo HtmlInput::hidden('ac', $_REQUEST['ac']);
    echo "</form>";
Esempio n. 2
0
 static function test_me()
 {
     $cn = new Database(dossier::id());
     $obj = new Periode($cn);
     $obj->set_jrn(1);
     $obj->display_form_periode();
 }