Parašė vlc· 2008 Rugs. 3 08:09:26
#1
kaip man pakeist baneri?as idejau i the,es images headeri,ir poto nuejau itheme.php ir pakeiciau jo pavadinima,bet man vistiek neveikia,padarykit jus nes man neveikia :(
headerio pavadinimas:headeris.gif
<?php
if (!defined("IN_FUSION")) { header("Location: ../../index.php"); exit; }
require_once INCLUDES."theme_functions_include.php";
// theme settings
$body_text = "#555555";
$body_bg = "#FFF";
$theme_width = "821";
$theme_width_l = "175";
$theme_width_r = "175";
function render_header($header_content) {
global $theme_width,$aidlink,$settings,$db_prefix;
echo "<table align='center' cellspacing='0' cellpadding='0' width='$theme_width' class='outer-border'>
<tr>
<td class='pageLeft'></td>
<td>
<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='full-header'>
<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='center' width='$theme_width' height='31' style='padding-bottom:0px; padding-left:255px;background-image:url(".THEME."images/search.png.gif)'>
<table style='padding-bottom:0px;' cellpadding='0' cellspadding='0' width='100%'><tr>
<td align='center' valign='top'>
<form name='searchform' method='post' action='".BASEDIR."search.php'>
<input type='text' name='stext' value='$stext' class='textbox' style='width:80px'>
<select name='stype' id='stype' value='$stype' class='textbox'>
<option name='stype' value='n'".($stype == "n" ? " selected" : "").">Naujienos</option>
<option name='stype' value='a'".($stype == "a" ? " selected" : "").">Straipsniai</option>
<option name='stype' value='f'".($stype == "f" ? " selected" : "").">Forumas</option>
<option name='stype' value='d'".($stype == "d" ? " selected" : "").">Failai</option>
<option name='stype' value='m'".($stype == "m" ? " selected" : "").">Vartotojai</option>
</select>
<input name='searchform' src='".THEME."images/search.PNG' value='Ieрkoti' title='Ieрkoti' align='middle' type='image'>
</form>
</td>
</tr>
</table>
</td>
<tr>
<td align='center' width='$theme_width' height='171' style='padding-bottom:0px; padding-left:280px;background-image:url(".THEME."images/headeris.gif)'>
<table width='100%' border='0' cellspacing='0' cellpadding='0'>
<tr><td>";
echo "\n";
$min = 10; // minimum visible shouts in first level.
$max = 10; // maximum number of shouts in second level (hidden).
$colors = array(
103 => "#F75013", // User name color for Super Admins
102 => "#008000", // User name color for Admins
101 => "#3333CC" // User name color for members
);
/******************************************************************/
echo "<table cellpadding='0' cellspacing='0' width='100%' class=''>";
$result = dbquery("SELECT * FROM ".$db_prefix."users ORDER BY user_lastvisit DESC LIMIT ".($min + $max));
if (dbrows($result) != 0) {
$user_count = 0;
while ($data = dbarray($result)) {
// Check if user has ever logged in
if ($data['user_lastvisit'] != 0) {
$lastseen = time() - $data['user_lastvisit'];
$iW=sprintf("%2d",floor($lastseen/604800));
$iD=sprintf("%2d",floor($lastseen/(60*60*24)));
$iH=sprintf("%02d",floor((($lastseen%604800)%86400)/3600));
$iM=sprintf("%02d",floor(((($lastseen%604800)%86400)%3600)/60));
$iS=sprintf("%02d",floor((((($lastseen%604800)%86400)%3600)%60)));
if ($lastseen < 60){
$lastseen="<font color='green'><b>Prisijungжs</b></font>";
} elseif ($lastseen < 360){
$lastseen="<font color='red'>< 5 min.</font>";
} elseif ($iW > 0){
if ($iW == 1) {
$Text = "savaite";
} else {
$Text = "savaitлs";
}
$lastseen = "".$iW." ".$Text."";
} elseif ($iD > 0){
if ($iD == 1) {
$Text = "diena";
} else {
$Text = "dienos";
}
$lastseen = "".$iD." ".$Text."";
} else {
$lastseen = $iH.":".$iM.":".$iS;
}
} else {
$lastseen = "Niekada";
}
echo "<tr>
<td class='small' style='padding-left:350px; align='left'>
<a href='".BASEDIR."profile.php?lookup=".$data['user_id']."'><font color='".$colors[$data['user_level']]."' title='".$data['user_name']." is located in: ".trimlink($data['user_location'] ? $data['user_location'] : $locale['LSUP_008'], 20)."'>".trimlink ($data['user_name'], 12)."</font></a>
</td>
<td class='small2' style='padding-right:0px; align='right'>".$lastseen."</td>
</tr>";
$user_count ++;
}
}
echo "</table>";
if ($user_count > $min) { echo "</div>\n"; }
echo "</td></tr></table>";
echo"</td>
</tr>
<table cellpadding='0' cellspacing='0' width='100%'>
</td>
<tr>
<td align='center' style='background-image:url(".THEME."images/headeris.gif);'>
</td>
</td>
</tr>
</table>
</td>
</tr>
</table>\n";
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
}
function render_footer($license=false) {
global $theme_width,$locale,$settings;
echo "</tr>\n</table>\n";
echo "<table cellSpacing='0' cellPadding='2' width='100%' border='0' background='".THEME."images/footer.png' >";
echo "<td width='20%' height='42' class='footer' align='left'>";
if ($license == false) {
echo "<a href='http://www.ryoart.xz.lt' target='_blank'><img src='".THEME."images/ryo.jpg' border='0'></a>";
}
echo "</td>";
echo "<td width='40%' class='white' align='center'>";
echo "</td>";
echo "<td width='26%' class='footer' align='right'><a href='http://www.php-fusion.co.uk' target='_blank'><img src='".THEME."images/fusion.gif' border='0'></a>";
echo "";
echo "</td>";
echo "<div align='center'></tr></table></td></tr></table></div>";
}
function render_news($subject, $news, $info) {
echo "<table width='496' cellpadding='0' cellspacing='0'>
<td>
<table width='496' cellpadding='0' cellspacing='0'>
<tr>
<td height='38' width='496' valign='bottom' align='center' class='capmain1'>$subject</td>
</tr>
<tr>
<td class='main-body'>
$news
</td>
</tr>
<tr>
<td align='center' height='38' class='news-footer'>\n";
echo openform("N",$info['news_id']).newsposter($info," ").newsopts($info," ").closeform("N",$info['news_id']);
echo "</td>
</tr>
</table>
</td>
</tr>
</table>\n";
}
function render_article($subject, $article, $info) {
echo "<table width='496' cellpadding='0' cellspacing='0'>
<td>
<table width='496' cellpadding='0' cellspacing='0'>
<tr>
<td height='38' width='496' valign='bottom' align='center' class='capmain'>$subject</td>
</tr>
<tr>
<td class='main-body'>
".($info['article_breaks'] == "y" ? nl2br($article) : $article)."
</td>
</tr>
<tr>
<td height='38' class='news-footer'>\n";
echo openform("A",$info['article_id']).articleposter($info," ").articleopts($info," ").closeform("A",$info['article_id']);
echo "</td>
</tr>
</table>
</td>
</tr>
</table>\n";
}
function opentable($title) {
echo "<table width='496' cellpadding='0' cellspacing='0'>
<td>
<table width='496' cellpadding='0' cellspacing='0'>
<tr>
<td height='38' width='496' valign='bottom' align='center' class='capmain1'>$title</td>
</tr>
<tr>
<td height='100%' class='main-body'>\n";
}
function closetable() {
echo "</td>
</tr>
</table>
</td>
<tr>
<td height='38' width='498' class='capmain2'>
</tr>
</table>\n";
}
function openside($title) {
echo "<table width='170' cellpadding='0' cellspacing='0'>
<td>
<table width='170' cellpadding='0' cellspacing='0'>
<tr>
<td>
<table cellspacing=0 celpadding=0 border=0>
<tr>
<td height='40' width='170' class='scapmain1' valign='bottom' align='left'>$title</td>
</tr>
</table>
</tr>
<tr>
<td height='100%' class='side-body'>\n";
}
function closeside() {
echo "</td>
<tr>
<td height='34' width='170' class='scapmain2'>
<tr>
</table>
</td>
</tr>
</table>\n";
tablebreak();
}
function opensidex($title,$state="on") {
$boxname = str_replace(" ", "", $title);
echo "<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='scapmain1'>
<tr>
<td>
<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='scapmain'>$title</td>
<td class='scapmain' align='right'>".panelbutton($state,$boxname)."</td>
</tr>
<tr>
<td colspan='2' class='side-body'>
<div id='box_$boxname'".($state=="off"?" style='display:none'":"").">\n";
}
function closesidex() {
echo "</div>
</td>
</tr>
</table>
</td>
</tr>
</table>\n";
tablebreak();
}
function tablebreak() {
echo "<table width='100%' cellspacing='0' cellpadding='0'>
<tr><td height='10'></td></tr>
</table>\n";
}
?>
Redagavo vlc· 2008 Rugs. 3 08:09:51