示例#1
0
 *   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 Search module
 */
require_once '../include/constant.php';
require_once NOALYSS_INCLUDE . '/class_dossier.php';
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;
}
示例#2
0
<?php

/*
 *   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
include_once "ac_common.php";
html_page_start();
echo '<H1 class="info"> Not Implemented</H1>';
html_page_stop();
示例#3
0
<?php

/*
 *   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 Logout
 */
require_once '../include/constant.php';
require_once "ac_common.php";
require_once 'class_database.php';
html_page_start("classic");
session_unset();
echo '<h2 class="info">' . _('Vous êtes déconnecté') . '</h2>';
echo '<META HTTP-EQUIV="REFRESH" content="0;url=index.html">';
html_page_stop();
示例#4
0
*/
// Copyright Author Dany De Bontridder danydb@aevalys.eu
/*! \file
 * \brief Administration of the repository : creation of user, folder, security,
 *        templates... Accessible only by the administrator
 */
require_once '../include/constant.php';
require_once "user_common.php";
include_once "ac_common.php";
require_once 'class_database.php';
include_once "user_menu.php";
$rep = new Database();
include_once "class_user.php";
$User = new User($rep);
$User->Check();
html_page_start($User->theme);
if ($User->admin != 1) {
    html_page_stop();
    return;
}
load_all_script();
echo '<H2 class="info"> ' . _('Administration Globale') . '</H2>';
echo '<div class="topmenu">';
echo MenuAdmin() . "</div>";
define('ALLOWED', true);
?>
<DIV >
<?php 
if (isset($_REQUEST["action"])) {
    echo js_include("admin.js");
    if ($_REQUEST["action"] == "user_mgt") {
示例#5
0
 /**
  * @brief this function is intended to test this class
  */
 static function test_me($pCase = '')
 {
     if ($pCase == '') {
         echo Acc_Reconciliation::$javascript;
         html_page_start();
         $cn = new Database(dossier::id());
         $_SESSION['g_user'] = '******';
         $_SESSION['g_pass'] = '******';
         $id = isset($_REQUEST['p_jrn']) ? $_REQUEST['p_jrn'] : -1;
         $a = new Acc_Ledger($cn, $id);
         $a->with_concerned = true;
         // Vide
         echo '<FORM method="post">';
         echo $a->select_ledger()->input();
         echo HtmlInput::submit('go', 'Test it');
         echo '</form>';
         if (isset($_POST['go'])) {
             echo "Ok ";
             echo '<form method="post">';
             echo $a->show_form();
             echo HtmlInput::submit('post_id', 'Try me');
             echo '</form>';
             // Show the predef operation
             // Don't forget the p_jrn
             echo '<form>';
             echo dossier::hidden();
             echo '<input type="hidden" value="' . $id . '" name="p_jrn">';
             $op = new Pre_operation($cn);
             $op->p_jrn = $id;
             $op->od_direct = 't';
             if ($op->count() != 0) {
                 echo HtmlInput::submit('use_opd', 'Utilisez une opération pr&eacute;d&eacute;finie', "", "smallbutton");
                 echo $op->show_button();
             }
             echo '</form>';
             exit('test_me');
         }
         if (isset($_POST['post_id'])) {
             echo '<form method="post">';
             echo $a->show_form($_POST, 1);
             echo HtmlInput::button('add', 'Ajout d\'une ligne', 'onClick="quick_writing_add_row()"');
             echo HtmlInput::submit('save_it', _("Sauver"));
             echo '</form>';
             exit('test_me');
         }
         if (isset($_POST['save_it'])) {
             print 'saving';
             $array = $_POST;
             $array['save_opd'] = 1;
             try {
                 $a->save($array);
             } catch (Exception $e) {
                 alert($e->getMessage());
                 echo '<form method="post">';
                 echo $a->show_form($_POST);
                 echo HtmlInput::submit('post_id', 'Try me');
                 echo '</form>';
             }
             return;
         }
         // The GET at the end because automatically repost when you don't
         // specify the url in the METHOD field
         if (isset($_GET['use_opd'])) {
             $op = new Pre_op_advanced($cn);
             $op->set_od_id($_REQUEST['pre_def']);
             //$op->p_jrn=$id;
             $p_post = $op->compute_array();
             echo '<FORM method="post">';
             echo $a->show_form($p_post);
             echo HtmlInput::submit('post_id', 'Use predefined operation');
             echo '</form>';
             return;
         }
     }
     // if case = ''
     ///////////////////////////////////////////////////////////////////////////
     // search
     if ($pCase == 'search') {
         html_page_start();
         $cn = new Database(dossier::id());
         $ledger = new Acc_Ledger($cn, 0);
         $_SESSION['g_user'] = '******';
         $_SESSION['g_pass'] = '******';
         echo $ledger->search_form('ALL');
     }
     ///////////////////////////////////////////////////////////////////////////
     // reverse
     // Give yourself the var and check in your tables
     ///////////////////////////////////////////////////////////////////////////
     if ($pCase == 'reverse') {
         $cn = new Database(dossier::id());
         $jr_internal = 'OD-01-272';
         try {
             $cn->start();
             $jrn_def_id = $cn->get_value('select jr_def_id from jrn where jr_internal=$1', array($jr_internal));
             $ledger = new Acc_Ledger($cn, $jrn_def_id);
             $ledger->jr_id = $cn->get_value('select jr_id from jrn where jr_internal=$1', array($jr_internal));
             echo "Ouvrez le fichier " . __FILE__ . " à la ligne " . __LINE__ . " pour changer jr_internal et vérifier le résultat de l'extourne";
             $ledger->reverse('01.07.2010');
         } catch (Exception $e) {
             $cn->rollback();
             var_dump($e);
         }
         $cn->commit();
     }
 }
示例#6
0
require_once NOALYSS_INCLUDE . '/class_html_input.php';
mb_internal_encoding("UTF-8");
// if gDossier is not set redirect to form to choose a folder
if (!isset($_REQUEST['gDossier'])) {
    redirect('user_login.php');
    exit;
}
if (!isset($_SESSION['g_theme'])) {
    echo "<h2>" . _('Vous  êtes déconnecté') . "</h2>";
    $backurl = $_SERVER['REQUEST_URI'];
    $url = "index.php?" . http_build_query(array('reconnect' => 1, 'backurl' => urlencode($backurl)));
    redirect($url);
    exit;
}
$style_user = HtmlInput::default_value_post("style_user", $_SESSION['g_theme']);
html_page_start($style_user);
if (DEBUG) {
    ?>
<div id="debug_div" style="border:slategray solid 1px;margin-left: 0px;position:absolute;background:white;display:fixed;top:2px;left:25px;z-index:1000;display:none">
    <h2>$_POST</h2>
    <?php 
    var_dump($_POST);
    ?>
    <h2>$_GET</h2>
    <?php 
    var_dump($_GET);
    ?>
</div>
<script>
    function show_debug_request() {
        var visible=document.getElementById('debug_div').style.display;