-- friend.php --
<?php
if (!$city)
{
$cidade = 'Viana';
}
else
{
$cidade = $city;
}
$friends[] = "Nuno \"nick\" Faria";
$friends[] = "Susana \"nick\" Pereira";
$friends[] = "Miguel \"nick\" Pinto";
$friends[] = "Alberto \"nick\" Simões";
$friends[] = "José \"nick\" Alves";
$friends[] = "José \"nick\" Moura";
$friends[] = "Paulo \"nick\" Cabral";
echo "<html>\n";
echo "<head>\n";
echo "<LINK href=\"chrome.css\" type=text/css rel=stylesheet>\n";
echo "</head>\n";
echo "<body>\n";
echo "<DIV ID=\"dek\" class=\"dek\"></DIV>";
echo "<script language=JavaScript type=text/javascript src=\"dek.js\"></script>\n";
echo "<p align=\"center\"><font face=\"verdana\" size=\"4\">\n";
echo "<a href=\"$php_self?pagina=friends&city=Braga\"><b>Braga</b></a>\n";
echo " e <a href=\"$php_self?pagina=friends&city=Viana\"><b>Viana</b></a></font>\n";
//echo "<p align=center>these are with any doubt my best friends i meet over the years in Braga\n";
echo "<br>\n";
echo "my friends in $cidade<br>\n";
sort($friends);
//$a = count($friends);
//$b = $friend[0];
//$nome = $friends[0];
$imagem = 'images/friend.jpg';
//echo "$a<br>\n";
echo "<br>\n";
echo "<div align=left><br>\n";
echo "<table width=\"50%\" cellspacing=\"2\">\n";
echo "<tr><td bgcolor=\"#aaaa00\" width=\"50%\" height=\"5%\"><a href=\"#\" onMouseOver=javascript:popup('header','msg','$imagem','#000000') onmouseout=javascript:kill()>$friends[0]</a></td></tr>\n";
echo "<tr><td bgcolor=\"#aaaa00\" width=\"50%\" height=\"5%\"><a href=\"#\" onMouseOver=javascript:popup('header','msg','$imagem','#000000') onmouseout=javascript:kill()>$friends[1]</a></td></tr>\n";
echo "<tr><td bgcolor=\"#aaaa00\" width=\"50%\" height=\"5%\"><a href=\"#\" onMouseOver=javascript:popup('header','msg','$imagem','#000000') onmouseout=javascript:kill()>$friends[2]</a></td></tr>\n";
echo "<tr><td bgcolor=\"#aaaa00\" width=\"50%\" height=\"5%\"><a href=\"#\" onMouseOver=javascript:popup('header','msg','$imagem','#000000') onmouseout=javascript:kill()>$friends[3]</a></td></tr>\n";
echo "<tr><td bgcolor=\"#aaaa00\" width=\"50%\" height=\"5%\"><a href=\"#\" onMouseOver=javascript:popup('header','msg','$imagem','#000000') onmouseout=javascript:kill()>$friends[4]</a></td></tr>\n";
echo "<tr><td bgcolor=\"#aaaa00\" width=\"50%\" height=\"5%\"><a href=\"#\" onMouseOver=javascript:popup('header','msg','$imagem','#000000') onmouseout=javascript:kill()>$friends[5]</a></td></tr>\n";
echo "</table>\n";
echo "</div>\n";
echo "</body>\n";
echo "</html>\n";
?>
-- chrome.css --
BODY {
FONT-SIZE: 20px; MARGIN: 10px; COLOR: #ffffff; FONT-FAMILY: MS Sans Serif, Arial, Helvetica; BACKGROUND-COLOR: #a4491d; SCROLLBAR-FACE-COLOR: #e1d8ce; SCROLLBAR-HIGHLIGHT-COLOR: #e1d8ce; SCROLLBAR-SHADOW-COLOR: #e1d8ce; SCROLLBAR-3DLIGHT-COLOR: #e1d8ce; SCROLLBAR-ARROW-COLOR: #d95d18; SCROLLBAR-TRACK-COLOR: #a4491d; SCROLLBAR-DARKSHADOW-COLOR: #e1d8ce
}
TH {
FONT-SIZE: 14px; COLOR: #ffffff; FONT-FAMILY: MS Sans Serif, Arial, Helvetica; BORDER-RIGHT: #ffffff 1px solid; BORDER-TOP: #ffffff 1px solid; BORDER-LEFT: #ffffff 1px solid; BORDER-BOTTOM: #ffffff 1px solid; BACKGROUND-COLOR: #000000
}
TD {
FONT-SIZE: 14px; COLOR: #ffffff; FONT-FAMILY: MS Sans Serif, Arial, Helvetica; BORDER-RIGHT: #ffffff 1px solid; BORDER-TOP: #ffffff 1px solid; BORDER-LEFT: #ffffff 1px solid; BORDER-BOTTOM: #ffffff 1px solid; BACKGROUND-COLOR: #000000
}
TD.test{
FONT-SIZE: 12px;
FONT-FAMILY: MS Sans Serif, Arial, Helvetica;
border: 1px solid #eeeedd;
color: black;
background: #eeeedd;
padding: 2px;
}
TD.test2{
FONT-SIZE: 12px;
FONT-FAMILY: MS Sans Serif, Arial, Helvetica;
border: 1px solid white;
color: white;
background: black;
padding: 2px;
}
A:link {
COLOR: #ffffff; TEXT-DECORATION: none
}
A:visited {
COLOR: #ffffff;
TEXT-DECORATION: none
}
A:active {
COLOR: #aa0000; TEXT-DECORATION: none
}
A:hover {
BACKGROUND-COLOR: #ffffff;
COLOR: #000000
}
DIV {
FONT-SIZE: 14px; COLOR: #ffffff; FONT-FAMILY: MS Sans Serif, Arial, Helvetica
}
DIV.dek{
POSITION : absolute;
VISIBILITY : hidden;
Z-INDEX : 200;
}
input {
font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; font-weight: normal; color: #5a6ba1; border: #5a6ba1; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-left-width: 1px; border-bottom-width: 1px; background-color: #ffffff
}
textarea {
font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; font-weight: normal; color: #5a6ba1; border: #5a6ba1; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-left-width: 1px; border-bottom-width: 1px; background-color: #ffffff
}
-- dek.js --
//Pop up information box II (Mike McGrath (
mike_mcgrath@lineone.net,
http://website.lineone.net/~mike_mcgrath))
//Permission granted to Dynamicdrive.com to include script in archive
//For this and 100's more DHTML scripts, visit
http://dynamicdrive.com
Xoffset=505; // modify these values to ...
Yoffset=219; // change the popup position.
var old,skn,iex=(document.all),yyy=-1000;
var ns4=document.layers
var ns6=document.getElementById&&!document.all
var ie4=document.all
if (ns4)
skn=document.dek
else if (ns6)
skn=document.getElementById("dek").style
else if (ie4)
skn=document.all.dek.style
if(ns4)document.captureEvents(Event.MOUSEMOVE);
else{
skn.visibility="visible"
skn.display="none"
}
document.onmousemove=get_mouse;
function popup(header,msg,imagem,color){
var content="<TABLE WIDTH=290 height=200 CELLPADDING=0 cellspacing=1 bgcolor="+color+" "+
"><th>"+header+"</tr><tr><TD width=290 height=100 ALIGN=center><FONT COLOR=white SIZE=2>"+msg+"</FONT></TD></tr>"+
"<tr><td align=center width=290 height=100 align=center><img src="+imagem+"></td></tr></TABLE>";
yyy=Yoffset;
if(ns4){skn.document.write(content);skn.document.close();skn.visibility="visible"}
if(ns6){document.getElementById("dek").innerHTML=content;skn.display=''}
if(ie4){document.all("dek").innerHTML=content;skn.display=''}
}
function get_mouse(e){
//var x=(ns4||ns6)?e.pageX:event.x+document.body.scrollLeft;
skn.left=Xoffset;
//var y=(ns4||ns6)?e.pageY:event.y+document.body.scrollTop;
skn.top=yyy;
}
function kill(){
yyy=-1000;
if(ns4){skn.visibility="hidden";}
else if (ns6||ie4)
skn.display="none"
}
try play around in friends.php with the popup params(i can´t pass more than 1 word).