Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $password='pasword'; // le password
- $hostname='bases.sql'; //connect sqladmin
- $username='login'; //user
- $dbname='bdd'; //nom ou regroupe toutes mes tables
- $base = mysql_connect ($hostname,$username,$password);
- $connect =mysql_query("$dbname", $base);
- $requete ="SELECT * FROM guestbookdafmer";
- $don =mysql_db_query($dbname,$requete,$base);
- if ($_GET['produit'] == LOGIN)
- {
- if(isset($_GET['nom']))
- {
- $nom=$_GET['nom'];
- $email=$_GET['email'];
- $site=$_GET['site'];
- $pays=$_GET['pays'];
- $ville=$_GET['ville'];
- $message=$_GET['message'];
- $sql = "INSERT INTO guestbookdafmer(daflee-livredor,nom,email,site,pays,ville,message,date,heure) VALUES ('','$nom','$email','$site','$pays','$ville','$message',CURRENT_DATE(),CURRENT_TIME())";
- $exc = mysql_query($sql);
- }
- }
- else
- {
- echo "mauvais calcul";
- }
- $livre.="<table border=1>";
- $sql2 = "SELECT * FROM guestbookdafmer ORDER BY date DESC, heure DESC";
- $ca = $sq12;
- $sql3 = mysql_query($sql2);
- $chemin = "images/pers/home.gif";
- while($data = mysql_fetch_array($sql3))
- {
- $date_us="".$data['date']."";
- $annee = substr($date_us,0,4);
- $mois = substr($date_us,5,2);
- $jour = substr($date_us,8,2);
- $date_fr = $jour."-".$mois."-".$annee;
- ['site'].'<br>'.$data['message'].'<br><br>';
- $mess = $data['message'];
- $smiley_text = array(':)', ':-D', ':?', '8)', ':cry:', ':shock:', ':V)', ':x', ':lol:', '8-O', ':;', ':oops:', ':twisted:', ':evil:', ':GG', ':mdr:', ':-)X', ':-//');
- $smiley_img = array('smile.gif', 'biggrin.gif', 'confused.gif', 'cool.gif', 'cry.gif', 'eek.gif', 'love.gif', 'mad.gif', 'lol.gif', 'surprised.gif', 'wink.gif', 'ooops.gif', 'twisted.gif', 'evil.gif', 'furious.gif', 'mdr.gif', 'cheer.gif', 'acllamer.gif');
- $mess = ' '.$mess.' ';
- $num_smilies = count($smiley_text);
- for ($i = 0; $i < $num_smilies; ++$i)
- $mess = preg_replace("#(?<=.\W|\W.|^\W)".preg_quote($smiley_text[$i], '#')."(?=.\W|\W.|\W$)#m", '$1<img src="./images/smileys/'.$smiley_img[$i].'" alt="'.substr($smiley_img[$i], 0, strrpos($smiley_img[$i], '.')).'" />$2', $mess);
- ['site']."<br>".$data['message']."<br><br>";
- width=100% class=row_gris><table border=0 width=100% cellspacing=0 cellpadding=0><tbody><font class=Verdana_rouge_clair><b> ".$data['nom']."</b></font> (<b>".$data['pays']."-".$data['ville']."</b>) mailto: ".$data['email']." site: ".$data['site']."<br>".$data['message']."<br><br></tbody></table></td></tr></tbody></table></td></tr></tbody></table>";
- width=100% class=row_gris><table border=0 width=100% cellspacing=0 cellpadding=0><tbody><font class=Verdana_rouge_clair><b> ".$data['nom']."</b></font> (<b>".$data['pays']."-".$data['ville']."</b>) mailto: ".$data['email']." site: ".$data['site']."<br><tr><td width=100% colspan=2><div style=padding-bottom: 4px; padding-left: 4px; padding-right: 4px;>".$data['message']."</div></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table><br>";
- width=100% class=row_gris><table border=0 width=100% cellspacing=0 cellpadding=0><tbody><tr><td width=70%><div style=padding-top: 4px; padding-left: 4px; padding-right: 4px;><font class=Verdana_rouge_clair><b> ".$data['nom']."</b></font></div></td> (<b> ".$data['pays']." - ".$data['ville']." </b>) mailto: ".$data['email']." site: ".$data['site']." <td width=30%><div style=padding-left: 4px; padding-right: 4px; text-align: right;><font class=Arial_rouge_fonce>le ".$data['date_fr']." à ".$data['heure']." </font></div></td></tr><br><tr><td width=100% colspan=2><div style=padding-bottom: 4px; padding-left: 4px; padding-right: 4px;>".$data['message']."</div></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table><br>";
- $livre.="<table border=0 width=746 cellspacing=0><tbody><tr><td width=100% class=row_bleu><table border=0 width=100% cellspacing=0 cellpadding=0><tbody><tr><td width=100% class=row_gris><table border=0 width=100% cellspacing=0 cellpadding=0><tbody><tr><td width=70%><div style=padding-top: 4px; padding-left: 4px; padding-right: 4px;></div></td> <b> <img src=images/flags/".$data['pays'].".png> - ".$data['ville']."</b><a href=mailto:".$data['email']."><img src=images/pers/mail.gif title=Envoyer un courriel à width=12 height=10></a><a href=".$data['site']." target=nom><img src=images/pers/home.gif width=12 height=12></a><font class=Verdana_rouge_clair><b>".$data['nom']."</b></font><td width=30%><div style=padding-left: 4px; padding-right: 4px; text-align: right;><font class=Arial_rouge_fonce>le ".$date_fr." à ".$data['heure']." </font></div></td></tr><br><tr><td width=100% colspan=2><div style=padding-bottom: 4px; padding-left: 4px; padding-right: 4px;>".$mess."</div></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table><br>";
- }
- $livre.="</table>";
- mysql_close();
- ?>
Add Comment
Please, Sign In to add comment