Witam serdecznie :)
Dzięki waszemu forum wiele się dowiedziałem o PHP-fusion - stokrotne dzięki.
Lecz mam oto taki problem. Chciałbym aby na stronce data + "imieniny" na belce były umieszczone po prawej stronie. Jak tego dokonać? Poniżej kody plików.
theme.php
<?php
/*--------------------------------------------+
| PHP-Fusion v6 - Content Management System |
|---------------------------------------------|
| author: Nick Jones (Digitanium) © 2002-2006 |
| web: http://www.php-fusion.co.uk |
| email: |
|---------------------------------------------|
| Released under the terms and conditions of |
| the GNU General Public License (Version 2) |
+--------------------------------------------*/
/*--------------------------------------------+
| Uriah Heep Theme for PHP-Fusion v6 |
|---------------------------------------------|
| author: Lorkan Themes - Shedrock © 2006 |
| web: http://phpfusion-themes.com |
| email: |
|---------------------------------------------|
| Released under the terms and conditions of |
| the GNU General Public License (Version 2) |
+--------------------------------------------*/
/* Theme Settings */
$body_text = "#000000";
$body_bg = "#FFFFFF";
$theme_width = "100%";
$theme_width_l = "170";
$theme_width_r = "170";
function render_header($header_content) {
global $theme_width,$settings,$userdata;
echo "<table cellSpacing='1' cellPadding='5' width='100%' class='bodyline' border='0'><tr>";
echo "<td class='td1'>";
echo "<table height='100%' cellSpacing='1' cellPadding='1' width='100%' border='0'><tr>";
echo "<td colSpan='3'>";
echo "<table cellSpacing='0' cellPadding='0' width='100%' align='center' border='0'><tr>";
echo "<td width='100%' colSpan='3'>";
echo "<table cellSpacing='0' cellPadding='0' width='100%' align='center'><tr>";
echo "<td><img src='".THEME."images/head-top-left.gif' width='4' height='10'></td>";
echo "<td width='100%' background='".THEME."images/head-top.gif' class='td2'>";
echo "<img height='1' src='".THEME."images/spacer.gif' width='100%'></td>";
echo "<td><img src='".THEME."images/head-top-right.gif' width='4' height='10'></td></tr></table>";
echo "<table cellSpacing='0' cellPadding='0' width='100%' border='0'><tr>";
echo "<td background='".THEME."images/head-side-left.gif'>";
echo "<img src='".THEME."images/head-side-left.gif' width='4' height='3'></td>";
echo "<td width='100%'>";
echo "<table cellSpacing='0' cellPadding='0' width='100%' border='0'><tr>";
echo "<td width='100%'>";
echo "<table cellSpacing='1' cellPadding='0' width='100%' class='td2' border='0'><tr>";
echo "<td width='100%' class='td2'>";
echo "<table cellSpacing='0' cellPadding='0' width='100%'><tr>";
echo "<td width='50%'><a href='".BASEDIR."index.php'>";
echo "<img title='".$settings[sitename]."' src='".THEME."images/logo.gif' border='0' width='500' height='168'></a></td>";
echo "</div>";
echo "</td></tr></table>";
echo "</td></tr></table>";
echo "</td></tr></table>";
echo "<td background='".THEME."images/head-side-right.gif'>";
echo "<img src='".THEME."images/head-side-right.gif' width='4' height='1'></td></tr></table>";
echo "<table cellSpacing='0' cellPadding='0' width='100%' align='center'><tr>";
echo "<td width='6' class='td1'>";
echo "<img src='".THEME."images/footer-left.gif' width='4' height='3'></td>";
echo "<td width='100%' background='".THEME."images/footer-bg.gif' class='td2'>";
echo "<img height='1' src='".THEME."images/spacer.gif' width='100%'></td>";
echo "<td width='6' class='td1'>";
echo "<img src='".THEME."images/footer-right.gif' width='4' height='3'>";
echo "</td></tr></table>";
echo "</td></tr></table>";
echo "<table><tr><td></td></tr></table>";
echo "<table cellSpacing='0' cellPadding='0' width='100%' align='center' border='0'><tr>";
echo "<td width='100%' colSpan='3'>";
echo "<table cellSpacing='0' cellPadding='0' width='100%' align='center'><tr>";
echo "<td><img src='".THEME."images/head-top-left.gif' width='4' height='1'></td>";
echo "<td width='100%' background='".THEME."images/head-top.gif' class='td2'>";
echo "<img height='1' src='".THEME."images/spacer.gif' width='100%'></td>";
echo "<td><img src='".THEME."images/head-top-right.gif' width='4' height='1'></td></tr></table>";
echo "<table cellSpacing='0' cellPadding='0' width='100%' border='0'><tr>";
echo "<td background='".THEME."images/head-side-left.gif'>";
echo "<img src='".THEME."images/head-side-left.gif' width='4' height='3'></td>";
echo "<td width='100%'>";
echo "<table cellSpacing='0' cellPadding='0' width='100%' border='0'><tr>";
echo "<td width='100%'>";
echo "<table cellSpacing='1' cellPadding='5' width='100%' class='td1' border='0'><tr>";
echo "<td class='td2'>";
echo "<table cellSpacing='1' cellPadding='1' width='100%' border='0'><tr>";
echo "<td class='Headernav' noWrap height='15'>";
//Navbar Login
echo "<span class='welcome'>Witaj</span> <span class='uName'>".(iMEMBER ? $userdata['user_name'] : "Guest")."</span> ";
if (iMEMBER) {
echo " <a href='".BASEDIR."profile.php?lookup=".$userdata['user_id']."'><img title='Zobacz swój profil' alt='Zobacz swój profil' src='".THEME."images/icons/icon-user.gif' align='absMiddle'></a>";
}else{
echo "";
}
if (iMEMBER) {
echo " <a class='userpref' href='".BASEDIR."edit_profile.php'><img title='Edytuj profil' alt='Edytuj profil' src='".THEME."images/icons/icon-edit.gif' align='absMiddle' border='0'></a> <a class='userpref' href='".BASEDIR."setuser.php?logout=yes'><img title='Wyloguj' alt='Wyloguj' src='".THEME."images/icons/icon-logout.gif' align='absMiddle' border='0'></a>";
} else {
echo " [<a class='userpref' href='".BASEDIR."register.php'>Register</a>]";
}
//Login Code End
echo"</td><td class='smText' align='right'>";
//Display only if member
if (iALL) {
[color=red]//Clock Script
echo ($i == 0 ? " " : "")."</div></td><td>";
require_once INFUSIONS."imieniny/imieniny.php";
echo "<table cellSpacing='0' width='100%' cellPadding='0' border='0'><tr>";
echo "</TD><td class='subheader' valign='right' align='right'>";
echo "</td></tr></table></form>";
echo "</td></tr></table></div>";
echo "</td></tr></table>";
echo "</td></tr></table>\n";
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
}
}[/color]
function render_footer($license=false) {
global $theme_width,$settings,$locale;
echo "</tr>\n</table></div>\n";
echo "<table cellSpacing='0' cellPadding='0' width='100%' border='0'><tr>";
echo "<td class='td1'>";
echo "<table height='100%' cellSpacing='1' cellPadding='1' width='100%' border='0'><tr>";
echo "<td colSpan='3'>";
echo "<table cellSpacing='0' cellPadding='0' width='100%' align='center' border='0'><tr>";
echo "<td width='100%' colSpan='3'>";
echo "<table cellSpacing='0' cellPadding='0' width='100%' align='center'><tr>";
echo "<td><img src='".THEME."images/head-top-left.gif' width='4' height='1'></td>";
echo "<td width='100%' background='".THEME."images/head-top.gif' class='td2'>";
echo "<img height='1' src='".THEME."images/spacer.gif' width='100%'></td>";
echo "<td><img src='".THEME."images/head-top-right.gif' width='4' height='1'></td></tr></table>";
echo "<table cellSpacing='0' cellPadding='0' width='100%' border='0'><tr>";
echo "<td background='".THEME."images/head-side-left.gif'>";
echo "<img src='".THEME."images/head-side-left.gif' width='4' height='3'></td>";
echo "<td width='100%'>";
echo "<table cellSpacing='0' cellPadding='0' width='100%' border='0'><tr>";
echo "<td width='100%'>";
echo "<table cellSpacing='1' cellPadding='0' width='100%' class='td2' border='0'><tr>";
echo "<td width='100%' class='td2'>";
echo "<table style='padding-top:6px; padding-bottom:6px;' height='50' cellSpacing='0' cellPadding='0' width='100%'><tr>";
echo "<td style='padding-left:4px;' align='left' width='20%'>";
echo "<a href='#top'><img alt='Top' title='Top' src='".THEME."images/top.gif'></a></td>";
echo "<td align='center' width='60%'>".stripslashes($settings['footer'])."<br />\n";
if ($license == false) {
echo "<span class='tName'>Uriah Heep</span> <span class='pName'>by</span> <a target='_blank' href='http://phpfusion-themes.com'>PHP Fusion Themes</a><br /><br /><span class='pName'>Powered by <a href='http://www.php-fusion.co.uk' target='_blank'>PHP-Fusion</a> v".$settings['version']." © 2003-2005</span><br /><br />\n";
}
echo "</td></tr></table>";
echo "</td></tr></table>";
echo "<td background='".THEME."images/head-side-right.gif'>";
echo "<img src='".THEME."images/head-side-right.gif' width='4' height='1'></td></tr></table>";
echo "<table cellSpacing='0' cellPadding='0' width='100%' align='center'><tr>";
echo "<td width='6' class='td1'>";
echo "<img src='".THEME."images/footer-left.gif' width='4' height='3'></td>";
echo "<td width='100%' background='".THEME."images/footer-bg.gif' class='td2'>";
echo "<img height='1' src='".THEME."images/spacer.gif' width='100%'></td>";
echo "<td width='6' class='td1'>";
echo "<img src='".THEME."images/footer-right.gif' width='4' height='3'>";
echo "</td></tr></table></td></tr></table>";
}
function render_news($subject, $news, $info) {
global $locale;
echo "<table cellSpacing='0' cellPadding='3' width='100%' align='center' border='0'><tr>";
echo "<td class='td1'>";
echo "<table cellSpacing='0' cellPadding='0' width='100%' border='0'><tr>";
echo "<td class='td1'>";
echo "<table height='100%' cellSpacing='0' cellPadding='0' width='100%' border='0'><tr>";
echo "<td vAlign='top' width='100%'>";
echo "<table cellSpacing='0' cellPadding='0' width='100%'><tr>";
echo "<td><table cellSpacing='1' cellPadding='3' width='100%'class='td3'><tr>";
echo "<td class='td2'><table width='100%'><tr>";
echo "<td rowSpan='2'><img src='".THEME."images/icons/icon-news.gif'></td>";
echo "<td class='news-heading'>$subject</td>";
echo "<td align='right' rowSpan='2'>";
echo "".($info['news_ext'] == "y" ? "<a class='readmore' href='news.php?readmore=".$info['news_id']."'>".$locale['042']."</a> ·\n" : "")."";
if ($info['news_allow_comments'])
echo "<b>Statystyka</b><br />".$info['news_reads'].$locale['044']." \ ";
echo "<a href='news.php?readmore=".$info['news_id']."'>".$info['news_comments'].$locale['043']."</a>";
echo"</td></tr>";
echo "<tr><td class='smText'>";
echo "".$locale['040']."<a href='profile.php?lookup=".$info['user_id']."'>".$info['user_name']."</a> ";
echo "".$locale['041'].showdate("longdate", $info['news_date'])."</td></tr>";
echo "<tr><td colSpan='3'>";
echo "<table cellSpacing='1' cellPadding='1' width='100%' class='td3'><tr>";
echo "<td class='news-body'><table width='100%'><tr>";
echo "<td class='news-text'>$news</td></tr>";
echo "<tr><td class='news-footer' align='right'>";
echo "Czytaj komentarze <a href='news.php?readmore=".$info['news_id']."'><img src='".THEME."images/icons/icon-comments.gif 'alt='Czytaj komentarze' title='Czytaj komentarze' style='vertical-align:middle;'></a> Drukuj <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> ";
if (iMEMBER) {
echo "Nowy news <a href='".BASEDIR."submit.php?stype=n'><img src='".THEME."images/icons/icon-postnews.gif' alt='Nowy news' title='Create News' style='vertical-align:middle;'></a>";
}
echo "</td></tr></table></td></tr></table>";
echo "</td></tr></table></td></tr></table>";
echo "</td></tr></table>";
//echo "<img height='3' src='".THEME."images/spacer.gif' width='3'>";
echo "</td></tr></table></td></tr></table></td></tr></table>";
}
function render_article($subject, $article, $info) {
global $locale;
echo "<table cellSpacing='0' cellPadding='0' width='100%' align='center' border='0'><tr>";
echo "<td class='td1'>";
echo "<table cellSpacing='0' cellPadding='0' width='100%' border='0'><tr>";
echo "<td class='td1'>";
echo "<table height='100%' cellSpacing='0' cellPadding='0' width='100%' border='0'><tr>";
echo "<td vAlign='top' width='100%'>";
echo "<table cellSpacing='0' cellPadding='0' width='100%'><tr>";
echo "<td><table cellSpacing='1' cellPadding='3' width='100%'class='td3'><tr>";
echo "<td class='td2'><table width='100%'><tr>";
echo "<td rowSpan='2'><img src='".THEME."images/icons/icon-article.gif'></td>";
echo "<td class='news-heading'>$subject</td>";
echo "<td align='right' rowSpan='2'>";
echo "<b>Article Item</b><br />".$info['article_reads'].$locale['044']." \ <span class='readmore'>";
if ($info['article_allow_comments']) echo $info['article_comments'].$locale['043']."</span></td></tr>";
echo "<tr><td class='smText'>";
echo "".$locale['040']."<a href='profile.php?lookup=".$info['user_id']."'>".$info['user_name']."</a> ";
echo "".$locale['041'].showdate("longdate", $info['article_date'])."</td></tr>";
echo "<tr><td colSpan='3'>";
echo "<table cellSpacing='1' cellPadding='1' width='100%' class='td3'><tr>";
echo "<td class='news-body'><table width='100%'><tr>";
echo "<td class='news-text'>".($info['article_breaks'] == "y" ? nl2br($article) : $article)."";
echo "</td></tr>";
echo "<tr><td class='news-footer' align='right'>";
echo "Drukuj <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> ";
if (iMEMBER) {
echo "Submit Article <a href='".BASEDIR."submit.php?stype=a'><img src='".THEME."images/icons/icon-postnews.gif' alt='Create Article' title='Create Article' style='vertical-align:middle;'></a>";
}
echo "</td></tr></table></td></tr></table>";
echo "</td></tr></table></td></tr></table>";
echo "</td></tr></table>";
//echo "<img height='3' src='".THEME."images/spacer.gif' width='3'>";
echo "</td></tr></table></td></tr></table></td></tr></table>";
}
// Open table begins
function opentable($title) {
echo "<table cellSpacing='0' cellPadding='0' width='100%' border='0'><tr>";
echo "<td background='".THEME."images/head-side-left.gif'>";
echo "<img src='".THEME."images/head-side-left.gif' width='4' height='3'></td>";
echo "<td width='100%'>";
echo "<table style cellSpacing='0' cellPadding='0' width='100%' align='center' border='0'><tr>";
echo "<td width='100%' colSpan='3'>";
echo "<table cellSpacing='0' cellPadding='0' width='100%' border='0'><tr>";
echo "<td width='100%'>";
echo "<table cellSpacing='0' cellPadding='0' width='100%' border='0'><tr>";
echo "<td style='border-top: 1px solid #98AAB1' width='100%'>";
echo "<table class='border' cellSpacing='0' cellPadding='3' width='100%' border='0'><tr>";
echo "<td class='panelHeading' background='".THEME."images/table_bg_image.gif' bgColor='#D8DEE3'>";
echo "<table cellSpacing='0' cellPadding='0' width='100%'><tr>";
echo "<td class='panelHeadingPic' width='100%'>$title</td></tr></table></td></tr></table>";
echo "<table cellSpacing='1' cellPadding='3' width='100%' class='td1' border='0'><tr>";
echo "<td class='side-body' colSpan='0'>";
}
// Close table end
function closetable() {
echo "</td></tr></table></td></tr></table>";
echo "</td></tr></table></td></tr></table>";
echo "<td background='".THEME."images/head-side-right.gif'>";
echo "<img src='".THEME."images/head-side-right.gif' width='4' height='1'></td></tr></table>";
echo "<table cellSpacing='0' cellPadding='0' width='100%' align='center'><tr>";
echo "<td width='6' class='td1'>";
echo "<img src='".THEME."images/footer-left.gif' width='4' height='3'></td>";
echo "<td width='100%' background='".THEME."images/footer-bg.gif' class='td1'>";
echo "<img height='1' src='".THEME."images/spacer.gif' width='100%'></td>";
echo "<td width='6'><img src='".THEME."images/footer-right.gif' width='4' height='3'>";
echo "</td></tr></table>";
}
function openside($title) {
echo "<table cellSpacing='0' cellPadding='0' width='100%' border='0'><tr>";
echo "<td background='".THEME."images/head-side-left.gif'>";
echo "<img src='".THEME."images/head-side-left.gif' width='4' height='3'></td>";
echo "<td width='100%'>";
echo "<table style cellSpacing='0' cellPadding='0' width='100%' align='center' border='0'><tr>";
echo "<td width='100%' colSpan='3'>";
echo "<table cellSpacing='0' cellPadding='0' width='100%' border='0'><tr>";
echo "<td width='100%'>";
echo "<table cellSpacing='0' cellPadding='0' width='100%' border='0'><tr>";
echo "<td style='border-top: 1px solid #98AAB1' width='100%'>";
echo "<table class='border' cellSpacing='0' cellPadding='3' width='100%' border='0'><tr>";
echo "<td class='panelHeading'>";
echo "<table cellSpacing='0' cellPadding='0' width='100%'><tr>";
echo "<td class='panelHeadingPic' width='100%'>$title</td></tr></table></td></tr></table>";
echo "<table cellSpacing='1' cellPadding='3' width='100%' class='td1' border='0'><tr>";
echo "<td class='side-body' colSpan='0'>";
}
function closeside() {
echo "</td></tr></table>";
echo "</td></tr></table>";
echo "</td></tr></table>";
echo "</td></tr></table>";
echo "<td background='".THEME."images/head-side-right.gif'>";
echo "<img src='".THEME."images/head-side-right.gif' width='4' height='1'>";
echo "</td></tr></table>";
echo "<table cellSpacing='0' cellPadding='0' width='100%' align='center'><tr>";
echo "<td width='6'><img src='".THEME."images/footer-left.gif' width='4' height='3'></td>";
echo "<td width='100%' background='".THEME."images/footer-bg.gif' class='td2'>";
echo "<img height='1' src='".THEME."images/spacer.gif' width='100%'></td>";
echo "<td width='6'><img src='".THEME."images/footer-right.gif' width='4' height='3'>";
echo "</td></tr></table>";
tablebreak();
}
function opensidex($title,$open="on") {
$box_img = ($open=="on" ? "off" : "on");
echo "<table cellSpacing='0' cellPadding='0' width='100%' border='0'><tr>";
echo "<td background='".THEME."images/head-side-left.gif'>";
echo "<img src='".THEME."images/head-side-left.gif' width='4' height='3'></td>";
echo "<td width='100%'>";
echo "<table style cellSpacing='0' cellPadding='0' width='100%' align='center' border='0'><tr>";
echo "<td width='100%' colSpan='3'>";
echo "<table cellSpacing='0' cellPadding='0' width='100%' border='0'><tr>";
echo "<td width='100%'>";
echo "<table cellSpacing='0' cellPadding='0' width='100%' border='0'><tr>";
echo "<td style='border-top: 1px solid #98AAB1' width='100%'>";
echo "<table class='border' cellSpacing='0' cellPadding='3' width='100%' border='0'><tr>";
echo "<td class='panelHeading' background='".THEME."images/table_bg_image.gif' bgColor='#D8DEE3'>";
echo "<table cellSpacing='0' cellPadding='0' width='100%'><tr>";
echo "<td class='panelHeadingPic' width='100%'>";
echo "<img align='right' onclick=\"javascript:flipBox('$title')\" name='b_$title' alt='$box_img' border='0' src='".THEME."images/panel_$box_img.gif'>$title</td>";
echo "</tr></table></td></tr></table>";
echo "<table cellSpacing='1' cellPadding='3' width='100%' class='td1' border='0'><tr>";
echo "<td class='side-body' align='middle' class='td2' colSpan='0'>";
echo "<div id='box_$title'".($open=="off" ? "style='display:none'" : "").">\n";
}
function closesidex() {
echo "</td></tr></table>";
echo "</td></tr></table>";
echo "</td></tr></table>";
echo "</td></tr></table></div>";
echo "<td background='".THEME."images/head-side-right.gif'>";
echo "<img src='".THEME."images/head-side-right.gif' width='4' height='1'></td></tr></table>";
echo "<table cellSpacing='0' cellPadding='0' width='100%' align='center'><tr>";
echo "<td width='6'><img src='".THEME."images/footer-left.gif' width='4' height='3'></td>";
echo "<td width='100%' background='".THEME."images/footer-bg.gif' class='td2'>";
echo "<img height='1' src='".THEME."images/spacer.gif' width='100%'></td>";
echo "<td width='6' class='td1'><img src='".THEME."images/footer-right.gif' width='4' height='3'>";
echo "</td></tr></table>";
tablebreak();
}
// Table functions
function tablebreak() {
echo "<table width='100%' cellspacing='0' cellpadding='0'><tr><td height='8'></td></tr></table>\n";
}
?>
imieniny.php
<?php
/**************************************************************
Skrypt wyswietla aktualna date i imieniny v1.0
(C)1999-2004 by Adam "Logic" Sobocinski <>
Homepage: http://www.anubisdev.com
Skrypt jest na licencji Freeware.
Przystosowany do działania na PHP3, PHP4 i PHP5
***************************************************************/
define('AD_IPATH',"imieniny/"); // sciezka do katalogu ze skryptem
define('AD_DATE',1); // gdy 1 - aktualna data jest wyswietlana
function ad_imieniny()
{
$month = array(1=>'Styczenia','Lutego','Marca','Kwietnia','Maja','Czerwca','Lipca',
'Sierpnia','Września','PaĽdziernika','Listopada','Grudnia');
$day = array("niedziela", 'poniedziałek','wtorek','¶roda','czwartek','pi±tek','sobota');
$dzisiaj = getdate();
$ad_m = date("m");
$ad_n = date("n");
$ad_d = date("j");
$name=@file(AD_IPATH.$ad_m);
if(AD_DATE==1) echo '<b>Dzisiaj jest</b> '.$day[$dzisiaj['wday']].' '.$ad_d.' '.$month[$ad_n].' '.$dzisiaj['year'].'.'; echo ' <b>Imieniny obchodzi:</b> '.$name[$ad_d].'';
}
ad_imieniny();
?>
|