Location: PHPKode > projects > Pnyx : des lections virtuelles! > pnyx1.0.1/installation/ajaxRempPancCatO.php
<?php	
	#########################################################################################
	# Requête pour remplir la table pancarte_categoriesobjet 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_categoriesobjet ###
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (7, 58, 9);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (7, 55, 10);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (8, 72, 15);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (8, 71, 14);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (7, 52, 6);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (8, 66, 9);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (11, 112, 9);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (9, 91, 2);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (9, 84, 3);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (9, 85, 4);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (10, 92, 0);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (10, 93, 1);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (10, 94, 2);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (7, 60, 11);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (8, 69, 12);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (8, 70, 13);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (8, 74, 3);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (8, 73, 0);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (7, 54, 5);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (7, 59, 4);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (7, 56, 7);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (7, 50, 3);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (7, 49, 2);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (7, 53, 1);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (8, 76, 1);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (7, 57, 8);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (8, 62, 5);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (7, 51, 0);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (6, 48, 2);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (6, 47, 1);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (6, 46, 0);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (5, 45, 3);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (5, 44, 2);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (5, 43, 1);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (5, 42, 0);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (4, 41, 4);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (4, 40, 3);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (8, 63, 6);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (8, 75, 2);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (8, 61, 4);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (8, 64, 7);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (8, 65, 8);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (11, 110, 8);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (11, 109, 7);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (11, 108, 6);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (11, 107, 5);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (11, 106, 4);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (9, 86, 5);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (9, 78, 0);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (8, 68, 11);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (8, 67, 10);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (9, 88, 1);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (4, 39, 2);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (3, 33, 4);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (3, 32, 3);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (2, 28, 9);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (2, 27, 8);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (2, 26, 7);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (2, 25, 6);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (2, 24, 5);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (2, 23, 4);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (2, 22, 3);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (2, 21, 2);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (4, 38, 1);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (3, 31, 2);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (3, 30, 1);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (4, 37, 0);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (3, 36, 6);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (3, 34, 5);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (3, 29, 0);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (2, 20, 1);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (2, 19, 0);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (2, 90, 17);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (2, 89, 16);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (2, 83, 15);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (2, 82, 14);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (2, 81, 13);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (2, 80, 12);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (2, 79, 11);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (2, 77, 10);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (1, 18, 8);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (1, 17, 7);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (9, 87, 6);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (11, 105, 3);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (11, 104, 2);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (11, 111, 1);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (11, 103, 0);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (10, 102, 10);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (10, 101, 9);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (10, 100, 8);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (10, 99, 7);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (10, 98, 6);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (10, 97, 5);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (1, 16, 6);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (1, 15, 5);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (1, 14, 4);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (1, 13, 3);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (1, 12, 2);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (1, 10, 1);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (1, 9, 0);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (12, 113, 0);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (12, 114, 1);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (12, 115, 2);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (10, 96, 4);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (10, 95, 3);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (12, 119, 3);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (12, 11, 4);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (12, 117, 5);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (12, 116, 6);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (12, 118, 7);");
			mysql_query("INSERT INTO `pancarte_categoriesobjet` VALUES (12, 120, 8);");
						
$html = "Table pancarte_categoriesobjet remplie<br />";


	
mysql_close($connection);

echo $html;

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