Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Biski pagalbos? ;/ *del teksto

Parašė Noyz· 2010 Bal. 4 17:04:11
#2

ZombieDeath parašė:
Pagaliau po ilgo laiko man pavyko issiaiskint viena dalyka, t.y kaip padaryt kad rodytu koki nors icon prie vartotojo vardo (last seen users).
Tai vat viskas super, viskas man patinka, bet.
Biski ten tekstas nedera prie paveikslo kur "online now" ar "1 day ago" ir t.t Vnz cia pic'as
http://i41.tinypic.com/bf3o6b.png
1-ame kaip man db rodo o 2-ame kaip as noreciau kad rodytu. Bandziau koreguoti bet vis neisejna D: gal kas nors galetu rasti kur problema ir istaisyt o tai jau 4 diena bandau pati issiaiskint, bet nieko D: stai cia kodas:


<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/

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

if (file_exists(INFUSIONS."last_seen_users_panel/locale/".$settings['locale'].".php")) {
   include INFUSIONS."last_seen_users_panel/locale/".$settings['locale'].".php";
} else { include INFUSIONS."last_seen_users_panel/locale/Lithuanian.php"; }

/*******************************************************************
* Nustatyti minimalø ir maksimalø vartotojø skai&#232;iø norite rodyti kiekviename lygyje
*******************************************************************/

$min = 10;   // minimalus matomas skai&#232;ius pirmojo lygio.
$max = 10;   // did&#254;iausias skai&#232;ius antrojo lygio (pasl&#235;ptas)
$colors = array(
   103 => "#FF0066",   // Vartotojo vardo spalva Super Administratoriai (pagal nutyl&#235;jim&#224; = stiliaus styles.css)
   102 => "#3366FF",   // Vartotojo vardo spalva Administratoriai (pagal nutyl&#235;jim&#224; = stiliaus styles.css)
   101 => "#FF6600"   // Vartotojo vardo spalva Nariai (pagal nutyl&#235;jim&#224; = stiliaus styles.css)
);

/******************************************************************/

echo "<script type='text/javascript'>
<!--
function toggle_lsup() {
   var smu = document.getElementById('show_more_users');
   var smutxt = document.getElementById('show_more_users_text');
   if (smu.style.display == 'none') {
      smu.style.display = 'block';
      smutxt.innerHTML = '".$locale['LSUP_010']."';
   } else {
      smu.style.display = 'none';
      smutxt.innerHTML = '".$locale['LSUP_009']."';
   }
}
//-->
</script>";

openside($locale['LSUP_000']);

echo "<table cellpadding='0' cellspacing='0' width='100%'  class=''>";
$result = dbquery("SELECT * FROM ".$db_prefix."users ORDER BY user_lastvisit DESC LIMIT ".($min + $max));
if (dbrows($result) != 0) {
   $user_count = 0;
   while ($data = dbarray($result)) {

/*******************************************************************
* Prad&#254;ia rodyti daugiau funkcijø.
********************************************************************/

      if ($user_count == $min) {
         echo "</table>
<br />
<div align='center'>
<img alt='' border='0' src='".THEME."images/bullet.gif' />&nbsp;
<a href=\"javascript:void(0)\" onClick=\"toggle_lsup();\"><span id='show_more_users_text'>".$locale['LSUP_009']."</span></a>&nbsp;
<img alt='' border='0' src='".THEME."images/bulletb.gif' />
</div>
<div id='show_more_users' style='display: none;'>
<br />
<table cellpadding='0' cellspacing='0' width='100%'  class=''>";
         }
/*******************************************************************
* Pabaiga rodyti daugiau funkcijø.
********************************************************************/
if ($data['user_level'] == '103') {
$vartotojas = "<a href='".BASEDIR."profile.php?lookup=$data[user_id]'>
<img src='/images/ranks/Owner.png' border='0px'> <span style='color:#FF0066'>".$data['user_name']."</span></a>";
}
elseif ($data['user_level'] == "102") {
$vartotojas = "<a href='".BASEDIR."profile.php?lookup=$data[user_id]'>
<img src='/images/ranks/Co-Owner.png' border='0px'> <font color='#C30000'>".$data['user_name']."</font></a>";
}
else {$vartotojas = "<a href='".BASEDIR."profile.php?lookup=$data[user_id]'>
<img src='/images/ranks/Member.png' border='0px'> <font color='#C30000'>".$data['user_name']."</font></a>";
}
echo "<tr><td class=\"small\" align=\"left\">";
echo "<img src='".THEME."images/.gif' alt=''> $vartotojas";if (iADMIN) {echo "<small><br></small>";}
      // Check if user has ever logged in
      if ($data['user_lastvisit'] != 0) {
         $lastseen = time() - $data['user_lastvisit'];
         $iW=sprintf("%2d",floor($lastseen/604800));
         $iD=sprintf("%2d",floor($lastseen/(60*60*24)));
         $iH=sprintf("%02d",floor((($lastseen%604800)%86400)/3600));
         $iM=sprintf("%02d",floor(((($lastseen%604800)%86400)%3600)/60));
         $iS=sprintf("%02d",floor((((($lastseen%604800)%86400)%3600)%60)));
         if ($lastseen < 60){
            $lastseen="".$locale['LSUP_001']."";
         } elseif ($lastseen < 360){
            $lastseen="".$locale['LSUP_002']."";
         } elseif ($iW > 0){
            if ($iW == 1) {
               $Text = $locale['LSUP_003'];
            } else {
               $Text = $locale['LSUP_004'];
            }
            $lastseen = "".$iW." ".$Text."";
         } elseif ($iD > 0){
            if ($iD == 1) {
               $Text = $locale['LSUP_005'];
            } else {
               $Text = $locale['LSUP_006'];
            }
            $lastseen = "".$iD." ".$Text."";
         } else {
            $lastseen = $iH.":".$iM.":".$iS;
         }
      } else {
         $lastseen = $locale['LSUP_007'];
      }
      
      echo "<tr>
<td class='small' align='left'>
</td>
<td class='small2' align='right'>".$lastseen."</td>
</tr>";
      $user_count ++;
   }
}
echo "</table>";
if ($user_count > $min) { echo "</div>\n"; }

closeside();
?>




cia ant 7 versijos jei ka; buciau labai dekinga jei kas nors galetu padeti :s

Kam antrą temą kuri?