phpbb sur mon site
- saad_sinpk
- Born


- Inscription: Jan 29, 2010
- Messages: 3
- Status: Offline
Salut je veux faire 1 login de mon site web et un forum phpBB, j'essaie, je me joins à la fois la DB et de faire 1 phpbb_user table, maintenant je reçois ce message d'erreur
1062 - Duplicate entry for key 2
insert into phpbb_users (user_name, user_email, user_forname, user_nickname, user_gender, user_birthday, username, user_password, user_image, user_ip, User_status) values ( "sadsa", "emailcom", "asdasdas",, "Mlle", "--", "sadasd", "25f9e794323b453885f5181f1b624d0b",, 119.63.136.101, "active")
1062 - Duplicate entry for key 2
insert into phpbb_users (user_name, user_email, user_forname, user_nickname, user_gender, user_birthday, username, user_password, user_image, user_ip, User_status) values ( "sadsa", "emailcom", "asdasdas",, "Mlle", "--", "sadasd", "25f9e794323b453885f5181f1b624d0b",, 119.63.136.101, "active")
- Anonymous
- Bot


- Inscription: 25 Feb 2008
- Messages: ?
- Loc: Ozzuland
- Status: Online
Janvier 29th, 2010, 1:34 pm
- joebert
- Sledgehammer


- Inscription: Fév 10, 2004
- Messages: 13455
- Loc: Florida
- Status: Offline
- saad_sinpk
- Born


- Inscription: Jan 29, 2010
- Messages: 3
- Status: Offline
D'abord, je déplace mon db connection site à phpbb site Web, puis-je supprimer ma table utilisateur du site web et film pour phpbb_user et le changement de codage dans mes fichiers,
encore une chose quand je cherche d'abord je me joins au premier abord, mais lorsque je tente la seconde fois, il est me permet pas, puis-je supprimer cet utilisateur de DB, et de nouveau je cherche à joindre, je reçois dans
Voici ma structure phpbb_user db
encore une chose quand je cherche d'abord je me joins au premier abord, mais lorsque je tente la seconde fois, il est me permet pas, puis-je supprimer cet utilisateur de DB, et de nouveau je cherche à joindre, je reçois dans
Voici ma structure phpbb_user db
Attachments:
Attachments:
Attachments:
Attachments:
Attachments:
- joebert
- Sledgehammer


- Inscription: Fév 10, 2004
- Messages: 13455
- Loc: Florida
- Status: Offline
Sounds like theres une faille dans le code qui gère les nouveaux membres. Dupliquer les sons des touches comme soit vous essayez de définir le user_id qui devrait être auto_incremented ou que vous n'avez pas pris en compte pour les adresses de courrier électronique existants ou quelque chose.
Avez-vous été à travers les suivants?
http://wiki.phpbb.com/Authentication_plugins
Avez-vous été à travers les suivants?
http://wiki.phpbb.com/Authentication_plugins
Strong with this one, the sudo is.
- saad_sinpk
- Born


- Inscription: Jan 29, 2010
- Messages: 3
- Status: Offline
Here is my code register.php
Quel est mon problème
Code: [ Select ]
<?php require_once('admin/inc/config.php');?>
<?
switch($action)
{
case 'register':
$user_gender =$_POST['gender'];
$user_name =$_POST['name'];
$user_email =$_POST['user_email'];
$user_forname=$_POST['forname'];
$user_nickname=$_POST['nickname'];
$user_birthday =$_POST['dd'].'-'.$_POST['mm'].'-'.$_POST['yy'];
$username =$_POST['username'];
$user_password=$_POST['user_password'];
$sql ="select * from ".TABLE_USERS." where username='$username' or user_email='$user_email'";
$res =tep_db_query($sql);
$row =tep_db_fetch_assoc($res);
if(tep_db_num_rows($res) > (int)1)
{
$err=base64_encode("e-mail ou l'ID utilisateur existe déjà s'il vous plaît choisir un autre!");
}
else if($row['user_email']==$user_email)
{
$err=base64_encode("Cet e-mail id existe déjà s'il vous plaît choisir un autre!");
}
else if($row['username']==$username)
{
$err=base64_encode("Cet ID utilisateur existe déjà choisir un autre!");
}
else{
$image=uploadImage('image', 'images/users/',96,'',32,"register.php?err=Please upload specified file size!",600);
$sql_data_array=array('user_name' =>$user_name,
'user_email' =>$user_email,
'user_forname' =>$user_forname,
'user_nickname' =>$user_nickname,
'user_gender' =>$user_gender,
'user_birthday' =>$user_birthday,
'username' =>$username,
'user_password' =>md5($user_password),
'user_image' =>$image,
'user_ip' =>USER_IP,
'user_status' =>'active'
);
$res=tep_db_perform(TABLE_USERS, $sql_data_array);
if($res)
{
tep_redirect("register.php?msg=".base64_encode("You are successfuly registered now you can access your account"));
}
}
break;
case 'edit':
$sql="select * from ".TABLE_USERS." where user_id='".$_SESSION['site_username']."'";
break;
case 'login':
$username =$_POST['username'];
$user_password =md5($_POST['user_password']);
$sql ="select * from ".TABLE_USERS." where username='".tep_db_input($username)."' and user_password='".tep_db_input($user_password)."'";
$res =tep_db_query($sql);
$row =tep_db_fetch_assoc($res);
if($username=='' && $_POST['user_password']=='')
{
tep_redirect("login.php?err=".base64_encode("Sorry user id and password canot left blank!"));
}
else if($row['user_status']=='inactive')
{
tep_redirect("login.php?err=".base64_encode("Your account has not activated contact administrator!"));
}
else if(tep_db_num_rows($res)>(int)0)
{
tep_session_register("site_user_name");
tep_session_register("site_username");
$_SESSION['site_user_name']=$row['username'];
$_SESSION['site_username'] =$row['user_id'];
//previous page
if(isset($_SESSION['last_return_url'])) {
list($page)= explode('.php',basename($_SESSION['last_return_url']) );
}else{
$page='';
}
//end
//check weather session is active or not
if(isset($_SESSION['cId']) && $_SESSION['cId']==1){
tep_redirect('checkout.php?step=1');
}else if(isset($_SESSION['last_return_url']) && $page=='video' ){
tep_redirect($_SESSION['last_return_url']);
}else{
tep_redirect('dashboard.php');
}
//end
}
else{
tep_redirect("login.php?err=".base64_encode("Wrong user id or password!"));
}
break;
case 'logout':
if(tep_session_is_registered('site_user_name')){
tep_session_unregister('site_user_name');
tep_session_unregister('site_username');
tep_session_unregister('last_return_url');
tep_redirect("login.php?msg=".base64_encode("You have successfully signed out!"));
}else{
tep_redirect("login.php");
}
break;
}
// date month year
$date =array('01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26',
'27','28','29','30','31');
$month =array('01','02','03','04','05','06','07','08','09','10','11','12');
// end
$msg=tep_string_convert($msg,'base64'); //calling string convertion function
$err=tep_string_convert($err,'base64'); //calling string convertion function
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>rougejaunevert</title>
<META name="description" content="rougejaunevert">
<META name="keywords" content="news, guinee, guinea, articles, election, 2010, conakry, labe, kankan, video, radio, candidats, candidat, candidates, candidate, vote, lansana, conte, dadis, moussa, camara, colone,l general, t-shirt, love, shop, achat">
<link rel="shortcut icon" href="favicon.ico" />
<link href="style.css" rel="stylesheet" type="text/css" />
<link href="tutorsty.css" rel="stylesheet" type="text/css" />
<link href="flexcrollstyles.css" rel="stylesheet" type="text/css" />
<script type='text/javascript' src="flexcroll.js"></script>
<script language="javascript" src="js/valid.js"></script>
<!--valid user name-->
<script src="js/jquery.js" type="text/javascript" language="javascript"></script>
<script language="javascript">
//<!---------------------------------+
// Developed by Roshan Bhattarai
// Visit http://roshanbh for this script and more.
// This notice MUST stay intact for legal use
// --------------------------------->
$(document).ready(function()
{
$("#username").blur(function()
{
//remove all the class add the messagebox classes and start fading
$("#msgbox").removeClass().addClass('messagebox').text('Checking...').fadeIn("slow");
//check the username exists or not from ajax
$.post("user_availability.php",{ user_name:$(this).val() } ,function(data)
{
if(data=='no') //if username not avaiable
{
$("#msgbox").fadeTo(200,0.1,function() //start fading the messagebox
{
//add message and change the class of the box and start fading
$(this).html('Cet ID utilisateur existe déjà choisir un autre').addClass('messageboxerror').fadeTo(900,1); return false;
});
}
else if(data=='blank') //if username not avaiable
{
$("#msgbox").fadeTo(200,0.1,function() //start fading the messagebox
{
//add message and change the class of the box and start fading
$(this).html('Sil vous plaît entrer votre nom dutilisateur').addClass('messageboxerror').fadeTo(900,1); return false;
});
}
else
{
$("#msgbox").fadeTo(200,0.1,function() //start fading the messagebox
{
//add message and change the class of the box and start fading
$(this).html('Userid disponible pour enregistrer').addClass('messageboxok').fadeTo(900,1);
});
}
});
});
});
</script>
<style type="text/css">
.top {
margin-bottom: 15px;
}
.messagebox{
position:absolute;
width:100px;
margin-left:30px;
border:1px solid #c93;
background:#ffc;
padding:3px;
}
.messageboxok{
position:absolute;
width:auto;
margin-left:30px;
border:1px solid #349534;
background:#C9FFCA;
padding:3px;
font-weight:bold;
color:#008000;
}
.messageboxerror{
position:absolute;
width:auto;
margin-left:30px;
border:1px solid #CC0000;
background:#F7CBCA;
padding:3px;
font-weight:bold;
color:#CC0000;
}
</style>
<!--end-->
</head>
<body>
<table width="984" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td class="hraderbg">
<? require_once('inc/header.php');?>
</td>
</tr>
<tr>
<td><table width="984" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="657" align="left" valign="top"><table width="657" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="padB"><? tep_inner_banner(0);?></td>
</tr>
<tr>
<td class="padB"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="background:#FFFFFF url(images/content-m-top.gif) no-repeat top;"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="background:url(images/contnet-m-btm.gif) no-repeat bottom;"><table width="100%" border="0" cellspacing="10" cellpadding="0">
<tr>
<td align="left" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="brdrB"><h1>Vous Tes Un Nouveau Client ?</h1></td>
</tr>
<tr>
<td class="brdB">(Champs obligatoires <font class="redCommentText">*</font>)</td>
</tr>
<tr>
<td class="padTB">
<?php echo (!empty($msg)) ? '<div class="success">'.$msg.'</div>' : '';?>
<?php echo (!empty($err)) ? '<div class="error">'.$err.'</div>' : '';?>
<form method="post" name="userform" action="register.php?action=register" enctype="multipart/form-data" onsubmit="javascript:return validRegister()">
<table width="100%" cellpadding="4" cellspacing="0" style="padding-left:10px;" bgcolor="#FFFFFF">
<tr>
<td>Civilite <font class="redCommentText">*</font></td>
<td align="left">
<table width="200" border="0" cellpadding="2" cellspacing="0">
<tr>
<td width="20"><input type="radio" name="gender" value="Mlle" <? if(isset($gender) && $gender=='Mile') echo 'checked';?> /></td>
<td width="33">Mlle</td>
<td width="20"><input type="radio" name="gender" value="Mme" <? if(isset($gender) && $gender=='Mme') echo 'checked';?> /></td>
<td width="43">Mme</td>
<td width="20"><input type="radio" name="gender" value="M" <? if(isset($gender) && $gender=='M') echo 'checked';?> /></td>
<td width="40">M</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>Votre adresse e-mail<font class="redCommentText">*</font></td>
<td align="left">
<input type="text" name="user_email" class="box" size="40" value="<? echo isset($user_email) ? $email : '';?>" />
</td>
</tr>
<tr>
<td>User Id<font class="redCommentText">*</font></td>
<td align="left">
<input type="text" name="username" id="username" class="box" size="30" maxlength="20" />
<span id="msgbox" style="display:none"></span>
</td>
</tr>
<tr>
<td>Votremotdepasse<font class="redCommentText">*</font></td>
<td align="left">
<input type="password" name="user_password" class="box" size="30" maxlength="30" /> </td>
</tr>
<tr>
<td>Confirmez Votremotdepasse<font class="redCommentText">*</font></td>
<td align="left">
<input type="password" name="confirm_pass" class="box" size="30" maxlength="30" /> </td>
</tr>
<tr>
<td width="25%">Nom<font class="redCommentText">*</font></td>
<td width="75%" align="left">
<input type="text" name="name" class="box" size="40" value="<? echo isset($name) ? $name : '';?>" />
</td>
</tr>
<tr>
<td>Prnom<font class="redCommentText">*</font></td>
<td align="left">
<input type="text" name="forname" size="40" value="<? echo isset($forname) ? $forname : '';?>">
</td>
</tr>
<tr>
<td>Pseudo</td>
<td align="left">
<input type="text" name="nickname" size="40" value="<? echo isset($name) ? $name : '';?>" />
</td>
</tr>
<tr>
<td>Date de naissance</td>
<td align="left">
<select name="dd">
<option value="">DD</option>
<?
foreach($date as $val)
{
?>
<option value="<? echo $val;?>" <? if(isset($_POST['dd']) && $_POST['dd']==$val) echo 'selected';?>><? echo $val;?></option>
<?
}
?>
</select>
<select name="mm">
<option value="">MM</option>
<?
foreach($month as $val)
{
?>
<option value="<? echo $val;?>" <? if(isset($_POST['mm']) && $_POST['mm']==$val) echo 'selected';?>><? echo $val;?></option>
<?
}
?>
</select>
<select name="yy">
<option value="">YY</option>
<?
for($i=1920;$i<=2040; $i++)
{
?>
<option value="<? echo $i;?>" <? if(isset($_POST['yy']) && $_POST['yy']==$i) echo 'selected';?>><? echo $i;?></option>
<?
}
?>
</select>
</td>
</tr>
<tr>
<td>Image Profile</td>
<td align="left">
<input type="file" name="image" size="40" />
</td>
</tr>
<tr>
<td> </td>
<td align="left">
<input type="image" name="submit" src="images/btn-submit.gif" style="border:none;padding:0px;" value="submit" />
<img src="images/btn-cancel.gif" onclick="javascript:document.userform.reset();" /> </td>
</tr>
</table>
</form>
</td>
</tr>
<tr>
<td class=" brdrT"></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
<td align="right" valign="top" class="padL"><table width="318" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="padB"><table width="318" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="background:#FFFFFF url(images/content-s-top.gif) no-repeat top;"><table width="318" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="background:url(images/content-s-btm.gif) no-repeat bottom;">
<? require_once('top_candidats.php');?>
</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td class="padB">
<a href="http://www.store.rougejaunevert" target="_blank"><img src="images/shop.jpg" border="0" alt="shop" /></a>
</td>
</tr>
<tr>
<td class="padB">
<? include('vote.php');?>
</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<? require_once('inc/footer.php');?>
</table>
</body>
</html>
<?
switch($action)
{
case 'register':
$user_gender =$_POST['gender'];
$user_name =$_POST['name'];
$user_email =$_POST['user_email'];
$user_forname=$_POST['forname'];
$user_nickname=$_POST['nickname'];
$user_birthday =$_POST['dd'].'-'.$_POST['mm'].'-'.$_POST['yy'];
$username =$_POST['username'];
$user_password=$_POST['user_password'];
$sql ="select * from ".TABLE_USERS." where username='$username' or user_email='$user_email'";
$res =tep_db_query($sql);
$row =tep_db_fetch_assoc($res);
if(tep_db_num_rows($res) > (int)1)
{
$err=base64_encode("e-mail ou l'ID utilisateur existe déjà s'il vous plaît choisir un autre!");
}
else if($row['user_email']==$user_email)
{
$err=base64_encode("Cet e-mail id existe déjà s'il vous plaît choisir un autre!");
}
else if($row['username']==$username)
{
$err=base64_encode("Cet ID utilisateur existe déjà choisir un autre!");
}
else{
$image=uploadImage('image', 'images/users/',96,'',32,"register.php?err=Please upload specified file size!",600);
$sql_data_array=array('user_name' =>$user_name,
'user_email' =>$user_email,
'user_forname' =>$user_forname,
'user_nickname' =>$user_nickname,
'user_gender' =>$user_gender,
'user_birthday' =>$user_birthday,
'username' =>$username,
'user_password' =>md5($user_password),
'user_image' =>$image,
'user_ip' =>USER_IP,
'user_status' =>'active'
);
$res=tep_db_perform(TABLE_USERS, $sql_data_array);
if($res)
{
tep_redirect("register.php?msg=".base64_encode("You are successfuly registered now you can access your account"));
}
}
break;
case 'edit':
$sql="select * from ".TABLE_USERS." where user_id='".$_SESSION['site_username']."'";
break;
case 'login':
$username =$_POST['username'];
$user_password =md5($_POST['user_password']);
$sql ="select * from ".TABLE_USERS." where username='".tep_db_input($username)."' and user_password='".tep_db_input($user_password)."'";
$res =tep_db_query($sql);
$row =tep_db_fetch_assoc($res);
if($username=='' && $_POST['user_password']=='')
{
tep_redirect("login.php?err=".base64_encode("Sorry user id and password canot left blank!"));
}
else if($row['user_status']=='inactive')
{
tep_redirect("login.php?err=".base64_encode("Your account has not activated contact administrator!"));
}
else if(tep_db_num_rows($res)>(int)0)
{
tep_session_register("site_user_name");
tep_session_register("site_username");
$_SESSION['site_user_name']=$row['username'];
$_SESSION['site_username'] =$row['user_id'];
//previous page
if(isset($_SESSION['last_return_url'])) {
list($page)= explode('.php',basename($_SESSION['last_return_url']) );
}else{
$page='';
}
//end
//check weather session is active or not
if(isset($_SESSION['cId']) && $_SESSION['cId']==1){
tep_redirect('checkout.php?step=1');
}else if(isset($_SESSION['last_return_url']) && $page=='video' ){
tep_redirect($_SESSION['last_return_url']);
}else{
tep_redirect('dashboard.php');
}
//end
}
else{
tep_redirect("login.php?err=".base64_encode("Wrong user id or password!"));
}
break;
case 'logout':
if(tep_session_is_registered('site_user_name')){
tep_session_unregister('site_user_name');
tep_session_unregister('site_username');
tep_session_unregister('last_return_url');
tep_redirect("login.php?msg=".base64_encode("You have successfully signed out!"));
}else{
tep_redirect("login.php");
}
break;
}
// date month year
$date =array('01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26',
'27','28','29','30','31');
$month =array('01','02','03','04','05','06','07','08','09','10','11','12');
// end
$msg=tep_string_convert($msg,'base64'); //calling string convertion function
$err=tep_string_convert($err,'base64'); //calling string convertion function
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>rougejaunevert</title>
<META name="description" content="rougejaunevert">
<META name="keywords" content="news, guinee, guinea, articles, election, 2010, conakry, labe, kankan, video, radio, candidats, candidat, candidates, candidate, vote, lansana, conte, dadis, moussa, camara, colone,l general, t-shirt, love, shop, achat">
<link rel="shortcut icon" href="favicon.ico" />
<link href="style.css" rel="stylesheet" type="text/css" />
<link href="tutorsty.css" rel="stylesheet" type="text/css" />
<link href="flexcrollstyles.css" rel="stylesheet" type="text/css" />
<script type='text/javascript' src="flexcroll.js"></script>
<script language="javascript" src="js/valid.js"></script>
<!--valid user name-->
<script src="js/jquery.js" type="text/javascript" language="javascript"></script>
<script language="javascript">
//<!---------------------------------+
// Developed by Roshan Bhattarai
// Visit http://roshanbh for this script and more.
// This notice MUST stay intact for legal use
// --------------------------------->
$(document).ready(function()
{
$("#username").blur(function()
{
//remove all the class add the messagebox classes and start fading
$("#msgbox").removeClass().addClass('messagebox').text('Checking...').fadeIn("slow");
//check the username exists or not from ajax
$.post("user_availability.php",{ user_name:$(this).val() } ,function(data)
{
if(data=='no') //if username not avaiable
{
$("#msgbox").fadeTo(200,0.1,function() //start fading the messagebox
{
//add message and change the class of the box and start fading
$(this).html('Cet ID utilisateur existe déjà choisir un autre').addClass('messageboxerror').fadeTo(900,1); return false;
});
}
else if(data=='blank') //if username not avaiable
{
$("#msgbox").fadeTo(200,0.1,function() //start fading the messagebox
{
//add message and change the class of the box and start fading
$(this).html('Sil vous plaît entrer votre nom dutilisateur').addClass('messageboxerror').fadeTo(900,1); return false;
});
}
else
{
$("#msgbox").fadeTo(200,0.1,function() //start fading the messagebox
{
//add message and change the class of the box and start fading
$(this).html('Userid disponible pour enregistrer').addClass('messageboxok').fadeTo(900,1);
});
}
});
});
});
</script>
<style type="text/css">
.top {
margin-bottom: 15px;
}
.messagebox{
position:absolute;
width:100px;
margin-left:30px;
border:1px solid #c93;
background:#ffc;
padding:3px;
}
.messageboxok{
position:absolute;
width:auto;
margin-left:30px;
border:1px solid #349534;
background:#C9FFCA;
padding:3px;
font-weight:bold;
color:#008000;
}
.messageboxerror{
position:absolute;
width:auto;
margin-left:30px;
border:1px solid #CC0000;
background:#F7CBCA;
padding:3px;
font-weight:bold;
color:#CC0000;
}
</style>
<!--end-->
</head>
<body>
<table width="984" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td class="hraderbg">
<? require_once('inc/header.php');?>
</td>
</tr>
<tr>
<td><table width="984" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="657" align="left" valign="top"><table width="657" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="padB"><? tep_inner_banner(0);?></td>
</tr>
<tr>
<td class="padB"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="background:#FFFFFF url(images/content-m-top.gif) no-repeat top;"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="background:url(images/contnet-m-btm.gif) no-repeat bottom;"><table width="100%" border="0" cellspacing="10" cellpadding="0">
<tr>
<td align="left" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="brdrB"><h1>Vous Tes Un Nouveau Client ?</h1></td>
</tr>
<tr>
<td class="brdB">(Champs obligatoires <font class="redCommentText">*</font>)</td>
</tr>
<tr>
<td class="padTB">
<?php echo (!empty($msg)) ? '<div class="success">'.$msg.'</div>' : '';?>
<?php echo (!empty($err)) ? '<div class="error">'.$err.'</div>' : '';?>
<form method="post" name="userform" action="register.php?action=register" enctype="multipart/form-data" onsubmit="javascript:return validRegister()">
<table width="100%" cellpadding="4" cellspacing="0" style="padding-left:10px;" bgcolor="#FFFFFF">
<tr>
<td>Civilite <font class="redCommentText">*</font></td>
<td align="left">
<table width="200" border="0" cellpadding="2" cellspacing="0">
<tr>
<td width="20"><input type="radio" name="gender" value="Mlle" <? if(isset($gender) && $gender=='Mile') echo 'checked';?> /></td>
<td width="33">Mlle</td>
<td width="20"><input type="radio" name="gender" value="Mme" <? if(isset($gender) && $gender=='Mme') echo 'checked';?> /></td>
<td width="43">Mme</td>
<td width="20"><input type="radio" name="gender" value="M" <? if(isset($gender) && $gender=='M') echo 'checked';?> /></td>
<td width="40">M</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>Votre adresse e-mail<font class="redCommentText">*</font></td>
<td align="left">
<input type="text" name="user_email" class="box" size="40" value="<? echo isset($user_email) ? $email : '';?>" />
</td>
</tr>
<tr>
<td>User Id<font class="redCommentText">*</font></td>
<td align="left">
<input type="text" name="username" id="username" class="box" size="30" maxlength="20" />
<span id="msgbox" style="display:none"></span>
</td>
</tr>
<tr>
<td>Votremotdepasse<font class="redCommentText">*</font></td>
<td align="left">
<input type="password" name="user_password" class="box" size="30" maxlength="30" /> </td>
</tr>
<tr>
<td>Confirmez Votremotdepasse<font class="redCommentText">*</font></td>
<td align="left">
<input type="password" name="confirm_pass" class="box" size="30" maxlength="30" /> </td>
</tr>
<tr>
<td width="25%">Nom<font class="redCommentText">*</font></td>
<td width="75%" align="left">
<input type="text" name="name" class="box" size="40" value="<? echo isset($name) ? $name : '';?>" />
</td>
</tr>
<tr>
<td>Prnom<font class="redCommentText">*</font></td>
<td align="left">
<input type="text" name="forname" size="40" value="<? echo isset($forname) ? $forname : '';?>">
</td>
</tr>
<tr>
<td>Pseudo</td>
<td align="left">
<input type="text" name="nickname" size="40" value="<? echo isset($name) ? $name : '';?>" />
</td>
</tr>
<tr>
<td>Date de naissance</td>
<td align="left">
<select name="dd">
<option value="">DD</option>
<?
foreach($date as $val)
{
?>
<option value="<? echo $val;?>" <? if(isset($_POST['dd']) && $_POST['dd']==$val) echo 'selected';?>><? echo $val;?></option>
<?
}
?>
</select>
<select name="mm">
<option value="">MM</option>
<?
foreach($month as $val)
{
?>
<option value="<? echo $val;?>" <? if(isset($_POST['mm']) && $_POST['mm']==$val) echo 'selected';?>><? echo $val;?></option>
<?
}
?>
</select>
<select name="yy">
<option value="">YY</option>
<?
for($i=1920;$i<=2040; $i++)
{
?>
<option value="<? echo $i;?>" <? if(isset($_POST['yy']) && $_POST['yy']==$i) echo 'selected';?>><? echo $i;?></option>
<?
}
?>
</select>
</td>
</tr>
<tr>
<td>Image Profile</td>
<td align="left">
<input type="file" name="image" size="40" />
</td>
</tr>
<tr>
<td> </td>
<td align="left">
<input type="image" name="submit" src="images/btn-submit.gif" style="border:none;padding:0px;" value="submit" />
<img src="images/btn-cancel.gif" onclick="javascript:document.userform.reset();" /> </td>
</tr>
</table>
</form>
</td>
</tr>
<tr>
<td class=" brdrT"></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
<td align="right" valign="top" class="padL"><table width="318" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="padB"><table width="318" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="background:#FFFFFF url(images/content-s-top.gif) no-repeat top;"><table width="318" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="background:url(images/content-s-btm.gif) no-repeat bottom;">
<? require_once('top_candidats.php');?>
</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td class="padB">
<a href="http://www.store.rougejaunevert" target="_blank"><img src="images/shop.jpg" border="0" alt="shop" /></a>
</td>
</tr>
<tr>
<td class="padB">
<? include('vote.php');?>
</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<? require_once('inc/footer.php');?>
</table>
</body>
</html>
- <?php require_once('admin/inc/config.php');?>
- <?
- switch($action)
- {
- case 'register':
- $user_gender =$_POST['gender'];
- $user_name =$_POST['name'];
- $user_email =$_POST['user_email'];
- $user_forname=$_POST['forname'];
- $user_nickname=$_POST['nickname'];
- $user_birthday =$_POST['dd'].'-'.$_POST['mm'].'-'.$_POST['yy'];
- $username =$_POST['username'];
- $user_password=$_POST['user_password'];
- $sql ="select * from ".TABLE_USERS." where username='$username' or user_email='$user_email'";
- $res =tep_db_query($sql);
- $row =tep_db_fetch_assoc($res);
- if(tep_db_num_rows($res) > (int)1)
- {
- $err=base64_encode("e-mail ou l'ID utilisateur existe déjà s'il vous plaît choisir un autre!");
- }
- else if($row['user_email']==$user_email)
- {
- $err=base64_encode("Cet e-mail id existe déjà s'il vous plaît choisir un autre!");
- }
- else if($row['username']==$username)
- {
- $err=base64_encode("Cet ID utilisateur existe déjà choisir un autre!");
- }
- else{
- $image=uploadImage('image', 'images/users/',96,'',32,"register.php?err=Please upload specified file size!",600);
- $sql_data_array=array('user_name' =>$user_name,
- 'user_email' =>$user_email,
- 'user_forname' =>$user_forname,
- 'user_nickname' =>$user_nickname,
- 'user_gender' =>$user_gender,
- 'user_birthday' =>$user_birthday,
- 'username' =>$username,
- 'user_password' =>md5($user_password),
- 'user_image' =>$image,
- 'user_ip' =>USER_IP,
- 'user_status' =>'active'
- );
- $res=tep_db_perform(TABLE_USERS, $sql_data_array);
- if($res)
- {
- tep_redirect("register.php?msg=".base64_encode("You are successfuly registered now you can access your account"));
- }
- }
- break;
- case 'edit':
- $sql="select * from ".TABLE_USERS." where user_id='".$_SESSION['site_username']."'";
- break;
- case 'login':
- $username =$_POST['username'];
- $user_password =md5($_POST['user_password']);
- $sql ="select * from ".TABLE_USERS." where username='".tep_db_input($username)."' and user_password='".tep_db_input($user_password)."'";
- $res =tep_db_query($sql);
- $row =tep_db_fetch_assoc($res);
- if($username=='' && $_POST['user_password']=='')
- {
- tep_redirect("login.php?err=".base64_encode("Sorry user id and password canot left blank!"));
- }
- else if($row['user_status']=='inactive')
- {
- tep_redirect("login.php?err=".base64_encode("Your account has not activated contact administrator!"));
- }
- else if(tep_db_num_rows($res)>(int)0)
- {
- tep_session_register("site_user_name");
- tep_session_register("site_username");
- $_SESSION['site_user_name']=$row['username'];
- $_SESSION['site_username'] =$row['user_id'];
- //previous page
- if(isset($_SESSION['last_return_url'])) {
- list($page)= explode('.php',basename($_SESSION['last_return_url']) );
- }else{
- $page='';
- }
- //end
- //check weather session is active or not
- if(isset($_SESSION['cId']) && $_SESSION['cId']==1){
- tep_redirect('checkout.php?step=1');
- }else if(isset($_SESSION['last_return_url']) && $page=='video' ){
- tep_redirect($_SESSION['last_return_url']);
- }else{
- tep_redirect('dashboard.php');
- }
- //end
- }
- else{
- tep_redirect("login.php?err=".base64_encode("Wrong user id or password!"));
- }
- break;
- case 'logout':
- if(tep_session_is_registered('site_user_name')){
- tep_session_unregister('site_user_name');
- tep_session_unregister('site_username');
- tep_session_unregister('last_return_url');
- tep_redirect("login.php?msg=".base64_encode("You have successfully signed out!"));
- }else{
- tep_redirect("login.php");
- }
- break;
- }
- // date month year
- $date =array('01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26',
- '27','28','29','30','31');
- $month =array('01','02','03','04','05','06','07','08','09','10','11','12');
- // end
- $msg=tep_string_convert($msg,'base64'); //calling string convertion function
- $err=tep_string_convert($err,'base64'); //calling string convertion function
- ?>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>rougejaunevert</title>
- <META name="description" content="rougejaunevert">
- <META name="keywords" content="news, guinee, guinea, articles, election, 2010, conakry, labe, kankan, video, radio, candidats, candidat, candidates, candidate, vote, lansana, conte, dadis, moussa, camara, colone,l general, t-shirt, love, shop, achat">
- <link rel="shortcut icon" href="favicon.ico" />
- <link href="style.css" rel="stylesheet" type="text/css" />
- <link href="tutorsty.css" rel="stylesheet" type="text/css" />
- <link href="flexcrollstyles.css" rel="stylesheet" type="text/css" />
- <script type='text/javascript' src="flexcroll.js"></script>
- <script language="javascript" src="js/valid.js"></script>
- <!--valid user name-->
- <script src="js/jquery.js" type="text/javascript" language="javascript"></script>
- <script language="javascript">
- //<!---------------------------------+
- // Developed by Roshan Bhattarai
- // Visit http://roshanbh for this script and more.
- // This notice MUST stay intact for legal use
- // --------------------------------->
- $(document).ready(function()
- {
- $("#username").blur(function()
- {
- //remove all the class add the messagebox classes and start fading
- $("#msgbox").removeClass().addClass('messagebox').text('Checking...').fadeIn("slow");
- //check the username exists or not from ajax
- $.post("user_availability.php",{ user_name:$(this).val() } ,function(data)
- {
- if(data=='no') //if username not avaiable
- {
- $("#msgbox").fadeTo(200,0.1,function() //start fading the messagebox
- {
- //add message and change the class of the box and start fading
- $(this).html('Cet ID utilisateur existe déjà choisir un autre').addClass('messageboxerror').fadeTo(900,1); return false;
- });
- }
- else if(data=='blank') //if username not avaiable
- {
- $("#msgbox").fadeTo(200,0.1,function() //start fading the messagebox
- {
- //add message and change the class of the box and start fading
- $(this).html('Sil vous plaît entrer votre nom dutilisateur').addClass('messageboxerror').fadeTo(900,1); return false;
- });
- }
- else
- {
- $("#msgbox").fadeTo(200,0.1,function() //start fading the messagebox
- {
- //add message and change the class of the box and start fading
- $(this).html('Userid disponible pour enregistrer').addClass('messageboxok').fadeTo(900,1);
- });
- }
- });
- });
- });
- </script>
- <style type="text/css">
- .top {
- margin-bottom: 15px;
- }
- .messagebox{
- position:absolute;
- width:100px;
- margin-left:30px;
- border:1px solid #c93;
- background:#ffc;
- padding:3px;
- }
- .messageboxok{
- position:absolute;
- width:auto;
- margin-left:30px;
- border:1px solid #349534;
- background:#C9FFCA;
- padding:3px;
- font-weight:bold;
- color:#008000;
- }
- .messageboxerror{
- position:absolute;
- width:auto;
- margin-left:30px;
- border:1px solid #CC0000;
- background:#F7CBCA;
- padding:3px;
- font-weight:bold;
- color:#CC0000;
- }
- </style>
- <!--end-->
- </head>
- <body>
- <table width="984" border="0" align="center" cellpadding="0" cellspacing="0">
- <tr>
- <td class="hraderbg">
- <? require_once('inc/header.php');?>
- </td>
- </tr>
- <tr>
- <td><table width="984" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td width="657" align="left" valign="top"><table width="657" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td class="padB"><? tep_inner_banner(0);?></td>
- </tr>
- <tr>
- <td class="padB"><table width="100%" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td style="background:#FFFFFF url(images/content-m-top.gif) no-repeat top;"><table width="100%" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td style="background:url(images/contnet-m-btm.gif) no-repeat bottom;"><table width="100%" border="0" cellspacing="10" cellpadding="0">
- <tr>
- <td align="left" valign="top">
- <table width="100%" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td class="brdrB"><h1>Vous Tes Un Nouveau Client ?</h1></td>
- </tr>
- <tr>
- <td class="brdB">(Champs obligatoires <font class="redCommentText">*</font>)</td>
- </tr>
- <tr>
- <td class="padTB">
- <?php echo (!empty($msg)) ? '<div class="success">'.$msg.'</div>' : '';?>
- <?php echo (!empty($err)) ? '<div class="error">'.$err.'</div>' : '';?>
- <form method="post" name="userform" action="register.php?action=register" enctype="multipart/form-data" onsubmit="javascript:return validRegister()">
- <table width="100%" cellpadding="4" cellspacing="0" style="padding-left:10px;" bgcolor="#FFFFFF">
- <tr>
- <td>Civilite <font class="redCommentText">*</font></td>
- <td align="left">
- <table width="200" border="0" cellpadding="2" cellspacing="0">
- <tr>
- <td width="20"><input type="radio" name="gender" value="Mlle" <? if(isset($gender) && $gender=='Mile') echo 'checked';?> /></td>
- <td width="33">Mlle</td>
- <td width="20"><input type="radio" name="gender" value="Mme" <? if(isset($gender) && $gender=='Mme') echo 'checked';?> /></td>
- <td width="43">Mme</td>
- <td width="20"><input type="radio" name="gender" value="M" <? if(isset($gender) && $gender=='M') echo 'checked';?> /></td>
- <td width="40">M</td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td>Votre adresse e-mail<font class="redCommentText">*</font></td>
- <td align="left">
- <input type="text" name="user_email" class="box" size="40" value="<? echo isset($user_email) ? $email : '';?>" />
- </td>
- </tr>
- <tr>
- <td>User Id<font class="redCommentText">*</font></td>
- <td align="left">
- <input type="text" name="username" id="username" class="box" size="30" maxlength="20" />
- <span id="msgbox" style="display:none"></span>
- </td>
- </tr>
- <tr>
- <td>Votremotdepasse<font class="redCommentText">*</font></td>
- <td align="left">
- <input type="password" name="user_password" class="box" size="30" maxlength="30" /> </td>
- </tr>
- <tr>
- <td>Confirmez Votremotdepasse<font class="redCommentText">*</font></td>
- <td align="left">
- <input type="password" name="confirm_pass" class="box" size="30" maxlength="30" /> </td>
- </tr>
- <tr>
- <td width="25%">Nom<font class="redCommentText">*</font></td>
- <td width="75%" align="left">
- <input type="text" name="name" class="box" size="40" value="<? echo isset($name) ? $name : '';?>" />
- </td>
- </tr>
- <tr>
- <td>Prnom<font class="redCommentText">*</font></td>
- <td align="left">
- <input type="text" name="forname" size="40" value="<? echo isset($forname) ? $forname : '';?>">
- </td>
- </tr>
- <tr>
- <td>Pseudo</td>
- <td align="left">
- <input type="text" name="nickname" size="40" value="<? echo isset($name) ? $name : '';?>" />
- </td>
- </tr>
- <tr>
- <td>Date de naissance</td>
- <td align="left">
- <select name="dd">
- <option value="">DD</option>
- <?
- foreach($date as $val)
- {
- ?>
- <option value="<? echo $val;?>" <? if(isset($_POST['dd']) && $_POST['dd']==$val) echo 'selected';?>><? echo $val;?></option>
- <?
- }
- ?>
- </select>
- <select name="mm">
- <option value="">MM</option>
- <?
- foreach($month as $val)
- {
- ?>
- <option value="<? echo $val;?>" <? if(isset($_POST['mm']) && $_POST['mm']==$val) echo 'selected';?>><? echo $val;?></option>
- <?
- }
- ?>
- </select>
- <select name="yy">
- <option value="">YY</option>
- <?
- for($i=1920;$i<=2040; $i++)
- {
- ?>
- <option value="<? echo $i;?>" <? if(isset($_POST['yy']) && $_POST['yy']==$i) echo 'selected';?>><? echo $i;?></option>
- <?
- }
- ?>
- </select>
- </td>
- </tr>
- <tr>
- <td>Image Profile</td>
- <td align="left">
- <input type="file" name="image" size="40" />
- </td>
- </tr>
- <tr>
- <td> </td>
- <td align="left">
- <input type="image" name="submit" src="images/btn-submit.gif" style="border:none;padding:0px;" value="submit" />
- <img src="images/btn-cancel.gif" onclick="javascript:document.userform.reset();" /> </td>
- </tr>
- </table>
- </form>
- </td>
- </tr>
- <tr>
- <td class=" brdrT"></td>
- </tr>
- </table></td>
- </tr>
- </table></td>
- </tr>
- </table></td>
- </tr>
- </table></td>
- </tr>
- </table></td>
- <td align="right" valign="top" class="padL"><table width="318" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td class="padB"><table width="318" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td style="background:#FFFFFF url(images/content-s-top.gif) no-repeat top;"><table width="318" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td style="background:url(images/content-s-btm.gif) no-repeat bottom;">
- <? require_once('top_candidats.php');?>
- </td>
- </tr>
- </table></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td class="padB">
- <a href="http://www.store.rougejaunevert" target="_blank"><img src="images/shop.jpg" border="0" alt="shop" /></a>
- </td>
- </tr>
- <tr>
- <td class="padB">
- <? include('vote.php');?>
- </td>
- </tr>
- </table></td>
- </tr>
- </table></td>
- </tr>
- <? require_once('inc/footer.php');?>
- </table>
- </body>
- </html>
Quel est mon problème
Page 1 sur 1
Pour répondre à ce sujet, vous devez vous connecter ou vous enregistrer. Il est gratuit.
Afficher de l'information
- Total des messages de ce sujet: 5 messages
- Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 92 invités
- Vous ne pouvez pas poster de nouveaux sujets
- Vous ne pouvez pas répondre aux sujets
- Vous ne pouvez pas éditer vos messages
- Vous ne pouvez pas supprimer vos messages
- Vous ne pouvez pas joindre des fichiers
