|
26.02.2006, 00:48
большой сенк
Что-то у меня не очень, правильно ли я сделал
PHP код:
function themeheader() {
global $banners, $sitename;
echo "<body bgcolor=\"#0E3259\" text=\"#000000\" link=\"0000ff\">";
if ($banners) {
echo "<br>";
include("banners.php");
[COLOR=Red]$img_array = array('themes/DeepBlue/images/pic1.jpg', 'themes/DeepBlue/images/pic2.jpg', 'themes/DeepBlue/images/pic3.jpg', 'themes/DeepBlue/images/pic4.jpg');
$img_now = array_rand($img_array); [/COLOR]
echo "<br>";
}
echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"840\" align=\"center\">\n"
."<tr><td width=\"100%\">\n"
."<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"840\">\n"
."<tr><td width=\"100%\">\n"
."<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"840\">\n"
."<tr><td width=\"100%\" height=\"88\" bgcolor=\"#FFFFFF\">\n"
."<table border=0 width=100% cellpadding=0 cellspacing=0><tr><td align=\"left\"><a href=\"index.php\">[COLOR=Red]<img border=\"0\" src=\"$img_now\" alt=\"Welcome to $sitename!\" hspace=\"20\">[/COLOR]</a></td><td align=\"right\"><img border=\"0\" src=\"themes/DeepBlue/images/logo-graphic.gif\"></td></tr></table></td></tr>\n"
."<tr><td width=\"100%\" bgcolor=\"#000000\" height=\"19\" valign=\"bottom\">\n"
."<a href=\"index.php\"><img border=\"0\" src=\"themes/DeepBlue/images/home.gif\" width=\"140\" height=\"18\"></a>"
."<a href=\"modules.php?name=Your_Account\"><img border=\"0\" src=\"themes/DeepBlue/images/account.gif\" width=\"140\" height=\"18\"></a>"
."<a href=\"modules.php?name=Downloads\"><img border=\"0\" src=\"themes/DeepBlue/images/downloads.gif\" width=\"140\" height=\"18\"></a>"
."<a href=\"modules.php?name=Web_Links\"><img border=\"0\" src=\"themes/DeepBlue/images/links.gif\" width=\"140\" height=\"18\"></a>"
."<a href=\"modules.php?name=Forums\"><img border=\"0\" src=\"themes/DeepBlue/images/forum.gif\" width=\"140\" height=\"18\"></a>"
."<a href=\"modules.php?name=Top\"><img border=\"0\" src=\"themes/DeepBlue/images/top10.gif\" width=\"140\" height=\"18\"></a>"
."</td></tr><tr><td width=\"100%\" height=\"10\" bgcolor=\"#d3e2ea\">\n"
."</td></tr></table>\n"
Все разобрался сам нужно было изминить не много твой код
PHP код:
echo "<img src=\"images/$img_now\">";
на
PHP код:
echo "<img src=\"images/$img_now.jpg\">";
большое, даже огромное спасибо.
|
|