From 73070acdc9d74814aee095c2b7a5169f27714ee7 Mon Sep 17 00:00:00 2001 From: adriy Date: Tue, 22 Jan 2019 15:03:49 +0100 Subject: [PATCH] work --- TVJR | 1 + TVJeanray.sql | 154 ++++++++++++++++++++++++++++++++++++++++++++ fonction - Copie.js | 23 +++++++ fonction.js | 47 +++++++------- index.js | 2 +- test | 0 views/TV.ejs | 2 + 7 files changed, 204 insertions(+), 25 deletions(-) create mode 160000 TVJR create mode 100755 TVJeanray.sql create mode 100644 fonction - Copie.js create mode 100755 test diff --git a/TVJR b/TVJR new file mode 160000 index 0000000..22e8271 --- /dev/null +++ b/TVJR @@ -0,0 +1 @@ +Subproject commit 22e8271b48453c13712a6b32f7598f342a8a3332 diff --git a/TVJeanray.sql b/TVJeanray.sql new file mode 100755 index 0000000..d097b35 --- /dev/null +++ b/TVJeanray.sql @@ -0,0 +1,154 @@ +-- phpMyAdmin SQL Dump +-- version 4.7.6 +-- https://www.phpmyadmin.net/ +-- +-- Hôte : localhost +-- Généré le : sam. 22 déc. 2018 à 19:41 +-- Version du serveur : 10.1.37-MariaDB-0+deb9u1 +-- Version de PHP : 7.0.33-0+deb9u1 + +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +SET AUTOCOMMIT = 0; +START TRANSACTION; +SET time_zone = "+00:00"; + + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8mb4 */; + +-- +-- Base de données : `TVJeanray` +-- + +-- -------------------------------------------------------- + +-- +-- Structure de la table `communication` +-- + +CREATE TABLE `communication` ( + `ID_Com` int(11) NOT NULL, + `Texte` varchar(200) DEFAULT NULL, + `Titre_Com` varchar(50) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- -------------------------------------------------------- + +-- +-- Structure de la table `com_active` +-- + +CREATE TABLE `com_active` ( + `ID_Com_Actif` int(11) NOT NULL, + `ID_Com` int(11) NOT NULL, + `ID_Zone` int(11) NOT NULL, + `Actif` tinyint(1) NOT NULL, + `Type` tinyint(4) NOT NULL DEFAULT '1', + `Date_debut` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, + `Date_fin` date NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- -------------------------------------------------------- + +-- +-- Structure de la table `user` +-- + +CREATE TABLE `user` ( + `id` int(11) NOT NULL, + `name` varchar(255) NOT NULL, + `pw` varchar(255) NOT NULL, + `actif` tinyint(1) NOT NULL DEFAULT '0' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- -------------------------------------------------------- + +-- +-- Structure de la table `zone` +-- + +CREATE TABLE `zone` ( + `ID_Zone` int(11) NOT NULL, + `Active` tinyint(1) NOT NULL, + `Nom` varchar(200) NOT NULL, + `Nord` double NOT NULL, + `Sud` double NOT NULL, + `Ouest` double NOT NULL, + `Est` double NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Index pour les tables déchargées +-- + +-- +-- Index pour la table `communication` +-- +ALTER TABLE `communication` + ADD PRIMARY KEY (`ID_Com`); + +-- +-- Index pour la table `com_active` +-- +ALTER TABLE `com_active` + ADD PRIMARY KEY (`ID_Com_Actif`), + ADD KEY `ID_Zone` (`ID_Zone`), + ADD KEY `ID_Com` (`ID_Com`); + +-- +-- Index pour la table `user` +-- +ALTER TABLE `user` + ADD PRIMARY KEY (`id`); + +-- +-- Index pour la table `zone` +-- +ALTER TABLE `zone` + ADD PRIMARY KEY (`ID_Zone`); + +-- +-- AUTO_INCREMENT pour les tables déchargées +-- + +-- +-- AUTO_INCREMENT pour la table `communication` +-- +ALTER TABLE `communication` + MODIFY `ID_Com` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; + +-- +-- AUTO_INCREMENT pour la table `com_active` +-- +ALTER TABLE `com_active` + MODIFY `ID_Com_Actif` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; + +-- +-- AUTO_INCREMENT pour la table `user` +-- +ALTER TABLE `user` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; + +-- +-- AUTO_INCREMENT pour la table `zone` +-- +ALTER TABLE `zone` + MODIFY `ID_Zone` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24; + +-- +-- Contraintes pour les tables déchargées +-- + +-- +-- Contraintes pour la table `com_active` +-- +ALTER TABLE `com_active` + ADD CONSTRAINT `fk_com` FOREIGN KEY (`ID_Com`) REFERENCES `communication` (`ID_Com`), + ADD CONSTRAINT `fk_zone` FOREIGN KEY (`ID_Zone`) REFERENCES `zone` (`ID_Zone`); +COMMIT; + +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; diff --git a/fonction - Copie.js b/fonction - Copie.js new file mode 100644 index 0000000..0c0a07a --- /dev/null +++ b/fonction - Copie.js @@ -0,0 +1,23 @@ +exports.choixZone = function(zones){ + var zone = zones[0]; + var aireMin = (zones[0].Nord-zones[0].Sud)*(zones[0].Est-zones[0].Ouest) + for(var i = 1;i'+Communication.html+'') @@ -36,6 +37,7 @@ default: } + $('.slider').slider({indicators: false}) }) });