function header_txt($p_cn) { $own = new own($p_cn); $soc = $own->MY_NAME; $date = date('d / m / Y H:i '); $dossier = utf8_decode(" Dossier : " . dossier::name()); return $dossier . " " . $soc . " " . $date; }
public function input($p_name = null, $p_value = null) { $this->name = $p_name == null ? $this->name : $p_name; $this->value = $p_value == null ? $this->value : $p_value; if ($this->readOnly == true) { return $this->display(); } $this->id = $this->id == "" ? $this->name : $this->id; $r = sprintf("\n <INPUT class=\"smallbutton\" TYPE=\"button\" onClick=\"search_action(" . dossier::id() . ",'%s')\" value=\"?\">\n <INPUT TYPE=\"text\" style=\"color:black;background:lightyellow;border:solid 1px grey;\" NAME=\"%s\" ID=\"%s\" VALUE=\"%s\" SIZE=\"8\" readonly>\n\t\t\t\t <INPUT class=\"smallbutton\" TYPE=\"button\" onClick=\"\$('%s').value=''\" value=\"X\">\n\n ", $this->id, $this->name, $this->id, $this->value, $this->id); return $r; }
/** * Display the content of a profile menu for printing * @param type $resource * @param type $p_id */ function sub_menu($resource, $p_id) { if (Database::num_row($resource) != 0) { //// // If there are submenus $gDossier = dossier::id(); echo '<td>'; for ($e = 0; $e < Database::num_row($resource); $e++) { $menu = Database::fetch_array($resource, $e); $me_code = $menu['me_code']; $me_code_dep = $menu['me_code_dep']; $mp_type = $menu['p_type_display']; $me_menu = $menu['me_menu']; $me_desc = $menu['me_description']; $me_def = $menu['pm_default'] == '1' ? '<span class="notice" style="display:inline">Défaut</span>' : ''; ?> <li id="sub<?php echo $menu['pm_id']; ?> "> <?php echo $me_menu; ?> <?php echo $me_desc; ?> <?php echo $me_def; ?> <?php $ret2 = $this->cn->exec_sql("\n SELECT pm_id,\n pm.me_code,\n me_code_dep,\n p_id,\n p_order,\n p_type_display,\n pm_default,\n pm_desc,\n me_menu,\n me_description\n FROM profile_menu as pm\n join profile_menu_type on (p_type_display=pm_type)\n join menu_ref as mr on (mr.me_code=pm.me_code)\n where\n p_id=\$1 and me_code_dep=\$2\n order by p_order asc\n ", array($p_id, $me_code)); ?> <span> <?php echo HtmlInput::anchor(SMALLX, "", sprintf(" onclick = \"remove_sub_menu(%d,%d)\"", Dossier::id(), $menu['pm_id']), 'class="tinybutton"'); ?> </span> <?php echo "</li>"; } //end loop e echo '</ul>'; } // end if }
/*! \file * \brief Send a report in PDF */ if (!defined('ALLOWED')) { die('Appel direct ne sont pas permis'); } include_once "class_acc_report.php"; include_once "ac_common.php"; require_once NOALYSS_INCLUDE . '/class_database.php'; include_once "class_impress.php"; require_once NOALYSS_INCLUDE . '/class_user.php'; require_once NOALYSS_INCLUDE . '/header_print.php'; require_once NOALYSS_INCLUDE . '/class_dossier.php'; require_once NOALYSS_INCLUDE . '/class_acc_report.php'; require_once NOALYSS_INCLUDE . '/class_pdf.php'; $gDossier = dossier::id(); $cn = new Database($gDossier); extract($_GET); $ret = ""; $Form = new Acc_Report($cn, $form_id); $Libelle = sprintf("%s ", $Form->get_name()); $pdf = new PDF($cn); $pdf->setDossierInfo($Libelle); $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->SetAuthor('NOALYSS'); $pdf->setTitle("Rapport " . $Libelle, true); // Step ?? //-- $step = HtmlInput::default_value_get("p_step", 0); if ($step == 0) {
$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>'; }
static function test_me() { $cn = new Database(dossier::id()); $a = new Acc_Report($cn); print_r($a->get_list()); $array = array("text0" => "test1", "form0" => "7%", "text1" => "test2", "form1" => "6%", "fr_id" => 110, "form_nom" => "Tableau"); $a->from_array($array); print_r($a); echo '<form method="post">'; echo $a->form(10); echo HtmlInput::submit('update', 'Enregistre'); /* Add a line should be a javascript see comptanalytic */ // $r.= '<INPUT TYPE="submit" value="Ajoute une ligne" name="add_line">'; echo HtmlInput::submit('del_form', 'Efface ce rapport'); echo HtmlInput::hidden('test_select', $_REQUEST['test_select']); echo "</FORM>"; if (isset($_POST['update'])) { $b = new Acc_Report($cn); $b->from_array($_POST); echo '<hr>'; print_r($b); } }
$last--; } } echo $last; ?> </td> </tr> <tr> <td> <?php echo _("Redémarrer la séquence (laisser à 0 pour ne pas changer)"); ?> </td> <td> <?php $pj = new INum('seq'); $pj->value = 0; echo $pj->input(); ?> </td> </tr> </table> <?php echo HtmlInput::hidden('p_action', 'document'); echo dossier::hidden(); echo HtmlInput::hidden('sa', 'mod_template'); echo HtmlInput::hidden('id', $doc->md_id); echo HtmlInput::submit("mod", _('Sauver')); ?> </form>
static function test_me() { $cn = new Database(dossier::id()); }
echo HtmlInput::anchor_close('mod_predf_op'); echo h2(_('Modification du nom'), ' class="title"'); echo ' <form method="POST" onsubmit="save_predf_op(this);return false;">'; $name = new IText('opd_name'); $name->value = $op->od_name; $name->size = 60; echo "Nom =" . $name->input(); $opd_description = new ITextarea('od_description'); $opd_description->style = ' class="itextarea" style="width:30em;height:4em;vertical-align:top"'; $opd_description->value = $op->od_description; echo '<p>'; echo _("Description (max 50 car.)"); echo $opd_description->input(); echo '</p>'; echo dossier::hidden() . HtmlInput::hidden('od_id', $_GET['id']); echo "<hr>"; ////////////////////////////////////////////////////////////////////////////// // Detail operation ////////////////////////////////////////////////////////////////////////////// echo $op->display(); echo HtmlInput::submit('save', _('Sauve')); echo HtmlInput::button('close', _('Annuler'), 'onclick="removeDiv(\'mod_predf_op\')"'); echo '</form>'; $html1 = ob_get_contents(); ob_end_clean(); $html = escape_xml($html1); if (headers_sent()) { echo $html1; } else { header('Content-type: text/xml; charset=UTF-8');
die('Forbidden'); } /*!\file * \brief Management of the folder * */ require_once NOALYSS_INCLUDE . '/class_itext.php'; require_once NOALYSS_INCLUDE . '/class_icheckbox.php'; require_once NOALYSS_INCLUDE . '/class_itextarea.php'; require_once NOALYSS_INCLUDE . '/class_html_input.php'; $sa = isset($_REQUEST['sa']) ? $_REQUEST['sa'] : 'list'; //--------------------------------------------------------------------------- // Update $dossier_id = HtmlInput::default_value_request('d', -1); if (isset($_POST['upd']) && isNumber($dossier_id) == 1 && $dossier_id != -1) { $dos = new dossier($dossier_id); $name = HtmlInput::default_value_post('name', "--vide--"); $desc = HtmlInput::default_value_post('desc', "--vide--"); $dos->set_parameter('name', $name); $dos->set_parameter('desc', $desc); $dos->save(); } echo '<div class="content" style="width:80%;margin-left:10%">'; /* * check and add an new folder */ if (isset($_POST["DATABASE"])) { $repo = new Database(); $dos = HtmlInput::default_value_post('DATABASE', ""); $dos = sql_string($dos); if (strlen($dos) == 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; }
function menu_acc_plan($p_start = 1) { $base = "?ac=" . $_REQUEST['ac']; $str_dossier = "&" . dossier::get(); for ($i = 0; $i < 10; $i++) { $class[$i] = "tabs"; } $class[$p_start] = "tabs_selected"; $idx = 0; ?> <ul class="tabs"> <li class="<?php echo $class[$idx]; $idx++; ?> "><A HREF="<?php echo $base . '&p_start=0' . $str_dossier; ?> ">0 <?php echo _(' Hors Bilan'); ?> </A></li> <li class="<?php echo $class[$idx]; $idx++; ?> "><A HREF="<?php echo $base . '&p_start=1' . $str_dossier; ?> ">1 <?php echo _(' Immobilisé'); ?> </A></li> <li class="<?php echo $class[$idx]; $idx++; ?> "><A HREF="<?php echo $base . '&p_start=2' . $str_dossier; ?> ">2 <?php echo _('Actif a un an au plus'); ?> </A></li> <li class="<?php echo $class[$idx]; $idx++; ?> "><A HREF="<?php echo $base . '&p_start=3' . $str_dossier; ?> ">3 <?php echo _('Stock et commande'); ?> </A></li> <li class="<?php echo $class[$idx]; $idx++; ?> "><A HREF="<?php echo $base . '&p_start=4' . $str_dossier; ?> ">4 <?php echo _('Compte tiers'); ?> </A></li> <li class="<?php echo $class[$idx]; $idx++; ?> "><A HREF="<?php echo $base . '&p_start=5' . $str_dossier; ?> ">5 <?php echo _('Financier'); ?> </A></li> <li class="<?php echo $class[$idx]; $idx++; ?> "><A HREF="<?php echo $base . '&p_start=6' . $str_dossier; ?> ">6 <?php echo _('Charges'); ?> </A></li> <li class="<?php echo $class[$idx]; $idx++; ?> "><A HREF="<?php echo $base . '&p_start=7' . $str_dossier; ?> ">7 <?php echo _('Produits'); ?> </A></li> <li class="<?php echo $class[$idx]; $idx++; ?> "><A HREF="<?php echo $base . '&p_start=8' . $str_dossier; ?> ">8 <?php echo _('Hors Comptabilité'); ?> </A></li> <li class="<?php echo $class[$idx]; $idx++; ?> "><A HREF="<?php echo $base . '&p_start=9' . $str_dossier; ?> ">9 <?php echo _('Hors Comptabilité'); ?> </A></li> </ul> <?php }
/** * show the module * @global $g_user * @param $module the $_REQUEST['ac'] exploded into an array * @param $idx the index of the array : the AD code is splitted into an array thanks the slash */ function show_menu($module) { if ($module == 0) { return; } static $level = 0; global $g_user; $cn = Dossier::connect(); /** * Show the submenus */ $amenu = $cn->get_array("\n select \n pm_id,\n me_code,\n pm_id_dep,\n me_file,\n me_javascript,\n me_url,\n me_menu,\n me_description,\n me_description_etendue\n from profile_menu \n join menu_ref using (me_code) \n where pm_id_dep=\$1 and p_id=\$2\n\t order by p_order", array($module, $g_user->get_profile())); // There are submenuS, so show them if (!empty($amenu) && count($amenu) > 1) { $a_style_menu = array('topmenu', 'menu2', 'menu3'); if ($level > count($a_style_menu)) { $style_menu = 'menu3'; } else { $style_menu = $a_style_menu[$level]; } require 'template/menu.php'; } elseif (count($amenu) == 1) { if (trim($amenu[0]['me_url']) != "" || trim($amenu[0]['me_file']) != "" || trim($amenu[0]['me_javascript']) != "") { echo '<div class="topmenu">'; echo h2info(_($amenu[0]['me_menu'])); echo '</div>'; $module = $amenu[0]['pm_id']; } else { $url = $_REQUEST['ac'] . '/' . $amenu[0]['me_code']; echo '<a href="do.php?gDossier=' . Dossier::id() . '&ac=' . $url . '">'; echo _($amenu[0]['me_menu']); echo '</a>'; $level++; return; } } // There is no submenu or only one if (empty($amenu) || count($amenu) == 1) { $file = $cn->get_array("select me_file,me_parameter,me_javascript,me_type\n\t\tfrom menu_ref\n\t\tjoin profile_menu using (me_code)\n\t\tjoin profile_user using (p_id)\n\t\twhere\n\t\tpm_id=\$1 and\n\t\tuser_name=\$2 and\n\t\t(me_file is not null or trim(me_file) <>'' or\n\t\tme_javascript is not null or trim (me_javascript) <> '')", array($module, $g_user->login)); if (count($file) == 0) { return; } if ($file[0]['me_file'] != "") { if ($file[0]['me_parameter'] !== "") { // if there are paramter put them in superglobal $array = compute_variable($file[0]['me_parameter']); put_global($array); } if (DEBUG) { echo $file[0]['me_file'], " param : ", $file[0]['me_parameter']; } /* * Log the file we input to put in the folder test-noalyss for replaying it */ if (LOGINPUT) { $file_loginput = fopen($_ENV['TMP'] . '/scenario-' . $_SERVER['REQUEST_TIME'] . '.php', 'a+'); fwrite($file_loginput, "include '" . $file[0]['me_file'] . "';"); fwrite($file_loginput, "\n"); fclose($file_loginput); } // if file is not a plugin, include the file, otherwise // include the plugin launcher if ($file[0]['me_type'] != 'PL') { require_once $file[0]['me_file']; } else { require 'extension_get.inc.php'; } exit; } if ($file[0]['me_javascript'] != '') { $js = str_replace('<DOSSIER>', dossier::id(), $file[0]['me_javascript']); echo create_script($js); } } $level++; }
static function test_me() { $cn = new Database(dossier::id()); $a = new Acc_Tva($cn); echo $a->get_info(); $a->set_parameter("id", 1); $a->load(); $a->set_parameter("id", 0); $a->set_parameter("rate", "0.2222"); $a->set_parameter("label", "test"); $a->save(); $a->load(); print_r($a); $a->set_parameter("comment", "un cht'it test"); $a->save(); $a->load(); print_r($a); $a->delete(); }
function input_new() { $single = new Tool_Uos("dup"); echo '<form method="post" style="display:inline">'; echo $single->hidden(); echo HtmlInput::hidden("p_action", "fiche"); echo dossier::hidden(); echo $this->input(); // CreateCategory($cn,$search); echo HtmlInput::submit("add_modele", _("Sauve")); echo '</FORM>'; }
static function test_me() { if (isset($_GET['result'])) { ob_start(); $cn = new Database(dossier::id()); $a = new Acc_Bilan($cn); $a->get_request_get(); $a->load(); $form = $a->file_open_form(); $a->compute_formula($form); fclose($form); // open the form $templ = $a->file_open_template(); $r = $a->generate_odt($templ); fclose($templ); ob_end_clean(); $a->send($r); } else { $cn = new Database(dossier::id()); $a = new Acc_Bilan($cn); $a->get_request_get(); echo '<form method="get">'; echo $a->display_form(); echo HtmlInput::hidden('test_select', $_GET['test_select']) . dossier::hidden(); echo HtmlInput::submit('result', 'Sauve'); echo '</form>'; } }
echo $anc->form_cat(); echo HtmlInput::submit('mod_cat_save', _('Sauver')); echo '</form>'; echo '</div>'; } } /* * ******************************************************************** * Display menu * * * ******************************************************************** */ // display button add and list of forecast to display if ($sa == 'list') { $aForecast = Forecast::load_all($cn); $menu = array(); $get_dossier = dossier::get(); echo '<div class="content">'; echo _('Filtre') . " " . HtmlInput::filter_table("forecast_table_id", '0', 1); echo '<TABLE id="forecast_table_id" class="vert_mtitle">'; $href = "?ac=" . $_REQUEST['ac'] . "&sa=new&" . $get_dossier; echo '<TR><TD class="first"><A HREF="' . $href . '">' . _("Ajout d'une prévision") . '</A></TD></TR>'; $def = isset($_REQUEST['f_id']) ? $_REQUEST['f_id'] : -1; for ($i = 0; $i < count($aForecast); $i++) { $href = "?ac=" . $_REQUEST['ac'] . "&sa=vw&" . $get_dossier . '&f_id=' . $aForecast[$i]['f_id']; $name = h($aForecast[$i]['f_name']); $menu[] = array($href, $name, $name, $aForecast[$i]['f_id']); echo '<TR><TD><A HREF="' . $href . '">' . h($name) . '</A></TD></TR>'; } echo "</TABLE>"; echo '</div>'; return;
* \brief manage all the export to CSV or PDF * act can be * */ define('ALLOWED', 1); require_once '../include/constant.php'; global $g_user, $cn, $g_parameter; require_once NOALYSS_INCLUDE . '/class_database.php'; require_once NOALYSS_INCLUDE . '/class_user.php'; $gDossier = dossier::id(); $cn = new Database($gDossier); mb_internal_encoding("UTF-8"); $g_user = new User($cn); $g_user->Check(); $action = $g_user->check_dossier($gDossier); set_language(); if ($action == 'X' || !isset($_GET['act']) || $g_user->check_print($_GET['act']) == 0) { echo alert(_('Accès interdit')); redirect("do.php?" . dossier::get()); exit; } // get file and execute it $action = HtmlInput::default_value_get('act', null); if ($action == null) { die(_('Appel invalide')); } $prfile = $cn->get_value("select me_file from menu_ref where me_code=\$1", array($action)); if ($prfile == "") { die(_('Export impossible')); } require_once $prfile;
function test_me() { $cn = new Database(dossier::id()); $anco = new Anc_Operation($cn); $j_id = 200; $anco->j_id = $j_id; $array = $anco->get_by_jid($j_id); $a = $anco->to_request($array, 1); echo '<form>'; echo dossier::hidden(); echo HtmlInput::hidden('j_id', $j_id); echo HtmlInput::hidden('test_select', $_REQUEST['test_select']); echo $anco->display_table(1, 15002, 0); echo '<input type="submit" name="save">'; echo '</form>'; if (isset($_REQUEST['save'])) { echo "to_save"; var_dump($_REQUEST); } var_dump($a); }
$export_pdf .= HtmlInput::hidden('act', "PDF:fiche_balance") . ($export_pdf .= HtmlInput::hidden('start', $_GET['start'])); $export_pdf .= HtmlInput::hidden('end', $_GET['end']); $export_pdf .= HtmlInput::hidden('histo', $_GET['histo']); $export_pdf .= HtmlInput::request_to_hidden(array('allcard')); $export_pdf .= dossier::hidden(); $export_pdf .= HtmlInput::submit('pdf', 'Export en PDF'); $export_pdf .= '</FORM>'; $export_print = HtmlInput::print_window(); $export_csv = '<FORM METHOD="get" ACTION="export.php" style="display:inline">'; $export_csv .= HtmlInput::hidden('cat', $_GET['cat']); $export_csv .= HtmlInput::hidden('act', 'CSV:fiche_balance'); $export_csv .= HtmlInput::hidden('start', $_GET['start']); $export_csv .= HtmlInput::hidden('end', $_GET['end']); $export_csv .= HtmlInput::hidden('histo', $_GET['histo']); $export_csv .= HtmlInput::request_to_hidden(array('allcard')); $export_csv .= dossier::hidden(); $export_csv .= HtmlInput::submit('CSV', 'Export en CSV'); $export_csv .= '</FORM>'; /* * Date is important is requested balance */ if (isDate($_REQUEST['start']) == null || isDate($_REQUEST['end']) == null) { echo h2('Date invalide !', 'class="error"'); alert('Date invalide !'); return; } /************************************************************************************************************************* * Balance agée tous /*************************************************************************************************************************/ if ($_GET['histo'] == 6) { require_once NOALYSS_INCLUDE . '/class_balance_age.php';
" value="<?php echo h($aAttachedFile[$i]['d_description']); ?> "> <?php $js = sprintf("update_document('%s','%s')", dossier::id(), $aAttachedFile[$i]['d_id']); echo HtmlInput::button('save_desc' . $aAttachedFile[$i]['d_id'], _('Sauve'), 'onclick="' . $js . '"', 'smallbutton'); ?> </span> <?php } else { ?> </span> <?php } $rmDoc = sprintf("return confirm_box(null,'" . _('Voulez-vous effacer le document') . " %s' , function(){remove_document('%s','%s');});", $aAttachedFile[$i]['d_filename'], dossier::id(), $aAttachedFile[$i]['d_id']); ?> </td> <td> <?php if ($p_view != 'READ') { ?> <a class="line" id="<?php echo "ac" . $aAttachedFile[$i]['d_id']; ?> " href="javascript:void(0)" onclick="<?php echo $rmDoc; ?> "><?php echo _("Effacer"); ?>
require_once NOALYSS_INCLUDE . '/class_dossier.php'; require_once NOALYSS_INCLUDE . '/ac_common.php'; require_once NOALYSS_INCLUDE . '/constant.php'; require_once NOALYSS_INCLUDE . '/function_javascript.php'; require_once NOALYSS_INCLUDE . '/class_extension.php'; require_once NOALYSS_INCLUDE . '/class_html_input.php'; require_once NOALYSS_INCLUDE . '/class_iselect.php'; require_once NOALYSS_INCLUDE . '/constant.security.php'; require_once NOALYSS_INCLUDE . '/class_user.php'; echo '<div class="topmenu">'; @html_page_start($_SESSION['g_theme']); $cn = new Database(dossier::id()); global $g_user; $g_user = new User($cn); $g_user->check(); $only_plugin = $g_user->check_dossier(dossier::id()); /* javascript file */ echo load_all_script(); /* show all the extension we can access */ $a = new ISelect('plugin_code'); $a->value = Extension::make_array($cn); $a->selected = isset($_REQUEST['plugin_code']) ? strtoupper($_REQUEST['plugin_code']) : ''; /* no plugin available */ if (count($a->value) == 0) { alert(j(_("Aucune extension disponible"))); exit; } /* only one plugin available then we don't propose a choice*/ if (count($a->value) == 1) { $_REQUEST['plugin_code'] = $a->value[0]['value']; }
* This file is part of NOALYSS. * * NOALYSS is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * 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 export the operation in pdf */ if (!defined('ALLOWED')) { die('Appel direct ne sont pas permis'); } header('Pragma: public'); header('Content-type: application/csv'); header('Content-Disposition: attachment;filename="ca_bal_simple.csv"', FALSE); require_once NOALYSS_INCLUDE . '/class_anc_balance_simple.php'; $cn = new Database(dossier::id()); $bal = new Anc_Balance_Simple($cn); $bal->get_request(); echo $bal->display_csv();
echo h($array[$i]['r_city']); ?> </td> <td> <?php echo h($array[$i]['r_country']); ?> </td> <td> <?php echo h($array[$i]['r_phone']); ?> </td> <td> <?php $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");
include_once NOALYSS_INCLUDE . '/ac_common.php'; require_once NOALYSS_INCLUDE . '/class_acc_ledger.php'; html_page_start($_SESSION['g_theme']); load_all_script(); $gDossier = dossier::id(); require_once NOALYSS_INCLUDE . '/class_database.php'; /* Admin. Dossier */ $cn = new Database($gDossier); include_once NOALYSS_INCLUDE . '/class_user.php'; global $g_user; $g_user = new User($cn); $g_user->Check(); $act = $g_user->check_dossier($gDossier); // AC CODE = SEARCH if ($act == 'P') { redirect("extension.php?" . dossier::get(), 0); exit; } if ($act == 'X') { alert(_('Accès interdit')); exit; } // display a search box $ledger = new Acc_Ledger($cn, 0); $ledger->type = 'ALL'; $search_box = $ledger->search_form('ALL', 1); echo '<div class="content">'; echo '<form method="GET">'; echo $search_box; echo HtmlInput::submit("viewsearch", _("Recherche")); ?>
<div class="content" style="padding:0;"> <?php require_once NOALYSS_INCLUDE . '/class_own.php'; $owner = new Own($cn); ?> <?php if ($access == 'W') { ?> <form class="print" onsubmit="return op_save(this);"> <?php } ?> <?php echo HtmlInput::hidden('whatdiv', $div) . HtmlInput::hidden('jr_id', $jr_id) . dossier::hidden(); ?> <table style="width:100%"> <tr><td> <table> <td></td> <?php $date = new IDate('p_date'); $date->value = format_date($obj->det->jr_date); echo td(_('Date')) . td($date->input()); ?> <tr> <td></td> <?php $date_ech = new IDate('p_ech'); $date_ech->value = format_date($obj->det->jr_ech);
if ($access == 'L') { $str = 'Local Admin'; $admin = 1; } elseif ($access == 'R') { $str = ' Utilisateur normal'; } elseif ($access == 'P') { $str = ' Extension uniquement'; } if ($SecUser->admin == 1) { $str = ' Super Admin'; $admin = 1; } //----------------------------------------------------- // Print result $pdf = new PDF($cn); $pdf->setDossierInfo(dossier::name() . ' Sécurité'); $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->SetAuthor('NOALYSS'); $pdf->setTitle("Sécurité", true); $str_user = sprintf("( %d ) %s %s [ %s ] - %s", $SecUser->id, $SecUser->first_name, $SecUser->name, $SecUser->login, $str); $pdf->SetFont('DejaVu', 'B', 9); $pdf->Cell(0, 7, $str_user, 'B', 0, 'C'); $pdf->Ln(); if ($SecUser->active == 0) { $pdf->SetTextColor(255, 0, 34); $pdf->Cell(0, 7, 'Bloqué', 0, 0, 'R'); $pdf->Ln(); } if ($SecUser->admin == 1) { $pdf->SetTextColor(0, 0, 0);
* - cred card for the debit only if j is set * - deb card for the debit only if j is set * - filter card for debit and credit only if j OR type is set * - list of fd_id * */ $jrn = !isset($_REQUEST['j']) ? -1 : $_REQUEST['j']; $filter_card = ""; $cn = new Database(dossier::id()); $d = $_REQUEST['e']; $filter_card = ''; require_once 'class_user.php'; global $g_user; $g_user = new User($cn); $g_user->check(); $g_user->check_dossier(dossier::id()); set_language(); if ($d == 'all') { $filter_card = ''; } else { if (strpos($d, 'sql]') == true) { $filter_card = str_replace('[sql]', " and ", $d); } else { $filter_card = "and fd_id in ({$d})"; } } if ($jrn != -1) { switch ($d) { case 'cred': $filter_jrn = $cn->make_list("select jrn_def_fiche_cred from jrn_def where jrn_def_id=\$1", array($jrn)); $filter_card = $filter_jrn != "" ? " and fd_id in ({$filter_jrn})" : ' and false ';
static function test_me() { $cn = new Database(dossier::id()); $rap = new Acc_Reconciliation($cn); var_dump($rap->get_reconciled_amount('', false)); }
static function test_me() { $a = new Database(dossier::id()); $bal = new Anc_Balance_Double($a); $bal->get_request(); echo '<form method="GET">'; echo $bal->display_form(); echo '</form>'; if (isset($_GET['result'])) { echo $bal->show_button("", ""); echo "<h1>HTML</h1>"; echo $bal->display_html(); echo "<h1>CSV</h1>"; echo $bal->display_csv(); } }