Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Theme.php

Parašė eziuukas· 2008 Vas. 12 08:02:06
#16

<?
// theme settings
$body_text = "#444444";
$body_bg = "#ffffff";
$theme_width = "100%";
$theme_width_l = "180";
$theme_width_r = "180";

function render_header($header_content) {

global $theme_width,$settings;

echo "<table align='center' cellspacing='0' cellpadding='0' width='50%'>
<tr>
<td>
<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='full-header'>
<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td>$header_content</td>
</tr>
</table>
</td>
</tr>
</table>
<fieldset>
<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td>\n";

echo "<font color='#000000'> \n";
$result = dbquery("SELECT * FROM ".DB_PREFIX."site_links WHERE link_position>='2' ORDER BY link_order");
if (dbrows($result) != 0) {
   $i = 0;
   while($data = dbarray($result)) {
      if (checkgroup($data['link_visibility'])) {
         if ($data['link_url']!="---") {
            if ($i != 0) { echo " &middot;\n"; } else { echo "\n"; }
            $link_target = ($data['link_window'] == "1" ? " target='_blank'" : "");
            if (strstr($data['link_url'], "http://") || strstr($data['link_url'], "https://")) {
               echo "<a href='".$data['link_url']."'".$link_target.">".$data['link_name']."</a>font>";
            } else {
               echo "<a href='".BASEDIR.$data['link_url']."'".$link_target.">".$data['link_name']."</a></font>";
            }
         }
         $i++;
      }
   }
}
echo ($i == 0 ? "&nbsp;" : "")."</font></td>
<td align='right'>
   <font color='#000000'>".ucwords(showdate($settings['subheaderdate'], time()))."</font>
</td>
</tr>
</table>
</fieldset>\n";
tablebreak();

echo "<table cellpadding='0' cellspacing='0' width='".$theme_width."'>\n<tr>\n";

}

function render_footer($license=false) {

global $theme_width,$settings,$locale;

echo "</tr>\n</table>\n";
tablebreak();
echo "<fieldset class='footer'><table cellpadding='0' cellspacing='0' width='98%'>
<tr>
<td class='footer'><br>".stripslashes($settings['footer'])."<br></td>
</tr>
<tr>
<td align='center' class='footer'>\n";
if ($license == false) {
   echo "<center>Powered by <a href='http://www.php-fusion.co.uk' target='_blank'>PHP-Fusion</a> v".$settings['version']." &copy; 2003-2005 Fieldset theme by: <a href='mailto:Timwand@gmail.com' >Tim s&#1096;rensen</a> ";
}
echo <<<EOF
<br /> <br />
EOF;
echo $settings['counter']." ".($settings['counter'] == 1 ? $locale['140']."<br><br>\n" : $locale['141']."")."
</center>
</td>
</tr>
</table>
</fieldset>
</td>
</tr>
</table>";

}

function render_news($subject, $news, $info) {

global $locale;

echo "<fieldset><legend class='legend'>$subject</legend>
$news
</fieldset>
<fieldset><img src='".THEME."images/bullet.gif' alt=''>
".$locale['040']."<a href='profile.php?lookup=".$info['user_id']."'>".$info['user_name']."</a>
".$locale['041'].showdate("longdate", $info['news_date'])." ·
".($info['news_ext'] == "y" ? "<a href='news.php?readmore=".$info['news_id']."'>".$locale['042']."</a> ·\n" : "");
if ($info['news_allow_comments']) echo "<a href='news.php?readmore=".$info['news_id']."'>".$info['news_comments'].$locale['043']."</a> ·\n";
echo $info['news_reads'].$locale['044']."
<a href='print.php?type=N&amp;item_id=".$info['news_id']."'><img src='".THEME."images/printer.gif' alt='".$locale['045']."' style='vertical-align:middle;border:0px;'></a>
</fieldset><br><br>\n";

}

function render_article($subject, $article, $info) {

global $locale;
   
echo "<fieldset><legend class='legend'>$subject</legend>
".($info['article_breaks'] == "y" ? nl2br($article) : $article)."
</fieldset><fieldset class='news-footer'><img src='".THEME."images/bullet.gif' alt=''>
".$locale['040']."<a href='profile.php?lookup=".$info['user_id']."'>".$info['user_name']."</a>
".$locale['041'].showdate("longdate", $info['article_date'])." ·\n";
if ($info['article_allow_comments']) echo $info['article_comments'].$locale['043']." ·\n";
echo $info['article_reads'].$locale['044']."
<a href='print.php?type=A&amp;item_id=".$info['article_id']."'><img src='".THEME."images/printer.gif' alt='".$locale['045']."' style='vertical-align:middle;border:0px;'></a>
</fieldset>\n";

}

function opentable($title) {

echo "<fieldset><legend class='legend' align='center'>&nbsp;<b>".$title."</b>&nbsp;</legend>\n";

}

function closetable() {

echo "</fieldset>\n";

}

function openside($title) {
   
echo "<fieldset><legend class='legend' align='center'>&nbsp;<b>".$title."</b>&nbsp;</legend>\n";

}

function closeside() {

echo "</fieldset>\n";

}

function opensidex($title,$open="on") {

if($open=="on"){$box_img="off";}else{$box_img="on";}
echo "<fieldset><legend class='legend' align='center'>&nbsp;<b>".$title."</b> &nbsp; &nbsp;<img src='".THEME."images/panel_$box_img.gif' name='b_$title' alt='' onclick=\"javascript:flipBox('$title')\"></center></legend>
<div id='box_$title'"; if($open=="off"){ echo "style='display:none'"; } echo ">\n";

}

function closesidex() {

echo "</div>
</fieldset>\n";

}

function tablebreak() {

echo "<table cellpadding='0' cellspacing='0' width='100%'>
<tr><td height='8'></td></tr>
</table>\n";

}
?>