Location: PHPKode > projects > Pnyx : des lections virtuelles! > pnyx1.0.1/installation/ajaxRempPancObjGx.php
<?php	
	#########################################################################################
	# Requête pour remplir la table pancarte_objetgx de Pnyx								#
	# Auteur : B. Leblanc																	#
	# Création : 2008-06-14																	#
	# Modification : 2008-07-01																#
	# 																						#
	# Pnyx - une application Web (PHP/MySQL) d'élections virtuelles conçue pour	des	élèves	#
	# du primaire et du secondaire, dans lequel ils sont amenés à faire des	propositions	#
	# en ligne et voter pour leur favorite, sous la supervision d'un enseignant.			#
	#																						#
    # Copyright (C) <2008 - 2009>															#
	# <Service national du RÉCIT de l'univers social de la Commission scolaire de la		#
	# Pointe-de-l'Île>																		#
	#																						#
	# 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.	#
	# 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 as the file LICENSE.txt; if not, please see 									#
	# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.									#
	# 																						#
	# Service national du RÉCIT de l'univers social											#
	# http://www.recitus.qc.ca																#
	# Contact e-mail : steve-hide@address.com												#
	#########################################################################################

@session_start();

if(@$HTTP_SESSION_VARS['ERREUR'] == ""){
	
$UTILISATEUR = $_POST['utilisateur'];
$MOT_DE_PASSE = $_POST['motPasse'];
$HOST = $_POST['host'];
$BD =	$_POST['bd'];
header('Content-Type: text/html; charset=ISO-8859-1');

$connection = mysql_connect($HOST,$UTILISATEUR,$MOT_DE_PASSE) or die("Impossible de se connecter : " . mysql_error());

// Sélectionne une base de données MySQL, si cela n'est pas possible alors fin de l'exécution du code
		if (!mysql_select_db($BD)){
		   die("Impossible d'acc&eacute;der &agrave; la base de donn&eacute;es  : " . mysql_error());
		}
		
### Contenu pancarte_objetgx ###
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (1, 0, 0, 'F1173093757.png', 'Fond beige', 400);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (2, 0, 0, 'F1173093768.png', 'Fond blanc', 400);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (3, 0, 0, 'F1173093779.png', 'Fond bleu', 400);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (4, 0, 0, 'F1173093788.png', 'Fond jaune', 400);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (5, 0, 0, 'F1173093798.png', 'Fond noir', 400);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (6, 0, 0, 'F1173093809.png', 'Fond rose', 400);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (7, 0, 0, 'F1173093817.png', 'Fond rouge', 400);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (8, 0, 0, 'F1173093828.png', 'Fond vert', 400);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (9, 232, 100, 'F1173094057.gif', 'Randonnée', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (10, 149, 150, 'F1173094064.png', 'Ballon', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (11, 134, 236, 'F1173094073.png', 'Bicyclette', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (12, 217, 300, 'F1173094079.gif', 'Camping', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (13, 77, 55, 'F1173094087.png', 'Course', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (14, 268, 209, 'F1173094097.gif', 'Exercice', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (15, 247, 200, 'F1173094107.gif', 'Exercice2', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (16, 256, 149, 'F1173094119.gif', 'Exercice3', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (17, 74, 54, 'F1173094127.png', 'Karaté', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (18, 45, 63, 'F1173094135.png', 'Kayak', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (19, 137, 138, 'F1173094152.png', 'Cigarette', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (20, 189, 229, 'F1173094159.png', 'Banque', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (21, 128, 200, 'F1173094165.png', 'Dés', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (22, 162, 150, 'F1173094173.png', 'Handicapé', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (23, 128, 128, 'F1173094191.png', 'Internet', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (24, 132, 202, 'F1173094198.gif', 'Musique', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (25, 128, 128, 'F1173094212.png', 'Note musique', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (26, 144, 200, 'F1173094224.png', 'Ordinateur', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (27, 99, 70, 'F1173094233.gif', 'Poubelle', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (28, 115, 123, 'F1173094249.gif', 'Sciences', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (29, 105, 126, 'F1173094597.gif', 'Cabane', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (30, 160, 150, 'F1173094616.gif', 'Édifice1', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (31, 191, 100, 'F1173094625.gif', 'Édifice2', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (32, 78, 84, 'F1173094632.png', 'Hotel', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (33, 131, 150, 'F1173094640.gif', 'Maison1', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (34, 166, 200, 'F1173094648.gif', 'Maison2', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (36, 146, 158, 'F1173094668.gif', 'Usine', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (37, 149, 142, 'F1173094713.gif', 'Boîte srcutin', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (38, 203, 239, 'F1173094723.png', 'Crayon', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (39, 133, 200, 'F1173094730.gif', 'Journal', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (40, 242, 119, 'F1173094738.gif', 'Micro', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (41, 211, 300, 'F1173094753.gif', 'Poignée mains', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (42, 106, 150, 'F1173094798.png', 'Calculatrice', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (43, 247, 200, 'F1173094806.gif', 'Éducation', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (44, 79, 125, 'F1173094820.png', 'Graduation', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (45, 172, 150, 'F1173094833.gif', 'Livres', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (46, 129, 50, 'F1173094983.gif', 'Ampoule1', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (47, 97, 50, 'F1173094997.gif', 'Ampoule2', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (48, 86, 50, 'F1173095005.gif', 'Pile', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (49, 258, 200, 'F1173095036.gif', 'Arbre1', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (50, 139, 98, 'F1173095045.gif', 'Arbre2', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (51, 64, 21, 'F1173095098.gif', 'Blé', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (52, 38, 53, 'F1173095111.gif', 'Bûches', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (53, 118, 100, 'F1173095153.gif', 'Fleurs', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (54, 128, 116, 'F1173095162.gif', 'Forêt', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (55, 119, 186, 'F1173095172.png', 'Météo', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (56, 105, 139, 'F1173095189.gif', 'Papier', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (57, 89, 97, 'F1173095241.gif', 'Recyclage1', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (58, 179, 180, 'F1173095261.png', 'Recyclage2', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (59, 138, 81, 'F1173095270.gif', 'Sapin', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (60, 116, 116, 'F1173095279.png', 'Terre', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (61, 67, 110, 'F1173095454.png', 'fleche90bd', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (62, 67, 110, 'F1173095466.png', 'fleche90bg', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (63, 110, 67, 'F1173095481.png', 'fleche90db', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (64, 110, 67, 'F1173095491.png', 'fleche90dh', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (65, 110, 67, 'F1173095508.png', 'fleche90gb', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (66, 110, 67, 'F1173095525.png', 'fleche90gh', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (67, 67, 110, 'F1173095537.png', 'fleche90hd', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (68, 67, 110, 'F1173095547.png', 'fleche90hg', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (69, 99, 88, 'F1173095581.png', 'Fleche180_bas', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (70, 88, 99, 'F1173095596.png', 'Fleche180_droite', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (71, 88, 99, 'F1173095607.png', 'Fleche180_gauche', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (72, 99, 88, 'F1173095621.png', 'Fleche180_haut', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (73, 141, 48, 'F1173095632.png', 'Fleche_bas', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (74, 48, 141, 'F1173095642.png', 'Fleche_droite', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (75, 48, 141, 'F1173095653.png', 'Fleche_gauche', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (76, 141, 48, 'F1173095670.png', 'Fleche_haut', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (77, 128, 117, 'F1173097014.png', 'Ballons', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (78, 172, 172, 'F1173097024.png', 'Carré', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (79, 141, 134, 'F1173097035.png', 'Étoile', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (80, 148, 150, 'F1173097044.gif', 'Fleur2', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (81, 128, 128, 'F1173097057.png', 'Flocon', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (82, 197, 198, 'F1173097088.png', 'Interdiction', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (83, 128, 128, 'F1173097095.png', 'Lune', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (84, 174, 238, 'F1173097109.png', 'parole_droite', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (85, 174, 238, 'F1173097117.png', 'parole_gauche', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (86, 152, 224, 'F1173097125.png', 'pensee_droite', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (87, 152, 224, 'F1173097136.png', 'pensee_gauche', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (88, 160, 160, 'F1173097144.png', 'Rond', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (89, 128, 128, 'F1173097150.png', 'Soleil', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (90, 123, 115, 'F1173097159.png', 'Trèfle', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (91, 157, 182, 'F1173097167.png', 'Tiangle', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (92, 206, 263, 'F1173097376.gif', 'Assiette', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (93, 100, 48, 'F1173097384.gif', 'Banane', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (94, 100, 147, 'F1173097394.gif', 'Bol salade', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (95, 100, 68, 'F1173097403.gif', 'Brocoli', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (96, 150, 150, 'F1173097413.png', 'Frites', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (97, 100, 126, 'F1173097419.gif', 'Fromage', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (98, 94, 121, 'F1173097430.gif', 'Lunch', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (99, 161, 200, 'F1173097440.gif', 'Malbouffe', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (100, 100, 176, 'F1173097446.gif', 'melon', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (101, 114, 150, 'F1173097453.png', 'Pizza', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (102, 100, 110, 'F1173097459.gif', 'Pomme', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (103, 203, 78, 'F1173097540.png', 'Crayon', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (104, 100, 100, 'F1173097551.png', 'Enfants', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (105, 283, 111, 'F1173097561.gif', 'Fille', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (106, 294, 118, 'F1173097572.gif', 'Garçon', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (107, 113, 56, 'F1173097582.gif', 'Manifestant', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (108, 184, 200, 'F1173097590.gif', 'Policier', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (109, 252, 307, 'F1173097597.gif', 'Femme', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (110, 273, 172, 'F1173097604.gif', 'Homme', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (111, 200, 189, 'F1173097611.png', 'Smiley', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (112, 295, 200, 'F1173097626.png', 'Patrimoine', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (113, 49, 53, 'F1173097937.png', 'Automobile', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (114, 48, 54, 'F1173097945.png', 'Avion', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (115, 49, 53, 'F1173097959.png', 'Bateau', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (116, 89, 200, 'F1173100982.gif', 'Automobile', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (117, 219, 400, 'F1173097982.gif', 'Metro', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (118, 98, 200, 'F1173101008.gif', 'Minivan', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (119, 49, 53, 'F1173097997.png', 'Train', 0);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (121, 0, 0, 'F1173098573.jpg', 'Fond gris', 400);");
			mysql_query("INSERT INTO `pancarte_objetgx` VALUES (120, 78, 200, 'F1173101024.gif', 'Camion', 0);");
						
$html = "Table pancarte_objetgx remplie<br />";


	
mysql_close($connection);

echo $html;

}
?>
Return current item: Pnyx : des lections virtuelles!