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
| <?php
session_start();
require_once'config.php';
$chat = mysql_query("SELECT expe, messy FROM chatonline WHERE dest='".$_SESSION['login']."'");
?>
<html>
<head>
<title>Dialogue-Priver</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="refresh" content="5;url="javascript:navigator.url">
<style type="text/css">
BODY
{
scrollbar-face-color: #0099CC;
scrollbar-shadow-color: #3333CC;
scrollbar-highlight-color: #CCCCFF;
scrollbar-3dlight-color: #99CCCC;
scrollbar-darkshadow-color: #000000;
scrollbar-track-color: #FFFFFF;
scrollbar-arrow-color: #FFFFFF;
}
</style>
<SCRIPT language=JavaScript>
var version = "other"
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
if (browserName == "Netscape" && browserVer >= 3) version = "n3";
else if (browserName == "Netscape" && browserVer < 3) version = "n2";
else if (browserName == "Microsoft Internet Explorer" && browserVer >= 4) version = "e4";
else if (browserName == "Microsoft Internet Explorer" && browserVer < 4) version = "e3";
var y = 0;
var test = 0;
function scroll_bas() {
if (version == "n2" || version == "n3" || version == "e4"){
//vous devez régler le 1000 qui suit si votre texte est plus grande que 1000 pixels
if (y < 1000) {
window.scroll(0,y);
y = y + 25;
//régler le 0 ci-dessous pour la vitesse de descente
if (test==0) {setTimeout('scroll_bas()', 0);}
}
}
}
</SCRIPT>
</head>
<body onload="scroll_bas();">
<table width="80%" border="0" cellspacing="0" cellpadding="0">
<?php while ($rs1 = mysql_fetch_array($chat))
{
$expe = $rs1['expe'];
$messy= $rs1['messy'];
echo"<left><b>$expe</b><a href=\"#\" onClick=\"window.open('detailspopup.php?det=$expe','_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=600, height=550, right=1, top=0');return(false)\"><img src=\"design/voir.gif\" width=\"20\" heigth=\"25\" border=\"0\" title=\"Profil\"></a>
<a href=\"#\" onClick=\"window.open('messa.php?dest=$expe&chat=$chat','_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=400, height=200, right=1, top=0');return(false)\"><img src=\"design/chat.gif\" width=\"15\" heigth=\"15\" border=\"0\" title=\"chat\"></a>";
echo" => $messy </left><br />";
}
$chat2 = mysql_query("select count(id_chat) AS nb_mess from chatonline");
$nb_mess = mysql_result($chat2,0,"nb_mess");
if($nb_mess >=10){
$chat3 = mysql_query("select min(id_chat) AS min_mess from chatonline");
$min_mess = mysql_result($chat3,0,"min_mess");
$chat4 = mysql_query("delete from chatonline where id_chat=".$min_mess."");
}
?>
</table> |
Partager