2
0
forked from Wavyzz/dolibarr

Modif de style et nettoyage

This commit is contained in:
Rodolphe Quiedeville
2007-05-31 08:13:31 +00:00
parent 10b69111d2
commit 302ad11dd9

View File

@@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
/* Copyright (C) 2005-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
*
* 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
@@ -21,55 +21,14 @@
*/
require("./pre.inc.php");
/*
*
*/
if ($_POST["action"] == 'addvalue')
{
if ($_POST["releve"] > 0)
{
$compteur = new EnergieCompteur($db, $user);
if ( $compteur->fetch($_GET["id"]) == 0)
{
$date = mktime(12,
0 ,
0,
$_POST["remonth"],
$_POST["reday"],
$_POST["reyear"]);
$compteur->AjoutReleve($date, $_POST["releve"]);
Header("Location: compteur.php?id=".$_GET["id"]);
}
}
}
/*
*
*/
llxHeader($langs, '',$langs->trans("Compteur"),"Compteur");
$html = new Form($db);
/*********************************************************************
*
* Mode creation
*
*
************************************************************************/
if ($_GET["action"] == 'create')
{
print_titre("Ajouter une compteur");
}
else
/* *************************************************************************** */
/* */
/* Mode vue */
/* */
/* *************************************************************************** */
{
if ($_GET["id"] > 0)
{
$compteur = new EnergieCompteur($db, $user);
@@ -101,9 +60,6 @@ else
print "</td></tr>";
print "</table><br>";
print '</div>';
print '<table class="noborder" width="100%">';
print '<tr><td align="center" colspan="2">';
@@ -123,19 +79,19 @@ else
$file = "year.".$compteur->id.".png";
print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=energie&file='.$file.'" alt="" title="">';
print '</td></tr></table><br>';
print '</div>';
}
else
{
/* Compteur non trouv<75>e */
print "Compteur inexistant";
}
}
else
{
print "Compteur inexistant";
}
}
else
{
/* Commande non trouv<75>e */
print "Compteur inexistant";
}
}
else
{
print "Compteur inexistant";
}
}
$db->close();