Bywalec
Postów: 888 Pomógł: 66
Data rejestracji: 19.08.2007 19:49
|
Jak wyśrodkować wszystkie pozycje poziomego menu w skórce Woody?
<?
// theme settings
$body_text = "#ffffff";
$theme_width_l = "170";
$theme_width_r = "170";
$body_bg = "#000000";
function render_header($header_content)
{
echo '<table width="100%" border="0" cellspacing="0" cellpadding="0" background="'.THEME.'images/cell.gif"><tr><td width="5"><img src="'.THEME.'images/frame_top_left.gif" alt="dnd, d&d" title="dnd, d&d"></td><td valign="top" background="'.THEME.'images/frame_top_mid.gif" class="maina"> </td><td width="5"><img src="'.THEME.'images/frame_top_right.gif" alt="dungeons and dragons" title="dungeon and dragon"></td></tr><tr><td background="'.THEME.'images/frame_left.gif"> </td><td align="center" valign="middle" background="'.THEME.'images/cell.gif"><table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td>';
echo $header_content;
echo '</td></tr></table></td><td background="'.THEME.'images/frame_right.gif"> </td></tr><tr><td height="4"><img src="'.THEME.'images/frame_foot_left.gif" width="5" height="5" alt="isa, dnd.rpg.info.pl" title="isa, dnd.rpg.info.pl"></td><td height="4" background="'.THEME.'images/frame_foot_mid.gif"></td><td height="4"><img src="'.THEME.'images/frame_foot_right.gif" width="5" height="5" alt="wotc, ogl" title="wotc, ogl"></td></tr></table><BR>';
echo '<table width="100%" border="0" cellspacing="0" cellpadding="0" background="'.THEME.'images/cell.gif"><tr><td width="5"><img src="'.THEME.'images/frame_top_left.gif" alt="dnd, d&d" title="dnd, d&d"></td><td valign="top" background="'.THEME.'images/frame_top_mid.gif" class="maina"> MENU </td><td width="5"><img src="'.THEME.'images/frame_top_right.gif" alt="dungeons and dragons" title="dungeon and dragon"></td></tr><tr><td background="'.THEME.'images/frame_left.gif"> </td><td align="center" valign="middle" background="'.THEME.'images/cell.gif"><table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td>';
$result = dbquery("SELECT * FROM ".DB_PREFIX."site_links WHERE link_visibility<='".iUSER."' AND link_position>='2' ORDER BY link_order");
if (dbrows($result) != 0) {
echo "<td class='white-header'>\n";
$i = 1;
while($data = dbarray($result)) {
if ($data['link_url']!="---") {
if (strstr($data['link_url'], "http://") || strstr($data['link_url'], "https://")) {
echo "<a href='".$data['link_url']."' class='white'>".$data['link_name']."</a>";
} else {
echo "<a href='".BASEDIR.$data['link_url']."' class='white'>".$data['link_name']."</a>";
}
}
if ($i != dbrows($result)) { echo " ·\n"; } else { echo "\n"; } $i++;
}
}
echo '</td></tr></table></td><td background="'.THEME.'images/frame_right.gif"> </td></tr><tr><td height="4"><img src="'.THEME.'images/frame_foot_left.gif" width="5" height="5" alt="isa, dnd.rpg.info.pl" title="isa, dnd.rpg.info.pl"></td><td height="4" background="'.THEME.'images/frame_foot_mid.gif"></td><td height="4"><img src="'.THEME.'images/frame_foot_right.gif" width="5" height="5"></td></tr></table><BR>';
echo "<table width='100%' cellspacing='0' cellpadding='0'>\n<tr>\n";
}
function render_footer($license=false) {
global $theme_width,$settings,$locale;
echo "</tr>\n</table>\n";
echo "<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='white-header'>".stripslashes($settings['footer'])."</td>
</tr>
</table>
<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='center' class='full-header'><br>
".$settings['counter']." ".($settings['counter'] == 1 ? $locale['140']."<br><br>\n" : $locale['141']."<br><br>\n");
if ($license == false) {
echo "Powered by <a href='http://www.php-fusion.co.uk' target='_blank'><img src='".THEME."images/fusion.gif' alt='PHP-Fusion' title='PHP-Fusion' border='0' style='vertical-align:middle;'></a> v".$settings['version']." © 2003-2005<br><br>\n";
}
echo "</td>\n</tr>
</table>
</td>
</tr>
</table>\n";
}
function render_news($subject, $news, $info)
{
global $locale;
echo '<center><table width="99%" border="0" cellspacing="0" cellpadding="0"><tr><td width="5"><img src="'.THEME.'images/frame_top_left.gif" alt="dnd, d&d" title="dnd, d&d"></td><td valign="top" background="'.THEME.'images/frame_top_mid.gif" class="maina"><B><center>'.$subject.'</center></B> </td><td width="5"><img src="'.THEME.'images/frame_top_right.gif" alt="dungeons and dragons" title="dungeon and dragon"></td></tr><tr><td background="'.THEME.'images/frame_left.gif"> </td><td align="center" valign="middle" background="'.THEME.'images/cell.gif"><table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td>';
echo "<div style='width:100%;vertical-align:top;'>$news</div>
<div class='news-footer'><img src='".THEME."images/bullet.gif'>
".$locale['040']."<a href='profile.php?lookup=".$info['user_id']."'>".$info['user_name']."</a>
".$locale['041'].showdate("longdate", $info['news_date'])." ·
".($info['news_ext'] == "y" ? "<a href='news.php?readmore=".$info['news_id']."'>".$locale['042']."</a> ·\n" : "")."
<a href='news.php?readmore=".$info['news_id']."'>".$info['news_comments'].$locale['043']."</a> ·
".$info['news_reads'].$locale['044']."
<a href='print.php?type=N&item_id=".$info['news_id']."'><img src='".THEME."images/printer.gif' alt='".$locale['045']."' border='0' style='vertical-align:middle;'></a>
</div>";
echo '</td></tr></table></td><td background="'.THEME.'images/frame_right.gif"> </td></tr><tr><td height="4"><img src="'.THEME.'images/frame_foot_left.gif" width="5" height="5" alt="isa, dnd.rpg.info.pl" title="isa, dnd.rpg.info.pl"></td><td height="4" background="'.THEME.'images/frame_foot_mid.gif"></td><td height="4"><img src="'.THEME.'images/frame_foot_right.gif" width="5" height="5" alt="wotc, ogl" title="wotc, ogl"></td></tr></table></center><BR>';
}
function render_article($subject, $article, $info)
{
global $locale;
echo '<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="5"><img src="'.THEME.'images/frame_top_left.gif" alt="dnd, d&d" title="dnd, d&d"></td><td valign="top" background="'.THEME.'images/frame_top_mid.gif" class="maina"><B><center>'.$subject.'</center></B></td><td width="5"><img src="'.THEME.'images/frame_top_right.gif" alt="dungeons and dragons" title="dungeon and dragon"></td></tr><tr><td background="'.THEME.'images/frame_left.gif"> </td><td align="center" valign="middle" background="'.THEME.'images/cell.gif"><table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td>';
echo "<div style='width:100%;vertical-align:top;'>".($info['article_breaks'] == "y" ? nl2br($article) : $article)."</div>
<div class='news-footer'><img src='".THEME."images/bullet.gif'>
".$locale['040']."<a href='profile.php?lookup=".$info['user_id']."'>".$info['user_name']."</a>
".$locale['041'].showdate("longdate", $info['article_date'])." ·
<a href='articlecomments.php?article_id=".$info['article_id']."'>".$info['article_comments'].$locale['043']."</a> ·
".$info['article_reads'].$locale['044']."
<a href='print.php?type=A&item_id=".$info['article_id']."'><img src='".THEME."images/printer.gif' alt='".$locale['045']."' border='0' style='vertical-align:middle;'></a>
</div>";
echo '</td></tr></table></td><td background="'.THEME.'images/frame_right.gif"> </td></tr><tr><td height="4"><img src="'.THEME.'images/frame_foot_left.gif" width="5" height="5" alt="isa, dnd.rpg.info.pl" title="isa, dnd.rpg.info.pl"></td><td height="4" background="'.THEME.'images/frame_foot_mid.gif"></td><td height="4"><img src="'.THEME.'images/frame_foot_right.gif" width="5" height="5" alt="wotc, ogl" title="wotc, ogl"></td></tr></table><BR>';
}
function opentable($title)
{
echo '<center><table width="99%" border="0" cellspacing="0" cellpadding="0"><tr><td width="5"><img src="'.THEME.'images/frame_top_left.gif" alt="dnd, d&d" title="dnd, d&d"></td><td valign="top" background="'.THEME.'images/frame_top_mid.gif" class="maina"> <B><center>'.$title.'</center></B> </td><td width="5"><img src="'.THEME.'images/frame_top_right.gif" alt="dungeons and dragons" title="dungeon and dragon"></td></tr><tr><td background="'.THEME.'images/frame_left.gif"> </td><td align="center" valign="middle" background="'.THEME.'images/cell.gif"><table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td>';
}
function closetable()
{
echo '</td></tr></table></td><td background="'.THEME.'images/frame_right.gif"> </td></tr><tr><td height="4"><img src="'.THEME.'images/frame_foot_left.gif" width="5" height="5" alt="isa, dnd.rpg.info.pl" title="isa, dnd.rpg.info.pl"></td><td height="4" background="'.THEME.'images/frame_foot_mid.gif"></td><td height="4"><img src="'.THEME.'images/frame_foot_right.gif" width="5" height="5" alt="wotc, ogl" title="wotc, ogl"></td></tr></table></center><BR>';
}
function openside($title)
{
echo '<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="5"><img src="'.THEME.'images/frame_top_left.gif" alt="dnd, d&d" title="dnd, d&d"></td><td valign="top" background="'.THEME.'images/frame_top_mid.gif" class="maina"><B><center>'.$title.'</center></B> </td><td width="5"><img src="'.THEME.'images/frame_top_right.gif" alt="dungeons and dragons" title="dungeon and dragon"></td></tr><tr><td background="'.THEME.'images/frame_left.gif"> </td><td align="center" valign="middle" background="'.THEME.'images/cell.gif"><table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td class="sbody">';
}
function closeside()
{
echo '</td></tr></table></td><td background="'.THEME.'images/frame_right.gif"> </td></tr><tr><td height="4"><img src="'.THEME.'images/frame_foot_left.gif" width="5" height="5" alt="isa, dnd.rpg.info.pl" title="isa, dnd.rpg.info.pl"></td><td height="4" background="'.THEME.'images/frame_foot_mid.gif"></td><td height="4"><img src="'.THEME.'images/frame_foot_right.gif" width="5" height="5" alt="wotc, ogl" title="wotc, ogl"></td></tr></table><BR>';
}
function opensidex($title,$open="on")
{
if($open=="on"){$box_img="off";}else{$box_img="on";}
echo '<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="5"><img src="'.THEME.'images/frame_top_left.gif" alt="dnd, d&d" title="dnd, d&d"></td><td valign="top" background="'.THEME.'images/frame_top_mid.gif" class="maina"><B><center>'.$title.'</center></B> </td><td width="5"><img src="'.THEME.'images/frame_top_right.gif" alt="dungeons and dragons" title="dungeon and dragon"></td></tr><tr><td background="'.THEME.'images/frame_left.gif"> </td><td align="center" valign="middle" background="'.THEME.'images/cell.gif"><table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td>';
echo "<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='scapmain' align='right'>
<img onclick=\"javascript:flipBox('$title')\" name='b_$title' border='0' src='".THEME."images/panel_$box_img.gif'>
</td>
</tr>
</table>
<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='sbody'>
<div id='box_$title'"; if($open=="off"){ echo "style='display:none'"; } echo ">\n";
}
function closesidex()
{
echo "</div>
</td>
</tr>
</table>\n";
echo '</td></tr></table></td><td background="'.THEME.'images/frame_right.gif"> </td></tr><tr><td height="4"><img src="'.THEME.'images/frame_foot_left.gif" width="5" height="5" alt="isa, dnd.rpg.info.pl" title="isa, dnd.rpg.info.pl"></td><td height="4" background="'.THEME.'images/frame_foot_mid.gif"></td><td height="4"><img src="'.THEME.'images/frame_foot_right.gif" width="5" height="5" alt="wotc, ogl" title="wotc, ogl"></td></tr></table><BR>';
}
function tablebreak() {
}
?>
|