не получается задать правильно ширину(((
шапка задана тоже в абсолютных величинах - 780 (см. код)
здесь скриншот
http://www.o-dezign.ru/raznoe/2.html
Код: Выделить всё
function OpenTable() {
global $bgcolor1, $bgcolor2;
echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" bgcolor=\"$bgcolor2\"><tr><td>\n";
echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"8\" bgcolor=\"$bgcolor1\"><tr><td>\n";
}
function CloseTable() {
echo "</td></tr></table></td></tr></table>\n";
}
function OpenTable2() {
global $bgcolor1, $bgcolor2;
echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"0\" bgcolor=\"$bgcolor2\" align=\"center\"><tr><td>\n";
echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"8\" bgcolor=\"$bgcolor1\"><tr><td>\n";
}
function CloseTable2() {
echo "</td></tr></table></td></tr></table>\n";
}
/************************************************************/
/* FormatStory */
/* */
/* Here we'll format the look of the stories in our site. */
/* If you dig a little on the function you will notice that */
/* we set different stuff for anonymous, admin and userfs */
/* when displaying the story. */
/************************************************************/
function FormatStory($thetext, $notes, $aid, $informant) {
global $anonymous;
if ($notes != "") {
$notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>\n";
} else {
$notes = "";
}
if ("$aid" == "$informant") {
echo "<font class=\"content\" color=\"#505050\">$thetext$notes</font>\n";
} else {
if($informant != "") {
$boxstuff = "<a href=\"modules.php?name=Your_Account?op=userinfo&uname=$informant\">$informant</a> ";
} else {
$boxstuff = "$anonymous ";
}
$boxstuff .= "".translate("writes")." <i>\"$thetext\"</i>$notes\n";
echo "<font class=\"content\" color=\"#505050\">$boxstuff</font>\n";
}
}
/************************************************************/
/* Function themeheader() */
/* */
/* Control the header for your site. You need to define the */
/* BODY tag and in some part of the code call the blocks */
/* function for left side with: blocks(left); */
/************************************************************/
function themeheader() {
global $user, $banners, $sitename, $slogan, $cookie, $prefix;
cookiedecode($user);
$username = $cookie[1];
if ($username == "") {
$username = "Anonymous";
}
echo "<body bgcolor=\"#FFFFFF\" text=\"#000000\" leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\" onLoad=\"MM_preloadImages('themes/BubbleGum/images/nav/news-02.gif','themes/BubbleGum/images/nav/topics-02.gif','themes/BubbleGum/images/nav/downloads-02.gif','themes/BubbleGum/images/nav/youraccount-02.gif','themes/BubbleGum/images/nav/submitnews-02.gif','themes/BubbleGum/images/nav/topten-02.gif')\">\n\n\n";
if ($banners) {
include("banners.php");
}
echo "<!----- PLEASE DO NOT REMOVE COPYRIGHT NOTICE ----->\n";
echo "<!----- Copyright (c) 2001 Somara Sem (http://www.pixelmayhem.com) ----->\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
// Top Images
echo "<table cellpadding=\"0\" cellspacing=\"0\" width=\"780\" border=\"0\" bgcolor=\"#ffffff\">\n"
."<tr>\n"
."<td height=\"51\" WIDTH=\"267\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" bgcolor=\"#99CC33\"></td>\n"
."<td bgcolor=\"#000000\"><img src=\"themes/BubbleGum/images/top-image_02.gif\" WIDTH=\"513\" HEIGHT=\"51\"></td>\n"
."</tr>\n"
."</table>\n";
// Top Image Swap Navigation Bar - customize links to your specs
echo "<table width=\"780\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"
."<tr>\n"
."</table>\n\n\n\n";
// Forms Bar
echo "<table width=\"780\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n"
."<tr>\n"
."<td background=\"themes/BubbleGum/images/forms-bar-bg.gif\" bgcolor=\"#7B017C\" width=\"12\" height=\"35\" align=\"left\"><img src=\"themes/BubbleGum/images/forms-bar-left.gif\" width=\"12\" height=\"35\" alt=\"\"></td>\n"
."<td background=\"themes/BubbleGum/images/forms-bar-bg.gif\" bgcolor=\"#7B017C\" width=\"450\" valign=\"middle\">\n";
if ($username == "Anonymous") {
echo "<form action=\"modules.php?name=Your_Account\" method=\"post\" style=\"margin:0\">\n"
." <font class=\"pinktext\"><b>Логин: </b></font>\n"
."<input type=\"text\" name=\"uname\" size=\"7\" maxlength=\"25\">\n"
." <font class=\"pinktext\"><b>пароль: </b></font>\n"
."<input type=\"password\" name=\"pass\" size=\"7\" maxlength=\"20\">\n"
."<input type=\"hidden\" name=\"op\" value=\"login\">\n"
."<input type=\"submit\" value=\"login\">\n"
." <a href=\"modules.php?name=Your_Account\"><font class=\"pinktext\"><b>Присоединиться</b></font></a>\n"
."</form>\n";
} else {
echo " <font class=\"pinktext\"><b>Привет $username!</b></font> <a href=\"modules.php?name=Your_Account&op=logout\"><font class=\"whitetext\">выход</font></a>";
}
echo "</td>\n"
."<td background=\"themes/BubbleGum/images/forms-bar-bg.gif\" align=\"right\" width=\"264\" valign=\"middle\">\n"
."<form action=\"search.php\" method=\"post\" style=\"margin:0\">\n"
."<input type=\"text\" name=\"query\" size=\"10\">\n"
."<input type=\"submit\" value=\"поиск\">\n"
."</form>\n"
."</td>\n"
."<td width=\"12\" height=\"35\" align=\"left\"><img src=\"themes/BubbleGum/images/forms-bar-right.gif\" width=\"12\" height=\"35\" alt=\"\"></td>\n"
."</tr>\n"
."</table>\n";
// Begin of Main Content Table
echo "<table width=\"780\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n"
."<tr valign=\"top\">\n"
."<td bgcolor=\"#000000\"><img src=\"themes/BubbleGum/images/pixel.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\"></td>\n"
."<td bgcolor=\"#F3D7E4\"><img src=\"themes/BubbleGum/images/pixel.gif\" width=\"10\" height=\"1\" border=\"0\" alt=\"\"></td>\n"
."<td bgcolor=\"#F3D7E4\" width=\"150\" valign=\"top\">\n";
blocks(left);
echo "</td>\n"
."<td bgcolor=\"#F3CBDD\"><img src=\"themes/BubbleGum/images/pixel.gif\" width=\"15\" height=\"1\" border=\"0\" alt=\"\"></td>\n"
."<td width=\"100%\" bgcolor=\"#F3CBDD\">\n";
}
/************************************************************/
/* Function themefooter() */
/* */
/* Control the footer for your site. You don't need to */
/* close BODY and HTML tags at the end. In some part call */
/* the function for right blocks with: blocks(right); */
/* Also, $index variable need to be global and is used to */
/* determine if the page your're viewing is the Homepage or */
/* and internal one. */
/************************************************************/
function themefooter() {
global $index;
if ($index == 1) {
echo "</td>\n"
."<td bgcolor=\"#F3CBDD\"><img src=\"themes/BubbleGum/images/pixel.gif\" width=\"15\" height=\"1\" border=\"0\" alt=\"\"></td>\n"
."<td bgcolor=\"#F3D7E4\" valign=\"top\" width=\"150\">\n";
blocks(right);
}
echo "</td>\n"
."<td bgcolor=\"#F3D7E4\"><img src=\"themes/BubbleGum/images/pixel.gif\" width=10 height=1 border=0 alt=\"\">\n"
."<td bgcolor=\"#000000\"><img src=\"themes/BubbleGum/images/pixel.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\"></td>\n"
."</td>\n"
."</tr>\n"
."</table>\n\n\n";
// Bottom Images
echo "<table cellpadding=\"0\" cellspacing=\"0\" width=\"780\" border=\"0\" bgcolor=\"#993399\">\n"
."<tr>\n"
."<td height=\"25\" WIDTH=\"780\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" bgcolor=\"#993399\"></td>\n"
."</tr>\n"
."</table>\n";
// Begin Footer Table
echo "<br><table width=\"780\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" bgcolor=\"#ffffff\">\n"
."<tr align=\"center\">\n"
."<td width=\"100%\" colspan=\"3\">\n";
footmsg();
echo "</td>\n"
."</tr>\n"
."</table>\n\n\n";
}
/************************************************************/
/* Function themeindex() */
/* */
/* This function format the stories on the Homepage */
/************************************************************/
function themeindex ($aid, $informant, $time, $title, $counter, $topic, $thetext, $notes, $morelink, $topicname, $topicimage, $topictext) {
global $anonymous, $tipath;
// Story Box Title Table
echo "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width=\"100%\">\n"
."<tr>\n"
."<td align=\"left\"><font class=\"option\" color=\"#363636\"><b>$title</b></font>\n"
."<br><font class=\"tiny\" size=\"1\">"._POSTEDBY." ";
formatAidHeader($aid);
echo " "._ON." $time $timezone ($counter "._READS.")</font><br><br>\n"
."</td>\n"
."</tr>\n"
."</table>\n\n\n"
// Story Box Content
."<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n"
."<tr>\n"
."<td>\n"
."<font class=\"tiny\"><b><a href=\"search.php?query=&topic=$topic\"><img src=\"$tipath$topicimage\" border=\"0\" alt=\"$topictext\" align=\"right\" hspace=\"10\" vspace=\"10\"></a></B></font>\n";
FormatStory($thetext, $notes, $aid, $informant);
echo "</td>\n"
."</tr>\n"
."</table>\n\n\n"
// Story Box Posted By, Morelink, Print
."<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width=\"100%\">\n"
."<tr>\n"
."<td align=\"right\">\n"
."<br><font class=\"tiny\">$morelink</font>\n"
."</td>\n"
."</tr>\n"
."</table>\n"
."<br>\n"
."<center>---------------------------------------------------------</center>\n"
."<br>\n\n\n";
}
/************************************************************/
/* Function themeindex() */
/* */
/* This function format the stories on the story page, when */
/* you click on that "Read More..." link in the home */
/************************************************************/
function themearticle ($aid, $informant, $datetime, $title, $thetext, $topic, $topicname, $topicimage, $topictext) {
global $admin, $sid, $tipath;
// Read More Title Area
echo "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width=\"100%\">\n"
."<tr>\n"
."<td align=\"left\">\n"
."<font class=\"option\"><b>$title</b></font>\n"
."<br>\n"
."<font class=\"content\">"._POSTEDON." $datetime "._BY." ";
formatAidHeader($aid);
if (is_admin($admin)) {
echo "<br>[ <a href=\"admin.php?op=EditStory&sid=$sid\">"._EDIT."</a> | <a href=\"admin.php?op=RemoveStory&sid=$sid\">"._DELETE."</a> ]\n";
}
echo "</td>\n"
."</tr>\n"
."</table>\n\n\n"
."<br>\n\n\n"
// Read More Content
."<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n"
."<tr>\n"
."<td>\n";
echo "<a href=\"search.php?query=&topic=$topic\"><img src=\"$tipath$topicimage\" border=\"0\" Alt=\"$topictext\" align=\"right\" hspace=\"10\" vspace=\"10\"></a>\n";
FormatStory($thetext, $notes="", $aid, $informant);
echo "</td>\n"
."</tr>\n"
."</table>\n\n\n"
."<br>\n\n\n";
}
/************************************************************/
/* Function themesidebox() */
/* */
/* Control look of your blocks. Just simple. */
/************************************************************/
function themesidebox($title, $content) {
// Side Box Title
echo "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width=\"100%\">\n"
."<tr>\n"
."<td align=left>\n"
."<font class=\"content\" color=\"#363636\"><b>$title</b></font>\n"
."</td>\n"
."</tr>\n"
."</table>\n"
// Side Box Content
."<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width=\"150\">\n"
."<tr valign=\"top\">\n"
."<td>\n"
."$content\n"
."</td>\n"
."</tr>\n"
."</table>\n\n\n"
."<br>\n\n\n";
}
?>