function form() { $comment = new IText(); $comment->name = 'p_comment'; $comment->value = $this->p_comment; $comment->size = 45; $value = new IPoste(); $value->name = 'p_value'; $value->value = $this->p_value; $value->size = 7; $value->set_attribute('ipopup', 'ipop_account'); $value->set_attribute('account', 'p_value'); $poste = new IText(); $poste->setReadOnly(true); $poste->size = strlen($this->p_code) + 1; $poste->name = 'p_code'; $poste->value = $this->p_code; $r = ""; $r .= '<tr>'; $r .= '<td align="right"> Code </td>'; $r .= '<TD>' . $poste->input() . '</TD>'; $r .= '</tr>'; $r .= '<tr>'; $r .= '<td align="right"> Commentaire </td>'; $r .= '<TD>' . $comment->input() . '</TD>'; $r .= '</tr>'; $r .= '<tr>'; $r .= '<td align="right"> Poste comptable </td>'; $r .= '<TD>' . $value->input(); $r .= '<span id="p_value_label"></span></td>'; $r .= '</tr>'; $r .= Dossier::hidden(); return $r; }
echo td(_('Jusque ') . $date_to->input()); $letter = new ICheckbox('letter'); $letter->selected = isset($_REQUEST['letter']) ? true : false; $from_poste = new IPoste('from_poste'); $from_poste->value = HtmlInput::default_value('from_poste', '', $_REQUEST); $from_poste->set_attribute('account', 'from_poste'); $to_poste = new IPoste('to_poste'); $to_poste->value = HtmlInput::default_value('to_poste', '', $_REQUEST); $to_poste->set_attribute('account', 'to_poste'); $solded = new ICheckbox('solded'); $solded->selected = isset($_REQUEST['solded']) ? true : false; echo '<tr>'; echo td(_('Depuis le poste')) . td($from_poste->input()); echo '</tr>'; echo '<tr>'; echo td(_("Jusqu'au poste")) . td($to_poste->input()); echo '</tr>'; echo '<tr>'; echo td(_('Uniquement les opérations non lettrées')); echo td($letter->input()); echo '</tr>'; echo '<tr>'; echo td(_('Uniquement les comptes non soldés')); echo td($solded->input()); echo '</tr>'; // echo '</TABLE>'; print HtmlInput::submit('bt_html', _('Visualisation')); echo '</FORM>'; echo '<hr>'; echo '</div>';
function form($p_line = 0) { $r = ""; if ($p_line == 0) { $p_line = count($this->aAcc_Report_row); } $r .= dossier::hidden(); $r .= HtmlInput::hidden('line', $p_line); $r .= HtmlInput::hidden('fr_id', $this->id); $wForm = new IText(); $r .= "Nom du rapport : "; $r .= $wForm->input('form_nom', $this->name); $r .= '<TABLE id="rap1" width="100%">'; $r .= "<TR>"; $r .= "<TH> Position </TH>"; $r .= "<TH> Texte </TH>"; $r .= "<TH> Formule</TH>"; $r .= '</TR>'; $wName = new IText(); $wName->size = 40; $wPos = new IText(); $wPos->size = 3; $wForm = new IText(); $wForm->size = 35; for ($i = 0; $i < $p_line; $i++) { $r .= "<TR>"; $r .= "<TD>"; $wPos->value = isset($this->aAcc_Report_row[$i]->fo_pos) ? $this->aAcc_Report_row[$i]->fo_pos : $i + 1; $r .= $wPos->input("pos" . $i); $r .= '</TD>'; $r .= "<TD>"; $wName->value = isset($this->aAcc_Report_row[$i]->fo_label) ? $this->aAcc_Report_row[$i]->fo_label : ""; $r .= $wName->input("text" . $i); $r .= '</TD>'; $r .= '<td>'; $search = new IPoste("form" . $i); $search->size = 50; $search->value = isset($this->aAcc_Report_row[$i]->fo_formula) ? $this->aAcc_Report_row[$i]->fo_formula : ""; $search->label = _("Recherche poste"); $search->set_attribute('gDossier', dossier::id()); $search->set_attribute('bracket', 1); $search->set_attribute('no_overwrite', 1); $search->set_attribute('noquery', 1); $search->set_attribute('account', $search->name); $search->set_attribute('ipopup', 'ipop_card'); $r .= $search->input(); $r .= '</td>'; $r .= "</TR>"; } $r .= "</TABLE>"; $wButton = new IButton(); $wButton->javascript = " rapport_add_row('" . dossier::id() . "')"; $wButton->label = "Ajout d'une ligne"; $r .= $wButton->input(); return $r; }
//----------------------------------------------------- echo '<div class="content">'; echo '<FORM action="?" METHOD="GET">'; echo HtmlInput::hidden('ac', $_REQUEST['ac']); echo HtmlInput::hidden('type', 'poste'); echo dossier::hidden(); echo '<TABLE><TR>'; $span = new ISpan(); $w = new IPoste('poste_id'); $w->set_attribute('ipopup', 'ipop_account'); $w->set_attribute('label', 'poste_id_label'); $w->set_attribute('account', 'poste_id'); $w->table = 0; $w->value = isset($_REQUEST['poste_id']) ? $_REQUEST['poste_id'] : ""; $w->label = "Choisissez le poste"; print td('Choisissez un poste ') . td($w->input()); echo td($span->input('poste_id_label')); echo '</tr><tr>'; $w_poste = new ICard('f_id'); $w_poste->table = 0; $w_poste->jrn = 0; echo td("Ou Choisissez la fiche"); $w_poste->set_attribute('label', 'f_id_label'); $w_poste->set_attribute('ipopup', 'ipop_card'); $w_poste->set_attribute('gDossier', dossier::id()); $w_poste->set_attribute('typecard', 'all'); $w_poste->set_function('fill_data'); $w_poste->set_dblclick("fill_ipopcard(this);"); $w_poste->value = isset($_REQUEST['f_id']) ? $_REQUEST['f_id'] : ""; print td($w_poste->input() . $w_poste->search()); echo td($span->input('f_id_label'));
function input_base() { $r = ""; $r .= _('Label'); $label = new IText('label', $this->label); $r .= $label->input(); $r .= '<br>'; /* the accounting item */ $class_base = new IPoste('class_base', $this->class_base); $class_base->set_attribute('ipopup', 'ipop_account'); $class_base->set_attribute('account', 'class_base'); $class_base->set_attribute('label', 'acc_label'); $fd_description = new ITextarea('fd_description', $this->fd_description); $fd_description->width = 80; $fd_description->heigh = 4; $fd_description->style = 'class="itextarea" style="margin-left:0px;vertical-align:text-top"'; $r .= _('Poste Comptable de base') . ' : '; $r .= $class_base->input(); $r .= '<span id="acc_label"></span><br>'; $r .= '<br/>'; $r .= " Description " . $fd_description->input(); /* auto Create */ $r .= '<br/>'; $ck = new ICheckBox('create'); $ck->selected = $this->create_account == 'f' ? false : true; $r .= _('Chaque fiche aura automatiquement son propre poste comptable : '); $r .= $ck->input(); return $r; }
/** * 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'; }
$from_poste->set_attribute('ipopup', 'ipop_account'); $from_poste->set_attribute('label', 'from_poste_label'); $from_poste->set_attribute('account', 'from_poste'); $from_poste->value = isset($_GET['from_poste']) ? $_GET['from_poste'] : ""; $from_span = new ISpan("from_poste_label", ""); $to_poste = new IPoste(); $to_poste->name = "to_poste"; $to_poste->set_attribute('ipopup', 'ipop_account'); $to_poste->set_attribute('label', 'to_poste_label'); $to_poste->set_attribute('account', 'to_poste'); $to_poste->value = isset($_GET['to_poste']) ? $_GET['to_poste'] : ""; $to_span = new ISpan("to_poste_label", ""); echo "<div>"; echo _("Plage de postes") . " :" . $from_poste->input(); echo $from_span->input(); echo " " . _("jusque") . " :" . $to_poste->input(); echo $to_span->input(); echo "</div>"; echo '<div>'; echo '<p>'; echo _("Uniquement comptes non soldés") . " " . $unsold->input(); echo '</p>'; echo '<p>'; echo _("Avec la balance de l'année précédente") . " " . $previous_exc->input(); echo '</p>'; echo '</div>'; echo '</div>'; echo HtmlInput::submit("view", _("Visualisation")); echo '</form>'; echo '<hr>'; //-----------------------------------------------------
case FICHE_TYPE_EMPL: $msg = _(' Employé ou administrateur'); $base = ''; break; } $html = ''; /* show the form */ $search = new IPoste("class_base"); $search->size = 40; $search->value = $base; $search->label = _("Recherche poste"); $search->set_attribute('gDossier', dossier::id()); $search->set_attribute('account', $search->name); $search->set_attribute('ipopup', 'ipop_account'); $nom_mod = new IText("nom_mod"); $str_poste = $search->input(); $submit = HtmlInput::submit('save', _('Sauve')); ob_start(); require 'template/category_of_card.php'; $html .= ob_get_contents(); ob_end_clean(); } else { $html = alert(_('Action interdite'), true); } break; case 'scc': /*---------------------------------------------------------------------- * Save card Category into the database and return a ok message * *----------------------------------------------------------------------*/ $html = '';
$poste = new IPoste(); $poste->name = "acc"; $poste->table = 0; $poste->set_attribute('jrn', 0); $poste->set_attribute('gDossier', dossier::id()); $poste->set_attribute('ipopup', 'ipop_account'); $poste->set_attribute('label', 'account_label'); $poste->set_attribute('account', 'acc'); $acc_lib = ""; if (isset($_GET['acc'])) { $poste->value = $_GET['acc']; $acc_lib = $cn->get_value('select pcm_lib from tmp_pcmn where pcm_val=upper($1)', array($poste->value)); } $poste_span = new ISpan('account_label'); $poste_span->value = $acc_lib; $r = td(_('Lettrage pour le poste comptable ')) . td($poste->input()) . td($poste_span->input()); echo '<table width="50%">'; echo tr($r); // 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'); if (isset($_GET['start']) && isDate($_GET['start']) == null) { echo alert(_('Date malformée, désolé')); $_GET['start'] = $first_per->first_day(); } $start->value = isset($_GET['start']) ? $_GET['start'] : $first_per->first_day(); $r = td(_('Date début')); $r .= td($start->input()); echo tr($r);
function display($p_array) { global $g_parameter, $g_user; require_once NOALYSS_INCLUDE . '/class_acc_ledger.php'; $legder = new Acc_Ledger($this->db, $this->jrn_def_id); $legder->nb = $legder->get_min_row(); if ($p_array != null) { extract($p_array); } $add_js = ""; $ret = ""; if ($g_user->check_action(FICADD) == 1) { /* Add button */ $f_add_button = new IButton('add_card'); $f_add_button->label = _('Créer une nouvelle fiche'); $f_add_button->set_attribute('ipopup', 'ipop_newcard'); $f_add_button->set_attribute('jrn', $legder->id); $f_add_button->javascript = " this.jrn=\$('p_jrn').value;select_card_type(this);"; $f_add_button->input(); } $nb_row = isset($nb_item) ? $nb_item : $legder->nb; $ret .= HtmlInput::hidden('nb_item', $nb_row); $ret .= HtmlInput::hidden('p_jrn', $this->jrn_def_id); $ret .= dossier::hidden(); $ret .= dossier::hidden(); $ret .= HtmlInput::hidden('jrn_type', $legder->get_type()); $info = HtmlInput::infobulle(0); $info_poste = HtmlInput::infobulle(9); if ($g_user->check_action(FICADD) == 1) { $ret .= $f_add_button->input(); } $ret .= '<table id="quick_item" style="width:100%">'; $ret .= '<tr>' . '<th style="text-align:left">Quickcode' . $info . '</th>' . '<th style="text-align:left">' . _('Poste') . $info_poste . '</th>' . '<th style="text-align:left">' . _('Libellé') . '</th>' . '<th style="text-align:left">' . _('Montant') . '</th>' . '<th style="text-align:left">' . _('Débit') . '</th>' . '</tr>'; for ($i = 0; $i < $nb_row; $i++) { // Quick Code $quick_code = new ICard('qc_' . $i); $quick_code->set_dblclick("fill_ipopcard(this);"); $quick_code->set_attribute('ipopup', 'ipopcard'); // name of the field to update with the name of the card $quick_code->set_attribute('label', "ld" . $i); $quick_code->set_attribute('jrn', $legder->id); // name of the field to update with the name of the card $quick_code->set_attribute('typecard', 'filter'); // Add the callback function to filter the card on the jrn $quick_code->set_callback('filter_card'); $quick_code->set_function('fill_data'); $quick_code->javascript = sprintf(' onchange="fill_data_onchange(\'%s\');" ', $quick_code->name); $quick_code->jrn = $legder->id; $quick_code->value = isset(${'qc_' . $i}) ? ${'qc_' . $i} : ""; $label = ''; if ($quick_code->value != '') { $Fiche = new Fiche($legder->db); $Fiche->get_by_qcode($quick_code->value); $label = $Fiche->strAttribut(ATTR_DEF_NAME); } // Account $poste = new IPoste(); $poste->name = 'poste' . $i; $poste->set_attribute('jrn', $legder->id); $poste->set_attribute('ipopup', 'ipop_account'); $poste->set_attribute('label', 'ld' . $i); $poste->set_attribute('account', 'poste' . $i); $poste->set_attribute('dossier', Dossier::id()); $poste->value = isset(${'poste' . $i}) ? ${"poste" . $i} : ''; $poste->dbl_click_history(); if ($poste->value != '') { $Poste = new Acc_Account($legder->db); $Poste->set_parameter('value', $poste->value); $label = $Poste->get_lib(); } // Description of the line $line_desc = new IText(); $line_desc->name = 'ld' . $i; $line_desc->size = 30; $line_desc->value = isset(${"ld" . $i}) ? ${"ld" . $i} : $label; // Amount $amount = new INum(); $amount->size = 10; $amount->name = 'amount' . $i; $amount->value = isset(${'amount' . $i}) ? ${"amount" . $i} : ''; $amount->javascript = ' onChange="format_number(this);checkTotalDirect()"'; // D/C $deb = new ICheckBox(); $deb->name = 'ck' . $i; $deb->selected = isset(${'ck' . $i}) ? true : false; $deb->javascript = ' onChange="checkTotalDirect()"'; $ret .= '<tr>'; $ret .= '<td>' . $quick_code->input() . $quick_code->search() . '</td>'; $ret .= '<td>' . $poste->input() . '<script> document.getElementById(\'poste' . $i . '\').onblur=function(){ if (trim(this.value) !=\'\') {document.getElementById(\'qc_' . $i . '\').value="";}}</script>' . '</td>'; $ret .= '<td>' . $line_desc->input() . '</td>'; $ret .= '<td>' . $amount->input() . '</td>'; $ret .= '<td>' . $deb->input() . '</td>'; $ret .= '</tr>'; // If readonly == 1 then show CA } $ret .= '</table>'; return $ret; }
/** *@brief display a form for modifying or add a forecast *@return HTML code */ public function form_item() { $forecast = new Forecast($this->cn, $this->f_id); $forecast->load(); $str_name = $forecast->get_parameter('name'); $str_start = $forecast->get_parameter('start_date'); $str_end = $forecast->get_parameter('end_date'); $r = ""; $str_action = _("Elements"); $cat = new Forecast_Cat($this->cn); $array = $cat->make_array($this->f_id); $periode = new Periode($this->cn); $aPeriode = $this->cn->make_array("select p_id,to_char(p_start,'MM.YYYY') as label from parm_periode\n where p_start >= (select p_start from parm_periode where p_id={$str_start})\n and p_end <= (select p_end from parm_periode where p_id={$str_end})\n\t\t\t\t order by p_start"); $aPeriode[] = array('value' => 0, 'label' => 'Mensuel'); $value = $this->cn->get_array("select fi_id,fi_text,fi_account,fi_card,fc_id,fi_amount,fi_debit,fi_pid " . " from forecast_item " . " \twhere fc_id in (select fc_id from forecast_cat where f_id = \$1)", array($this->f_id)); $max = count($value) < MAX_FORECAST_ITEM ? MAX_FORECAST_ITEM : count($value); $r .= HtmlInput::hidden('nbrow', $max); for ($i = 0; $i < $max; $i++) { if (isset($value[$i]['fi_id'])) { $r .= HtmlInput::hidden('fi_id' . $i, $value[$i]['fi_id']); } /* category*/ $category = new ISelect(); $category->name = 'an_cat' . $i; $category->value = $array; $category->selected = isset($value[$i]["fc_id"]) ? $value[$i]["fc_id"] : -1; $aCat[$i]['cat'] = $category->input(); /* amount */ $amount = new INum('an_cat_amount' . $i); $amount->value = isset($value[$i]["fi_amount"]) ? $value[$i]["fi_amount"] : 0; $aCat[$i]['amount'] = $amount->input(); /* Accounting*/ $account = new IPoste('an_cat_acc' . $i); $account->set_attribute('ipopup', 'ipop_account'); // $account->set_attribute('label','an_label'.$i); $account->set_attribute('account', 'an_cat_acc' . $i); $account->set_attribute('bracket', 1); $account->set_attribute('no_overwrite', 1); $account->set_attribute('noquery', 1); $account->css_size = "85%"; $account->value = isset($value[$i]["fi_account"]) ? $value[$i]["fi_account"] : ""; $aCat[$i]['account'] = $account->input(); /*Quick Code */ $qc = new ICard('an_qc' . $i); // If double click call the javascript fill_ipopcard $qc->set_dblclick("fill_ipopcard(this);"); // This attribute is mandatory, it is the name of the IPopup $qc->set_attribute('ipopup', 'ipopcard'); // name of the field to update with the name of the card $qc->set_attribute('label', 'an_label' . $i); // Type of card : all $qc->set_attribute('typecard', 'all'); $qc->set_attribute('jrn', 0); $qc->extra = 'all'; // when value selected in the autcomplete $qc->set_function('fill_data'); if (isset($value[$i]["fi_card"])) { $f = new Fiche($this->cn, $value[$i]["fi_card"]); $qc->value = $f->strAttribut(ATTR_DEF_QUICKCODE); } $aCat[$i]['qc'] = $qc->search() . $qc->input(); /* Label */ $label = new IText('an_label' . $i); $label->value = isset($value[$i]["fi_text"]) ? $value[$i]["fi_text"] : ""; $aCat[$i]['name'] = $label->input(); //Deb or Cred $deb = new ISelect('an_deb' . $i); $deb->selected = isset($value[$i]["fi_debit"]) ? $value[$i]["fi_debit"] : -1; $deb->value = array(array('value' => 'D', 'label' => _('Débit')), array('value' => 'C', 'label' => _('Crédit'))); $aCat[$i]['deb'] = $deb->input(); //Periode $isPeriode = new ISelect('month' . $i); $isPeriode->value = $aPeriode; $isPeriode->selected = isset($value[$i]["fi_pid"]) ? $value[$i]["fi_pid"] : 0; $aCat[$i]['per'] = $isPeriode->input(); } $add_row = new IButton('add_row'); $add_row->label = _('Ajouter une ligne'); $add_row->javascript = 'for_add_row(\'fortable\')'; $f_add_row = $add_row->input(); ob_start(); require_once NOALYSS_INCLUDE . '/template/forecast-detail.php'; $r .= ob_get_contents(); ob_end_clean(); return $r; }
function blank($p_fiche_def) { // array = array of attribute object sorted on ad_id $f = new Fiche_Def($this->cn, $p_fiche_def); $f->get(); $array = $f->getAttribut(); $r = h2(_('Catégorie') . ' ' . $f->label, ""); $r .= '<table style="width:98%;margin:1%">'; foreach ($array as $attr) { $table = 0; $msg = ""; $bulle = ''; if ($attr->ad_id == ATTR_DEF_ACCOUNT) { $w = new IPoste("av_text" . $attr->ad_id); $w->set_attribute('ipopup', 'ipop_account'); $w->set_attribute('account', "av_text" . $attr->ad_id); $w->dbl_click_history(); // account created automatically $sql = "select account_auto({$p_fiche_def})"; $ret_sql = $this->cn->exec_sql($sql); $a = Database::fetch_array($ret_sql, 0); $label = new ISpan(); $label->name = "av_text" . $attr->ad_id . "_label"; if ($a['account_auto'] == 't') { $msg .= $label->input() . " <span style=\"color:red\">" . _("Rappel: Poste créé automatiquement à partir de ") . $f->class_base . " </span> "; } else { // if there is a class base in fiche_def_ref, this account will be the // the default one if (strlen(trim($f->class_base)) != 0) { $msg .= "<TD>" . $label->input() . " <span style=\"color:red\">" . _("Rappel: Poste par défaut sera ") . $f->class_base . " !</span> "; $w->value = $f->class_base; } } $r .= "<TR>" . td(_("Poste Comptable"), ' class="input_text" ') . td($w->input() . $msg) . "</TR>"; continue; } elseif ($attr->ad_id == ATTR_DEF_TVA) { $w = new ITva_Popup('popup_tva'); $w->table = 1; } else { switch ($attr->ad_type) { case 'text': $w = new IText(); $w->css_size = "100%"; break; case 'numeric': $w = new INum(); $w->prec = $attr->ad_extra == "" ? 2 : $attr->ad_extra; $w->size = $attr->ad_size; break; case 'date': $w = new IDate(); break; case 'zone': $w = new ITextArea(); $w->style = ' class="itextarea" style="margin:0px;width:100%"'; break; case 'poste': $w = new IPoste("av_text" . $attr->ad_id); $w->set_attribute('ipopup', 'ipop_account'); $w->set_attribute('account', "av_text" . $attr->ad_id); $w->table = 1; $bulle = HtmlInput::infobulle(14); break; case 'select': $w = new ISelect("av_text" . $attr->ad_id); $w->value = $this->cn->make_array($attr->ad_extra); $w->style = 'style="width:100%"'; break; case 'card': $w = new ICard("av_text" . $attr->ad_id); // filter on frd_id $w->extra = $attr->ad_extra; $w->extra2 = 0; $label = new ISpan(); $label->name = "av_text" . $attr->ad_id . "_label"; $w->set_attribute('ipopup', 'ipopcard'); $w->set_attribute('typecard', $attr->ad_extra); $w->set_attribute('inp', "av_text" . $attr->ad_id); $w->set_attribute('label', "av_text" . $attr->ad_id . "_label"); $msg = $w->search(); $msg .= $label->input(); break; } $w->table = 0; } $w->table = $table; $w->label = $attr->ad_text; $w->name = "av_text" . $attr->ad_id; if ($attr->ad_id == 21 || $attr->ad_id == 22 || $attr->ad_id == 20 || $attr->ad_id == 31) { $bulle = HtmlInput::infobulle(21); } $r .= "<TR>" . td(_($w->label) . " {$bulle}", ' class="input_text" ') . td($w->input() . " {$msg}") . " </TR>"; } $r .= '</table>'; return $r; }