Kod
<?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
+----------------------------------------------------*/
require_once "maincore.php";
require_once "subheader.php";
require_once "side_left.php";
echo "
";
echo"
<table width=\"0\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
<tr>
<td> <table width=\"0\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-image:url(".THEME."images/gtastudios_54.jpg); width:533px; height:70px\">
<tr>
<td width=\"240\"><a href='".BASEDIR."feeds/news.php' class='side'><img src='".THEME."images/rss.jpg' border='0' alt='' ></a></td>
<td>
";
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }
if (file_exists(INFUSIONS."advanced_welcome_panel/locale/".$settings['locale'].".php")) {
include INFUSIONS."advanced_welcome_panel/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."advanced_welcome_panel/locale/Polish.php";
}
$awp1 = dbarray(dbquery("SELECT * FROM ".$db_prefix."advanced_welcome_panel_config"));
$awp2 = dbarray(dbquery("SELECT * FROM ".$db_prefix."advanced_welcome_panel"));
$awp3 = dbarray(dbquery("SELECT * FROM ".$db_prefix."advanced_welcome_panel_bookmarks"));
echo "<link rel='stylesheet' href='".INFUSIONS."newsy_artykuly/css/style.css' type='text/css'>
<script type='text/javascript' src='".INFUSIONS."newsy_artykuly/javascriptst/js.js'></script>";
echo "
<span id='w2elcome' onclick=\"return S2etBoxText('w2elcome');\"><a href=\"javascript:show_hide()\"><img src='".THEME."images/news.jpg' border='0' alt='' > </a></span>
<span id='i2nformations' onclick=\"return S2etBoxText('i2nformations');\"><a href=\"javascript:show_hide()\"><img src='".THEME."images/art.jpg' border='0' alt='' ></a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td><div id='b2ox_text' style='overflow: auto; padding: 0px'> </div>";
echo "<div class='box' id='title_w2elcome'>";include BASEDIR."news.php";
echo"</div>";
echo "<div class='box' id='title_i2nformations'>";
include INFUSIONS."newsy_artykuly/article.php";
echo "</div>";
echo "</td>
</tr>
<tr>
<td> </td>
</tr>
</table><script language=\"Javascript\"> S2etBoxText('w2elcome');</script></div>
";
require_once "side_right.php";
require_once "footer.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
+----------------------------------------------------*/
require_once "maincore.php";
require_once "subheader.php";
require_once "side_left.php";
echo "
";
echo"
<table width=\"0\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
<tr>
<td> <table width=\"0\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-image:url(".THEME."images/gtastudios_54.jpg); width:533px; height:70px\">
<tr>
<td width=\"240\"><a href='".BASEDIR."feeds/news.php' class='side'><img src='".THEME."images/rss.jpg' border='0' alt='' ></a></td>
<td>
";
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }
if (file_exists(INFUSIONS."advanced_welcome_panel/locale/".$settings['locale'].".php")) {
include INFUSIONS."advanced_welcome_panel/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."advanced_welcome_panel/locale/Polish.php";
}
$awp1 = dbarray(dbquery("SELECT * FROM ".$db_prefix."advanced_welcome_panel_config"));
$awp2 = dbarray(dbquery("SELECT * FROM ".$db_prefix."advanced_welcome_panel"));
$awp3 = dbarray(dbquery("SELECT * FROM ".$db_prefix."advanced_welcome_panel_bookmarks"));
echo "<link rel='stylesheet' href='".INFUSIONS."newsy_artykuly/css/style.css' type='text/css'>
<script type='text/javascript' src='".INFUSIONS."newsy_artykuly/javascriptst/js.js'></script>";
echo "
<span id='w2elcome' onclick=\"return S2etBoxText('w2elcome');\"><a href=\"javascript:show_hide()\"><img src='".THEME."images/news.jpg' border='0' alt='' > </a></span>
<span id='i2nformations' onclick=\"return S2etBoxText('i2nformations');\"><a href=\"javascript:show_hide()\"><img src='".THEME."images/art.jpg' border='0' alt='' ></a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td><div id='b2ox_text' style='overflow: auto; padding: 0px'> </div>";
echo "<div class='box' id='title_w2elcome'>";include BASEDIR."news.php";
echo"</div>";
echo "<div class='box' id='title_i2nformations'>";
include INFUSIONS."newsy_artykuly/article.php";
echo "</div>";
echo "</td>
</tr>
<tr>
<td> </td>
</tr>
</table><script language=\"Javascript\"> S2etBoxText('w2elcome');</script></div>
";
require_once "side_right.php";
require_once "footer.php";
?>
plik news.php jest prawie oryginalny tylko dodany kod żeby avatary były wyświatlane. a nizej macie kod za wyświetlanie najnowszych artow.
Kod
<?php
$result = dbquery("SELECT * FROM ".$db_prefix."articles ORDER BY article_id DESC LIMIT 3");
if(dbrows($result) != 0){
echo "<table cellspacing='0' cellpadding='0' border='0px' width='100%'>";
while($data = dbarray($result)){
$rows = dbcount("(article_id)", "articles", "article_cat='$cat_id'");
echo "<tr>
<td align='left' class='tbl5'><b>";
echo $data['article_subject'];
echo "</b></td>
</tr>
<tr>
<td align='left' class='tbl5'>
";
if (file_exists(IMAGES."artmin_".$data['article_id'].".jpg")){
echo "<img src='".IMAGES."artmin_".$data['article_id'].".jpg' height='50' width='50' style='margin:5px' align='left'>";}
else {echo "<img src='".THEME."images/brak.gif' height='50' width='50' style='margin:5px' align='left'>";}
echo "
";
echo trimlink($data['article_article'], 500);
echo "</td>
</tr>
<tr>
<td align='right' class='tbl6'>
<a href='readarticle.php?article_id=".$data['article_id']."'><span style=\"color: #818181\">[Czytaj wiecej]</span></a>
</td>
</tr>
<tr>
<td align='right'>
<img src='".THEME."images/pasek.jpg' border='0' width=\"450\" height=\"2\" alt='' >
</td>
</tr>";
}
echo "<tr>
<td><a href='/articles.php'>Zobacz wiecej artykulów</a></td>
</tr>
</table>";
}
?>
$result = dbquery("SELECT * FROM ".$db_prefix."articles ORDER BY article_id DESC LIMIT 3");
if(dbrows($result) != 0){
echo "<table cellspacing='0' cellpadding='0' border='0px' width='100%'>";
while($data = dbarray($result)){
$rows = dbcount("(article_id)", "articles", "article_cat='$cat_id'");
echo "<tr>
<td align='left' class='tbl5'><b>";
echo $data['article_subject'];
echo "</b></td>
</tr>
<tr>
<td align='left' class='tbl5'>
";
if (file_exists(IMAGES."artmin_".$data['article_id'].".jpg")){
echo "<img src='".IMAGES."artmin_".$data['article_id'].".jpg' height='50' width='50' style='margin:5px' align='left'>";}
else {echo "<img src='".THEME."images/brak.gif' height='50' width='50' style='margin:5px' align='left'>";}
echo "
";
echo trimlink($data['article_article'], 500);
echo "</td>
</tr>
<tr>
<td align='right' class='tbl6'>
<a href='readarticle.php?article_id=".$data['article_id']."'><span style=\"color: #818181\">[Czytaj wiecej]</span></a>
</td>
</tr>
<tr>
<td align='right'>
<img src='".THEME."images/pasek.jpg' border='0' width=\"450\" height=\"2\" alt='' >
</td>
</tr>";
}
echo "<tr>
<td><a href='/articles.php'>Zobacz wiecej artykulów</a></td>
</tr>
</table>";
}
?>
Pewnie sam link mówi za siebie i będziecie chyba wiedzieć co jest.
