<?php
if (!defined("IN_FUSION")) { die("Access Denied"); }
$showLogInForm = TRUE;
$showBanner = false;
$logo = TRUE; //FALSE for site logo, TRUE for theme logo
define("THEME_WIDTH", "1050px"); //site width!!!
define("NAVIGATION_WIDTH", "100%"); //set the navigation width!!!
define("THEME_BULLET", "<img src='".THEME."images/bullet.png' alt='' style='border:0' />");
require_once INCLUDES."theme_functions_include.php";
require_once THEME."core.php";
function render_page($license=false) {
global $settings, $main_style, $logo, $showLogInForm, $showBanner, $locale;
/******MAIN*FRAME*******************************************/
echo "<table cellpadding='0' cellspacing='0' width='".THEME_WIDTH."' align='center' border='0px'>
<tr>
<td colspan='3'>
<table cellpadding='0' cellspacing='0' width='100%' >
<tr>
<td class='left_top' align='left'>
<div id='info'>".returnDate(mktime(),2)." <a href='http://www.solofm.too.lt' class='infol'>SoloFM</a> | <a href='".BASEDIR."news.php' class='infol'>Naujienos</a> | <a href='".BASEDIR."viewpage.php?page_id=5' class='infol'>Komanda</a></div>
</td>
<td class='top'><img src='".THEME."images/blank.png' width='10px' height='70px' alt='' style='border: 0px;'></td>
<td class='right_top' align='right'>".showTools()."</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign='top' width='88px' height='530px' class='left_one_bg'>
<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='left_one'><img src='".THEME."images/blank.png' width='88px' height='430px' alt='' style='border: 0px;'></td>
</tr>
</table>
</td>
<td rowspan='2' class='main_content' valign='top'>";
/******MAIN*FRAME*******************************************/
/******HEADER*******************************************/
echo "<table cellpadding='0' cellspacing='0' width='100%' class='header'>
<tr>
<td><a href='".BASEDIR."index.php' style='border: 0px;' alt='".$settings['sitename']."' title='".$settings['sitename']."'>".($logo ? "<img src='".THEME."logo.png' alt='' style='border: 0px;'>" : "<img src='".BASEDIR.$settings['sitebanner']."' alt='' style='border: 0px;'>")."</a></td><td> </td>
".showBanner($showBanner).showForm($showLogInForm)."
</tr>
</table>";
/******HEADER*******************************************/
/******NAVIGATION*******************************************/
echo "<table cellpadding='0' cellspacing='0' width='100%' class='navigation'>
<tr>
<td class='navi_l'></td>
<td width='".NAVIGATION_WIDTH."' class='navi'>".navigacija()."</td>
<td class='navi_k'></td>
<td class='naviend'><img src='".THEME."images/blank.png' width='10px' height='30px' alt='' style='border: 0px;'></td>
</tr>
</table><p>";
/******NAVIGATION*******************************************/
/******CONTENT*******************************************/
echo "<table cellpadding='0' cellspacing='0' width='100%' class='$main_style'>\n<tr>\n";
if (LEFT) { echo "<td class='side-border-left' valign='top'>".LEFT."</td>"; }
echo "<td class='main-bg' valign='top'>".U_CENTER.CONTENT.L_CENTER."</td>";
if (RIGHT) { echo "<td class='side-border-right' valign='top'>".RIGHT."</td>"; }
echo "</tr>\n</table>\n";
/******CONTENT*******************************************/
/******FOOTER*******************************************/
echo "<div id='nogatop'>".showcounter()."<br>".showcopyright()."<br>Theme <i>Ambient</i> designed by <a href='http://www.solofm.too.lt'>Si Fusion</a>.</div>";
/******FOOTER*******************************************/
/******MAIN*FRAME*******************************************/
echo "</td>
<td valign='top' width='88px' height='530px' class='right_one_bg'>
<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='right_one'><img src='".THEME."images/blank.png' width='88px' height='530px' alt='' style='border: 0px;'></td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign='bottom' width='88px' class='left_half'>
<table cellpadding='0' cellspacing='0' width='88px'>
<tr>
<td class='left_second' height='90px'><img src='".THEME."images/blank.png' width='88px' height='90px' alt='' style='border: 0px;'></td>
</tr>
</table>
</td>
<td valign='bottom' width='88px' class='right_half'>
<table cellpadding='0' cellspacing='0' width='88px'>
<tr>
<td class='right_second' height='90px'><img src='".THEME."images/blank.png' width='88px' height='90px' alt='' style='border: 0px;'></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan='3'>
<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='left_bottom' align='left'><img src='".THEME."images/blank.png' width='500px' height='100px' alt='' style='border: 0px;'></td>
<td class='bottom'><img src='".THEME."images/blank.png' width='10px' height='88px' alt='' style='border: 0px;'></td>
<td class='right_bottom' align='right'><img src='".THEME."images/blank.png' width='300px' height='100px' alt='' style='border: 0px;'></td>
</tr>
</table>
</td>
</tr>
</table>";
/******MAIN*FRAME*******************************************/
}
function render_news($subject, $news, $info) {
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td class='news'>".$subject."</td>\n";
echo "<td class='newsr' align='right'>".avtornovice($info)."</td>\n";
echo "</tr>\n<tr>\n";
echo "<td class='main-body' colspan='2'>".$news."</td>\n";
echo "</tr>\n<tr>\n";
echo "<td align='center' class='news-footer' colspan='2'>\n";
echo opcijenovice($info).dodatno("N",$info['news_id']);
echo "</td>\n</tr>\n</table>\n";
echo hr();
}
function render_article($subject, $article, $info) {
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td class='news'>".$subject."</td>\n";
echo "<td class='newsr'></td>\n";
echo "</tr>\n<tr>\n";
echo "<td class='main-body'>".($info['article_breaks'] == "y" ? nl2br($article) : $article)."</td>\n";
echo "</tr>\n<tr>\n";
echo "<td align='center' class='news-footer' colspan='2'>\n";
echo articleposter($info," ·").articleopts($info,"·").itemoptions("A",$info['article_id']);
echo "</td>\n</tr>\n</table>\n";
echo hr();
}
function opentable($title) {
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td class='capmain'>".$title."</td>\n";
echo "</tr>\n<tr>\n";
echo "<td class='main-body'>\n";
}
function closetable() {
echo "</td>\n</tr>\n</table>\n";
echo hr();
}
function openside($title, $collapse = false, $state = "on") {
global $panel_collapse; $panel_collapse = $collapse;
echo "<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='l_z'><img src='".THEME."images/blank.png' width='7px' height='25px' alt='' style='border: 0px;'></td>
<td class='z'>".$title."</td><td class='z' align='right'>";
if ($collapse == true){
$boxname = str_replace(" ", "", $title);
echo panelbutton($state,$boxname);
}
echo "</td>
<td class='d_z'><img src='".THEME."images/blank.png' width='7px' height='25px' alt='' style='border: 0px;'></td>
</tr>
<tr>
<td class='l'></td>
<td colspan='2' class='side-body'>";
if ($collapse == true) { echo panelstate($state, $boxname); }
}
function closeside($collapse = false) {
global $panel_collapse;
if ($panel_collapse == true) { echo "</div>\n"; }
echo "</td>
<td class='d'></td>
</tr>
<tr>
<td class='l_s'><img src='".THEME."images/blank.png' width='7px' height='7px' alt='' style='border: 0px;'></td>
<td colspan='2' class='s'></td>
<td class='d_s'><img src='".THEME."images/blank.png' width='7px' height='7px' alt='' style='border: 0px;'></td>
</tr>
</table>";
echo hr();
}
?>
<div id='info'>".returnDate(mktime(),2)." <a href='http://www.solofm.too.lt' class='infol'>SoloFM</a> | <a href='".BASEDIR."news.php' class='infol'>Naujienos</a> | <a href='".BASEDIR."viewpage.php?page_id=5' class='infol'>Komanda</a></div>
</td>
<?php
/**
* @author Matej Krhin
* @copyright 2008
*/
function showForm($mode){
global $userdata, $zs, $aidlink, $locale;
if($mode){
if(!iUSER)
return "<td valign='top' class='logInForm'><table cellpadding='0' cellspacing='0' width='100%'><tr><td width='210px'>
<form name='loginform' method='post' action='".FUSION_SELF."'>
<input type='text' name='user_name' class='userbox' style='width:73px' />
<input type='password' name='user_pass' class='passbox' style='width:73px' /></td><td>
<input type='submit' name='login' value='' class='submitgumb' border='0px' />
</form></td></tr></table><p>
<a href='".BASEDIR."lostpassword.php'>Pamiršai slaptažodį?</a> <a href='".BASEDIR."register.php'>Registracija</a>
</td>";
if(iUSER)
return "<td valign='top' class='logInForm'>Jūsų profilis, <b><a href='".BASEDIR."edit_profile.php'>".$userdata['user_name']."</a>.</b>
<br>Turiš ".countMessages().($zs != 0 ? "!" : ".")."<br>
<a href='".BASEDIR."members.php' class='side'>".$locale['global_122']."</a><br>
".(iADMIN ? "<a href='".ADMIN."index.php".$aidlink."' class='side'>".$locale['global_123']."</a><br>" : "")."
<a href='".BASEDIR."setuser.php?logout=yes' class='side'>".$locale['global_124']."</a>
</td>";
}
else
return "";
}
function showBanner($mode) {
if($mode)
return "<td align='center'><!-- SoloFM - muzika gerai nuotaikai... <a href='http://www.solofm.too.lt' target='_blank'><span style='color:005C5B'>www.solofm.too.lt</span></a> -->
<script type='text/javascript'>
_iprom_s='qnphtoaioblqgicf';
_iprom_d='468x60';
</script>
<script type='text/javascript' src='http://solofm.too.lt/banner.js'>
</script>
<!-- SoloFM - muzika gerai nuotaikai... <a href='http://www.solofm.too.lt' target='_blank'><span style='color:005C5B'>www.solofm.too.lt</span></a> --></td>";
else return ""; //vrnemo prazno polje
}
function countMessages(){
global $userdata;
$zs = dbcount("(message_id)", DB_MESSAGES, "message_to='".$userdata['user_id']."' AND message_read='0'AND message_folder='0'");
if($zs == 1) $zs .= " naują <a href='".BASEDIR."messages.php'>žinutę</a>";
if($zs == 2) $zs .= " naujas <a href='".BASEDIR."messages.php'>žinutes</a>";
if($zs == 3 || $zs == 4) $zs .= " naujas <a href='".BASEDIR."messages.php'>žinutes</a>";
if($zs >= 5 || $zs == 0) $zs .= " naujų <a href='".BASEDIR."messages.php'>žinučių</a>";
return $zs;
}
function showTools(){
return "<table cellpadding='0' cellspacing='0' class='tools'><tr>
<td width='50px'><a href='".THEME."settings.php?font=zmanjsaj' alt='Smaller font' title='Smaller font'><img src='".THEME."images/down.png' border='0'></a> <a href='".THEME."settings.php' alt='Reset font' title='Reset font'><img src='".THEME."images/reset.png' border='0'></a> <a href='".THEME."settings.php?font=povecaj' alt='Bigger font' title='Bigger font'><img src='".THEME."images/up.png' border='0'></a></td>
<td class='ozadjeiskanja'>
<form name='searchform' method='get' action='".BASEDIR."search.php'>
<input type='textbox' value='' name='stext' class='searchbox' width='90px'></td><td class='gumbiskanja'>
<input type='image' name='search' src='".THEME."images/najdi.png'> </td></tr>
</form></table>";
}
function hr(){
return "<table cellpadding='0' cellspacing='0' border='0px' width='100%'>
<tr>
<td height='13px' align='center'><img src='".THEME."images/hr.png' width='171px' height='11px' alt='' style='border: 0px;'></td>
</tr>
</table>";
}
function returnDate($stamp,$mode){
global $settings;
$dan = strftime("%d",$stamp+($settings['timeoffset']*3600));
$dant = strftime("%w",$stamp+($settings['timeoffset']*3600));
$mesec = strftime("%m",$stamp+($settings['timeoffset']*3600));
$leto = strftime("%y",$stamp+($settings['timeoffset']*3600));
$letow = strftime("%Y",$stamp+($settings['timeoffset']*3600));
switch ($dant){
case 0 : $dant = "Sekmadienis"; break;
case 1 : $dant = "Pirmadienis"; break;
case 2 : $dant = "Antradienis"; break;
case 3 : $dant = "Trečiadienis"; break;
case 4 : $dant = "Ketvirtadienis"; break;
case 5 : $dant = "Penktadienis"; break;
case 6 : $dant = "Šeštadienis"; break;
}
switch ($mesec){
case 01 : $mesec = "Sausis"; break;
case 02 : $mesec = "Vasaris"; break;
case 03 : $mesec = "Kovas"; break;
case 04 : $mesec = "Balandis"; break;
case 05 : $mesec = "Gegužė"; break;
case 06 : $mesec = "Birželis"; break;
case 07 : $mesec = "Liepa"; break;
case 08 : $mesec = "Rugpjūtis"; break;
case 09 : $mesec = "Rugsėjis"; break;
case 10 : $mesec = "Spalis"; break;
case 11 : $mesec = "Lapkritis"; break;
case 12 : $mesec = "Gruodis"; break;
}
if($mode == 1)
return "$dan. $mesec $leto";
if($mode == 2)
return "$dant, $dan. $mesec $letow";
}
function avtornovice($info) {
global $locale;
$res = "<i><a href='profile.php?lookup=".$info['user_id']."' class='avtor'>".$info['user_name']."</a>, ";
$res .= returnDate($info['news_date'],1)."</i>";
return "<!--news_poster-->".$res;
}
function opcijenovice($info) {
global $locale; $res = "";
if (!isset($_GET['readmore']) && $info['news_ext'] == "y") $res = "<a href='news.php?readmore=".$info['news_id']."'>".$locale['global_072']."</a> ".THEME_BULLET;
if ($info['news_allow_comments']) $res .= " <a href='news.php?readmore=".$info['news_id']."#comments'>".$info['news_comments'].($info['news_comments'] == 1 ? $locale['global_073b'] : $locale['global_073'])."</a> ".THEME_BULLET;
if ($info['news_ext'] == "y" || $info['news_allow_comments']) $res .= " ".$info['news_reads'].$locale['global_074']." ".THEME_BULLET."\n";
$res .= " <a href='print.php?type=N&item_id=".$info['news_id']."'><img src='".get_image("printer")."' alt='".$locale['global_075']."' style='vertical-align:middle;border:0;' /></a>\n";
return "<!--news_opts-->".$res;
}
function dodatno($item_type, $item_id) {
global $locale, $aidlink; $res = "";
if ($item_type == "N") {
if (iADMIN && checkrights($item_type)) { $res = "<!--article_news_opts--> ".THEME_BULLET." <a href='".ADMIN."news.php".$aidlink."&action=edit&news_id=".$item_id."'><img src='".get_image("edit")."' alt='".$locale['global_076']."' title='".$locale['global_076']."' style='vertical-align:middle;border:0;' /></a>\n"; }
} elseif ($item_type == "A") {
if (iADMIN && checkrights($item_type)) { $res .= "<!--article_admin_opts--> · <a href='".ADMIN."articles.php".$aidlink."&action=edit&article_id=".$item_id."'><img src='".get_image("edit")."' alt='".$locale['global_076']."' title='".$locale['global_076']."' style='vertical-align:middle;border:0;' /></a>\n"; }
}
return $res;
}
function navigacija(){
global $fusion_page_title, $locale;
$i = 0; $res = "";
$sres = dbquery("SELECT * FROM ".DB_PREFIX."site_links WHERE link_position>='2' ORDER BY link_order");
if (dbrows($sres) != 0) {
while($sdata = dbarray($sres)) {
if (preg_match("/\b".$sdata['link_name']."\b/i", $fusion_page_title)) $clas = "id='curent'";
//elseif( $sdata['link_name'] == "Domov" && )
else {
if($i == 0) $clas = "id=''";
elseif($i == 1) $clas = "id='pink'";
elseif($i == 2) $clas = "id='green'";
elseif($i == 3) $clas = "id='red'";
elseif($i == 4) $clas = "id='orange'";
elseif($i == 5) $clas = "id=''";
elseif($i == 6) $clas = "id='pink'";
elseif($i == 7) $clas = "id='green'";
elseif($i == 8) $clas = "id='red'";
elseif($i == 9) $clas = "id='orange'";
elseif($i == 10) $clas = "id=''";
elseif($i == 11) $clas = "id='pink'";
elseif($i == 12) $clas = "id='green'";
elseif($i == 13) $clas = "id='red'";
elseif($i == 14) $clas = "id='orange'";
}
if (checkgroup($sdata['link_visibility'])) {
if ($sdata['link_url']!="---") {
$link_target = $sdata['link_window'] == "1" ? " target='_blank'" : "";
if (strstr($sdata['link_url'], "http://") || strstr($sdata['link_url'], "https://")) {
$res .= "<li $clas><a href='".$sdata['link_url']."'><span>".$sdata['link_name']."</span></a></li>";
} else {
$res .= "<li $clas><a href='".BASEDIR.$sdata['link_url']."'><span>".$sdata['link_name']."</span></a></li>";
}
}
$i++;
}
}
}
if ($i != 0) { return "<div id='navigacija'><ul>$res</ul></div>"; } else { return "prazno"; }
}
function showFontTools(){
return "<div id='fonts'><a href='".THEME."settings.php?font=zmanjsaj' alt='Zmanjšaj pisavo' title='Zmanjšaj pisavo'><img src='".THEME."images/down.png' border='0'></a> <a href='".THEME."settings.php' alt='Resetiraj pisavo' title='Resetiraj pisavo'><img src='".THEME."images/reset.png' border='0'></a> <a href='".THEME."settings.php?font=povecaj' alt='Povečaj pisavo' title='Povečaj pisavo'><img src='".THEME."images/up.png' border='0'></a></div>";
}
?>