Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Lygiavimas

Parašė luxkas· 2008 Rugp. 25 10:08:42
#7

<?php
//************************************************************************************************************************//
// Theme Name: Void ResurrectionTheme for PHP-Fusion 7.00                  
// Theme Design: by: SoulSmasher (www.soulsmasher.net) & Pher-d (www.pher-d.net)           
// version 2.0
//************************************************************************************************************************//
if (!defined("IN_FUSION")) { die("Access Denied"); }
require_once INCLUDES."theme_functions_include.php";

define("THEME_WIDTH", "1000");
define("THEME_BULLET", "<img src='".THEME."images/small_arrow.gif' width='4' height='7' alt='small_arrow' />");
define("DIVIDER", " <img src='".THEME."images/divider.gif' alt='divider' width='4' height='4' /> ");

//v7 sublinks function is a bit more for this, so taken from v6 and tweaked
function thesublinks($sep="&middot;",$class="") {
   $i = 0; $res = "";
   $sres = dbquery("SELECT * FROM ".DB_PREFIX."site_links WHERE link_position>='2' AND ".groupaccess('link_visibility')." AND link_url!='---' ORDER BY link_order ASC");
   if (dbrows($sres)) {
      while($sdata = dbarray($sres)) {
               if ($i != 0) { $res .= " ".$sep."\n"; } else { $res .= "\n"; }
               $link_target = $sdata['link_window'] == "1" ? " target='_blank'" : "";
               $link_class = $class ? " class='$class'" : "";
               if (strstr($sdata['link_url'], "http://") || strstr($sdata['link_url'], "https://")) {
                  $res .= "<a href='".$sdata['link_url']."'".$link_target.$link_class.">".$sdata['link_name']."</a>";
               } else {
                  $res .= "<a href='".BASEDIR.$sdata['link_url']."'".$link_target.$link_class.">".$sdata['link_name']."</a>";
               }
            
            $i++;
      }
   }
   if ($i != 0) { return $res; } else { return "&nbsp;"; }
}

function render_page($header_content) {

global $settings, $main_style;
   //Header
   echo "<div align='center' style='width: ".THEME_WIDTH."px;'>\n"; //main div
   echo "<script src='".THEME."grade.js' language='Javascript' type='text/javascript'></script>\n";
   echo "<table width='".THEME_WIDTH."' cellspacing='0' cellpadding='0' border='0' align='center' id='main'>\n";
   echo "<tr><td align='center' width='100%'>\n
      <img src='".THEME."images/banner.jpg' width='1000' height='200' alt='header' />\n
      </td></tr></table>\n\n";
   //sublinks
   echo "<table width='".THEME_WIDTH."' border='0' cellspacing='0' cellpadding='0'><tr>\n";
   echo "<td align='center' style='height: 26px;' class='cellpic'>".thesublinks(DIVIDER)."\n";
   echo "</td></tr></table>";
   
   //Content
   echo "<table cellpadding='0' cellspacing='0' width='".THEME_WIDTH."'>\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";
   
   //Footer
   echo "<div id='footer'>";
   echo "<table border='0' cellpadding='0' cellspacing='0' width='100%'><tr>";
   echo "<td style='color: #c0c0c0; font-weight: bold;'>".stripslashes($settings['footer'])."</td></tr>\n<tr>\n";
   echo "<td class='footer' style='vertical-align: middle'>";
   
   
   echo "<table cellpadding='0' cellspacing='0' width='100%'><tr>";
   echo "<td width='42%'>".showcopyright()."</td>\n";
   echo "<td align='center' width='16%'><strong>".showcounter()."</strong></td>\n";
   echo "<td width='42%' align='right'>";
   echo "</td>";
   
   echo "</tr></table>\n";
   
   
   echo "</td></tr></table>\n";
   echo "</div>"; //for footer
   
   echo "</div>"; //main div
}


function render_news($subject, $news, $info) {
   
global $locale;
   
   echo "<table cellspacing='0' width='100%' cellpadding='5'><tr>";
   echo "<td class='capmain'>$subject</td>";
   echo "</tr></table>";
   
   echo "<table width='100%' cellpadding='0' cellspacing='0' class='border'><tr>";
   echo "<td class='main-body'>$news</td></tr></table>";
   
   echo "<table width='100%' cellpadding='0' cellspacing='0'><tr>";
   echo "<td style='height: 24px;' align='center' class='news-footer'>";
   echo newsposter($info,"&middot;").newsopts($info,"&middot;").itemoptions("N",$info['news_id']);
   echo "</td></tr></table>\n";
}

function render_article($subject, $article, $info) {
   
   echo "<div class='capmain'>$subject</div>\n";
   echo "<div class='main-body floatfix'>".($info['article_breaks'] == "y" ? nl2br($article) : $article)."</div>\n";
   echo "<div class='news-footer'>\n";
   echo articleposter($info,"&middot;").articleopts($info,"&middot;").itemoptions("A",$info['article_id']);
   echo "</div>\n";
}

// Open table begins
function opentable($title) {

   echo "<table width='100%' cellpadding='2' cellspacing='1' style='border: 1px solid #404050'>";
   echo "<tr><td style='background-image: url(".THEME."images/cellpic2.jpg); background-color: #202734; height: 24px;'><font class='head-title'>&nbsp;$title</font></td>";
   echo "</tr></table>";
   echo "<table width='100%' cellpadding='0' cellspacing='0' class='border tablebreak'><tr>";
   echo "<td class='main-body'>\n";
}

// Close table end
function closetable() {
   echo "</td></tr></table>\n";
}

function openside($title) {

   echo "<table border='0' style='border: 1px solid #404050' cellspacing='1' width='100%' cellpadding='3'><tr>";
   echo "<td width='100%' style='background-image: url(".THEME."images/cellpic3.jpg); height: 24px;'>";
   echo "<font class='block-title'>$title</font>";
   echo "</td></tr></table>";
   echo "<table width='100%' cellpadding='0' cellspacing='0' class='border tablebreak'>
      <tr><td class='side-body' width='100%' >";
}

function closeside() {
   echo "</td></tr></table>";
   tablebreak();
}

?>