function fill_from_action(&$p_array, $p_style) { global $g_user; $profile = $g_user->get_profile(); $cn = new Database(dossier::id()); $sql = "select ag_id,to_char(ag_remind_date,'DD')::integer as ag_timestamp_day,ag_title,ag_hour,\n coalesce(name,'interne') as str_name\n\t\t\t" . " from action_gestion " . " left join vw_fiche_name on (f_id=f_id_dest) " . " where " . " to_char(ag_remind_date,'MM')::integer=\$1 " . " and to_char(ag_remind_date,'YYYY')::integer=\$2 " . " and ag_dest in (select p_granted from user_sec_action_profile where p_id =\$3)\n\t\t\t\t and ag_state IN (2, 3)\n\t\t\t\t"; $array = $cn->get_array($sql, array($this->month, $this->year, $profile)); for ($i = 0; $i < count($array); $i++) { $ind = $array[$i]['ag_timestamp_day']; $this->action[$ind][] = $array[$i]['ag_id']; $this->title[$ind][] = $array[$i]['ag_title']; $this->hour[$ind][] = $array[$i]['ag_hour']; $this->str_name[$ind][] = $array[$i]['str_name']; } /* * Fill foreach day */ if ($p_style == "short") { foreach ($this->action as $day => $aAction) { if ($p_array[$day] == "") { $p_array[$day] = '<span class="input_text" onclick="display_task(\'tsk' . $day . '\');">' . " " . count($aAction) . " " . _("Tâches") . '</span>'; } $this->action_div[$day] = '<div id="tsk' . $day . '" class="inner_box" style="width:200;display:none">'; $this->action_div[$day] .= HtmlInput::title_box($day . "/" . $this->month . "/" . $this->year, "tsk" . $day, "hide"); $this->action_div[$day] .= "<ol>"; for ($i = 0; $i < count($aAction); $i++) { $this->action_div[$day] .= '<li>' . HtmlInput::detail_action($aAction[$i], $this->title[$day][$i]) . '</li>'; } $this->action_div[$day] .= '</ol></div>'; } } else { if ($p_style == "long") { foreach ($this->action as $day => $aAction) { $p_array[$day] .= "<ol>"; for ($i = 0; $i < count($aAction); $i++) { $p_array[$day] .= '<li>' . hb($this->str_name[$day][$i]) . '→' . HtmlInput::detail_action($aAction[$i], $this->hour[$day][$i] . " " . $this->title[$day][$i]) . '</li>'; } $p_array[$day] .= '</ol>'; } } } }
* - t for the table id * - amount is the amount to distributed * */ // Copyright (2014) Author Dany De Bontridder danydb@aevalys.eu if (!defined('ALLOWED')) { die('Appel direct ne sont pas permis'); } $amount = HtmlInput::default_value_get("amount", 0); $table_id = HtmlInput::default_value_get("t", ""); $ledger = HtmlInput::default_value_get('led', 0); if ($table_id == "" || isNumber($amount) == 0 || isNumber($ledger) == 0) { die('Invalid Parameter'); } require_once 'class_anc_key.php'; ob_start(); echo HtmlInput::title_box(_("Choix d'une clef"), 'div_anc_key_choice'); Anc_Key::display_choice($amount, $table_id, $ledger); echo HtmlInput::button_close('div_anc_key_choice'); $response = ob_get_clean(); $html = escape_xml($response); header('Content-type: text/xml; charset=UTF-8'); echo <<<EOF <?xml version="1.0" encoding="UTF-8"?> <data> <ctl></ctl> <code>{$html}</code> </data> EOF; ?>
* * You should have received a copy of the GNU General Public License * along with NOALYSS; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* $Revision$ */ // Copyright Author Dany De Bontridder danydb@aevalys.eu /** * @file * @brief show box for search * */ ?> <div id="histo_search_d" class="inner_box" style="width:60%;height:380px;display:none"> <?php echo HtmlInput::title_box(_("Recherche"), "histo_search_d", "hide"); ?> <form method="GET"> <?php echo HtmlInput::get_to_hidden(array("gDossier", "ac")); ?> <table> <tr> <td> <?php echo _("Code Stock"); ?> </td> <td> <?php echo $wcode_stock->input(); echo $wcode_stock->search(); ?>
<?php //This file is part of NOALYSS and is under GPL //see licence.txt ?> <?php echo HtmlInput::title_box("Modèle de document", "mod_doc", 'hide'); ?> <form method="post" enctype="multipart/form-data"> <table> <tr> <td><?php echo _("Nom du document"); ?> </td> <td> <?php $a = new IText('md_name'); $a->value = $doc->md_name; echo $a->input(); ?> </td> </tr> <tr> <td> <?php echo _("Catégorie de document"); ?>
</table> </div> <div id="add_todo_list" class="box" style="display:none"> <script charset="utf-8" type="text/javascript" language="javascript"> new Draggable($('add_todo_list'),{}); </script> <form method="post"> <?php $wDate = new IDate('p_date_todo'); $wDate->id = 'p_date_todo'; $wTitle = new IText('p_title'); $wDesc = new ITextArea('p_desc'); $wDesc->heigh = 5; $wDesc->width = 40; echo HtmlInput::title_box("Note", "add_todo_list", "hide"); echo _("Date") . " " . $wDate->input() . '<br>'; echo _("Titre") . " " . $wTitle->input() . '<br>'; echo _("Description") . "<br>" . $wDesc->input() . '<br>'; echo dossier::hidden(); echo HtmlInput::hidden('tl_id', 0); echo HtmlInput::submit('save_todo_list', _('Sauve'), 'onClick="Effect.Fold(\'add_todo_list\');return true;"'); echo HtmlInput::button('hide', _('Annuler'), 'onClick="Effect.Fold(\'add_todo_list\');return true;"'); ?> </form> </div> <script type="text/javascript" language="javascript" charset="utf-8"> function display_detail(div) { $(div).style.display="block"; // $(div).style.top=calcy('150')+'px';
* GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with PhpCompta; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ // Copyright (2014) Author Dany De Bontridder <*****@*****.**> if (!defined('ALLOWED')) { die('Appel direct ne sont pas permis'); } /** * @file * @brief * @param type $name Descriptionara */ echo HtmlInput::title_box("Poste comptable", "acc_update", "hide"); ?> <span id="acc_update_info" class="notice"></span> <form method="post" id="acc_update_frm_id" onsubmit="pcmn_save();return false;"> <table style="width:100%"> <?php $r = td(_('Poste comptable'), 'style="width:20em;width:15rem;text-align:right"') . td($val->input()); echo tr($r); $r = td(_('Description'), 'style="width:auto;text-align:right"') . td($lib->input()); echo tr($r); $r = td(_('Parent'), 'style="width:auto;text-align:right"') . td($parent->input()); echo tr($r); $r = td(_('Type'), 'style="width:auto;text-align:right"') . td($type->input()); echo tr($r); ?>
/** * @brief display a window with the content of a tag */ //This file is part of NOALYSS and is under GPL //see licence.txt if (!defined('ALLOWED')) { die('Appel direct ne sont pas permis'); } require_once NOALYSS_INCLUDE . '/class_tool_uos.php'; require_once NOALYSS_INCLUDE . '/class_tag.php'; ob_start(); $tag = new Tag($cn); $tag->data->t_id = $_GET['tag']; $tag->data->load(); echo HtmlInput::title_box(_("Détail du dossier ou tag"), "tag_div"); // save via POST and reload page if ($_GET['form'] == 'p') { ?> <form id="tag_detail_frm" method="POST" > <?php /* * save via javascript and don't reload page */ } else { ?> <form id="tag_detail_frm" method="POST" onsubmit="return save_tag();"> <?php } ?>
* You should have received a copy of the GNU General Public License * along with NOALYSS; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ // Copyright Author Dany De Bontridder danydb@aevalys.eu /** * @file * @brief show result card search * */ if (!defined('ALLOWED')) { die('Appel direct ne sont pas permis'); } $sql = "\n\tselect distinct vw.f_id,vw_name,vw_first_name,vw_description,fd_label,quick_code,tva_num,(select ad_value from fiche_Detail where f_id=pc.f_id and ad_id=5) as poste\n\tfrom vw_fiche_attr as vw\n\tjoin fiche_def as fd on (vw.fd_id=fd.fd_id)\n\tleft join fiche_detail as pc on (pc.f_id=vw.f_id)\n\twhere\n\tad_value ~* \$1\n\torder by 2\n"; $array = $cn->get_array($sql, array($_GET['card'])); echo HtmlInput::title_box(_("Résultat recherche"), "boxsearch_card_div"); $max = count($array) > MAX_CARD_SEARCH ? MAX_CARD_SEARCH : count($array); if (count($array) > MAX_CARD_SEARCH) { ?> <h2 class="notice"><?php printf(_("Résultat limité à %d , %d nombre de fiches trouvées"), MAX_CARD_SEARCH, count($array)); ?> </h2> <?php } echo _('Filtre'); ?> <?php echo HtmlInput::infobulle(26); echo HtmlInput::filter_table("tb_fiche", "0,1,2,3,4,5", 1);
?> </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 echo HtmlInput::hidden('p_id', $p_id); ?>
//----------------------------------------------------- if ($sub_action == 'rm_template') { require_once NOALYSS_INCLUDE . '/class_document_modele.php'; // Get all the document to remove foreach ($_POST as $name => $value) { list($id) = sscanf($name, "dm_remove_%d"); if ($id == null) { continue; } // a document has to be removed $doc = new Document_modele($cn); $doc->md_id = $id; $doc->Delete(); } } //---------------------------------------------------------------------- // Document modify a template //---------------------------------------------------------------------- if ($sub_action == 'mod_template') { require_once NOALYSS_INCLUDE . '/class_document_modele.php'; $doc = new Document_modele($cn, $_POST['id']); $doc->update($_POST); } //----------------------------------------------------- // Default action : Show the list //----------------------------------------------------- echo $doc->myList(); echo '<div id="add_modele" class="inner_box" style="display:none">'; echo HtmlInput::title_box("Ajout d'un modèle", "add_modele", "hide"); echo $doc->form(''); echo '</div>';
* You should have received a copy of the GNU General Public License * along with NOALYSS; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ // Copyright 2014 Author Dany De Bontridder danydb@aevalys.eu // require_once '.php'; if (!defined('ALLOWED')) { die('Appel direct ne sont pas permis'); } ob_start(); $ag_id = HtmlInput::default_value_get("ag_id", "0"); if ($ag_id == 0) { throw new Exception('ag_id is null'); } require_once 'class_acc_ledger.php'; $r = HtmlInput::title_box(_("Détail fiche"), 'search_card'); $r .= '<form id="search_card1_frm" method="GET" onsubmit="action_add_concerned_card(this);return false;">'; $q = new IText('query'); $q->value = isset($query) ? $query : ''; $r .= '<span style="margin-left:50px">'; $r .= _('Fiche contenant') . HtmlInput::infobulle(19); $r .= $q->input(); $r .= HtmlInput::submit('fs', _('Recherche'), "", "smallbutton"); $r .= '</span>'; $r .= dossier::hidden() . HtmlInput::hidden('op', 'add_concerned_card'); $r .= HtmlInput::request_to_hidden(array('ag_id')); $r .= '</form>'; $query = HtmlInput::default_value_get("query", ""); $sql_array['query'] = $query; $sql_array['typecard'] = 'all'; $fiche = new Fiche($cn);
<?php //This file is part of NOALYSS and is under GPL //see licence.txt $html = HtmlInput::title_box(_("Ajout d'une catégorie ") . $msg, $ctl); ?> <div class="content"> <form id="newcat" name="newcat" method="get" onsubmit="this.ipopup='<?php echo $ipopup; ?> ';save_card_category(this);return false;"> <?php echo HtmlInput::get_to_hidden(array('gDossier', 'cat')); ?> <TABLE BORDER="0" CELLSPACING="0"> <TR> <TD><?php echo _('Nom de la catégorie de fiche'); ?> </TD> <TD><?php echo $nom_mod->input(); ?> </TD> </TR> <TR> <TD> <?php echo _('Classe de base'); ?>
* * NOALYSS is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with NOALYSS; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ // Copyright Author Dany De Bontridder danydb@aevalys.eu /**\file * \brief this file respond to an ajax request to modify a type of document */ require_once NOALYSS_INCLUDE . '/class_document_type.php'; echo HtmlInput::title_box(_('Type de document'), 'change_doc_div'); $doc_type = new Document_type($cn, $dt_id); $doc_type->get(); ?> <form method="POST" id="cat_doc_f" onsubmit="cat_doc_change_record('cat_doc_f');"> <?php echo HtmlInput::request_to_hidden(array("ac", "gDossier", "dt_id")); ?> <table> <tr> <td> <?php echo _('Nom'); ?> </td> <td> <?php
$base = basename($_SERVER['SCRIPT_NAME']); $inside = false; $ledger = new Acc_Ledger($cn, 0); $ledger->type = 'ALL'; if (isset($_GET['amount_id'])) { put_global(array(array("key" => 'amount_min', 'value' => $_GET['amount_id']), array("key" => 'amount_max', 'value' => $_GET['amount_id']))); } $search_box = $ledger->search_form('ALL', 1, 'search_op'); if ($base == 'recherche.php' || $base == 'do.php') { echo '<div class="content" >'; echo '<form method="GET">'; } else { $div = 'search_op'; $action = ""; $callback = ""; echo HtmlInput::title_box(_('Recherche'), $div); echo '<form name="search_form_ajx" id="search_form_ajx" onsubmit="search_operation(this);return false">'; echo HtmlInput::get_to_hidden(array('ctlc', 'ledger', 'target')); $inside = true; } echo $search_box; echo HtmlInput::submit("viewsearch", _("Recherche")); echo HtmlInput::button_close('search_op'); echo '</form>'; if (isset($_GET['amount_min']) && isset($_GET['amount_max']) && ($_GET['amount_max'] != 0 || $_GET['amount_min'] != 0)) { $_GET['viewsearch'] = 1; put_global(array(array('key' => 'ledger_type', 'value' => 'ALL'))); } //----------------------------------------------------- // Display search result //-----------------------------------------------------
* You should have received a copy of the GNU General Public License * along with NOALYSS; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ // Copyright Author Dany De Bontridder danydb@aevalys.eu /** * @file * @brief show a depot * */ if (!defined('ALLOWED')) { die('Appel direct ne sont pas permis'); } require_once NOALYSS_INCLUDE . '/class_stock_sql.php'; $st = new Stock_Sql($_GET['r_id']); echo HtmlInput::title_box("Ajouter un dépôt", "change_stock_repo_div", "close"); ?> <form method="post"> <?php echo HtmlInput::hidden("r_id", $_GET['r_id']); ?> <table> <tr> <td> <?php echo _("Nom"); ?> </td> <td> <?php $name = new IText("r_name", $st->r_name);
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ // Copyright Author Dany De Bontridder danydb@aevalys.eu /**\file * \brief this file is always included and then executed * it permits to change the user preferences */ if (!defined('ALLOWED')) { die('Appel direct ne sont pas permis'); } require_once NOALYSS_INCLUDE . '/class_user.php'; require_once NOALYSS_INCLUDE . '/class_iselect.php'; require_once NOALYSS_INCLUDE . '/class_iperiod.php'; require_once NOALYSS_INCLUDE . '/class_acc_report.php'; require_once NOALYSS_INCLUDE . '/class_periode.php'; echo HtmlInput::title_box(_('Préférence'), 'preference_div'); echo '<DIV class="content">'; echo '<p class="notice">'; echo _("Si vous validez, la page sera rechargée et vous pourriez perdre ce que vous faisiez"); echo '</p>'; //---------------------------------------------------------------------- // global $g_user; $g_user = new User($cn); $inside_dossier = false; if (isset($_REQUEST['gDossier']) && $_REQUEST['gDossier'] != 0) { $g_user->load_global_pref(); $msg = ""; $cn = new Database($_REQUEST['gDossier']); $g_user->cn = $cn; $inside_dossier = true;
<?php //This file is part of NOALYSS and is under GPL //see licence.txt echo HtmlInput::title_box('Tag', $p_prefix . 'tag_div'); $max = $this->cn->count($ret); if ($max == 0) { echo h2(_("Aucune étiquette disponible"), ' class="notice"'); return; } ?> Filtrer = <?php echo HtmlInput::filter_table($p_prefix . 'tag_tb_id', '0,1', 1); ?> <table class="result" id="<?php echo $p_prefix; ?> tag_tb_id"> <tr> <th> <?php echo _("Tag"); ?> </th> <th> <?php echo _("Description"); ?> </th> </tr> <?php
if ($p_readonly == false) { echo HtmlInput::submit('save', _('Sauver')); } if ($p_readonly == false) { echo HtmlInput::hidden('row', $nb); } if ($p_readonly == false) { echo HtmlInput::button("reprise_show", _('Reprise inventaire'), " onclick=\"\$('reprise_inventaire_div').show();\""); } ?> </form> </div> <div class="inner_box" id="reprise_inventaire_div" style="display:none"> <form method="get"> <?php echo HtmlInput::title_box(_('Reprise inventaire'), 'reprise_inventaire_div', 'hide'); ?> <?php echo HtmlInput::request_to_hidden(array('gDossier', 'ac')); ?> <table> <tr> <td> <?php echo _('Dépot'); ?> </td> <td> <?php echo $idepo->input(); ?>
/** * @brief Display a box with the contains * @param type $p_array Data to display * @param type $p_title Title of the box * @param type $p_div id of the box */ function display_dashboard_operation($p_array, $p_title, $p_div) { ?> <div id="<?php echo $p_div; ?> " class="inner_box" style="display:none;position:fixed;top:250px;left:12%;width: 75%;min-height:50%;overflow:auto;"> <?php echo HtmlInput::title_box($p_title, $p_div, "hide"); ?> <?php if (count($p_array) > 0) { ?> <table class="result"> <tr> <th><?php echo _('Date'); ?> </th> <th><?php echo _('Code Interne'); ?> </th> <th><?php echo _('Pièce'); ?> </th> <th><?php echo _('Description'); ?> </th> <th> <?php echo _('Montant'); ?> </th> </tr> <?php for ($i = 0; $i < count($p_array); $i++) { ?> <tr class="<?php echo $i % 2 == 0 ? 'odd' : 'even'; ?> "> <td> <?php echo smaller_date(format_date($p_array[$i]['jr_date'])); ?> </td> <td> <?php echo HtmlInput::detail_op($p_array[$i]['jr_id'], $p_array[$i]['jr_internal']); ?> </td> <td> <?php echo h($p_array[$i]['jr_pj_number']); ?> </td> <td> <?php echo h($p_array[$i]['jr_comment']); ?> </td> <td> <?php echo nbm($p_array[$i]['jr_montant']); ?> </td> </tr> <?php } ?> </table> <?php } else { ?> <h2 class="notice"><?php echo _('Aucune donnée'); ?> </h2> <?php } ?> </div> <?php }
for ($i = 0; $i < $count; $i++) { $mod = Database::fetch_array($Res, $i); $class = $i % 2 == 0 ? "odd" : "even"; $str_name = domaine . 'mod' . $mod['mod_id']; printf('<TR class="' . $class . '" style="vertical-align:top">' . '<TD>%d </td><td><b> %s</b> </TD>' . '<TD><I> %s </I></TD>' . '<td>' . $str_name . '</td>' . '<td> ' . HtmlInput::anchor(_('Effacer'), '?action=modele_mgt&sa=del&m=' . $mod['mod_id'], " onclick = \"modele_drop('{$mod['mod_id']}') \"") . '</td>' . '</td>' . '<td>' . HtmlInput::anchor(_('Modifie'), '?action=modele_mgt&sa=mod&m=' . $mod['mod_id'], " onclick = \"modele_modify('{$mod['mod_id']}') \"") . '</td>' . '</td>' . '<td>' . HtmlInput::anchor(_('Backup'), 'backup.php?action=backup&sa=b&t=m&d=' . $mod['mod_id']) . '</td>' . '</TR>', $mod['mod_id'], $mod['mod_name'], $mod['mod_desc']); } // for echo "</table>"; } // if count = 0 echo "<p class=\"notice\">" . _("Si vous voulez récupérer toutes les adaptations d'un dossier " . " dans un autre dossier, vous pouvez en faire un modèle." . " Seules les fiches, la structure des journaux, les périodes,... seront reprises " . "et aucune donnée du dossier sur lequel le dossier est basé. Les données contenues dans les extensions ne sont pas effacées") . "</p>"; } ?> <div id="folder_add_id" class="inner_box" style="display:none;top:50px"> <?php echo HtmlInput::title_box(_("Ajout d'un modèle"), 'folder_add_id', "hide"); //--------------------------------------------------------------------------- // Add a template //--------------------------------------------------------------------------- // Show All available folder $Res = $cn->exec_sql("select dos_id, dos_name,dos_description from ac_dossier\n order by dos_name"); $count = Database::num_row($Res); $available = ""; if ($count != 0) { $available = '<SELECT NAME="FMOD_DBID">'; for ($i = 0; $i < $count; $i++) { $db = Database::fetch_array($Res, $i); $available .= '<OPTION VALUE="' . $db['dos_id'] . '">' . $db['dos_name'] . ':' . $db['dos_description']; } //for i $available .= '</SELECT>';
echo td(HtmlInput::anchor(_('Backup'), 'backup.php?action=backup&sa=b&t=d&d=' . $Dossier['dos_id'])); } else { echo td(HtmlInput::anchor(_('Effacer'), '?action=dossier_mgt&sa=del&d=' . $Dossier['dos_id'], " onclick=\"folder_drop('" . $Dossier['dos_id'] . "')\"")); } $compteur++; } echo "</TR>"; } echo '</table>'; } ?> <div id="folder_add_id" class="inner_box" style="display:none;top:50px"> <?php //--------------------------------------------------------------------------- // Add a new folder echo HtmlInput::title_box(_("Ajout d'un dossier"), 'folder_add_id', "hide"); $repo = new Database(); // Load the available Templates $Res = $repo->exec_sql("select mod_id,mod_name,mod_desc from\n modeledef order by mod_name"); $count = Database::num_row($Res); if ($count == 0) { echo _("pas de modèle disponible"); } else { $template = '<SELECT NAME=FMOD_ID>'; for ($i = 0; $i < $count; $i++) { $mod = Database::fetch_array($Res, $i); $template .= '<OPTION VALUE="' . $mod['mod_id'] . '"> ' . h($mod['mod_name'] . " - " . mb_substr($mod['mod_desc'], 0, 30)); } // for $template .= '<option value="0" >' . _('Aucun modèle (dossier vide, devant être restauré manuellement)'); $template .= "</SELECT>";
//This file is part of NOALYSS and is under GPL //see licence.txt ?> <?php echo HtmlInput::button("other_bt", _("Autres actions"), 'onclick="$(\'other_div\').style.display=\'block\';action_show_checkbox();"', "smallbutton"); $radio = new IRadio("othact"); /* * Hidden values for a previous search */ echo HtmlInput::request_to_hidden(array("closed_action", "remind_date_end", "remind_date", "sag_ref", "remind_date", "only_internal", "state", "gDossier", "qcode", "start_date", "end_date", "ag_id", "ag_dest_query", "tdoc", "action_query", "date_start", "date_end", "hsstate", "searchtag")); ?> <div id="other_div" class="inner_box" style="width:40%;display: none"> <?php echo HtmlInput::title_box(_('Actions sur plusieurs documents'), 'other_div', 'hide', 'action_hide_checkbox();'); ?> <?php echo _("Sélectionner les documents et l' action :"); ?> <ul style='list-style-type: none;padding-left:30px;margin: 0px' > <li > <?php $radio->value = "IMP"; $radio->selected = true; echo $radio->input(); ?> <?php echo _("Impression"); ?> </li>
$js = ' onclick="stock_repo_change(\'' . dossier::id() . '\',\'' . $array[$i]['r_id'] . '\')"'; echo HtmlInput::button("mod", _("Modifier"), $js); ?> </td> </tr> <?php } ?> </table> <?php echo HtmlInput::button("show_add_depot_d", "Ajout d'un dépot", "onclick=\"\$('add_depot_d').show();\""); ?> <div id="add_depot_d" class="inner_box" style="display:none"> <?php echo HtmlInput::title_box("Ajouter un dépôt", "add_depot_d", "hide"); ?> <form method="post"> <table> <tr> <td> Nom </td> <td> <?php $name = new IText("r_name", ""); echo $name->input(); ?> </td> </tr> <tr>
* along with NOALYSS; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ // Copyright Author Dany De Bontridder danydb@aevalys.eu /** * @file * @brief show the detail of an action * */ if (!defined('ALLOWED')) { die('Appel direct ne sont pas permis'); } ob_start(); require_once NOALYSS_INCLUDE . '/class_follow_up.php'; require_once NOALYSS_INCLUDE . '/class_default_menu.php'; echo HtmlInput::title_box(_("Détail action"), $div); $act = new Follow_Up($cn); $act->ag_id = $ag_id; $act->get(); $code = 'nok'; if ($g_user->can_write_action($ag_id) == true || $g_user->can_read_action($ag_id) == true || $act->ag_dest == -1) { $menu = new Default_Menu(); echo $act->Display('READ', false, "ajax", ""); //$action=HtmlInput::array_to_string(array("gDossier","ag_id"), $_GET)."&ac=FOLLOW&sa=detail"; $action = "do.php?" . http_build_query(array("gDossier" => Dossier::id(), "ag_id" => $ag_id, "ac" => $menu->get('code_follow'), "sa" => "detail")); $code = 'ok'; if ($_GET['mod'] == 1) { $forbidden = _("Accès interdit : vous n'avez pas accès à cette information, contactez votre responsable"); ?> <a href="<?php echo $action;
function form_get($p_url) { $r = HtmlInput::button_action(_("Modèle d'opérations"), ' $(\'modele_op_div\').style.display=\'block\';$(\'lk_modele_op_tab\').focus();'); $r .= '<div id="modele_op_div" class="noprint">'; $r .= HtmlInput::title_box(_("Modèle d'opérations"), 'modele_op_div', 'hide'); $hid = new IHidden(); $r .= $hid->input("action", "use_opd"); $r .= $hid->input("jrn_type", $this->get("ledger_type")); $r .= $this->show_button($p_url); $r .= '</div>'; return $r; }
require_once NOALYSS_INCLUDE . '/class_dossier.php'; require_once NOALYSS_INCLUDE . '/class_pre_operation.php'; // Check if the needed field does exist extract($_GET); foreach (array('l', 't', 'd', 'gDossier') as $a) { if (!isset(${$a})) { echo "error {$a} is not set "; exit; } } $cn = new Database(dossier::id()); $op = new Pre_operation_detail($cn); $op->set('ledger', $l); $op->set('ledger_type', $t); $op->set('direct', $d); $url = http_build_query(array('action' => 'use_opd', 'p_jrn_predef' => $l, 'ac' => $_GET['ac'], 'gDossier' => dossier::id())); $html = ""; $html .= HtmlInput::title_box(_("Modèle d'opérations"), 'modele_op_div', 'hide'); $html .= $op->show_button('do.php?' . $url); $html = escape_xml($html); header('Content-type: text/xml; charset=UTF-8'); echo <<<EOF <?xml version="1.0" encoding="UTF-8"?> <data> <code></code> <value>{$html}</value> </data> EOF; ?>
$_REQUEST['use_id'] = $new_user->id; require_once NOALYSS_INCLUDE . '/user_detail.inc.php'; return; } } //SET login // View user detail if (isset($_REQUEST['det'])) { require_once NOALYSS_INCLUDE . '/user_detail.inc.php'; return; } ?> <div id="create_user" style="display:none;width:30%;margin-right: 20%" class="inner_box"> <?php echo HtmlInput::title_box(_('Ajout Utilisateur'), "create_user", "hide"); ?> <form action="admin_repo.php?action=user_mgt" method="POST" onsubmit="return check_form()"> <div style="text-align: center"> <TABLE class="result" > <TR><TD style="text-align: right"> <?php echo _('login'); ?> </TD><TD><INPUT id="input_login" class="input_text" TYPE="TEXT" NAME="LOGIN"></TD></tr> <TR><TD style="text-align: right"> <?php echo _('Prénom'); ?> </TD><TD><INPUT class="input_text" TYPE="TEXT" NAME="FNAME"></TD></tr> <TR><TD style="text-align: right"> <?php echo _('Nom'); ?>
$dom = new DOMDocument('1.0', 'UTF-8'); $tl_id = $dom->createElement('content', _("Cette note n'est pas à vous")); $dom->appendChild($tl_id); echo $dom->saveXML(); return; } if ($g_user->check_action(SHARENOTE) == 0) { header('Content-type: text/xml; charset=UTF-8'); $dom = new DOMDocument('1.0', 'UTF-8'); $tl_id = $dom->createElement('content', _("Accès interdit")); $dom->appendChild($tl_id); echo $dom->saveXML(); return; } ob_start(); echo HtmlInput::title_box(_('Liste utilisateurs'), "shared_" . $id); $todo->display_user(); echo '<p style="text-align:center">'; echo HtmlInput::submit('close' . $id, 'Ferme', " onclick=\"\$('shared_{$id}').remove();\""); echo '</p>'; $result = ob_get_clean(); // // output the XML header('Content-type: text/xml; charset=UTF-8'); $dom = new DOMDocument('1.0', 'UTF-8'); $tl_id = $dom->createElement('content', escape_xml($result)); $dom->appendChild($tl_id); echo $dom->saveXML(); return; } ////////////////////////////////////////////////////////////////////////////////
$per = new Periode($cn, $obj->det->jr_tech_per); if ($per->is_closed() == 0 && $owner->MY_STRICT == 'N' && $g_user->check_action(RMOPER) == 1) { $remove = new IButton('Effacer'); $remove->label = _('Effacer'); $remove->javascript = "return confirm_box(null,'Vous confirmez effacement ?',function () {removeOperation('" . $obj->det->jr_id . "'," . dossier::id() . ",'" . $div . "')})"; echo $remove->input(); } $reverse = new IButton('bext' . $div); $reverse->label = _('Extourner'); $reverse->javascript = "g('ext" . $div . "').style.display='block'"; echo $reverse->input(); echo '</p>'; echo '</form>'; echo '<div id="ext' . $div . '" class="inner_box" style="position:relative;top:-150px;display:none">'; $date = new IDate('ext_date'); $r = "<form id=\"form_" . $div . "\" onsubmit=\"return false;\">"; $r .= HtmlInput::hidden('jr_id', $_REQUEST['jr_id']) . HtmlInput::hidden('div', $div) . dossier::hidden() . HtmlInput::hidden('act', 'reverseop'); $r .= HtmlInput::title_box(_('Extourner'), 'ext' . $div, 'hide'); $r .= "<p>"; $r .= _("Extourner une opération vous permet de l'annuler par son écriture inverse"); $r .= "</p>"; $r .= _("entrez une date") . " :" . $date->input(); $r .= '<p style="text-align:center">'; $r .= HtmlInput::submit('x', 'accepter', 'onclick="confirm_box($(\'form_' . $div . '\'),\'Vous confirmez ? \',function () {$(\'form_' . $div . '\').divname=\'' . $div . '\';reverseOperation($(\'form_' . $div . '\'))}); return false"'); $r .= "</p>"; $r .= '</form>'; echo $r; echo '</div>'; } else { echo '</p>'; }
/** * return the html code to create an hidden div and a button * to show this DIV. This contains all the available ledgers * for the user in READ or RW *@param $selected is an array of checkbox *@param $div div suffix *@note the choosen ledger are stored in the array r_jrn (_GET) */ static function select_ledger($p_type, $p_selected, $div = '') { global $g_user; $r = ''; /* security : filter ledger on user */ $p_array = $g_user->get_ledger($p_type, 3); ob_start(); /* create a hidden div for the ledger */ echo '<div id="div_jrn' . $div . '" >'; echo HtmlInput::title_box(_("Journaux"), $div . "jrn_search"); echo '<div style="padding:5px">'; echo '<form method="GET" id="' . $div . 'search_frm" onsubmit="return hide_ledger_choice(\'' . $div . 'search_frm\')">'; echo HtmlInput::hidden('nb_jrn', count($p_array)); echo _('Filtre ') . HtmlInput::filter_table($div . 'tb_jrn', '0,1,2', 2); echo '<table class="result" id="' . $div . 'tb_jrn">'; echo '<tr>'; echo th(_('Nom')); echo th(_('Description')); echo th(_('Type')); echo '</tr>'; echo '<tr>'; echo '<td>'; echo HtmlInput::button('sel_' . $div, _('Inverser la sélection'), ' onclick = "toggle_checkbox(\'' . "{$div}search_frm" . '\')"'); echo '</td>'; echo '</tr>'; for ($e = 0; $e < count($p_array); $e++) { $row = $p_array[$e]; $r = new ICheckBox($div . 'r_jrn' . $e, $row['jrn_def_id']); $idx = $row['jrn_def_id']; if ($p_selected != null && in_array($row['jrn_def_id'], $p_selected)) { $r->selected = true; } $class = $e % 2 == 0 ? ' class="even" ' : ' class="odd" '; echo '<tr ' . $class . '>'; echo '<td style="white-space: nowrap">' . $r->input() . $row['jrn_def_name'] . '</td>'; echo '<td >' . $row['jrn_def_description'] . '</td>'; echo '<td >' . $row['jrn_def_type'] . '</td>'; echo '</tr>'; } echo '</table>'; echo HtmlInput::hidden('div', $div); echo HtmlInput::submit('save', _('Valider')); echo HtmlInput::button_close($div . "jrn_search"); echo '</form>'; echo '</div>'; echo '</div>'; $ret = ob_get_contents(); ob_end_clean(); return $ret; }