Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: profilio blokai

Parašė satio11· 2008 Geg. 2 09:05:51
#1

Niekaip nerandu kur ir kaip šiame kode reik padaryti, kad draugų ir svečių sąrašo blokus rodytų skirtingose eilutėse, gal galite padėt? Dėkui ;)
(Draugus pažymėjau raudonai, svečius mėlynai)

// Friends & Visiters
// Add visiter
if ((iMEMBER) && ($userdata['user_id'] != $data['user_id'])) {
   $result = dbquery("SELECT * FROM ".$db_prefix."profilevisiters WHERE

user_id='".$data['user_id']."' AND visiter_id='".$userdata['user_id']."'");
   if (dbrows($result) != 0) {
      $ondata = dbarray($result);
      if ($ondata['visiter_id'] == $userdata['user_id']) {
         $result = dbquery("UPDATE ".$db_prefix."profilevisiters

SET datestamp='".time()."' WHERE visiter_id='".$userdata['user_id']."' and

datestamp='".$ondata['datestamp']."'");
      } else {
         $result = dbquery("INSERT INTO

".$db_prefix."profilevisiters (user_id, visiter_id, datestamp) VALUES

('".$data['user_id']."', '".$userdata['user_id']."', '".time()."')");
      }
   } else {
      $result = dbquery("INSERT INTO ".$db_prefix."profilevisiters

(user_id, visiter_id, datestamp) VALUES ('".$data['user_id']."',

'".$userdata['user_id']."', '".time()."')");
   }
}

$fv_settings = dbarray(dbquery("SELECT * FROM ".$db_prefix."fv_options"));

if ((iMEMBER && $userdata['user_id'] != $data['user_id']) &&

($fv_settings['f_work'] == 1)) {
   tablebreak();
   echo "<table align='center' cellpadding='0' cellspacing='1' width='600'

class='tbl-border'>
   <tr align='center'><td width='100%' class='tbl2'><a

href='".INFUSIONS."friends_and_visiters/user_options.php?action=add&id=".$data[

'user_id']."'>".$locale['fv014']."</a></td></tr></table>";
}
tablebreak();

$result1 = dbquery("SELECT pv.*, tu.user_name FROM ".$db_prefix."friends pv
      LEFT JOIN ".$db_prefix."users tu ON pv.friend_id=tu.user_id
      WHERE pv.user_id='".$data['user_id']."' ORDER BY datestamp DESC

LIMIT ".$fv_settings['f_onpage']."");

$result2 = dbquery("SELECT pv.*, tu.user_name AS user_name FROM

".$db_prefix."profilevisiters pv
      LEFT JOIN ".$db_prefix."users tu ON pv.visiter_id=tu.user_id
      WHERE pv.user_id='".$data['user_id']."' ORDER BY pv.datestamp

DESC LIMIT ".$fv_settings['v_onpage']."");

echo "<table align='center' cellpadding='0' cellspacing='0'>
<tr valign='top'>";
echo "<td width='300' class='tbl1'><table align='center' cellpadding='0'

cellspacing='1' width='300' class='tbl-border'>";
echo "<tr><td width='300' class='tbl2'

align='center'>".$locale['fv010']."</td></tr>";
if (dbrows($result1) != 0 ) {
   echo "<tr><td valign='top' class='tbl1'>";
   while ($fvdata = dbarray($result1)) {
      echo "<a

href='profile.php?lookup=".$fvdata['friend_id']."'>".$fvdata['user_name']."</a>

";
      $result3 = dbquery("SELECT * FROM ".$db_prefix."online WHERE

online_user='".$fvdata['friend_id']."'");
      if (dbrows($result3) != 0) {
         echo " [<b>".$locale['fv022']."</b>]";
      } else {
         echo " [".$locale['fv023']."]";
      }
      echo " [<a

href='messages.php?msg_send=".$fvdata['friend_id']."'

title='".$locale['fv020']."'>".$locale['fv020']."</a>]";
      if ($userdata['user_id'] == $data['user_id']) {
         echo " [<a

href='".INFUSIONS."friends_and_visiters/user_options.php?action=del&id=".$fvdat

a['friend_id']."'>DELETE</a>]";
      }
      echo "<br>";
   }
   echo "</td></tr><tr><td class='tbl1' align='center'>[<a

href='friend_visit.php?all=friends&id=".$data['user_id']."'>".$locale['fv012'].

"</a>]</td></tr>";
} else {
   echo "<tr><td class='tbl1'>".$locale['fv015']."</td></tr>";
}
echo "</table></td>";
if ($fv_settings['v_work'] == 1) {
   echo "<td width='300' class='tbl1'><table align='center'

cellpadding='0' cellspacing='1' width='300' class='tbl-border'>";
   echo "<tr><td width='300' class='tbl2'

align='center'>".$locale['fv011']."</td></tr>";
   if (dbrows($result2) != 0 ) {
      echo "<tr><td valign='top' class='tbl1'>";
      while ($fvdata = dbarray($result2)) {
         echo "<a

href='profile.php?lookup=".$fvdata['visiter_id']."'>".$fvdata['user_name']."</a

>";
         $result3 = dbquery("SELECT * FROM ".$db_prefix."online

WHERE online_user='".$fvdata['visiter_id']."'");
         if (dbrows($result3) != 0) {
            echo " [<b>".$locale['fv022']."</b>]";
         } else {
            echo " [".$locale['fv023']."]";
         }
         echo " [<a

href='messages.php?msg_send=".$fvdata['visiter_id']."'

title='".$locale['fv020']."'>".$locale['fv020']."</a>]";
         //echo " [".showdate("forumdate",

$fvdata['datestamp'])."]";
         echo "<br>";
      }
      echo "</td></tr><tr><td class='tbl1' align='center'>[<a

href='friend_visit.php?all=profilevisiters&id=".$data['user_id']."'>".$locale['

fv013']."</a>]</td></tr>";
   } else {
      echo "<tr><td class='tbl1'>".$locale['fv016']."</td></tr>";
   }
   echo "</td></tr></table></td>";
}
echo "</tr></table>\n<br>\n";
// END FV