/*
* This file is part of PhpCompta.
*
* PhpCompta 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.
*
* PhpCompta 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 PhpCompta; 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 ddebontridder@yahoo.fr
/* $Revision$ */
/*! \file
* \brief Parametre module
*/
include_once ("ac_common.php");
html_page_start($_SESSION['g_theme']);
include_once ("postgres.php");
require_once("class_widget.php");
if ( isset ($_REQUEST['dos'] ) ) {
$_SESSION['g_dossier']=$_REQUEST['dos'];
$g_name=GetDossierName($_SESSION['g_dossier']);
$_SESSION["g_name"]=$g_name;
}
if ( ! isset ( $_SESSION['g_dossier'] ) ) {
echo "You must choose a Dossier ";
exit -2;
}
include_once ("postgres.php");
/* Admin. Dossier */
$rep=DbConnect();
include_once ("class_user.php");
$User=new cl_user($rep);
$User->Check();
include_once("preference.php");
include_once("user_menu.php");
echo "
';
//-----------------------------------------------------
// Currency
//-----------------------------------------------------
if ( $p_action == "change" ) {
$p_mid=$_GET['p_mid'];
$p_rate=$_GET['p_rate'];
$p_code=$_GET['p_code'];
echo '
';
}
if ( $action == "Change") {
$p_devise=$_POST['p_devise'];
$p_id=$_POST['p_id'];
$p_rate=$_POST['p_rate'];
$Res=ExecSql($cn,"update parm_money set pm_code='$p_devise',pm_rate=$p_rate where pm_id=$p_id");
ShowDevise($cn);
}
if ( $action == "Ajout") {
$p_devise=$_POST['p_devise'];
$p_rate=$_POST['p_rate'];
$Res=ExecSql($cn,"insert into parm_money ( pm_code,pm_rate) values ('$p_devise',$p_rate) ");
ShowDevise($cn);
}
if ( $p_action == "delete") {
$p_id=$_GET['p_mid'];
$Res=ExecSql($cn,"delete from parm_money where pm_id=$p_id");
ShowDevise($cn);
}
if ( $p_action=="devise") {
ShowDevise($cn);
}
//-----------------------------------------------------
// Coord societe
//-----------------------------------------------------
if ( $p_action=='company') {
require_once("class_own.php");
require_once("class_widget.php");
if ( isset ($_POST['record_company'] )) {
$m=new Own($cn);
extract($_POST);
$m->MY_NAME=$p_name;
$m->MY_TVA=$p_tva;
$m->MY_STREET=$p_street;
$m->MY_NUMBER=$p_no;
$m->MY_CP=$p_cp;
$m->MY_COMMUNE=$p_Commune;
$m->MY_TEL=$p_tel;
$m->MY_FAX=$p_fax;
$m->MY_PAYS=$p_pays;
$m->Save();
}
$my=new Own($cn);
$all=new widget("text");
$all->table=1;
echo '
";
}
//-----------------------------------------------------
// Document
//-----------------------------------------------------
echo "
";
if ( $p_action == 'document' ) {
echo '