<?php
/****************************************************************************************
SMI (Services Maintenance Interventions) est une gestion libre de maintenance et de SAV

Version 1.0.2

Copyright (C) 2006-2015  Sylvain FATOME
This program 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.

This program 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 this program
(in the directory docs); 
if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 
Boston, MA  02110-1301, USA.

Contact : galawa@free.fr

Web : http://smi.no-ip.org
 ****************************************************************************************/

session_start();

require_once("../lib/gettext/gettext.inc");
include_once("../inc/config.inc.php");
include_once("../inc/fic_droits.inc.php");
include_once("../inc/func_log.inc.php");
if (CheckURLLog(TRUE) == FALSE) header("Location: ../index.php");
if (CheckNivLog("5-9") == FALSE) header("Location: ../index.php");
include_once("../inc/func.inc.php");
include_once("../inc/func_geo.inc.php");
include_once("../inc/func_txt.inc.php");
include_once("../inc/fic_co.inc.php");
include_once("../classes/ezSQL/shared/ez_sql_core.php");
include_once("../classes/ezSQL/mysqli/ez_sql_mysqli.php");
include_once("../inc/func_sql.inc.php");
Archivelog(@$_SESSION["code_log"]);
// Variables Formulaire
fix_magic_quotes();
$_GET = clean_str($_GET);

$coderech = $_GET['code'];

$pbm_co = FALSE;

if ($coderech <> "") {
    // Récupération des informations périodicité
    $row = lit_enr_co($coderech);
    if (is_array($row))
        extract($row);
    else
        $pbm_co = TRUE;
} else
    $pbm_co = TRUE;
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <title>SMI - <?PHP echo _("ESPACE PRIVE"); ?> : <?PHP echo _("Impression fiche contrat type"); ?></title>

    <?PHP include_once("../inc/header.inc.php"); ?>

    <script type="text/javascript">
        <!--
        function init_all() {
            init_Body();
            warn_print(2);
        }

        $(document).ready(function () {
            init_all();
        });
        //-->
    </script>

</head>

<body>

<?PHP
if ($pbm_co == FALSE) {
    entimpfic(_("FICHE CONTRAT TYPE"));
    ?>

    <table class="Ftable" width="100%" border="0">
        <tr>
            <td width="160" class="rubNormal" id="f_code" align="right"><?PHP echo _("Code"); ?></td>
            <td>
                <?PHP echo $co_code ?>
            </td>
        </tr>
        <tr>
            <td width="160" class="rubNormal" id="f_nom" align="right"><?PHP echo _("Nom"); ?></td>
            <td>
                <?PHP echo $co_nom ?>
            </td>
        </tr>
        <tr>
            <td width="160" class="rubNormal" id="f_desc" align="right"><?PHP echo _("Libellé"); ?></td>
            <td>
                <?PHP
                echo "<span class=\"txtnotes\">";
                echo formatetxt($co_desc);
                echo "</span>";
                ?>
            </td>
        </tr>
        <tr>
            <td valign="top" class="rubNormal" id="f_cgv" align="right"><?PHP echo _("Conditions générales de vente du contrat (par l'agence)"); ?></td>
            <td valign="top">
                <?PHP
                echo "<span class=\"txtnotes\">";
                echo formatetxt($co_cgv);
                echo "</span>";
                ?>
            </td>
        </tr>
        <tr>
            <td valign="top" class="rubNormal" id="f_actif" align="right"><?PHP echo _("Actif"); ?></td>
            <td valign="top"><?PHP echo $non_oui[$co_actif]; ?></td>
        </tr>
    </table>
<?PHP
}
else
{
?>
    <script type="text/javascript">
        <!--
        window.close();
        //-->
    </script>
<?PHP
}
?>
</body>
</html>
