Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Naujienų reitingavimo sistema

Parašė ququ· 2008 Bir. 29 14:06:52
#67

<?php
/*
CleanRed 1.0 theme for PHP-Fusion
Copyright © 2007 Patric G. Forcelini (IceWasp)
Released under the terms & conditions of GNU/GPL v2
*/
if (!defined("IN_FUSION")) { header("Location: ../../index.php"); exit; }
require_once THEMES."CleanRed/theme_functions_include.php";

// theme settings
$body_text = "#000000";
$body_bg = "#ffffff";
$theme_width = "750";
$theme_width_l = "165";
$theme_width_r = "165";

function render_header($header_content) {

global $theme_width,$settings,$locale;

echo "
<div id='container' style='width:$theme_width;'>
      <div id='header'>
         $header_content
      </div>
      <div id='sub-header'>
         ".showsublinks("","white")."
      </div>
      <table width='100%' cellpadding='0' cellspacing='0'>
         <tr>\n";

}

function render_footer($license=false) {

global $theme_width,$settings,$locale;

echo "
         </tr>
      </table>
      <div id='footer'>
         ".stripslashes($settings['footer'])."
               <b>   </div>
   </div>\n";

}

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

global $locale;
   
echo "
         <div class='open-div'>
            <div class='title'>
               $subject
            </div>

            ".newsposter($info,"<br><br>")."
            $news\n";
               if ($info['news_ext'] == "y") echo "<br><br><a href='news.php?readmore=".$info['news_id']."'><span class='read-more'><b><marquee><img src='".THEME."images/readmore.gif'> ".$locale['042']."</marquee></b></span></a>\n";
echo "
            <div class='news-footer'>\n";
               echo openform("N",$info['news_id']).newsopts($info,"&middot;").closeform("N",$info['news_id']);
echo "

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

}

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

global $locale;

echo "
         <div class='open-div'>
            <div class='title'>
               $subject
            </div>
            ".articleposter($info,"<br><br>")."
            ".($info['article_breaks'] == "y" ? nl2br($article) : $article)."
            <div class='news-footer'>\n";
               echo openform("A",$info['article_id']).articleopts($info,"&middot;").closeform("A",$info['article_id']);
echo "

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

}

function opentable($title) {

echo "
         <div class='open-div'>
            <div class='title'>
               $title
            </div>\n";

}

function closetable() {

    echo "
         </div>\n";

}

function openside($title) {
   
echo "
         <div class='open-sdiv'>
            <div class='title'>
               $title
            </div>\n";

}

function closeside() {

echo "
         </div>\n";

}

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

$boxname = str_replace(" ", "", $title);

echo "
         <div class='open-sdiv'>
            <div class='titler'>
               ".panelbutton($state,$boxname)."
            </div>
            <div class='title'>
               $title
            </div>
               <div id='box_$boxname'"; if($open=="off"){ echo "style='display:none'"; } echo ">\n";

}

function closesidex() {

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

}

function tablebreak() {

echo "
         <div class='break'></div>\n";

}
?>




dar yra pasony failas


<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2006 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
/*
CleanRed 1.0 theme for PHP-Fusion
Copyright © 2007 Patric G. Forcelini (IceWasp)
Released under the terms & conditions of GNU/GPL v2
*/
if (!defined("IN_FUSION")) { header("Location:../index.php"); exit; }

function showsublinks($sep="&middot;",$class="") {
   $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 (checkgroup($sdata['link_visibility'])) {
            if ($sdata['link_url']!="---") {
               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 newsposter($info,$sep="",$class="") {
   global $locale; $res = "";
   $link_class = $class ? " class='$class' " : "";
   $res = "";
   $res .= "";
   $res .= $locale['041'];
   $res .= $sep."\n";
   return $res;
}

function newsopts($info,$sep,$class="") {
   global $locale; $res = "";
   $link_class = $class ? " class='$class' " : "";
   if ($info['news_allow_comments']) $res .= "<a href='news.php?readmore=".$info['news_id']."'".$link_class.">".$info['news_comments'].$locale['043']."</a> ".$sep." ";
   if ($info['news_ext'] == "y" || $info['news_allow_comments']) $res .= $info['news_reads'].$locale['044']."\n" ;
   $res .= $sep." <a href='print.php?type=N&amp;item_id=".$info['news_id']."'><img src='".THEME."images/pakeista.gif' alt='".$locale['045']."' title='".$locale['045']."' style='vertical-align:middle;border:0px;'></a>\n";
   return $res;
}

function articleposter($info,$sep="",$class="") {
   global $locale; $res = "";
   $link_class = $class ? " class='$class' " : "";
   $res = "<img src='".THEME."images/bullet.gif' alt='&middot;'>\n";
   $res .= $locale['040']."<a href='profile.php?lookup=".$info['user_id']."'".$link_class.">".$info['user_name']."</a>\n";
   $res .= $locale['041'].showdate("longdate", $info['article_date']);
   $res .= $sep."\n";
   return $res;
}

function articleopts($info,$sep) {
   global $locale; $res = "";
   if ($info['article_allow_comments']) $res = $info['article_comments'].$locale['043']." ".$sep."\n";
   $res .= $info['article_reads'].$locale['044']." ".$sep."\n";
   $res .= "<a href='print.php?type=A&amp;item_id=".$info['article_id']."'><img src='".THEME."images/pakeista.gif' alt='".$locale['045']."' title='".$locale['045']."' style='vertical-align:middle;border:0px;'></a>\n";
   return $res;
}

function openform($item_type,$item_id) {
   global $aidlink;
   $res = "";
   if ($item_type == "N") {
      if (iADMIN && checkrights($item_type)) $res .= "<form name='editnews".$item_id."' method='post' action='".ADMIN."news.php".$aidlink."&amp;news_id=".$item_id."'>\n";
   } elseif ($item_type == "A") {
      if (iADMIN && checkrights($item_type)) $res .= "<form name='editarticle".$item_id."' method='post' action='".ADMIN."articles.php".$aidlink."&amp;article_id=".$item_id."'>\n";
   }
   return $res;
}

function closeform($item_type,$item_id) {
   global $locale; $res = "";
   if ($item_type == "N") {
      if (iADMIN && checkrights($item_type)) $res .= "&middot; <input type='hidden' name='edit' value='edit'><a href='javascript:document.editnews".$item_id.".submit();'><img src='".IMAGES."edit.gif' alt='".$locale['048']."' title='".$locale['048']."' style='vertical-align:middle;border:0px;'></a>\n</form>\n";
   } elseif ($item_type == "A") {
      if (iADMIN && checkrights($item_type)) $res .= " &middot; <input type='hidden' name='edit' value='edit'><a href='javascript:document.editarticle".$item_id.".submit();'><img src='".IMAGES."edit.gif' alt='".$locale['048']."' title='".$locale['048']."' style='vertical-align:middle;border:0px;'></a>\n</form>\n";
   }
   return $res;
}

function showcopyright($class="") {
   global $settings;
   $link_class = $class ? " class='$class' " : "";
   $res = "Powered by <a href='http://www.xdd.lt'".$link_class."target='_blank'>PHP-Fusion</a> <br>\n";
   $res .= "Released as free software under the terms of the GNU/GPL license.";
   return $res;
}

function showcounter() {
   global $locale,$settings;
   return number_format($settings['counter'])." ".($settings['counter'] == 1 ? $locale['140'] : $locale['141']);
}

function panelbutton($state,$bname) {
   return "<img src='".THEME."images/panel_".($state == "on" ? "off" : "on").".gif' name='b_$bname' alt='' onclick=\"javascript:flipBox('$bname')\">";
}
?>



Redagavo ququ· 2008 Bir. 29 14:06:44