Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Nariu reitingavimo taisymas

Parašė RAFFAK· 2009 Bir. 26 10:06:41
#1

Modu tinklapyje radau Nariu Reitingavima. Noreciau, kad vietoj nariu forumo pranesimu skaiciaus, rodytu pateiktu nuotrauku skaiciu. Reitingavimas atrodo stai taip:

http://img99.imageshack.us/img99/7263/reitingavimas.jpg

O jame esantis kodas taip:

<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2005 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
|               By Rolisj
|            www.emp3.dar.lt
|
+----------------------------------------------------*/
require_once "maincore.php";
require_once "subheader.php";
require_once "side_left.php";
include LOCALE.LOCALESET."members-profile.php";

opentable("Reitingai");
if (iMEMBER) {
   if (!isset($sortby)) $sortby = "all";
   $orderby = ($sortby == "all" ? "" : " WHERE user_name LIKE '".stripinput($sortby)."%'");
   $result = dbquery("SELECT * FROM ".$db_prefix."users".$orderby."");
   $rows = dbrows($result);
   if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
   if ($rows != 0) {
      echo "<table align='center' width='100%' cellspacing='0'>
<tr>
<td class='tbl2'><span>".$locale['401']."</td>
<td align='center' class='tbl2'><span>Pranešimų forume:</td>
<td align='center' class='tbl2'><span>Pranešimai šaukykloje:</td>
<td align='center' class='tbl2'><span>Komentarų:</td>
<td align='center' class='tbl2'><span>Reitingavimų:</td>
<td align='center' class='tbl2'><span>Data:</td>
</tr>\n";
$result = dbquery("SELECT * FROM ".$db_prefix."users".$orderby." ORDER BY user_posts DESC, user_posts LIMIT $rowstart,20");
while ($data = dbarray($result)) {


echo "<tr>\n<td>\n<a href='profile.php?lookup=".$data['user_id']."'>".$data['user_name']."</a></td>\n";
echo "<td align='center'>\n".$data['user_posts']."</td>";
echo "<td align='center'>\n".dbcount("(shout_id)", "shoutbox", "shout_name='".$data['user_id']."'")."</td>\n";
echo "<td align='center'>\n".dbcount("(comment_id)", "comments", "comment_name='".$data['user_id']."'")."</td>\n";
echo"<td align='center'>\n".dbcount("(rating_id)", "ratings", "rating_user='".$data['user_id']."'")."</td>";
echo "<td align='center'>\n".($data['user_lastvisit'] != 0 ? showdate("shortdate", $data['user_lastvisit']) : $locale['u049'])."</td>";
      }
      echo "\n</tr></table>\n";
   } else {
      echo "<center><br>\n".$locale['403']."$sortby<br><br>\n</center>\n";
   }
   $search = array(
      "A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R",
      "S","T","U","V","W","X","Y","Z","0","1","2","3","4","5","6","7","8","9"
   );
   echo "<hr><table align='center' cellpadding='0' cellspacing='1' class='tbl-border'>\n<tr>\n";
   echo "<td rowspan='2' class='tbl2'><a href='".FUSION_SELF."?sortby=all'>".$locale['404']."</a></td>";
   for ($i=0;$i < 36!="";$i++) {
      echo "<td align='center' class='tbl1'><div class='small'><a href='".FUSION_SELF."?sortby=".$search[$i]."'>".$search[$i]."</a></div></td>";
      echo ($i==17 ? "<td rowspan='2' class='tbl2'><a href='".FUSION_SELF."?sortby=all'>".$locale['404']."</a></td>\n</tr>\n<tr>\n" : "\n");
   }
   echo "</tr>\n</table>\n";
} else {
   echo "<center><br>\n".$locale['002']."<br><br>\n</center>\n";
}
closetable();
echo "<div align='center' style='margin-top:5px;'>".makePageNav($rowstart,20,$rows,3,FUSION_SELF."?sortby=$sortby&")."\n</div>\n";

require_once "side_right.php";
require_once "footer.php";
?>



Redagavo RAFFAK· 2009 Bir. 26 10:06:11

Parašė And2s· 2009 Bir. 29 12:06:56
#2

<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2005 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
|               By Rolisj
|            www.emp3.dar.lt
|
+----------------------------------------------------*/
require_once "maincore.php";
require_once "subheader.php";
require_once "side_left.php";
include LOCALE.LOCALESET."members-profile.php";

opentable("Reitingai");
if (iMEMBER) {
   if (!isset($sortby)) $sortby = "all";
   $orderby = ($sortby == "all" ? "" : " WHERE user_name LIKE '".stripinput($sortby)."%'");
   $result = dbquery("SELECT * FROM ".$db_prefix."users".$orderby."");
   $rows = dbrows($result);
   if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
   if ($rows != 0) {
      echo "<table align='center' width='100%' cellspacing='0'>
<tr>
<td class='tbl2'><span>".$locale['401']."</td>
<td align='center' class='tbl2'><span>Nuotraukų:</td>
<td align='center' class='tbl2'><span>Pranešimai šaukykloje:</td>
<td align='center' class='tbl2'><span>Komentarų:</td>
<td align='center' class='tbl2'><span>Reitingavimų:</td>
<td align='center' class='tbl2'><span>Data:</td>
</tr>\n";
$result = dbquery("SELECT * FROM ".$db_prefix."users".$orderby." ORDER BY user_posts DESC, user_posts LIMIT $rowstart,20");
while ($data = dbarray($result)) {


echo "<tr>\n<td>\n<a href='profile.php?lookup=".$data['user_id']."'>".$data['user_name']."</a></td>\n";
echo "<td align='center'>\n".dbcount("(photo_id)", "photos", "photo_user='".$data['user_id']."'")."</td>";
echo "<td align='center'>\n".dbcount("(shout_id)", "shoutbox", "shout_name='".$data['user_id']."'")."</td>\n";
echo "<td align='center'>\n".dbcount("(comment_id)", "comments", "comment_name='".$data['user_id']."'")."</td>\n";
echo"<td align='center'>\n".dbcount("(rating_id)", "ratings", "rating_user='".$data['user_id']."'")."</td>";
echo "<td align='center'>\n".($data['user_lastvisit'] != 0 ? showdate("shortdate", $data['user_lastvisit']) : $locale['u049'])."</td>";
      }
      echo "\n</tr></table>\n";
   } else {
      echo "<center><br>\n".$locale['403']."$sortby<br><br>\n</center>\n";
   }
   $search = array(
      "A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R",
      "S","T","U","V","W","X","Y","Z","0","1","2","3","4","5","6","7","8","9"
   );
   echo "<hr><table align='center' cellpadding='0' cellspacing='1' class='tbl-border'>\n<tr>\n";
   echo "<td rowspan='2' class='tbl2'><a href='".FUSION_SELF."?sortby=all'>".$locale['404']."</a></td>";
   for ($i=0;$i < 36!="";$i++) {
      echo "<td align='center' class='tbl1'><div class='small'><a href='".FUSION_SELF."?sortby=".$search[$i]."'>".$search[$i]."</a></div></td>";
      echo ($i==17 ? "<td rowspan='2' class='tbl2'><a href='".FUSION_SELF."?sortby=all'>".$locale['404']."</a></td>\n</tr>\n<tr>\n" : "\n");
   }
   echo "</tr>\n</table>\n";
} else {
   echo "<center><br>\n".$locale['002']."<br><br>\n</center>\n";
}
closetable();
echo "<div align='center' style='margin-top:5px;'>".makePageNav($rowstart,20,$rows,3,FUSION_SELF."?sortby=$sortby&")."\n</div>\n";

require_once "side_right.php";
require_once "footer.php";
?>



Redagavo And2s· 2009 Bir. 29 16:06:35

Parašė RAFFAK· 2009 Bir. 30 09:06:32
#3

Dekui, veikia. Lock