Parašė edeni· 2010 Rugs. 15 17:09:43
#7
Pamokos žaidėjams:
<?php
echo "<table width='100%'>
<tr>
<td width='33%'>";
$result = dbquery(
"SELECT ta.*,tac.* FROM ".$db_prefix."articles ta
INNER JOIN ".$db_prefix."article_cats tac ON ta.article_cat=tac.article_cat_id
WHERE ".groupaccess('article_cat_access')." AND article_cat_id = '2' ORDER BY article_datestamp DESC LIMIT 0,5"
);
if (dbrows($result) != 0) {
while($data = dbarray($result)) {
$itemsubject = trimlink($data['article_subject'], 23);
echo "<img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."readarticle.php?article_id=".$data['article_id']."' title='".$data['article_subject']."' class='side'>$itemsubject</a><br>\n";
}
} else {
echo "<center>".$locale['004']."</center>\n";
}
echo "</tr>
</table>";
?>
Pamokos serveriui:
<?php
echo "<table width='100%'>
<tr>
<td width='33%'>";
echo "<table width='100%'>
<tr>
<td width='33%'>";
$result = dbquery(
"SELECT ta.*,tac.* FROM ".$db_prefix."articles ta
INNER JOIN ".$db_prefix."article_cats tac ON ta.article_cat=tac.article_cat_id
WHERE ".groupaccess('article_cat_access')." AND article_cat_id = '3' ORDER BY article_datestamp DESC LIMIT 0,5"
);
while($data = dbarray($result)) {
$itemsubject = trimlink($data['article_subject'], 23);
echo "<img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."readarticle.php?article_id=2".$data['article_id']."' title='".$data['article_subject']."' class='side'>$itemsubject</a><br>\n";
}
if (dbrows($result) != 0) {
while($data = dbarray($result)) {
$itemsubject = trimlink($data['article_subject'], 23);
echo "<img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."readarticle.php?article_id=2".$data['article_id']."' title='".$data['article_subject']."' class='side'>$itemsubject</a><br>\n";
}
} else {
echo "<center>".$locale['004']."</center>\n";
}
echo "</td>
<td width='33%'>";
echo "</tr>
</table>";
?>
Na va turėtų veikt.
Redagavo edeni· 2010 Rugs. 15 18:09:11