Пример #1
0
		};
	echo "</pre>\n";
	}
}

if ($submit || $mode) {

	// save message into db
	
	$thedate = date("Y-d-m H:i:s");

	if ($contact=="null") {
	$contact = trim($Number);
	}
	$sql="INSERT INTO messages (MessageID, Name, Message, Datum) VALUES ('', '$contact', '$message', '$thedate')";

	If (!$result=send_sql($db,$sql))  
		{
   		echo "SQL-command was not executed!<br>";
   		}
		else
		{
			if ($debug) { echo "<b>Nachricht in DB gespeichert.</b>"; }
		}

}
mysql_close();
?>
</body>
</html>
Пример #2
0
     $mot_de_pass = $_POST['mot_de_pass'];
     $mail = $_POST['mail'];
     $taille = 19;
     $lettres = "abcdefghijklmnopqrstuvwxyz0123456789";
     srand(time());
     for ($i = 0; $i < $taille; $i++) {
         if ($i == "0") {
             $id_prono = substr($lettres, rand() % strlen($lettres), 1);
         } else {
             $id_prono .= substr($lettres, rand() % strlen($lettres), 1);
         }
     }
     $mdp = md5($_POST['mot_de_pass']);
     // On crée les tables
     $sql_admin = "\nCREATE TABLE `phpl_buteurs` (\n  `id` int(10) unsigned NOT NULL auto_increment,\n  `id_match` int(10) unsigned default NULL,\n  `id_effectif` smallint(5) unsigned NOT NULL default '0',\n  `buts` tinyint(4) default NULL,\n  KEY `id` (`id`)\n);\nCREATE TABLE `phpl_championnats` (\n  `id` tinyint(3) unsigned NOT NULL auto_increment,\n  `id_division` tinyint(3) unsigned NOT NULL default '0',\n  `id_saison` tinyint(3) unsigned NOT NULL default '0',\n  PRIMARY KEY  (`id`)\n) ;\nCREATE TABLE `phpl_classe` (\n  `id` tinyint(3) unsigned NOT NULL auto_increment,\n  `nom` varchar(255) NOT NULL default '',\n  `rang` tinyint(3) NOT NULL default '0',\n  PRIMARY KEY  (`id`)\n) ;\nCREATE TABLE `phpl_clmnt` (\n  `NOM` varchar(255) default NULL,\n  `POINTS` smallint(4) unsigned default NULL,\n  `JOUES` tinyint(3) unsigned default NULL,\n  `G` tinyint(3) unsigned default NULL,\n  `N` tinyint(3) unsigned default NULL,\n  `P` tinyint(3) unsigned default NULL,\n  `BUTSPOUR` smallint(4) unsigned default NULL,\n  `BUTSCONTRE` smallint(4) unsigned default NULL,\n  `DIFF` smallint(4) default NULL,\n  `PEN` tinyint(2) default NULL,\n  `DOMPOINTS` smallint(4) unsigned default NULL,\n  `DOMJOUES` tinyint(3) unsigned default NULL,\n  `DOMG` tinyint(3) unsigned default NULL,\n  `DOMN` tinyint(3) unsigned default NULL,\n  `DOMP` tinyint(3) unsigned default NULL,\n  `DOMBUTSPOUR` smallint(4) unsigned default NULL,\n  `DOMBUTSCONTRE` smallint(4) unsigned default NULL,\n  `DOMDIFF` smallint(4) default NULL,\n  `EXTPOINTS` smallint(4) unsigned default NULL,\n  `EXTJOUES` tinyint(3) unsigned default NULL,\n  `EXTG` tinyint(3) unsigned default NULL,\n  `EXTN` tinyint(3) unsigned default NULL,\n  `EXTP` tinyint(3) unsigned default NULL,\n  `EXTBUTSPOUR` smallint(4) unsigned default NULL,\n  `EXTBUTSCONTRE` smallint(4) unsigned default NULL,\n  `EXTDIFF` tinyint(4) default NULL,\n  `ID_EQUIPE` smallint(5) unsigned NOT NULL default '0',\n  `ID_CHAMP` tinyint(3) unsigned NOT NULL default '0',\n  KEY `ID_CHAMP` (`ID_CHAMP`)\n) ;\nCREATE TABLE `phpl_clmnt_cache` (\n  `NOM` varchar(255) default NULL,\n  `POINTS` smallint(4) unsigned default NULL,\n  `JOUES` tinyint(3) unsigned default NULL,\n  `G` tinyint(3) unsigned default NULL,\n  `N` tinyint(3) unsigned default NULL,\n  `P` tinyint(3) unsigned default NULL,\n  `BUTSPOUR` smallint(4) unsigned default NULL,\n  `BUTSCONTRE` smallint(4) unsigned default NULL,\n  `DIFF` smallint(4) default NULL,\n  `PEN` tinyint(2) default NULL,\n  `DOMPOINTS` smallint(4) unsigned default NULL,\n  `DOMJOUES` tinyint(3) unsigned default NULL,\n  `DOMG` tinyint(3) unsigned default NULL,\n  `DOMN` tinyint(3) unsigned default NULL,\n  `DOMP` tinyint(3) unsigned default NULL,\n  `DOMBUTSPOUR` smallint(4) unsigned default NULL,\n  `DOMBUTSCONTRE` smallint(4) unsigned default NULL,\n  `DOMDIFF` smallint(4) default NULL,\n  `EXTPOINTS` smallint(4) unsigned default NULL,\n  `EXTJOUES` tinyint(3) unsigned default NULL,\n  `EXTG` tinyint(3) unsigned default NULL,\n  `EXTN` tinyint(3) unsigned default NULL,\n  `EXTP` tinyint(3) unsigned default NULL,\n  `EXTBUTSPOUR` smallint(4) unsigned default NULL,\n  `EXTBUTSCONTRE` smallint(4) unsigned default NULL,\n  `EXTDIFF` tinyint(4) default NULL,\n  `ID_EQUIPE` smallint(5) unsigned NOT NULL default '0',\n  `ID_CHAMP` tinyint(3) unsigned NOT NULL default '0',\n  KEY `ID_CHAMP` (`ID_CHAMP`)\n) ;\nCREATE TABLE `phpl_clmnt_graph` (\n  `id_equipe` smallint(5) unsigned NOT NULL default '0',\n  `fin` tinyint(3) unsigned NOT NULL default '0',\n  `classement` tinyint(3) unsigned NOT NULL default '0',\n  KEY `id_equipe` (`id_equipe`)\n) ;\nCREATE TABLE `phpl_clmnt_pronos` (\n  `id_champ` tinyint(3) unsigned NOT NULL default '0',\n  `id_membre` smallint(5) unsigned NOT NULL default '0',\n  `pseudo` varchar(255) NOT NULL default '',\n  `points` smallint(5) unsigned NOT NULL default '0',\n  `participation` smallint(3) unsigned NOT NULL default '0',\n  `type` enum('hebdo','mensuel_30_jours','mensuel_en_cours','general') NOT NULL default 'hebdo',\n  KEY `id_membre` (`id_membre`),\n  KEY `id_champ` (`id_champ`)\n) ;\nCREATE TABLE `phpl_clubs` (\n  `id` smallint(5) unsigned NOT NULL auto_increment,\n  `nom` varchar(255) NOT NULL default '',\n  `url_logo` tinytext NOT NULL,\n  PRIMARY KEY  (`id`)\n)  ;\n\nCREATE TABLE `phpl_divisions` (\n  `id` tinyint(3) unsigned NOT NULL auto_increment,\n  `nom` varchar(255) NOT NULL default '',\n  PRIMARY KEY  (`id`)\n) ;\nCREATE TABLE `phpl_donnee` (\n  `id` smallint(5) unsigned NOT NULL auto_increment,\n  `nom` text NOT NULL,\n  `id_clubs` smallint(5) unsigned NOT NULL default '0',\n  `id_rens` smallint(5) unsigned NOT NULL default '0',\n  `etat` enum('0','1') NOT NULL default '0',\n  `url` varchar(200) NOT NULL default '',\n  KEY `id` (`id`),\n  KEY `id_rens` (`id_rens`),\n  KEY `id_clubs` (`id_clubs`),\n  KEY `etat` (`etat`)\n) ;\nCREATE TABLE `phpl_effectif` (\n  `id` smallint(5) unsigned NOT NULL auto_increment,\n  `id_joueur` smallint(5) unsigned NOT NULL default '0',\n  `id_equipe` smallint(5) unsigned NOT NULL default '0',\n  PRIMARY KEY  (`id`)\n) ;\nCREATE TABLE `phpl_equipes` (\n  `id` smallint(5) unsigned NOT NULL auto_increment,\n  `id_champ` tinyint(3) unsigned NOT NULL default '0',\n  `id_club` smallint(5) unsigned NOT NULL default '0',\n  `penalite` tinyint(3) default NULL,\n  PRIMARY KEY  (`id`),\n  KEY `id_champ` (`id_champ`),\n  KEY `id_club` (`id_club`)\n) ;\nCREATE TABLE `phpl_gr_championnats` (\n  `id` tinyint(3) unsigned NOT NULL auto_increment,\n  `nom` varchar(255) NOT NULL default '',\n  `id_champ` tinyint(3) unsigned NOT NULL default '0',\n  `activ_prono` enum('0','1') NOT NULL default '1',\n  `pts_prono_exact` tinyint(3) unsigned NOT NULL default '0',\n  `pts_prono_participation` tinyint(2) unsigned NOT NULL default '0',\n  `id_master` smallint(5) unsigned default '0',\n  `tps_avant_prono` tinyint(2) unsigned NOT NULL default '2',\n  KEY `id` (`id`)\n) ;\nCREATE TABLE `phpl_joueurs` (\n  `nom` varchar(100) NOT NULL default '',\n  `prenom` varchar(100) NOT NULL default '',\n  `date_naissance` date NOT NULL default '0000-00-00',\n  `position_terrain` varchar(50) NOT NULL default '',\n  `photo` varchar(250) NOT NULL default '',\n  `id` smallint(5) NOT NULL auto_increment,\n  KEY `id` (`id`)\n) ;\nCREATE TABLE `phpl_journees` (\n  `numero` tinyint(3) unsigned NOT NULL default '0',\n  `date_prevue` date NOT NULL default '0000-00-00',\n  `id` smallint(5) unsigned NOT NULL auto_increment,\n  `id_champ` tinyint(3) unsigned NOT NULL default '0',\n  PRIMARY KEY  (`id`),\n  KEY `id_champ` (`id_champ`)\n) ;\nCREATE TABLE `phpl_matchs` (\n  `id` mediumint(6) unsigned NOT NULL auto_increment,\n  `id_equipe_dom` smallint(5) unsigned default NULL,\n  `id_equipe_ext` smallint(5) unsigned default NULL,\n  `date_reelle` datetime default NULL,\n  `id_journee` smallint(5) unsigned default NULL,\n  `buts_dom` smallint(4) unsigned default NULL,\n  `buts_ext` smallint(4) unsigned default NULL,\n  PRIMARY KEY  (`id`),\n  KEY `id_equipe_dom` (`id_equipe_dom`),\n  KEY `id_equipe_ext` (`id_equipe_ext`),\n  KEY `buts_dom` (`buts_dom`),\n  KEY `buts_ext` (`buts_ext`),\n  KEY `id_journee` (`id_journee`)\n) ;\nCREATE TABLE `phpl_membres` (\n  `id` smallint(5) unsigned NOT NULL auto_increment,\n  `id_prono` varchar(19) NOT NULL default '',\n  `pseudo` varchar(20) NOT NULL default '',\n  `mot_de_passe` varchar(250) NOT NULL default '',\n  `mail` varchar(40) NOT NULL default '',\n  `nom_site` varchar(50) NOT NULL default '',\n  `url_site` varchar(100) NOT NULL default '',\n  `nom` varchar(50) NOT NULL default '',\n  `prenom` varchar(50) NOT NULL default '',\n  `adresse` varchar(100) NOT NULL default '',\n  `code_postal` mediumint(5) NOT NULL default '0',\n  `ville` varchar(200) NOT NULL default '',\n  `pays` varchar(200) NOT NULL default '',\n  `date_naissance` date NOT NULL default '0000-00-00',\n  `profession` varchar(200) NOT NULL default '',\n  `mobile` varchar(14) NOT NULL default '',\n  `ip` varchar(15) NOT NULL default '',\n  `last_connect` varchar(10) NOT NULL default '',\n  `admin` enum('0','1') NOT NULL default '0',\n  PRIMARY KEY  (`id`)\n) ;\nCREATE TABLE `phpl_parametres` (\n  `id_champ` tinyint(3) unsigned NOT NULL default '0',\n  `pts_victoire` tinyint(3) unsigned NOT NULL default '0',\n  `pts_nul` tinyint(3) unsigned NOT NULL default '0',\n  `pts_defaite` tinyint(3) unsigned NOT NULL default '0',\n  `accession` tinyint(3) unsigned NOT NULL default '0',\n  `barrage` tinyint(3) unsigned NOT NULL default '0',\n  `relegation` tinyint(3) unsigned NOT NULL default '0',\n  `id_equipe_fetiche` smallint(4) default NULL,\n  `fiches_clubs` enum('0','1') NOT NULL default '1',\n  `estimation` enum('0','1') NOT NULL default '1',\n  PRIMARY KEY  (`id_champ`)\n) ;\nCREATE TABLE `phpl_pronostics` (\n  `id_membre` smallint(5) unsigned NOT NULL default '0',\n  `id_champ` int(3) unsigned NOT NULL default '0',\n  `id_match` mediumint(6) unsigned NOT NULL default '0',\n  `pronostic` enum('1','N','2') default NULL,\n  `buts_dom` smallint(4) unsigned default NULL,\n  `buts_ext` smallint(4) unsigned default NULL,\n  `points` tinyint(2) unsigned NOT NULL default '0',\n  `participation` enum('0','1') NOT NULL default '0',\n  KEY `id_match` (`id_match`),\n  KEY `id_membre` (`id_membre`)\n) ;\nCREATE TABLE `phpl_rens` (\n  `id` smallint(5) unsigned NOT NULL auto_increment,\n  `nom` varchar(50) NOT NULL default '',\n  `id_classe` tinyint(3) unsigned NOT NULL default '0',\n  `rang` tinyint(3) unsigned NOT NULL default '0',\n  `url` varchar(200) NOT NULL default '',\n  PRIMARY KEY  (`id`)\n) ;\nCREATE TABLE `phpl_saisons` (\n  `id` tinyint(3) unsigned NOT NULL auto_increment,\n  `annee` year(4) NOT NULL default '0000',\n  PRIMARY KEY  (`id`),\n  KEY `id` (`id`)\n) ;\nINSERT INTO `phpl_membres` (`id_prono` , `pseudo` , `mot_de_passe` , `mail` , `nom_site` , `url_site`, `admin` )\n                    VALUES ('{$id_prono}', '{$pseudo}', '{$mdp}', '{$mail}', '{$nom_site}', '{$url_site}','1')";
     if ($res_admin = send_sql($sql_admin, SETUP_TABLE_4)) {
         echo "<font color=\"#009900\" size=\"2\" face=\"Verdana\">" . SETUP_TABLE_5 . "</font>\n<br />";
     }
     $installation_terminee = 1;
 } elseif ($action2 == "install" and $action == "2" and (!isset($_POST['nom_site']) or $_POST['nom_site'] == "" or !isset($_POST['url_site']) or $_POST['url_site'] == "" or !isset($_POST['repertoire_script']) or $_POST['repertoire_script'] == "" or !isset($_POST['pseudo']) or $_POST['pseudo'] == "" or !isset($_POST['mot_de_pass']) or $_POST['mot_de_pass'] == "" or !isset($_POST['mail']) or $_POST['mail'] == "" or $test == "erreur")) {
     echo SETUP_REMPLIR_CHAMP;
 }
 if (!isset($installation_terminee)) {
     $installation_terminee = 0;
 }
 if ($installation_terminee == "1") {
     $to = "phpleague@univert.org<*****@*****.**>";
     $sujet = "Nouvel utilisateur";
     $message = "<html><head>\n<title>PhpLeague</title>\n</head>\n<body>\n<p align=\"center\"><u><font face=\"Verdana\" size=\"3\" color=\"#006A36\">Nouvel\nutilisateur</font></u></p>\n<p><font size=\"2\" face=\"Verdana\">Url : <a href=\"{$url_site}\">{$url_site}</a></font></p>\n<p><font size=\"2\" face=\"Verdana\">Mail : {$mail}</font></p>\n<p><font size=\"2\" face=\"Verdana\">Site : {$nom_site}</font></p>\n</body>\n</html>";
     $from = "Content-Type: text/html; charset=\"iso-8859-1\"\nFrom: {$mail}\n";
     $email = @mail($to, $sujet, $message, $from);