Communauté Informatique NDFR.net : prob de lien de ref - PHP - Programmation Web (HTML, PHP, ASP, Java, XML, etc.)
Reply
prob de lien de ref - PHP
Thread Tools Display Modes
  #1  
Old 24-03-2004, 19:02
StoRm StoRm is offline
Membre
 
Join Date: 06-10-2003
Posts: 61
Re: prob de lien de ref - PHP

ouais justement j'arrive pas à trouver ou est l erreur !
si tu connais assez bien le langage et que tu pourrais m aider

on se contact sur msn pour que je te montre quelques fragment de code
Reply With Quote
  #2  
Old 24-03-2004, 19:16
Samva's Avatar
Samva Samva is offline
Niaisüre within
 
Join Date: 24-04-2003
Location: Tours
Age: 41
Posts: 2,320
Send a message via ICQ to Samva Send a message via MSN to Samva
Re: prob de lien de ref - PHP

Ben montre ton code ici, du moins la partie qui pose probleme.. essaie de cerner la partie ou tu fais la génération de l'url par exemple
__________________
For the End-of-the-World spell, press "Ctrl, Alt, Delete."


Reply With Quote
  #3  
Old 24-03-2004, 19:46
StoRm StoRm is offline
Membre
 
Join Date: 06-10-2003
Posts: 61
Re: prob de lien de ref - PHP

<?
if(!isset($ref)){
include("membres/fonctions.php");
$kil=rotateur();
$pg=$PHP_SELF;
$ki=$kil["pseudo"]; sti($kil["id"],$pg);
}
else{
include("membres/fonctions.php");
$kil=rot_perso($ref);
$pg=$PHP_SELF;
$ki=$kil["pseudo"]; sti($kil["id"],$pg);
}
echo $ki;
?>


site.domaine/xxx.php?parin=<? echo $kil['parain']; ?>&ref=<? echo $kil['code']; ?>


rotateur :




<?

function rotateur(){
include("db.php");
$con_rot=mysql_connect($host,$user,$pass);
$sql_der="select dernier from technique where id='1' ";
$res_der=@mysql_db_query($db,$sql_der,$con_rot);
list($dern)=@mysql_fetch_row($res_der);

$sql_rot="select id,parain,pseudo,mail,code from $tbl_membres where id>$dern order by id asc ";
$res_rot=mysql_db_query($db,$sql_rot,$con_rot);
$valides=@mysql_num_rows($res_rot);
if($valides==0){
$sql_rot="select id,parain,pseudo,mail,code from $tbl_membres where id<>'1' order by id asc ";
$res_rot=mysql_db_query($db,$sql_rot,$con_rot);
}
list($rot["id"],$rot["parain"],$rot["pseudo"],$rot["mail"],$rot["code"])=mysql_fetch_row($res_rot);

$sql_par="select code from $tbl_membres where id='".$rot["parain"]."' ";
$res_par=@mysql_db_query($db,$sql_par,$con_rot);
list($rot["parain"])=@mysql_fetch_row($res_par);

return $rot;
@mysql_close($con_rot);
}

function rot_perso($rep) {
include("db.php");
$con_rot=mysql_connect($host,$user,$pass);
$sql_rot="select id,parain,code,pseudo,mail from $tbl_membres where code='$rep' ";
$res_rot=mysql_db_query($db,$sql_rot,$con_rot);
list($rotperso["id"],$rotperso["parain"],$rotperso["code"],$rotperso["pseudo"],$rotperso["mail"])=mysql_fetch_row($res_rot);

$sql_par="select code from $tbl_membres where id='".$rot["parain"]."' ";
$res_par=@mysql_db_query($db,$sql_par,$con_rot);
list($rotperso["paran"])=@mysql_fetch_row($res_par);

$rot["parain"]=$rotperso["paran"];

return $rotperso;
@mysql_close($con_rot);
}

function sti($quel_id,$page){
if(isset($quel_id)){
$date_vue=date("Y-m-j");
$time_vue=date("H:i");
$ip=getenv("REMOTE_ADDR");

@include("db.php");
$con_par=mysql_connect($host,$user,$pass);
$sql_par="insert into $tbl_stats (quel_id,page,date_vue,time_vue,ip)
values ('$quel_id','$page','$date_vue','$time_vue','$ip') ";
$sql_par2="update $tbl_membres set pages_vues=pages_vues+1 where id='$quel_id' ";
$sql_par3=" update technique set dernier='$quel_id' where id='1' ";
mysql_db_query($db,$sql_par,$con_par);
mysql_db_query($db,$sql_par2,$con_par);
mysql_db_query($db,$sql_par3,$con_par);
@mysql_close($con_par);
}
}
?>
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP 4.3.10 et PHP 5.0.3 1for-matik Actualité 0 16-12-2004 18:40
PHP 5.0.0 Final Toitoine Actualité 10 18-07-2004 17:16
Problème de lecture de fichier en PHP stan Programmation Web (HTML, PHP, ASP, Java, XML, etc.) 9 12-10-2003 22:47
Prob Framework claude922 Windows NT4/2000/XP Client 21 03-11-2002 16:05
creer un site en php kenny250 Discussions sur le site et/ou le forum 5 03-11-2002 11:40

All times are GMT +2. The time now is 18:41.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.