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

Parašė Giedrunskis· 2008 Kov. 1 19:03:57
#2

susikuri top10.php failiuka ir i ji irasyk:


<?php
openside("Top 10 Siuntiniai");
$result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_count DESC LIMIT 10");
if (dbrows($result) != 0) {
echo "<table width='100%' cellpadding='0' cellspacing='0'>";
while($data = dbarray($result)) {
$itemsubject = trimlink($data['download_title'], 23);
echo "<tr>\n<td class='small'><img src='".THEME."images/bullet.gif'> <a href='".BASEDIR."downloads.php?cat_id=".$data['download_cat']."&download_id=".$data['download_id']."' title='".$data['download_title']."' class='side'>$itemsubject</a></td>\n
<td align='right'>".$data['download_count']."</td>\n</tr>\n";
}
echo "</table>";
} else {
echo "<center>".$locale['004']."</center>\n";
}
closeside();
?>




Imesk ji naudojamos themos folderi ir irasyk si koda:

echo "<table cellpadding='0' cellspacing='0' width='$theme_width' class='paneles'>\n<tr>
<td align='left' width='120'>";
include THEME."user_info_panel.php";
echo "</td>
<td align='center' width='97'><br><br>";
echo ($userdata['user_avatar'] ? "<img src='".IMAGES."avatars/".$userdata['user_avatar']."' width='70' height='70'></center><br>\n" : "<center><a href='".BASEDIR."edit_profile.php'><img src='".THEME."images/avatar.gif' border='0' width='70' height='70'></a></center>\n")."";
echo "</td>
<td align='center' width='306'>";
include THEME."top10.php";
echo "</td>
<td align='center' width='195'>";
include THEME."member_poll_panel.php";
echo "</td>
</tr>
</table><br>\n";



Redagavo Giedrunskis· 2008 Kov. 1 19:03:36