Пример #1
0
 function display_form($p_filter_year = "")
 {
     $r = "";
     $r .= dossier::hidden();
     $r .= '<TABLE>';
     $r .= '<TR>';
     // filter on the current year
     $w = new ISelect();
     $w->table = 1;
     $periode_start = $this->db->make_array("select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode {$p_filter_year} order by p_start,p_end");
     $periode_end = $this->db->make_array("select p_id,to_char(p_end,'DD-MM-YYYY') from parm_periode {$p_filter_year} order by p_end,p_start");
     $w->label = _("Depuis");
     $w->value = $this->from;
     $w->selected = $this->from;
     $r .= td($w->input('from_periode', $periode_start));
     $w->label = _(" jusque ");
     $w->value = $this->to;
     $w->selected = $this->to;
     $r .= td($w->input('to_periode', $periode_end));
     $r .= "</TR>";
     $r .= "<tr>";
     $mod = new ISelect();
     $mod->table = 1;
     $mod->value = $this->db->make_array("select b_id, b_name from bilan order by b_name");
     $mod->label = _("Choix du bilan");
     $r .= td($mod->input('b_id'));
     $r .= "</tr>";
     $r .= '</TABLE>';
     return $r;
 }
Пример #2
0
 /**
  *@brief display form to get the parameter
  *  - card_poste 1 by card, 2 by account
  *  - from_poste
  *  - to_poste
  *  - from from date
  *  - to until date
  *  - pa_id Analytic plan to use
  */
 function display_form($p_hidden = '')
 {
     $r = parent::display_form($p_hidden);
     $icard = new ISelect('card_poste');
     $icard->value = array(array('value' => 1, 'label' => 'Par fiche /Activité'), array('value' => 2, 'label' => 'Par poste comptable/Activité'), array('value' => 3, 'label' => 'Par activité/Fiche'), array('value' => 4, 'label' => 'Par activité/Poste Comptable'));
     $icard->selected = $this->card_poste;
     $r .= $icard->input();
     $r .= HtmlInput::request_to_hidden(array('ac'));
     return $r;
 }
Пример #3
0
    		</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">';
for ($i = 0; $i < count($aLang); $i++) {
    $sel = "";
    if ($aLang[$i][1] == $_SESSION['g_lang']) {
Пример #4
0
 /**
  * @brief show the form for loading a template
  * @param p_action for the field action = destination url
  *
  *
  * @return string containing the forms
  */
 function form()
 {
     $r = '<p class="notice">';
     $r .= 'Veuillez introduire les mod&egrave;les servant à g&eacute;n&eacute;rer vos documents';
     $r .= '</p>';
     $r .= '<form enctype="multipart/form-data"  method="post">';
     $r .= dossier::hidden();
     // we need to add the sub action as hidden
     $h = new IHidden();
     $h->name = "sa";
     $h->value = "add_document";
     $r .= $h->input();
     $r .= '<table>';
     $t = new IText();
     $t->name = "md_name";
     $r .= "<tr><td> Nom </td><td>" . $t->input() . "</td>";
     $r .= "</tr>";
     $r .= "<tr><td>Catégorie de document </td>";
     $w = new ISelect();
     $w->name = "md_type";
     $w->value = $this->cn->make_array('select dt_id,dt_value from document_type order by dt_value');
     $r .= "<td>" . $w->input() . "</td></tr>";
     $r .= '<tr>';
     $r .= td(_('Affectation'));
     $waffect = new ISelect();
     $waffect->name = 'md_affect';
     $waffect->value = array(array('value' => 'ACH', 'label' => _('Uniquement journaux achat')), array('value' => 'VEN', 'label' => _('Uniquement journaux vente')), array('value' => 'GES', 'label' => _('Partie gestion')));
     $r .= td($waffect->input());
     $r .= '</tr>';
     $f = new IFile();
     $f->name = "doc";
     $r .= "<tr><td>fichier</td><td> " . $f->input() . "</td></tr>";
     $start = new IText();
     $start->name = "start_seq";
     $start->size = 9;
     $start->value = "0";
     $r .= "<tr><td> Numerotation commence a</td><td> " . $start->input() . "</td>";
     $r .= '<td class="notice">Si vous laissez &agrave; 0, la num&eacute;rotation ne changera pas, la prochaine facture sera n+1, n étant le n° que vous avez donn&eacute;</td>';
     $r .= "</tr>";
     $r .= '</table>';
     $r .= HtmlInput::submit('add_document', 'Ajout');
     $r .= "</form></p>";
     return $r;
 }
Пример #5
0
    ?>
    <div class="content">
                           <div>
	<form method="get" action="<?php 
    echo $href;
    ?>
">
	<?php 
    echo '<h2>' . "Exercice " . $g_user->get_exercice() . '</h2>';
    echo dossier::hidden();
    $a = isset($_GET['query']) ? $_GET['query'] : "";
    printf(_('Recherche') . ' <input class="input_text" type="text" name="query" value="%s">', $a);
    echo HtmlInput::request_to_hidden(array('ac'));
    $choice_cat = HtmlInput::default_value_request("choice_cat", 1);
    if ($choice_cat == 1) {
        $sel_card = new ISelect('cat');
        $sel_card->value = $cn->make_array('select fd_id, fd_label from fiche_def ' . ' where  frd_id=$1 ' . ' order by fd_label ', 1, array(FICHE_TYPE_ADM_TAX));
        $sel_card->selected = isset($_GET['cat']) ? $_GET['cat'] : -1;
        $sel_card->javascript = ' onchange="submit(this);"';
        echo _('Catégorie :') . $sel_card->input();
    } else {
        $cat = HtmlInput::default_value_request('cat', '');
        echo HtmlInput::hidden("cat", $cat);
        echo HtmlInput::hidden('choice_cat', 0);
    }
    echo Dossier::hidden();
    ?>
    <input type="submit" class="button" name="submit_query" value="<?php 
    echo _('recherche');
    ?>
">
Пример #6
0
//This file is part of NOALYSS and is under GPL
//see licence.txt
?>
<fieldset>
	<div id="jrn_name_div">
	<h2  id="jrn_name"> <?php 
echo $this->get_name();
?>
</h2>
</div>
<legend><?php 
echo $f_legend;
?>
 </legend>
<?php 
$wchdate = new ISelect('chdate');
$wchdate->value = array(array('value' => 1, 'label' => _("Avec date d'extrait")), array('value' => 2, 'label' => _("Avec date opérations")));
$wchdate->selected = isset($chdate) ? $chdate : 1;
$wchdate->javascript = 'onchange="show_fin_chdate(\'chdate\')"';
echo $wchdate->input();
?>
<span id="chdate_ext">
   <?php 
echo _('Date') . ' ' . $f_date;
?>
</span>

<?php 
echo $f_period;
?>
<br>
Пример #7
0
 function form($p_table = true)
 {
     $wType = new ISelect();
     $wType->name = 'p_type';
     $wType->value = self::$type;
     if (!$p_table) {
         $ret = '    <TR>
              <TD>
              <INPUT TYPE="TEXT" NAME="p_val" SIZE=7>
              </TD>
              <TD>
              <INPUT TYPE="TEXT" NAME="p_lib" size=50>
              </TD>
              <TD>
              <INPUT TYPE="TEXT" NAME="p_parent" size=5>
              </TD>
              <TD>';
         $ret .= $wType->input() . '</TD>';
         return $ret;
     } else {
         $ret = '<TABLE><TR>';
         $ret .= sprintf('<TD>' . _('Numéro de classe') . ' </TD><TD><INPUT TYPE="TEXT" name="p_val" value="%s"></TD>', $this->pcm_val);
         $ret .= "</TR><TR>";
         $ret .= sprintf('<TD>' . _('Libellé') . ' </TD><TD><INPUT TYPE="TEXT" size="70" NAME="p_lib" value="%s"></TD>', h($this->pcm_lib));
         $ret .= "</TR><TR>";
         $ret .= sprintf('<TD>' . _('Classe Parent') . '</TD><TD><INPUT TYPE="TEXT" name="p_parent" value="%s"></TD>', $this->pcm_val_parent);
         $ret .= '</tr><tr>';
         $wType->selected = $this->pcm_type;
         $ret .= "<td> Type de poste </td>";
         $ret .= '<td>' . $wType->input() . '</td>';
         $ret .= "</TR> </TABLE>";
         $ret .= dossier::hidden();
         return $ret;
     }
 }
Пример #8
0
 $sec_User = new User($cn, $_GET['user_id']);
 echo '<form method="post">';
 $sHref = sprintf('export.php?act=PDF:sec&user_id=%s&' . $str_dossier, $_GET['user_id']);
 echo dossier::hidden();
 echo HtmlInput::hidden('action', 'sec');
 echo HtmlInput::hidden('user_id', $_GET['user_id']);
 $i_profile = new ISelect('profile');
 $i_profile->value = $cn->make_array("select p_id,p_name from profile\n\t\t\torder by p_name");
 $i_profile->selected = $sec_User->get_profile();
 echo "<p>";
 echo _("Profil") . " " . $i_profile->input();
 echo "</p>";
 echo '<Fieldset><legend>Journaux </legend>';
 echo '<table>';
 $MaxJrn = Database::num_row($Res);
 $jrn_priv = new ISelect();
 $array = array(array('value' => 'R', 'label' => 'Uniquement lecture'), array('value' => 'W', 'label' => 'Lecture et écriture'), array('value' => 'X', 'label' => 'Aucun accès'));
 for ($i = 0; $i < $MaxJrn; $i++) {
     /* set the widget */
     $l_line = Database::fetch_array($Res, $i);
     echo '<TR> ';
     if ($i == 0) {
         echo '<TD class="num"> <B> Journal </B> </TD>';
     } else {
         echo "<TD></TD>";
     }
     echo "<TD class=\"num\"> {$l_line['jrn_def_name']} </TD>";
     $jrn_priv->name = 'jrn_act' . $l_line['jrn_def_id'];
     $jrn_priv->value = $array;
     if ($admin != 1) {
         $jrn_priv->selected = $sec_User->get_ledger_access($l_line['jrn_def_id']);
 function display_form($p_string = '')
 {
     $r = parent::display_form($p_string);
     // show the second plan
     $r .= '<span style="padding:5px;margin:5px;border:2px double  blue;display:block;">';
     $plan = new Anc_Plan($this->db);
     $plan_id = new ISelect("pa_id2");
     $plan_id->value = $this->db->make_array("select pa_id, pa_name from plan_analytique order by pa_name");
     $plan_id->selected = $this->pa_id2;
     $r .= "Plan Analytique :" . $plan_id->input();
     $r .= HtmlInput::request_to_hidden(array('ac'));
     $poste = new IText();
     $poste->size = 10;
     $r .= "Entre le poste " . $poste->input("from_poste2", $this->from_poste2);
     $choose = new IButton();
     $choose->name = "Choix Poste";
     $choose->label = _("Recherche");
     $choose->javascript = "onClick=search_ca(" . dossier::id() . ",'from_poste2','pa_id2')";
     $r .= $choose->input();
     $r .= " et le poste " . $poste->input("to_poste2", $this->to_poste2);
     $choose->javascript = "onClick=search_ca(" . dossier::id() . ",'to_poste2','pa_id2')";
     $r .= $choose->input();
     $r .= '<span class="notice" style="display:block">' . _('Selectionnez le plan qui vous int&eacute;resse avant de cliquer sur Recherche') . '</span>';
     $r .= '</span>';
     $r .= HtmlInput::submit('Affiche', _('Rechercher'));
     return $r;
 }
Пример #10
0
                <td><?php 
    echo $pm_default->input();
    ?>
</td>
            </tr>

        </table>
        <?php 
    echo HtmlInput::submit('add_menubt', _("Valider"));
    echo '</form>';
    return;
}
// for printing menu (export CSV or PDF)
if ($type == 'pr') {
    $ame_code = $cn->make_array("\nselect me_code,me_code||' '||coalesce(me_menu,'')||' '||coalesce(me_description,'')\n\tfrom\n\tmenu_ref\n\twhere me_type='PR'\n\tand me_code not in (select me_code from profile_menu where p_id=\$1)\n\torder by 1\n\t", 0, array($p_id));
    $me_code = new ISelect('me_code');
    $me_code->value = $ame_code;
    echo HtmlInput::title_box(_("Nouveau menu"), $ctl);
    if (count($ame_code) == 0) {
        echo h2(_("Aucune impression disponible à ajouter"), 'class="notice"');
        return;
    }
    ?>
        <form method="POST" id="menu_new2_frm" onsubmit="return confirm_box('menu_new2_frm','<?php 
    echo _('Vous confirmez ?');
    ?>
">
            <?php 
    echo HtmlInput::hidden('tab', 'profile_print_div');
    ?>
            <?php 
Пример #11
0
de fiche, ce fichier est en CSV. Le code est simple et compréhensible, normalement on 
devrait avoir une meilleure gestion des erreurs, vérifier les attaques SQL Inject,...
Ce code n'est là QUE pour expliquer le concept
*/
// se connecter au dossier courant
$cn = new Database(dossier::id());
// dans extension.php on vérifie la sécurité, en ajoutez une ici n'est en général
// pas nécessaire
// Ce form permet de choisir dans quel cat de fiche je veux intégrer les
// enregistrements.
echo '<form METHOD="get" action="extension.php">';
echo dossier::hidden();
// Ceci vous permet de revenir ici (voir extension.php)
echo HtmlInput::extension();
echo "Choix de la catégorie de fiche";
$select_cat = new ISelect('fd_id');
$select_cat->value = $cn->make_array('select fd_id,fd_label from fiche_def where frd_id=' . FICHE_TYPE_CLIENT);
echo $select_cat->input();
echo HtmlInput::submit('display_prop', 'Afficher les propriétés');
echo '</FORM>';
// on choisit d'afficher les propriétés avant de confirmer l'import
// get parce qu'on interroge
if (isset($_GET['display_prop'])) {
    $a = new Fiche($cn);
    $prop = $a->to_array($_GET['fd_id']);
    foreach ($prop as $key => $value) {
        echo "Index : {$key} valeur {$value} <br/>";
    }
    echo '<form method="POST" action="extension.php"  enctype="multipart/form-data">';
    echo dossier::hidden();
    echo HtmlInput::extension();
Пример #12
0
$select_actif = new ISelect('Actif');
$select_actif->value = array(array('value' => 0, 'label' => _('Non')), array('value' => 1, 'label' => _('Oui')));
$select_actif->selected = $UserChange->active;
echo $select_actif->input();
?>
            </td>
        </tr>
        <tr>
            <td>
                <?php 
echo _('Type');
?>
            </td>
            <td>
                <?php 
$select_admin = new ISelect('Admin');
$select_admin->value = array(array('value' => 0, 'label' => _('Utilisateur normal')), array('value' => 1, 'label' => _('Administrateur')));
$select_admin->selected = $UserChange->admin;
echo $select_admin->input();
?>
            </td>
        </tr>
    </table>
    <input type="hidden" name="sbaction" id="sbaction" value="">
        <input type="Submit" class="button" NAME="SAVE" VALUE="Sauver les changements" onclick="$('sbaction').value='save';return confirm_box('user_detail_frm','Confirmer changement ?');">

        <input type="Submit"  class="button" NAME="DELETE" VALUE="Effacer" onclick="$('sbaction').value='delete';return confirm_box('user_detail_frm','Confirmer effacement ?');" >

</FORM>
<?php 
if ($UserChange->admin == 0) {
Пример #13
0
    <div class="content">
        <div>
    	<form method="get" action="<?php 
    echo $href;
    ?>
">
		<?php 
    echo dossier::hidden();
    $a = isset($_GET['query']) ? $_GET['query'] : "";
    printf(_('Recherche') . HtmlInput::filter_table("contact_tb", "0,1,2,3,4,5,6", 1));
    $sel_card = new ISelect('cat');
    $sel_card->value = $cn->make_array('select fd_id, fd_label from fiche_def ' . ' where  frd_id=' . FICHE_TYPE_CONTACT . ' order by fd_label ', 1);
    $sel_card->selected = isset($_GET['cat']) ? $_GET['cat'] : -1;
    $sel_card->javascript = ' onchange="submit(this);"';
    echo _('Catégorie :') . $sel_card->input();
    $sl_company = new ISelect("sel_company");
    $sl_company->value = $cn->make_array('select distinct ad_value,ad_value from fiche_detail as fd' . ' join fiche as f1 on (f1.f_id=fd.f_id) join fiche_def as fdf on (f1.fd_id=fdf.fd_id)
				where
				ad_id=' . ATTR_DEF_COMPANY . " and frd_id= " . FICHE_TYPE_CONTACT . ' order by 1', 1);
    $sl_company->selected = isset($_GET['sel_company']) ? $_GET['sel_company'] : '';
    echo _('Société :') . $sl_company->input();
    ?>
    	    <input type="submit" class="button" name="submit_query" value="<?php 
    echo _('recherche');
    ?>
">
    	    <input type="hidden" name="ac" value="<?php 
    echo $_REQUEST['ac'];
    ?>
">
    	</form>
Пример #14
0
 /**
  * display screen to enter a new ledger
  */
 function input_new()
 {
     $retry = HtmlInput::default_value_post("sa", "");
     //            if ( $retry == "add") {
     $default_type = HtmlInput::default_value_post("p_jrn_type", -1);
     $previous_jrn_def_pj_pref = HtmlInput::default_value_post("jrn_def_pj_pref", "");
     $previous_p_description = HtmlInput::default_value_post("p_description", "");
     $previous_p_jrn_name = HtmlInput::default_value_post('p_jrn_name', '');
     $previous_p_jrn_type = HtmlInput::default_value_post("p_jrn_type", "");
     //            }
     global $g_user;
     $f_add_button = new ISmallButton('add_card');
     $f_add_button->label = _('Créer une nouvelle fiche');
     $f_add_button->tabindex = -1;
     $f_add_button->set_attribute('jrn', -1);
     $f_add_button->javascript = " this.jrn=-1;select_card_type({type_cat:4});";
     $str_add_button = "";
     if ($g_user->check_action(FICADD) == 1) {
         $str_add_button = $f_add_button->input();
     }
     $wSearch = new IPoste();
     $wSearch->table = 3;
     $wSearch->set_attribute('ipopup', 'ipop_account');
     $wSearch->set_attribute('account', 'p_jrn_class_deb');
     $wSearch->set_attribute('no_overwrite', '1');
     $wSearch->set_attribute('noquery', '1');
     $wSearch->name = "p_jrn_class_deb";
     $wSearch->size = 20;
     $search = $wSearch->input();
     // default for ACH
     $default_deb_purchase = $this->get_default_card('ACH', 'D');
     $default_cred_purchase = $this->get_default_card('ACH', 'C');
     // default for VEN
     $default_deb_sale = $this->get_default_card('VEN', 'D');
     $default_cred_sale = $this->get_default_card('VEN', 'C');
     // default for FIN
     $default_fin = $this->get_default_card("FIN", "");
     //default ods
     $default_ods = $this->get_default_card("ODS", "");
     /* construct all the hidden */
     $hidden = HtmlInput::hidden('p_jrn', -1);
     $hidden .= HtmlInput::hidden('p_action', 'jrn');
     $hidden .= HtmlInput::hidden('sa', 'add');
     $hidden .= dossier::hidden();
     $hidden .= HtmlInput::hidden('p_jrn_deb_max_line', 10);
     $hidden .= HtmlInput::hidden('p_ech_lib', 'echeance');
     /* properties of the ledger */
     $name = $previous_p_jrn_name;
     $code = "";
     $wType = new ISelect();
     $a_jrn = $this->db->make_array("select '-1',' -- " . _("choix du type de journal") . " -- ' union select jrn_type_id,jrn_desc from jrn_type");
     $wType->selected = '-1';
     $wType->value = $a_jrn;
     $wType->name = "p_jrn_type";
     $wType->id = "p_jrn_type_select_id";
     $wType->javascript = ' onchange="show_ledger_div()"';
     $wType->selected = $default_type;
     $type = $wType->input();
     $rcred = $rdeb = array();
     $wPjPref = new IText();
     $wPjPref->name = 'jrn_def_pj_pref';
     $wPjPref->value = $previous_jrn_def_pj_pref;
     $pj_pref = $wPjPref->input();
     $pj_seq = '';
     $last_seq = 0;
     $new = 1;
     $description = new ITextarea('p_description');
     $description->style = 'class="itextarea" style="margin:0px;"';
     $description->value = $previous_p_description;
     $str_description = $description->input();
     /* bank card */
     $qcode_bank = '';
     /* Numbering (only FIN) */
     $num_op = new ICheckBox('numb_operation');
     echo dossier::hidden();
     echo HtmlInput::hidden('ac', $_REQUEST['ac']);
     echo $hidden;
     $cn = $this->db;
     $min_row = new INum("min_row", MAX_ARTICLE);
     $min_row->prec = 0;
     require_once NOALYSS_INCLUDE . '/template/param_jrn.php';
 }
Пример #15
0
 /**
  *@brief return an html with a form to add a new middle of payment
  */
 public function blank()
 {
     //label
     $lib = new IText('mp_lib');
     $f_lib = $lib->input();
     $ledger_source = new ISelect('jrn_def_id');
     $ledger_source->value = $this->cn->make_array("select jrn_def_id,jrn_Def_name from\n                              jrn_def where jrn_def_type  in ('ACH','VEN') order by jrn_def_name");
     $f_source = $ledger_source->input();
     // type of card
     $tcard = new ISelect('mp_fd_id');
     $tcard->value = $this->cn->make_array('select fd_id,fd_label from fiche_def join fiche_def_ref ' . ' using (frd_id) where frd_id in (25,4) order by fd_label');
     $f_type_fiche = $tcard->input();
     $ledger_record = new ISelect('mp_jrn_def_id');
     $ledger_record->value = $this->cn->make_array("select jrn_def_id,jrn_Def_name from\n                              jrn_def where jrn_def_type  in ('ODS','FIN')");
     $f_ledger_record = $ledger_record->input();
     // the card
     $qcode = new ICard();
     $qcode->noadd = true;
     $qcode->name = 'mp_qcode';
     $list = $this->cn->make_list('select fd_id from fiche_def where frd_id in (25,4)');
     $qcode->typecard = $list;
     $qcode->dblclick = 'fill_ipopcard(this);';
     $f_qcode = $qcode->input();
     $msg = "Ajout d'un nouveau moyen de paiement";
     ob_start();
     require_once NOALYSS_INCLUDE . '/template/new_mod_payment.php';
     $r = ob_get_contents();
     ob_end_clean();
     return $r;
 }
Пример #16
0
// limit of the year
$exercice = $g_user->get_exercice();
$periode = new Periode($cn);
list($first_per, $last_per) = $periode->get_limit($exercice);
$start = new IDate('start');
$start->value = isset($_GET['start']) ? $_GET['start'] : $first_per->first_day();
$r = td(_('Date début'));
$r .= td($start->input());
echo tr($r);
$end = new IDate('end');
$end->value = isset($_GET['end']) ? $_GET['end'] : $last_per->last_day();
$r = td(_('Date fin'));
$r .= td($end->input());
echo tr($r);
// type of lettering : all, lettered, not lettered
$sel = new ISelect('type_let');
$sel->value = array(array('value' => 0, 'label' => _('Toutes opérations')), array('value' => 1, 'label' => _('Opérations lettrées')), array('value' => 2, 'label' => _('Opérations NON lettrées')));
if (isset($_GET['type_let'])) {
    $sel->selected = $_GET['type_let'];
} else {
    $sel->selected = 1;
}
$r = td("Filtre ") . td($sel->input());
echo tr($r);
echo '</table>';
echo '<br>';
echo HtmlInput::submit("seek", _('Recherche'));
echo '</FORM>';
echo '</div>';
//if (! isset($_REQUEST['seek'])) exit;
echo '<hr>';
Пример #17
0
    function display_form($p_hidden = "")
    {
        /* if there is no analytic plan return */
        $pa = new Anc_Plan($this->db);
        if ($pa->count() == 0) {
            echo '<div class="content">';
            echo '<h2 class="error">' . _('Aucun plan défini') . '</h2>';
            echo '</div>';
            return;
        }
        $from = new IDate('from', 'from');
        $from->size = 10;
        $from->value = $this->from;
        $to = new IDate('to', 'to');
        $to->value = $this->to;
        $to->size = 10;
        $from_poste = new IAncCard('from_poste', 'from_poste');
        $from_poste->size = 10;
        $from_poste->plan_ctl = 'pa_id';
        $from_poste->value = $this->from_poste;
        $to_poste = new IAncCard('to_poste', 'to_poste');
        $to_poste->value = $this->to_poste;
        $to_poste->size = 10;
        $hidden = new IHidden();
        $r = dossier::hidden();
        $r .= $hidden->input("result", "1");
        $r .= HtmlInput::request_to_hidden(array('ac'));
        $r .= $p_hidden;
        $plan = new Anc_Plan($this->db);
        $plan_id = new ISelect("pa_id");
        $plan_id->value = $this->db->make_array("select pa_id, pa_name from plan_analytique order by pa_name");
        $plan_id->selected = $this->pa_id;
        $choose_from = new IButton();
        $choose_from->name = _("Choix Poste");
        $choose_from->label = _("Recherche");
        $choose_from->javascript = "onClick=search_ca(" . dossier::id() . ",'from_poste','pa_id')";
        $choose_to = new IButton();
        $choose_to->name = _("Choix Poste");
        $choose_to->label = _("Recherche");
        $choose_to->javascript = "onClick=search_ca(" . dossier::id() . ",'to_poste','pa_id')";
        $r .= HtmlInput::request_to_hidden(array('ac'));
        ob_start();
        ?>
<table>
    <tr>
        <td>
            <?php 
        echo _('Depuis');
        echo HtmlInput::infobulle(37);
        ?>
        </td>
        <td>
            <?php 
        echo $from->input();
        ?>
        </td>
    </tr>
    <tr>
        <td>
            <?php 
        echo _('Jusque');
        echo HtmlInput::infobulle(37);
        ?>
        </td>
        <td>
            <?php 
        echo $to->input();
        ?>
        </td>
    </tr>
    
</table>
<span style="padding:5px;margin:5px;display:block;">
    <?php 
        echo _("Plan Analytique :") . $plan_id->input();
        echo HtmlInput::infobulle(42);
        ?>
</span>

<?php 
        $r .= ob_get_clean();
        $r .= _("Entre l'activité ") . $from_poste->input();
        $r .= $choose_from->input();
        $r .= _(" et l'activité ") . $to_poste->input();
        $r .= $choose_to->input();
        $r .= '</span>';
        return $r;
    }
Пример #18
0
?>
            <?php 
echo _("Impression");
?>
        </li>
        <li>
            <?php 
$radio->value = "ST";
$radio->selected = false;
echo $radio->input();
?>
            <?php 
echo _("Changement des états");
?>
            <?php 
$etat = new ISelect('ag_state');
$etat->value = $cn->make_array('select s_id,s_value from document_state order by s_value');
echo $etat->input();
?>
        </li>
        <li>
            <?php 
$radio->value = "ETIADD";
echo $radio->input();
?>
            <?php 
echo _("Ajout d'étiquettes");
?>
            <?php 
echo Tag::button_search('add');
?>
Пример #19
0
$str_categorie = $categorie->input();
$icall = new ICheckBox("allcard", 1);
$icall->selected = isset($_GET['allcard']) ? 1 : 0;
$str_icall = $icall->input();
/* periode */
$exercice = $g_user->get_exercice();
$iperiode = new Periode($cn);
list($first, $last) = $iperiode->get_limit($exercice);
$periode_start = new IDate('start');
$periode_end = new IDate('end');
$periode_start->value = isset($_GET['start']) ? $_GET['start'] : $first->first_day();
$periode_end->value = isset($_GET['end']) ? $_GET['end'] : $last->last_day();
$str_start = $periode_start->input();
$str_end = $periode_end->input();
/* histo ou summary */
$histo = new ISelect('histo');
$histo->value = array(array('value' => -1, 'label' => _('Liste')), array('value' => 0, 'label' => _('Historique')), array('value' => 1, 'label' => _('Historique Lettré')), array('value' => 6, 'label' => _('Historique Lettré et montants différents')), array('value' => 2, 'label' => _('Historique non Lettré')), array('value' => 3, 'label' => _('Résumé')), array('value' => 4, 'label' => _('Balance')), array('value' => 6, 'label' => _('Balance âgée')), array('value' => 7, 'label' => _('Balance âgée en-cours')), array('value' => 5, 'label' => _('Balance non soldée')));
$histo->javascript = 'onchange="if (this.value==3 || this.value==-1) {
                   g(&quot;trstart&quot;).style.display=&quot;none&quot;;g(&quot;trend&quot;).style.display=&quot;none&quot;;g(&quot;allcard&quot;).style.display=&quot;none&quot;;}
                   else  {g(&quot;trstart&quot;).style.display=&quot;&quot;;g(&quot;trend&quot;).style.display=&quot;&quot;;g(&quot;allcard&quot;).style.display=&quot;&quot;;}"';
$histo->selected = isset($_GET['histo']) ? $_GET['histo'] : -1;
$str_histo = $histo->input();
echo '<div class="content">';
echo '<FORM method="GET">';
echo dossier::hidden();
echo HtmlInput::hidden('ac', $_GET['ac']);
require_once NOALYSS_INCLUDE . '/template/impress_cat_card.php';
echo HtmlInput::submit('cat_display', _('Recherche'));
echo '</FORM>';
$search_card = new IText('card_search');
$search_card_js = sprintf('onclick="boxsearch_card(\'%d\')"', dossier::id());
Пример #20
0
            $fa->set_parameter('size', $ad_size[$e]);
            $fa->set_parameter('extra', $ad_extra[$e]);
            if (trim($ad_text[$e]) != '' && trim($ad_type[$e]) != '') {
                $fa->save();
            }
        }
        $cn->commit();
    } catch (Exception $e) {
        alert($e->getMessage());
        $cn->rollback();
    }
}
/* show list of existing */
$gDossier = dossier::id();
$array = $fa->seek();
$select_type = new ISelect('type[]');
$select_type->table = 0;
$desc = new IText('desc[]');
$desc->size = 50;
$size = new INum('size[]');
$size->size = 5;
$extra = new IText('extra[]');
$select_type->value = array(array('value' => 'text', 'label' => _('Texte')), array('value' => 'numeric', 'label' => _('Nombre')), array('value' => 'date', 'label' => _('Date')), array('value' => 'zone', 'label' => _('Zone de texte')), array('value' => 'poste', 'label' => _('Poste Comptable')), array('value' => 'card', 'label' => _('Fiche')), array('value' => 'select', 'label' => _('Selection')));
echo '<div class="content">';
echo '<form method="post">';
echo HtmlInput::hidden('sa', 'fat');
echo HtmlInput::hidden('p_action', 'divers');
echo '<table id="tb_rmfa">';
echo '<tr>';
echo th(_("id"));
echo th(_("Description"));
Пример #21
0
 static function test_me()
 {
     require_once NOALYSS_INCLUDE . '/class_iselect.php';
     $select = new ISelect('a');
     $select->value = array(array('value' => 0, 'label' => 'Première valeur'), array('value' => 0, 'label' => 'Première valeur'), array('value' => 0, 'label' => 'Première valeur'));
     for ($e = 0; $e < 5; $e++) {
         echo $select->input();
         if ($e % 10 == 0) {
             echo '<hr>';
         }
     }
     $a = new IPopup('pop1');
     $a->value = "";
     for ($e = 0; $e < 500; $e++) {
         $a->value .= "<p>Il etait une fois dans  un pays vraiment lointain où même plus loin que ça</p>";
     }
     echo $a->input();
     echo '
     <input type="button" onclick="hide(\'pop1\');hide(\'pop1_border\')" value="cacher">
                                  <input type="button" onclick="showIPopup(\'pop1\')" value="montrer">
           ';
     $a = new IPopup('pop2');
     $a->value = '';
     $a->title = "Retrouvez une saucisse";
     echo $a->input();
     echo '
     <input type="button" onclick="hide(\'pop2\');hide(\'pop2_border\')" value="cacher">
                     <input type="button" onclick="showIPopup(\'pop2\')" value="montrer">
           ';
 }
Пример #22
0
    // and exit
    //-----------------------------
    $a = new Anc_Operation($cn);
    echo '
    <div class="content"  >
    <form method= "get">
    ';
    echo dossier::hidden();
    $hid = new IHidden();
    $hid->name = "ac";
    $hid->value = $_REQUEST['ac'];
    echo $hid->input();
    $hid->name = "see";
    $hid->value = "";
    echo $hid->input();
    $w = new ISelect();
    $w->name = "p_periode";
    // filter on the current year
    $filter_year = " where p_exercice='" . $g_user->get_exercice() . "'";
    $periode_start = $cn->make_array("select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode {$filter_year} order by  p_start,p_end", 1);
    $g_user = new User($cn);
    $current = isset($_GET['p_periode']) ? $_GET['p_periode'] : $g_user->get_periode();
    $w->value = $periode_start;
    $w->selected = $current;
    echo _('Filtrer par période') . ":" . $w->input() . HtmlInput::submit('gl_submit', 'Valider') . '</form>';
    echo '<hr>';
    echo '<div class="content" >';
    echo $a->html_table($current);
    echo '</div>';
    return;
}
Пример #23
0
*/
// Copyright (2014) Author Dany De Bontridder <*****@*****.**>
if (!defined('ALLOWED')) {
    die('Appel direct ne sont pas permis');
}
/**
 * @file
 * @brief 
 * @param type $name Descriptionara
 */
$date_start = HtmlInput::default_value_get('p_date_start', '01.01.' . $g_user->get_exercice());
$w_date_start = new IDate('p_date_start', $date_start);
$w_select = new ISelect('p_type');
$w_select->value = array(array('value' => 'C', 'label' => _('Client')), array('value' => 'F', 'label' => _('Fournisseur')));
$w_select->selected = HtmlInput::default_value_get('p_type', 'C');
$w_lettre = new ISelect('p_let');
$w_lettre->value = array(array('value' => 'let', 'label' => _('lettrées et non lettrées')), array('value' => 'unlet', 'label' => _('non lettrées')));
$w_lettre->selected = HtmlInput::default_value_get('p_let', 'unlet');
?>
<form method="GET">
    <?php 
echo HtmlInput::request_to_hidden(array('gDossier', 'ac'));
?>
    <?php 
printf(_(' Opérations après la date %s qui sont %s '), $w_date_start->input(), $w_lettre->input());
?>
 
   <?php 
echo _("Type de tiers") . " " . $w_select->input();
?>
   <?php 
Пример #24
0
$pj_suggest->selected = $my->MY_PJ_SUGGEST;
$date_suggest = new ISelect();
$date_suggest->table = 1;
$date_suggest->selected = $my->MY_DATE_SUGGEST;
$check_periode = new ISelect();
$check_periode->table = 1;
$check_periode->selected = $my->MY_CHECK_PERIODE;
$alpha_num = new ISelect();
$alpha_num->table = 1;
$alpha_num->value = $alpha_num_array;
$alpha_num->selected = $my->MY_ALPHANUM;
$updlab = new ISelect();
$updlab->table = 1;
$updlab->value = $updlab_array;
$updlab->selected = $my->MY_UPDLAB;
$stock = new ISelect('p_stock');
$stock->value = array(array('value' => 'N', 'label' => _('Non')), array('value' => 'Y', 'label' => _('Oui')));
$stock->selected = $my->MY_STOCK;
$stock->table = 1;
// other parameters
$all = new IText();
$all->table = 1;
echo '<form method="post" >';
echo dossier::hidden();
echo "<table class=\"result\" style=\"width:auto\">";
echo "<tr>" . td(_('Nom société'), 'style="text-align:right"') . $all->input("p_name", $my->MY_NAME) . "</tr>";
$all->value = '';
echo "<tr>" . td(_("Téléphone"), 'style="text-align:right"') . $all->input("p_tel", $my->MY_TEL) . "</tr>";
$all->value = '';
echo "<tr>" . td(_("Fax"), 'style="text-align:right"') . $all->input("p_fax", $my->MY_FAX) . "</tr>";
$all->value = '';
Пример #25
0
 function show_button()
 {
     $select = new ISelect();
     $value = $this->db->make_array("select od_id,od_name from op_predef " . " where jrn_def_id=" . $this->p_jrn . " and od_direct ='" . $this->od_direct . "'" . " order by od_name");
     if (empty($value) == true) {
         return "";
     }
     $select->value = $value;
     $r = $select->input("pre_def");
     return $r;
 }
Пример #26
0
// Show the list of menu
//////////////////////////////////////////////////////////////////////////////
global $cn;
$table = new Sort_Table();
$url = $_SERVER['REQUEST_URI'];
$table->add(_('Code'), $url, "order by me_code asc", "order by me_code desc", "codea", "coded");
$table->add(_('Menu'), $url, "order by me_menu asc", "order by me_menu desc", "menua", "menud");
$table->add(_('Description'), $url, "order by me_description asc", "order by me_description desc", "desa", "desd");
$table->add(_('Type'), $url, "order by me_type asc", "order by me_type desc", "ta", "td");
$table->add(_('Fichier'), $url, "order by me_file asc", "order by me_file desc", "fa", "fd");
$table->add(_('URL'), $url, "order by me_url asc", "order by me_url desc", "urla", "urld");
$table->add(_('Paramètre'), $url, "order by me_parametere asc", "order by me_parameter desc", "paa", "pad");
$table->add(_('Javascript'), $url, "order by me_javascript asc", "order by me_javascript desc", "jsa", "jsd");
$ord = isset($_REQUEST['ord']) ? $_REQUEST['ord'] : 'codea';
$order = $table->get_sql_order($ord);
$iselect = new ISelect('p_type');
$iselect->value = array(array("value" => '', "label" => _("Tout")), array("value" => 'ME', "label" => _("Menu")), array("value" => 'PR', "label" => _("Impression")), array("value" => 'PL', "label" => _("Extension / Plugin")), array("value" => 'SP', "label" => _("Valeurs spéciales")));
$iselect->selected = isset($_REQUEST['p_type']) ? $_REQUEST['p_type'] : '';
$sql = "";
if ($iselect->selected != '') {
    $sql = "where me_type='" . sql_string($_REQUEST['p_type']) . "'  ";
}
$menu = new Menu_Ref_sql($cn);
$ret = $menu->seek($sql . $order);
?>
<fieldset><legend><?php 
echo _('Recherche');
?>
</legend>
<form method="GET">
	<?php 
Пример #27
0
 function display_form_plan($p_array, $p_null, $p_mode, $p_seq, $p_amount, $p_id = '', $p_add_button = true)
 {
     if ($p_array != null) {
         extract($p_array);
     }
     $result = "";
     $plan = new Anc_Plan($this->db);
     $a_plan = $plan->get_list(" order by pa_id ");
     if (empty($a_plan)) {
         return "";
     }
     $table_id = "t" . $p_seq;
     $hidden = new IHidden();
     $readonly = $p_mode == 1 ? false : true;
     $result .= $hidden->input('amount_' . $table_id, $p_amount);
     if ($p_mode == 1) {
         $result .= '<table id="' . $p_id . $table_id . '">';
     } else {
         $result .= '<table>';
     }
     $result .= "<tr>" . $plan->header() . "<th>montant</th></tr>";
     /* compute the number of rows */
     $nb_row = isset($val[$p_seq]) ? count($val[$p_seq]) : 1;
     $count = 0;
     $remain = abs($p_amount);
     $ctrl_remain = "remain" . $this->in_div . $table_id;
     for ($i = 0; $i < $nb_row; $i++) {
         $result .= '<tr>';
         foreach ($a_plan as $r_plan) {
             $array = $this->db->make_array("select po_id as value," . " html_quote(po_name) as label from poste_analytique " . " where pa_id = " . $r_plan['id'] . " order by po_name", $p_null);
             $select = new ISelect("hplan[" . $p_seq . "][]", $array);
             $select->table = 0;
             // view only or editables
             if ($p_mode == 1) {
                 // editable
                 $select->readonly = false;
                 if (isset($hplan) && isset($hplan[$p_seq][$count])) {
                     $select->selected = $hplan[$p_seq][$count];
                 }
             } else {
                 if (isset($hplan) && isset($hplan[$p_seq][$count])) {
                     $select->selected = $hplan[$p_seq][$count];
                 }
                 // view only
                 $select->readOnly = true;
             }
             if ($p_mode == 1) {
                 $result .= '<td>' . $select->input() . '</td>';
             } else {
                 $result .= '<td>' . $select->display() . '</td>';
             }
             $count++;
         }
         $value = new INum();
         $value->javascript = 'onchange="format_number(this);anc_refresh_remain(\'' . $this->in_div . $table_id . '\',\'' . $p_seq . '\')"';
         $value->name = "val[" . $p_seq . "][]";
         $value->size = 6;
         $value->value = isset($val[$p_seq][$i]) ? $val[$p_seq][$i] : abs($p_amount);
         $value->readOnly = $p_mode == 1 ? false : true;
         $remain = bcsub($remain, $value->value);
         $result .= '<td>' . $value->input() . '</td>';
         $result .= "</tr>";
     }
     $result .= "</table>";
     if ($p_add_button && $p_mode == 1) {
         $style_remain = $remain == 0 ? 'style="color:green"' : ' style="color:red"';
         $result .= " Reste à imputer =  " . '<span class="remain" ' . $style_remain . ' id="' . $ctrl_remain . '">' . $remain . '</span>';
         // add a button to add a row
         $button = new IButton();
         $button->javascript = "add_row('" . $p_id . "{$table_id}',{$p_seq});";
         $button->name = "js" . $p_id . $p_seq;
         $button->label = _("Nouvelle ligne");
         $result .= "<br>" . $button->input();
         /**
          * Add a button for distribution key
          * 
          */
         $ledger = HtmlInput::default_value_post("p_jrn", 0);
         if ($ledger == 0) {
             $ledger = $this->db->get_value('select j_jrn_def from jrnx where j_id=$1', array($this->j_id));
         }
         $gDossier = Dossier::id();
         $button_key = new IButton();
         $button_key->javascript = "anc_key_choice(" . $gDossier . ",'" . $p_id . "{$table_id}',{$p_amount},'" . $ledger . "');";
         $button_key->name = "js" . $p_id . $p_seq;
         $button_key->label = _("Clef");
         $result .= $button_key->input();
     }
     return $result;
 }
Пример #28
0
print "<TR><TD>";
$all = new ICheckBox();
$all->label = "Tous les postes qui en dépendent";
$all->disabled = false;
$all->selected = isset($_REQUEST['poste_fille']) ? true : false;
echo $all->input("poste_fille");
echo '</TD></TR><TR><TD>';
$detail = new ICheckBox();
$detail->label = "D&eacute;tail des op&eacute;rations";
$detail->disabled = false;
$detail->selected = isset($_REQUEST['oper_detail']) ? true : false;
echo $detail->input("oper_detail");
echo '</td></tr>';
$a_let = array(array('value' => 0, 'label' => 'Toutes les opérations'), array('value' => 1, 'label' => ' Opérations lettrées'), array('value' => 2, 'label' => ' Opérations non lettrées'));
echo '</TABLE>';
$salet = new ISelect('ople');
$salet->value = $a_let;
$salet->selected = isset($_GET['ople']) ? $_GET['ople'] : 0;
echo $salet->input();
print HtmlInput::submit('bt_html', 'Visualisation');
echo '</FORM>';
echo '<hr>';
echo '</div>';
//-----------------------------------------------------
// If print is asked
// First time in html
// after in pdf or cvs
//-----------------------------------------------------
if (isset($_REQUEST['bt_html'])) {
    if (isDate($_REQUEST['from_periode']) == null || isDate($_REQUEST['to_periode']) == null) {
        echo alert(_('Date malformée, désolée'));
Пример #29
0
$w->value = $cn->make_array('select dt_id,dt_value from document_type order by dt_value');
$w->selected = $doc->md_type;
echo $w->input();
?>

</td>
</tr>
<tr>
<td>
<?php 
echo _("Affectation");
?>
</td>
<td>
<?php 
$waffect = new ISelect();
$waffect->name = 'md_affect';
$waffect->value = array(array('value' => 'ACH', 'label' => _('Uniquement journaux achat')), array('value' => 'VEN', 'label' => _('Uniquement journaux vente')), array('value' => 'GES', 'label' => _('Partie gestion')));
$waffect->selected = $doc->md_affect;
echo $waffect->input();
?>
</td>
</tr>
<tr>

<tr>
<td>
<?php 
echo _("Fichier");
$s = dossier::get();
echo '<A HREF="show_document_modele.php?md_id=' . $doc->md_id . '&' . $s . '">(fichier actuel)</a>';
Пример #30
0
 /**
  * @brief zoom the calendar
  */
 function zoom_calendar($notitle)
 {
     global $g_user;
     $exercice_user = $g_user->get_exercice();
     /* day */
     $cell = array();
     for ($i = 0; $i < 42; $i++) {
         $cell[$i] = "";
     }
     $this->set_month_year();
     /* weekday */
     $week = array(_('Dimanche'), _('Lundi'), _('Mardi'), _('Mercredi'), _('Jeudi'), _('Vendredi'), _('Samedi'));
     $this->fill_from_action($cell, "long");
     $this->fill_from_todo($cell, "long");
     $wMonth = new ISelect('per_div');
     $cn = new Database(dossier::id());
     $wMonth->value = $cn->make_array("select p_id,to_char(p_start,'MM/YYYY') from parm_periode where p_exercice = '{$exercice_user}' order by p_start");
     $wMonth->selected = $this->default_periode;
     $wMonth->javascript = sprintf("onchange=calendar_zoom({gDossier:%d,invalue:'%s',outvalue:'%s',distype:'%s',notitle:%d})", dossier::id(), 'per_div', 'calendar_zoom_div', 'cal', $notitle);
     $wMonth->set_attribute('gDossier', dossier::id());
     $month_year = $wMonth->input() . $wMonth->get_js_attr();
     ob_start();
     $zoom = 1;
     $notitle = HtmlInput::default_value_get('notitle', 0);
     require_once NOALYSS_INCLUDE . '/template/calendar.php';
     if (count($this->action_div) > 0) {
         foreach ($this->action_div as $day) {
             echo $day;
         }
     }
     $ret = ob_get_contents();
     ob_end_clean();
     return $ret;
 }