The site is www.Letsmoto.com/Sonik/java/ . I would like to add gradient fill for table (see picture, the first table) how can i do this ?
and second is adding banners see the blue lines (on picture) where i would like them.
The code is
<html>
<HTML>
<meta content="charset=windows-1251">
<HEAD><TITLE>Letsmoto.com - Sonik</TITLE></HEAD>
<style>
A {text-decoration: none;}
A:link {color: blue; text-decoration: none; }
A:active {color: blue; text-decoration: none; }
A:visited {color: blue; text-decoration: none; }
A:hover {color: red; text-decoration: underline; }
h5 {font-weight:normal;}
A.asel {text-decoration: none;}
A.asel:link {color: red; text-decoration: none; font-weight:bold;}
A.asel:active {color: red; text-decoration: none; font-weight:bold;}
A.asel:visited {color: red; text-decoration: none; font-weight:bold;}
A.asel:hover {color: blue; text-decoration: underline; font-weight:bold;}
td.cell {text-align:center; vertical-align:top; padding:4; width:230;}
table.pages {width:700; border-width:1; border-color:#008CCF; border-style:solid; background-color:#F7F3F7; margin-top:15;}
table.items {width:700; margin-top:10;}
table.item {width:100%; border-width:1; border-color:#cb0000; border-style:solid; background-color:#EEEEEE;}
td.pages {width:100%; font-size:10pt; text-align:left; }
td.chars {font-size:10pt; text-align:center; border-top:1 solid gray; padding:0 3 0 3;}
td.find {font-size:8pt; text-align:left; border-width:1 0 0 1; border-style:solid; border-color:gray; padding:0 4 0 4; }
td.align {font-size:10pt; text-align:right; border-left:1 solid gray; padding:0 3 0 3;}
td.item_name {padding:5 2 5 2;text-align:center; font-size:10pt; font-weight:bold; background-color:#cb0000;}
td.item_pic {padding:2;text-align:center; vertical-align:middle; background-color:#f6f6f6;height:240;}
td.item_down {padding:3;text-align:center; font-size:10pt; font-weight:bold;}
input.find {border-width:1; border-color:#008CCF; border-style:solid; background-color:#FAFAFA; font-size:7pt; width:80; height:13; padding:0 2 0 2;font-family:tahoma;}
input.findbtn {border-width:1; border-color:#008CCF; border-style:solid; background-color:#cb0000; font-size:6pt; width:28; height:13; padding:0 2 0 2;font-family:tahoma;}
</style>
<BODY><center>
<!--<a href="http://oleg.19may.ru"><img src="http://www.19may.ru/files/temp/chinush03.gif" border="0" width="200" height="240" alt="Сегодня Щербинский, а завтра - ты!" title="Сегодня Щербинский, а завтра - ты!"></a>
<h2>Fullscreen games on K700/K750/W800/K600 <font style="font-size:11pt;font-weight:none;">[<a href="../thm/index.php">Themes on K750</a> / <a href="../gif/index.php">Screensavers</a>]</font>
</h2>
<h5>[Also recommend (my favorite sites): <a href=http://www.sony-ericsson.ru/ target=_blank>Sony Ericsson Club</a>, <a href=http://www.soneric.ru/ target=_blank>Sony Ericsson общество [Soneric]</a>, <a href=http://www.mobile9.com/ target=_blank>Mobile Phone Portal - mobile9</a>, <a href=http://seclub.org/ target=_blank>SEClub</a>]</h5>-->
<?
include("lib.php");
ShowHeader("java");
if ($Maestro && (!file_exists("cash.php") || $_GET["cash"])){
echo "Создан кэш-файл<br>";
$cashfile=fopen("cash.php","w+");
fclose($cashfile);
}
include("cash.php");
$f=0; $i=0; $r=3; $items=21; $img=array(".jpg",".gif",".png",".jpeg");
if (!isset($files)){
if ($Maestro) echo "Обновлен кэш-файл";
$cashfile=fopen("cash.php","w+");
$handle=opendir(".");
$files=array();
$dates=array();
fwrite($cashfile,"<? $"."files=array();");
fwrite($cashfile,"$"."dates=array();"); // новые даты
while (($file = readdir($handle))!==false) {
if (ExtractFileExt($file)!=".jar") continue;
$a=filemtime($file);
while (isset($files[$a])) $a++;
$files[$a]=$file;
$dates[$a]=date("d.m.y",$a); // новые даты
$s="$"."files[".$a."]=\"".$file."\";";
fwrite($cashfile,$s);
}
$dates=array_unique($dates); // новые даты BEGIN
krsort($dates); $izi=0;
foreach($dates as $key => $sd){
$izi++;
if ($izi>10) unset($dates[$key]); else fwrite($cashfile,"$"."dates[".$key."]=\"".$sd."\";");
} // новые даты END
fwrite($cashfile,"?>");
fclose($cashfile);
closedir($handle);
} else {
if ($Maestro) echo "Работаем c кэш-файлом | <a href=\"?cash=1\">Обновить КЭШ</a> <br>";
}
$cnt=round(count($files)/$items+0.49);
if (empty($_GET["page"])) $page=1; else $page=$_GET["page"]+0;
if (empty($_GET["sort"])) $sort="date"; else $sort=$_GET["sort"];
if (!empty($_GET["dateadd"])) { // новые даты BEGIN
$dateadd=date("d.m.y",$_GET["dateadd"]);
foreach($files as $a => $file){
if (date("d.m.y",$a)!=$dateadd) unset($files[$a]);
}
$items=count($files);
$cnt=round(count($files)/$items+0.49);
} // новые даты END
$pages="<table border=0 width=700 align=center class=pages cellspacing=0 cellpadding=1><tr><td class=pages>Pages: ";
for($ff=1; $ff<=$cnt; $ff++){
if ($ff!=1) $pages.=$sep;
$pages.="<a href='?page=$ff&sort=$sort'".($ff==$page && !isset($_GET["name"]) && !isset($_POST["findit"])?" class=asel":"").">$ff</a>";
}
$pages.="<td class=align nowrap>Files: <b>".count($files)."</b><td class=align nowrap>Sort by: ".($sort=="name"?"<b>":"<a href='?sort=name'>")."Name</b></a>".$sep.($sort=="date"?"<b>":"<a href='?sort=date'>")."Date</b></a>";
$A="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
$pages.="<tr><td colspan=2 class=chars>";
for($az=0; $az<strlen($A); $az++){
$pages.="<a href='?name=".$A[$az]."'".($_GET["name"]==$A[$az]?" class=asel":"").">".$A[$az]."</a>".$sep;
}
$pages.="<a href='?name=1'".($_GET["name"]=="1"?" class=asel":"").">0-9</a>".$sep;
$pages.="<a href='?name=?' title='Other symbols'".($_GET["name"]=="?"?" class=asel":"").">?</a>".$sep;
$pages.="<a href='?name=Я' title='Russian names'".($_GET["name"]=="Я"?" class=asel":"").">Рус</a>";
$pages.="<td class=find><form action='?' method=Post style='margin:0;'><input type=text class=find name=findit maxlength=10 value=\"".htmlspecialchars(stripslashes($_POST["findit"]))."\">";
$pages.=" <input type=submit class=findbtn value='Find'></form>";
if (isset($dates)){ // новые даты BEGIN
$pages.="<tr><td colspan=3 class=chars>Added: ";
foreach($dates as $key => $sd){
if ($dateadd==$sd)
$pages.="<b><font color=red>".$sd."</font></b>".$sep;
else
$pages.="<a href=\"?dateadd=$key&sort=$sort\">".$sd."</a>".$sep;
}
$pages.="(top 10 dates)".$sep.$sep.$sep."<a href=\"?sort=$sort\">All</a>";
} // новые даты END
$pages.="</table>";
echo $pages;
echo "<table border=0 class=items align=center><colgroup></colgroup><tr>";
if ($sort=="date") krsort($files); else asort($files);
if (isset($_GET["name"]) && strlen($_GET["name"])==1){
asort($files);
$n=$_GET["name"];
if (eregi("[A-Z]",$n)) $n="^[".$n."].+";
elseif ($n==1) $n="^([0-9]).+";
elseif ($n=="Я") $n="^([А-Я]|[а-я]).+";
else $n="^[^А-Яа-яA-Za-z0-9].+";
foreach($files as $a => $file){
if (!eregi($n,$file)) unset($files[$a]);
}
$page=1;
$items=count($files);
}
if (isset($_POST["findit"]) && !empty($_POST["findit"])){
$n=substr(strip_tags($_POST["findit"]),0,10);
$n=quotemeta($n);
foreach($files as $a => $file){
if (!eregi($n,$file)) unset($files[$a]);
}
$page=1;
$items=count($files);
}
foreach($files as $date => $file){
$i++;
if ($i<($page*$items-$items+1)) continue;
if ($i>($page*$items)) continue;
if (($f/$r)==round($f/$r)) echo "<tr>";
$sz=filesize($file);
echo "<td class=cell nowrap>";
$name=ChangeFileExt($file,"");
if (eregi("((\(|-))(rus)((\)|-))",$name)) $rus="<img src=\"../images/rusflag.gif\" width=13 height=13 border=0 valign=middle>"; else $rus="";
$name=str_replace("_"," ",$name);
$name=eregi_replace("((\(|-))(rus)((\)|-))","\\2<font color=yellow>\\3</font>\\4",$name);
echo "<table border=0 cellpadding=0 cellspacing=0 class=item>";
echo "<tr><td class=item_name"./*(substr($name,0,2)=="3D"?" style=\"background-image:url('/../images/3d.gif');\"":"").*/">".(substr($name,0,2)=="3D"?" <img src=\"../images/3d.gif\" align=left width=22 height=20 border=0 valign=middle>":"").$name."";
foreach($img as $ext){
$pic=ChangeFileExt($file,$ext);
if (file_exists($pic)){
$z=getimagesize($pic);
$w=$z[0]; $h=$z[1];
GetProportionalWH(&$w,&$h,200,220);
echo "<tr><td class=item_pic>";
if ($w!=$z[0] || $h!=$z[1]) echo "<a href=\"$pic\" target=_blank title='Click to enlarge'>";
echo "<img src=\"$pic\" width=$w height=$h vspace=5 align=center></a>";
break;
}
}
$date=date("d.m.y",$date);
if ($date==date("d.m.y")) $date="<font color=red>".$date."</font>";
echo "<tr><td class=item_down>$sep<a href=\"$file\"' title=\"$file\">Download</a> $sep".number_format($sz/1024,2,".","")." Kb.$sep".$date.$sep.$rus;
echo "</table>";
$f++;
}
echo "</table>";
echo $pages;
//echo "<h5><font color=maroon>По просьбе компаний <b>Gameloft</b>, <b>Qplaze</b> я убрал их игры со странички</font></h5>";
echo "<h4>www.Letsmoto.com </br>Первоначальный автор <a href='mailto:maester@mail.ru'>maester@mail.ru</a></h4>";
function ExtractFileExt($fn,$lc=True){
$i=strrpos($fn,".");
$ret="";
if ($i!==false) $ret=substr($fn,$i,strlen($fn)-$i);
if ($lc) $ret=strtolower($ret);
return $ret;
}
function ChangeFileExt($fn,$ext,$lc=True){
$i=strrpos($fn,".");
if ($lc) $ext=strtolower($ext);
if ($i!==false) $fn=substr($fn,0,$i);
$ret=$fn.$ext;
return $ret;
}
function GetProportionalWH(&$pw,&$ph,$imw=168,$imh=126){
$iws=$pw;
$ihs=$ph;
if (($pw>$imw) || ($ph>$imh)) {
$aw=$pw/$imw;
$ah=$ph/$imh;
if ($aw>$ah) $a=$aw; else $a=$ah;
$iws=round($pw/$a);
$ihs=round($ph/$a);
}
$pw=$iws;
$ph=$ihs;
}
?>
</HTML>
Help would be much appreciated !