Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: ikono img atvaizdavimas

Parašė manex· 2010 Rugp. 15 22:08:14
#1

Pabalbos nebereikia, susitvarkyta.

Redagavo manex· 2010 Rugp. 17 17:08:11

Parašė manex· 2010 Rugp. 16 22:08:53
#2

Nėra kas pabelbėtų.?

Parašė Narysx· 2010 Rugp. 17 01:08:04
#3

<?php
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }

$result = dbquery(
   "SELECT tf.*, tt.*, tu.user_id,user_name, MAX(tp.post_id) as last_id, COUNT(tp.post_id) as count_posts FROM ".$db_prefix."forums tf
   INNER JOIN ".$db_prefix."threads tt USING(forum_id)
   INNER JOIN ".$db_prefix."posts tp USING(thread_id)
   INNER JOIN ".$db_prefix."users tu ON tt.thread_lastuser=tu.user_id
   WHERE ".groupaccess('forum_access')." GROUP BY thread_id ORDER BY thread_lastpost DESC LIMIT 0,".$settings['numofthreads']
);
if (dbrows($result) != 0) {
   $i = 0;
   opentable($locale['025']);
   echo "<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n<tr>\n";
   if ($theme_width == "100%") echo "<td class='tbl2'><span class='small'><b>".$locale['030']."</b></span></td>\n";
   echo "<td class='tbl2'><span class='small'><b>".$locale['031']."</b></span></td>
<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><span class='small'><b>".$locale['033']."</b></span></td>
<td align='center' colspan='2' width='1%' class='tbl2' style='white-space:nowrap'><span class='small'><b>".$locale['034']."</b></span></td>
</tr>\n";
   while ($data = dbarray($result)) {
      if ($i % 2 == 0) { $row_color = "tbl1"; } else { $row_color = "tbl2"; }
      echo "<tr>\n";
      if ($theme_width == "100%") {

///////////////KRC

 $viewed_result = dbquery("SELECT threads FROM ".$db_prefix."viewed_threads WHERE user_id = '".$userdata['user_id']."'");
            if (dbrows($viewed_result) != 0) {
               $viewed_data = dbarray($viewed_result);
               $viewed_data2 = explode(".", $viewed_data['threads']);
               $viewed = array();
               for($x = 0; $x < count($viewed_data2); $x ++) {
                  $viewed_data = explode("-", $viewed_data2[$x]);
                  $viewed[$viewed_data[0]] = $viewed_data[1];
               }
               if (!isset($viewed[$data['thread_id']]) || $viewed[$data['thread_id']] < $data['thread_lastpost']) {
                  $folder_image = $imagenew;
               } else { $folder_image = $imageold; }
            } else

            $folder_image = $imagenew;
         } elseif ($data['count_posts'] > 20) { $folder_image = $imagehot; }
         else { $folder_image = $imageold; }
      }
/////////////KRC


         echo "<td width='45%' class='$row_color'><img src='$folder_image' alt=''> <span class='small'>".$data['forum_name']."</span></td>
<td width='55%' class='$row_color'><span class='small'><a href='forum/".seoname($data['thread_subject'])."-fc".$data['forum_id'].$forum_id."-ft".$data['thread_id'].".htm'&amp;pid=".$data['last_id']."#post_".$data['last_id']."' title='".$data['thread_subject']." (".$data['forum_name'].")'>".trimlink($data['thread_subject'], 30)."</a></span></td>\n";
      } else {
         echo "<td width='100%' class='$row_color'><span class='small'><a href='forum/".seoname($data['thread_subject'])."-fc".$data['forum_id'].$forum_id."-ft".$data['thread_id'].".htm'&amp;pid=".$data['last_id']."#post_".$data['last_id']."' title='".$data['thread_subject']." (".$data['forum_name'].")'>".trimlink($data['thread_subject'], 30)."</a></span></td>\n";
      }
      echo "<td align='center' width='1%' class='$row_color' style='white-space:nowrap'><span class='small'>".($data['count_posts']-1)."</span></td>
<td align='center' width='1%' class='$row_color' style='white-space:nowrap'><span class='small'><a href='".BASEDIR."profile.php?lookup=".$data['thread_lastuser']."'>".$data['user_name']."</a></span></td>
</tr>\n";
      $i++;
   }
   if (iMEMBER) {
      echo "<tr>\n<td align='center' colspan='5' class='tbl1'><span class='small'><a href='http://frag.lt/paskutinis-pranesimas'>".$locale['026']."</a> |
<a href='http://frag.lt/paskutine-zinute'>".$locale['027']."</a> |
<a href='http://frag.lt/nauji-pranesimai'>".$locale['028']."</a></span></td>\n</tr>\n";
   }
   echo "</table>\n";
   closetable();
}
?>




Jei neveiks - rašyk. Bandysim, kol veiks. ;)

Redagavo Narysx· 2010 Rugp. 17 01:08:26

Parašė manex· 2010 Rugp. 17 14:08:17
#4

Klaidą tarp kodo.

PS. Susitvarkiau pats. Dėkui už bandymą padėti.

Redagavo manex· 2010 Rugp. 17 17:08:06