Créer les différentes tables avec:
Code : Tout sélectionner
-- --------------------------------------------------------
--
-- Structure de la table `date`
--
CREATE TABLE `date` (
`num` int(8) NOT NULL auto_increment,
`valeur` date NOT NULL default '0000-00-00',
`date` varchar(99) NOT NULL default '',
UNIQUE KEY `num` (`num`)
);
-- --------------------------------------------------------
--
-- Structure de la table `log`
--
CREATE TABLE `log` (
`num` mediumint(8) NOT NULL auto_increment,
`uptime` varchar(99) NOT NULL default '',
`date` datetime NOT NULL default '0000-00-00 00:00:00',
`time` int(15) NOT NULL default '0',
`ip` varchar(15) NOT NULL default '',
`marge` varchar(4) NOT NULL default '',
`attenuation` varchar(4) NOT NULL default '',
`voip` varchar(5) NOT NULL default '',
PRIMARY KEY (`num`)
) ;
-- --------------------------------------------------------
--
-- Structure de la table `update`
--
CREATE TABLE `update` (
`id` int(2) NOT NULL auto_increment,
`numversion` varchar(6) NOT NULL default '',
`topicid` int(6) NOT NULL default '0',
`date` int(20) NOT NULL default '0',
UNIQUE KEY `id` (`id`)
) ;
Code : Tout sélectionner
<?php
/*********************************************************************************/
/*Copyright (C) Jean-Sébastien H. ( ED ) webmaster Livebox-script.com */
/* */
/*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; if not, write to the Free Software */
/*Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/*********************************************************************************/
// Adresse de la base SQL
$hote = "localhost";
// Utilisateur SQL:
$user = "root";
// Pass SQL
$pass = "****";
// Base de donnée
$dbname = "uptime";
// Type de base de donnée
$dbtype = "mysql";
// Constructeur de la livebox: Inventel ou Sagem
$livebox = "Inventel";
// bail ip 22 ou 24 heures
$bail_ip = 22;
// voIP 0 ou 1 selon que la voIP est active
$voip_activ = 0;
// Adresse IP de la livebox:
$ipbox = "192.168.1.1";
// login livebox
$login = "admin";
// Pass livebox
$passw = "****";
// Version du graphique: grande 800px (taper high) petite 600px: (taper small)
$graph_version = "high";
require("include.php")
?>