Parašė Sharkie· 2008 Lap. 2 15:11:08
#2
Skaityk straipsnius daugiau. O šiaip galbūt toks kodas, bandyk:
<?php
if (!defined("IN_FUSION")) { header("Location: ../../index.php"); exit; }
require_once INCLUDES."theme_functions_include.php";
// theme settings
$body_text = "#444444";
$body_bg = "#ffffff";
$theme_width = "957";
$theme_width_l = "210";
$theme_width_r = "210";
function render_header($header_content) {
global $theme_width;
echo "<table colspan='3' align='center' cellspacing='0' cellpadding='0' width='$theme_width'>
<tr>
<td>";
if (iMEMBER) {
echo "Sveikas, nary!";
} else {
echo"<table border='0' cellpadding='0' cellspacing='0' width='100%' background='".THEME."images/imageslogo.jpg'>
<tr>
<td style='padding-left:800px; padding-bottom:0px; padding-right:0px; padding-top:0px;'>";
echo "
<form name='loginform' method='post' action='".FUSION_SELF."'>
".$locale['061']."<br>
<input type='text' name='user_name' class='textbox' style='width:100px'><br>
".$locale['062']."<br>
<input type='password' name='user_pass' class='textbox' style='width:100px'><br>
<input type='checkbox' name='remember_me' value='y'>".$locale['063']."<br><br>
<input type='submit' name='login' value='Login' class='button'><br>
</form>\n";
</td>
</tr>
</tr>
</table>\n";
}
tablebreak();
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
}
function render_footer($license=false) {
global $theme_width,$settings;
echo "</tr>\n</table>\n";
}
function render_news($subject, $news, $info) {
echo "<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td><img src='".THEME."images/01.png'></td>
<td class='capmain' height='3' align='left' valign='middle' width='100%'>$subject</td>
<td><img src='".THEME."images/03.png' ></td>
</tr>
</table>
<table cellpadding='0' cellspacing='0' width='100%' class='border'>
<tr>
<td background='".THEME."images/04.png'></td>
<td class='main-body'>
$news
</td>
<td background='".THEME."images/05.png'></td>
</tr>
<tr>
<td background='".THEME."images/04.png'></td>
<td align='right' class='news-footer'>\n";
echo "<img src='".THEME."images/bullet.jpg'> <a href='".BASEDIR."news.php?readmore=".$info['news_id']."'>Plačiau!</a>";
echo "</td>
<td background='".THEME."images/05.png'></td>
</tr>
<tr><td><img src='".THEME."images/06.png'></td><td background='".THEME."images/07.png' width='100%'></td><td><img src='".THEME."images/08.png'></td></tr>
</table>\n";
}
function render_article($subject, $article, $info) {
echo "<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td>
<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td><img src='".THEME."images/01.png'></td>
<td class='capmain' height='3' align='left' valign='middle' width='100%'>$subject</td>
<td><img src='".THEME."images/03.png' ></td>
</tr>
<tr>
<td background='".THEME."images/04.png'></td>
<td class='main-body'>
".($info['article_breaks'] == "y" ? nl2br($article) : $article)."
</td>
<td background='".THEME."images/05.png'></td>
</tr>
<tr>
<td background='".THEME."images/04.png'></td>
<td width='100%' align='center' class='news-footer'>\n";
echo openform("A",$info['article_id']).articleposter($info,"<br>").articleopts($info,"·").closeform("A",$info['article_id']);
echo "</td>
<td background='".THEME."images/05.png'></td>
</tr>
<tr><td><img src='".THEME."images/06.png'></td><td background='".THEME."images/07.png' width='100%'></td><td><img src='".THEME."images/08.png'></td></tr>
</table>
</td>
</tr>
</table>\n";
}
function opentable($title) {
echo "<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td><img src='".THEME."images/01.png'></td>
<td class='capmain' height='3' align='left' valign='middle' width='100%'>$title</td>
<td><img src='".THEME."images/03.png' ></td>
</tr>
</table>
<table width='100%' cellpadding='0' cellspacing='0' class='border'>
<tr>
<td background='".THEME."images/04.png'></td>
<td class='main-body'>\n";
}
function closetable() {
echo "</td>
<td background='".THEME."images/05.png'></td>
</tr>
<tr>
<td><img src='".THEME."images/06.png'></td>
<td background='".THEME."images/07.png' width='100%'></td>
<td><img src='".THEME."images/08.png'></td>
</tr>
</table>\n";
}
function openside($title) {
echo "<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td><img src='".THEME."images/1.png'></td>
<td class='scapmain' height='37' align='left' valign='middle' width='100%'>$title</td>
<td><img src='".THEME."images/3.png' ></td>
</tr>
<tr>
<td background='".THEME."images/04.png'></td>
<td class='side-body'>
\n";
}
function closeside() {
echo "
</td>
<td background='".THEME."images/05.png'></td>
</tr>
<tr>
<td><img src='".THEME."images/06.png'></td>
<td background='".THEME."images/7.png' width='100%'></td>
<td><img src='".THEME."images/08.png'></td>
</tr>
</table>\n";
}
function tablebreak() {
echo "<table cellpadding='0' cellspacing='0' width='100%'>
<tr><td height='8'></td></tr>
</table>\n";
}
?>
Bet prieš keisdamas kodą išsisaugok seną theme.php, kad paskui nebūtų bėdų. :)
EDIT: Redagavau kodą, turėtų veikti.
Redagavo Sharkie· 2008 Lap. 2 15:11:24