1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339
| <?php require_once('Connections/comsite.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
// *** Redirect if username exists
$MM_flag="MM_insert";
if (isset($_POST[$MM_flag])) {
$MM_dupKeyRedirect="LoginErreurinscrip.php";
$loginUsername = $_POST['ch_mem_pseudo'];
$LoginRS__query = sprintf("SELECT ch_mem_pseudo FROM tab_membres WHERE ch_mem_pseudo=%s", GetSQLValueString($loginUsername, "text"));
mysql_select_db($database_comsite, $comsite);
$LoginRS=mysql_query($LoginRS__query, $comsite) or die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);
//if there is a row in the database, the username was found - can not add the requested username
if($loginFoundUser){
$MM_qsChar = "?";
//append the username to the redirect page
if (substr_count($MM_dupKeyRedirect,"?") >=1) $MM_qsChar = "&";
$MM_dupKeyRedirect = $MM_dupKeyRedirect . $MM_qsChar ."requsername=".$loginUsername;
header ("Location: $MM_dupKeyRedirect");
exit;
}
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "Inscrire")) {
$insertSQL = sprintf("INSERT INTO tab_membres (ch_mem_pseudo, ch_mem_email, ch_mem_pass, ch_mem_nom, ch_mem_prenom, ch_mem_sexe, ch_mem_naissance, ch_mem_publie_nom, ch_mem_publie_pre, ch_mem_publie_sexe, ch_mem_publie_nais, ch_mem_pays, ch_mem_qualite, ch_mem_parrain, ch_mem_site, ch_mem_avatar, ch_mem_parler_soi, ch_mem_niveau) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['ch_mem_pseudo'], "text"),
GetSQLValueString($_POST['ch_mem_email'], "text"),
GetSQLValueString($_POST['ch_mem_pass'], "text"),
GetSQLValueString($_POST['ch_mem_nom'], "text"),
GetSQLValueString($_POST['ch_mem_prenom'], "text"),
GetSQLValueString($_POST['ch_mem_sexe'], "text"),
GetSQLValueString($_POST['ch_mem_naissance'], "date"),
GetSQLValueString($_POST['ch_mem_publie_nom'], "int"),
GetSQLValueString($_POST['ch_mem_publie_pre'], "int"),
GetSQLValueString($_POST['ch_mem_publie_sexe'], "int"),
GetSQLValueString($_POST['ch_mem_publie_nais'], "int"),
GetSQLValueString($_POST['ch_mem_pays'], "text"),
GetSQLValueString($_POST['ch_mem_qualite'], "text"),
GetSQLValueString($_POST['ch_mem_parrain'], "text"),
GetSQLValueString($_POST['ch_mem_site'], "text"),
GetSQLValueString($_POST['ch_mem_avatar'], "text"),
GetSQLValueString($_POST['ch_mem_parler_soi'], "text"),
GetSQLValueString($_POST['ch_mem_niveau'], "int"));
mysql_select_db($database_comsite, $comsite);
$Result1 = mysql_query($insertSQL, $comsite) or die(mysql_error());
$insertGoTo = "profilMembre_accueil.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Bienvenue sur ************ ! : identification</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="reset.css" rel="stylesheet" type="text/css">
<link href="styles/visuel_02b.css" rel="stylesheet" type="text/css">
<style type="text/css">
.page_generale_bis h4 {
font: 18px "Comic Sans MS", cursive;
margin-top: 40px;
width: 600px;
text-align: center;
margin-right: auto;
margin-left: auto;
}
.page_generale_bis #en_tete {
text-align: center;
}
.page_generale_bis .footer .menu_pied {
margin-top: 100px;
padding-left: 100px;
}
.page_generale_bis .bas_page {
width: 960px;
font-size: 8px;
margin-right: auto;
margin-left: auto;
text-align: center;
display: block;
}
</style>
<script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<script src="SpryAssets/SpryValidationPassword.js" type="text/javascript"></script>
<script src="SpryAssets/SpryValidationConfirm.js" type="text/javascript"></script>
<script src="SpryAssets/SpryValidationTextarea.js" type="text/javascript"></script>
<link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css">
<link href="SpryAssets/SpryValidationPassword.css" rel="stylesheet" type="text/css">
<link href="SpryAssets/SpryValidationConfirm.css" rel="stylesheet" type="text/css">
<link href="SpryAssets/SpryValidationTextarea.css" rel="stylesheet" type="text/css">
</head>
<body class="page_generale_bis" >
<!-- Bannière du site -->
<div id="en_tete">
<p><img src="image/LogoCDCo.jpg" width="960" height="400" alt="logoCDCo"></p>
</div>
<!-- Accroche -->
<h4> **.</h4>
<h2>S'incrire</h2>
<p style="text-align:center">Les champs munis d'une * sont obligatoires</p>
<div class="inscrire">
<fieldset>
<form action="<?php echo $editFormAction; ?>" method="POST" enctype="multipart/form-data" name="Inscrire" id="Inscrire">
<table width="850" border="0" cellspacing="5" cellpadding="2">
<tr>
<th colspan="3" scope="row"><h4>Identifiants</h4></th>
</tr>
<tr>
<th width="250" scope="row"><strong>Pseudo : *</strong></th>
<td colspan="2"><label for="ch_mem_pseudo"></label>
<span id="sprytextfield2">
<input name="ch_mem_pseudo" type="text" id="ch_mem_pseudo" size="50">
<span class="textfieldRequiredMsg">Une valeur est requise.</span></span></td>
</tr>
<tr>
<th width="250" scope="row"><strong>Email : *</strong></th>
<td colspan="2"><label for="ch_mem_email"></label>
<span id="sprytextfield3">
<input name="ch_mem_email" type="text" id="ch_mem_email" size="80">
<span class="textfieldRequiredMsg">Une valeur est requise.</span><span class="textfieldInvalidFormatMsg">Format non valide.</span></span></td>
</tr>
<tr>
<th width="250" scope="row"><strong>Mot de passe : *</strong></th>
<td colspan="2"><label for="ch_mem_pass"></label>
<span id="sprypassword1">
<input name="ch_mem_pass" type="password" id="ch_mem_pass" size="50">
<span class="passwordRequiredMsg">Une valeur est requise.</span></span></td>
</tr>
<tr>
<th width="250" scope="row"><strong>Confirmer le mot de passe : *</strong></th>
<td colspan="2"><label for="textfield"></label>
<span id="spryconfirm1">
<input name="textfield" type="password" id="textfield" size="50">
<span class="confirmRequiredMsg">Une valeur est requise.</span><span class="confirmInvalidMsg">Les valeurs ne correspondent pas.</span></span></td>
</tr>
<tr>
<th colspan="3" scope="row"><h4>Coordonnées</h4></th>
</tr>
<tr>
<th width="250" scope="row"><strong>Nom : *</strong></th>
<td><label for="ch_mem_nom"></label>
<span id="sprytextfield4">
<input name="ch_mem_nom" type="text" id="ch_mem_nom" size="50">
<span class="textfieldRequiredMsg">Une valeur est requise.</span></span></td>
<td width="200"><label>Publié :
<input name="ch_mem_publie_nom" type="radio" id="ch_mem_publie_nom_0" value="1" checked>
Oui</label>
<label>
<input type="radio" name="ch_mem_publie_nom" value="0" id="ch_mem_publie_nom_1">
Non *</label></td>
</tr>
<tr>
<th width="250" scope="row"><strong>Prénom: *</strong></th>
<td width="300"><label for="ch_mem_prenom"></label>
<span id="sprytextfield5">
<input name="ch_mem_prenom" type="text" id="ch_mem_prenom" size="50">
<span class="textfieldRequiredMsg">Une valeur est requise.</span></span></td>
<td width="200"><label> Publié :
<input name="ch_mem_publie_pre" type="radio" id="ch_mem_publie_pre_0" value="1" checked>
Oui</label>
<label>
<input type="radio" name="ch_mem_publie_pre" value="0" id="ch_mem_publie_pre_1">
Non *</label></td>
</tr>
<tr>
<th width="250" scope="row"><strong>Sexe : *</strong></th>
<td width="300"><label>
<input name="ch_mem_sexe" type="radio" id="ch_mem_sexe_0" value="F" checked>
Femme</label>
<label>
<input type="radio" name="ch_mem_sexe" value="H" id="ch_mem_sexe_1">
Homme</label></td>
<td width="200"><label> Publié :
<input name="ch_mem_publie_sexe" type="radio" id="ch_mem_publie_sexe_0" value="1" checked>
Oui</label>
<label>
<input type="radio" name="ch_mem_publie_sexe" value="0" id="ch_mem_publie_sexe_1">
Non *</label></td>
</tr>
<tr>
<th width="250" scope="row"><p><strong>Date de naissance : *</strong></p>
<p><strong>(Format : AAAA-MM-JJ)</strong></p></th>
<td width="300"><label for="ch_mem_naissance"></label>
<span id="sprytextfield1"><span id="sprytextfield6">
<input type="text" name="ch_mem_naissance" id="ch_mem_naissance">
<span class="textfieldRequiredMsg">Une valeur est requise.</span><span class="textfieldInvalidFormatMsg">Format non valide.</span></span><span class="textfieldRequiredMsg">Une valeur est requise.</span><span class="textfieldInvalidFormatMsg">Format non valide.</span></span></td>
<td width="200"><label>Publié :
<input name="ch_mem_publie_nais" type="radio" id="ch_mem_publie_nais_0" value="1" checked>
Oui</label>
<label>
<input type="radio" name="ch_mem_publie_nais" value="0" id="ch_mem_publie_nais_1">
Non *</label></td>
</tr>
<tr>
<th width="250" scope="row"><strong>Pays : *</strong></th>
<td colspan="2"><label for="ch_mem_pays"></label>
<select name="ch_mem_pays" id="ch_mem_pays">
<option value="1">France</option>
<option value="2">Belgique</option>
<option value="3">Suisse</option>
<option value="4">Canada Français</option>
</select></td>
</tr>
<tr>
<th width="250" scope="row"><strong>Qualité : *</strong></th>
<td colspan="2"><label>
<input name="ch_mem_qualite" type="radio" id="ch_mem_qualite_0" value="P" checked>
Particulier</label>
<label>
<input type="radio" name="ch_mem_qualite" value="E" id="ch_mem_qualite_1">
Eleveur</label>
<label>
<input type="radio" name="ch_mem_qualite" value="F" id="ch_mem_qualite_2">
Famille Accueil</label>
<label>
<input type="radio" name="ch_mem_qualite" value="A" id="ch_mem_qualite_2">
Association</label></td>
</tr>
<tr>
<th width="250" scope="row"><strong>Nom du parrain :</strong></th>
<td colspan="2"><label for="ch_mem_parrain"></label>
<input name="ch_mem_parrain" type="text" id="ch_mem_parrain" size="50"></td>
</tr>
<tr>
<th width="250" scope="row"><strong>Site internet :</strong></th>
<td colspan="2"><label for="ch_mem_site"></label>
<span id="sprytextfield7">
<input name="ch_mem_site" type="text" id="ch_mem_site" size="80">
<span class="textfieldInvalidFormatMsg">Format non valide.</span></span></td>
</tr>
<tr>
<th colspan="3" scope="row"><h4>Personnalisation</h4></th>
</tr>
<tr>
<th width="250" scope="row"><strong>Photo Avatar :</strong></th>
<td width="300"><label for="ch_mem_avatar"></label>
<input name="ch_mem_avatar" type="file" id="ch_mem_avatar" size="50"></td>
<td width="200"> </td>
</tr>
<tr>
<th width="250" scope="row"><strong>Parler de soi :</strong></th>
<td colspan="2"><label for="ch_mem_parler_soi"></label>
<span id="sprytextarea1"><span id="sprytextarea2">
<textarea name="ch_mem_parler_soi" id="ch_mem_parler_soi" cols="45" rows="5"></textarea>
<span class="textareaMaxCharsMsg">Le nombre maximum de caractères a été dépassé.</span></span><span class="textareaMaxCharsMsg">Le nombre maximum de caractères a été dépassé.</span></span></td>
</tr>
<tr>
<th colspan="3" scope="row"><h4>Terminer votre inscription en choisissant une option *</h4></th>
</tr>
<tr>
<th colspan="3" scope="row"><strong>
<label>
<input type="radio" name="ch_mem_niveau" value="10" id="ch_mem_niveau_0">
Je m'inscris gratuitement avec accès limité et je valide immédiatement mon inscription.</label>
</strong></th>
</tr>
<tr>
<th colspan="3" scope="row"><strong>
<label>
<input type="radio" name="ch_mem_niveau" id="ch_mem_niveau_1" value="20" checked>
Je deviens Membre Gold et je renseigne la partie Paiement.</label>
</strong></th>
</tr>
<tr>
<th colspan="3" scope="row"><input name="cgu" type="checkbox" value="">
Je reconnais avoir lu les conditions générales et les règles d'usage du site</th>
</tr>
<tr>
<th width="250" scope="row"> </th>
<td width="300"><input type="submit" name="button" id="button" value="Envoyer">
<input type="reset" name="button2" id="button2" value="Annuler"></td>
<td width="200"> </td>
</tr>
</table>
<input type="hidden" name="MM_insert" value="Inscrire">
</form>
</fieldset>
</div>
<!-- Pied de page -->
</div>
<script type="text/javascript">
var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2", "none", {validateOn:["change"]});
var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3", "email", {validateOn:["change"]});
var sprypassword1 = new Spry.Widget.ValidationPassword("sprypassword1", {validateOn:["change"]});
var spryconfirm1 = new Spry.Widget.ValidationConfirm("spryconfirm1", "ch_mem_pass", {validateOn:["change"]});
var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4", "none", {validateOn:["change"]});
var sprytextfield5 = new Spry.Widget.ValidationTextField("sprytextfield5", "none", {validateOn:["change"]});
var sprytextfield6 = new Spry.Widget.ValidationTextField("sprytextfield6", "date", {format:"yyyy-mm-dd", validateOn:["change"]});
var sprytextfield7 = new Spry.Widget.ValidationTextField("sprytextfield7", "url", {validateOn:["change"], isRequired:false});
var sprytextarea2 = new Spry.Widget.ValidationTextarea("sprytextarea2", {maxChars:255, validateOn:["change"], isRequired:false});
</script>
</body>
</html> |
Partager