Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: kodel tjp yra?
Parašė House· 2008 Rugp. 24 18:08:23
#1
kai bunu home page online.gif rodo gerai
kai nueinu i foruma, neberodo.. tokia pat nuotraukyte naudoju ir forume bet is kitos direktorijos :/
Redagavo MAnjack· 2008 Rugp. 24 19:08:26
Parašė NoNy· 2008 Rugp. 24 18:08:16
#2
Pakopink čia kodą Online_User_Panel ir imge dėk į [code] ;)
Redagavo NoNy· 2008 Rugp. 24 18:08:40
Parašė House· 2008 Rugp. 24 18:08:43
#3
<?php
if (!defined("IN_FUSION")) { header("Location: ../../index.php"); exit; }
if ($settings['maintenance'] != "1") {
$cond = ($userdata['user_level'] != 0 ? "'".$userdata['user_id']."'" : "'0' AND online_ip='".USER_IP."'");
$result = dbquery("SELECT * FROM ".$db_prefix."online WHERE online_user=".$cond."");
if (dbrows($result) != 0) {
$result = dbquery("UPDATE ".$db_prefix."online SET online_lastactive='".time()."' WHERE online_user=".$cond."");
} else {
$name = ($userdata['user_level'] != 0 ? $userdata['user_id'] : "0");
$result = dbquery("INSERT INTO ".$db_prefix."online (online_user, online_ip, online_lastactive) VALUES ('$name', '".USER_IP."', '".time()."')");
}
$result = dbquery("DELETE FROM ".$db_prefix."online WHERE online_lastactive<".(time()-60)."");
openside($locale['010']);
$result = dbquery(
"SELECT ton.*, tu.user_id,user_name FROM ".$db_prefix."online ton
LEFT JOIN ".$db_prefix."users tu ON ton.online_user=tu.user_id"
);
$guests = 0; $members = array();
while ($data = dbarray($result)) {
if ($data['online_user'] == "0") {
$guests++;
} else {
array_push($members, array($data['user_id'], $data['user_name']));
}
}
echo "<img src='".THEME."images/bullet.gif' alt=''> ".$locale['011'].$guests."<br>\n";
if (count($members) > 0) {
$i = 1;
echo "<img src='".THEME."images/bullet.gif' alt=''> ".$locale['012'];
while (list($key, $member) = each($members)) {
echo "<br><a href='".BASEDIR."profile.php?lookup=".$member[0]."' class='side'>".$member[1]."</a>";
if ($i != count($members)) echo ", ";
$i++;
}
echo "<br>\n";
} else {
echo $locale['013'].":<br>\n";
}
$result = dbquery("SELECT * FROM ".$db_prefix."online");
echo "<img src='".THEME."images/bullet.gif' alt=''> Ið viso narðo: ".dbrows($result)."";
echo "<br><img src='".THEME."images/bullet.gif' alt=''> ".$locale['014'].number_format(dbcount("(user_id)",
"users", "user_status<='1'"))."<br>\n";
if ($settings['admin_activation'] == "1") echo "<img src='".THEME."images/bullet.gif' alt=''>
".$locale['015'].dbcount("(user_id)", "users", "user_status='2'")."<br><br><br>\n";
$data = dbarray(dbquery("SELECT user_id,user_name FROM ".$db_prefix."users WHERE user_status='0' ORDER
BY user_joined DESC LIMIT 0,1"));
echo "<img src='".THEME."images/bullet.gif'>";
echo " Naujø nariø vakar: ".dbcount("(user_id)", "users", "user_joined >='".$ganfang."' AND user_joined
<='".$gende."'")."<br>";
echo "<img src='".THEME."images/bullet.gif'> Naujø nariø ðiandien: ".dbcount("(user_id)", "users", "user_joined
>='".$hanfang."' AND user_joined <='".$hende."'")."<br><br>";
echo "<center>Sveikiname naujà nará:<br>
<a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' class='side'>-=".$data['user_name']."=-</a></center>\n";
$tag1= date('d');
$monat1= date('m');
$jahr1= date('Y');
$hanfang = mktime(0,0,0,$monat1,$tag1,$jahr1);
$hende = mktime(23,59,59,$monat1,$tag1,$jahr1);
$ganfang = mktime(0,0,0,$monat1,$tag1-1,$jahr1);
$gende = mktime(23,59,59,$monat1,$tag1-1,$jahr1);
echo "<br><b>Vartotojø istorija:<br> ";
$result=dbquery("SELECT * FROM ".$db_prefix."users ORDER BY user_lastvisit DESC LIMIT 5");
echo "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" class=\"\">";
if(dbrows($result)!=0){
while($data=dbarray($result)){
$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<20){
$lastseen="<img src='images/on-line.gif'kod do kartinki' border=0><BR>";
}elseif($lastseen<360){
$lastseen="<small>Prieð 5 Min.</small><br>";
}elseif($iW>0){
if($iW==1) $Text="Savaitës";
else $Text="Savaitës";
$lastseen="$iW $Text";
}elseif($iD>0){
if($iD==1) $Text="Diena";
else $Text="Dienos";
$lastseen="$iD $Text";
}else{
$lastseen="$iH:$iM:$iS";
}
if ($data[user_level] == "103") {
$vartotojas = "<a href='".BASEDIR."profile.php?lookup=$data[user_id]' title='Ðis narys yra ".$locale['user3']."'>
<font color='red'><b> ".$data['user_name']."</b></font></a>";
}elseif ($data[user_level] == "102") {
$vartotojas = "<a href='".BASEDIR."profile.php?lookup=$data[user_id]' title='Ðis narys yra ".$locale['user2']."'>
<font color='red'><b> ".$data['user_name']."</b></font></a>";
}else{
$vartotojas = "<a href='".BASEDIR."profile.php?lookup=$data[user_id]' title='Ðis narys yra".$locale['user1']."'><font color='grey'><b> ".$data['user_name']."</b></a></font>";}
echo "<tr><td class=\"small\" align=\"left\">";
echo "<img src='".THEME."images/bullet.gif' alt=''> $vartotojas";if (iADMIN) {echo "<small><br></small>";}
if (iADMIN) { echo
"";}echo "</td><td class=\"small2\" align=\"center\">".$lastseen."</td></tr>";
}
}
echo "</table>";
closeside();
}
?>
Parašė MAnjack· 2008 Rugp. 24 19:08:29
#4
<img src='images/on-line.gif'kod do kartinki' border=0>
Keisk į:
<img src='"".IMAGES.on-line.gif'kod do kartinki' border=0>
Parašė Lyygis· 2008 Rugp. 24 19:08:13
#5
<?php
if (!defined("IN_FUSION") { header("Location: ../../index.php"; exit; }
if ($settings['maintenance'] != "1" {
$cond = ($userdata['user_level'] != 0 ? "'".$userdata['user_id']."'" : "'0' AND online_ip='".USER_IP."'";
$result = dbquery("SELECT * FROM ".$db_prefix."online WHERE online_user=".$cond."";
if (dbrows($result) != 0) {
$result = dbquery("UPDATE ".$db_prefix."online SET online_lastactive='".time()."' WHERE online_user=".$cond."";
} else {
$name = ($userdata['user_level'] != 0 ? $userdata['user_id'] : "0";
$result = dbquery("INSERT INTO ".$db_prefix."online (online_user, online_ip, online_lastactive) VALUES ('$name', '".USER_IP."', '".time()."'";
}
$result = dbquery("DELETE FROM ".$db_prefix."online WHERE online_lastactive<".(time()-60)."";
openside($locale['010']);
$result = dbquery(
"SELECT ton.*, tu.user_id,user_name FROM ".$db_prefix."online ton
LEFT JOIN ".$db_prefix."users tu ON ton.online_user=tu.user_id"
;
$guests = 0; $members = array();
while ($data = dbarray($result)) {
if ($data['online_user'] == "0" {
$guests++;
} else {
array_push($members, array($data['user_id'], $data['user_name']));
}
}
echo "<img src='".THEME."images/bullet.gif' alt=''> ".$locale['011'].$guests."<br>\n";
if (count($members) > 0) {
$i = 1;
echo "<img src='".THEME."images/bullet.gif' alt=''> ".$locale['012'];
while (list($key, $member) = each($members)) {
echo "<br><a href='".BASEDIR."profile.php?lookup=".$member[0]."' class='side'>".$member[1]."</a>";
if ($i != count($members)) echo ", ";
$i++;
}
echo "<br>\n";
} else {
echo $locale['013'].":<br>\n";
}
$result = dbquery("SELECT * FROM ".$db_prefix."online";
echo "<img src='".THEME."images/bullet.gif' alt=''> Ið viso narðo: ".dbrows($result)."";
echo "<br><img src='".THEME."images/bullet.gif' alt=''> ".$locale['014'].number_format(dbcount("(user_id)",
"users", "user_status<='1'")."<br>\n";
if ($settings['admin_activation'] == "1" echo "<img src='".THEME."images/bullet.gif' alt=''>
".$locale['015'].dbcount("(user_id)", "users", "user_status='2'"."<br><br><br>\n";
$data = dbarray(dbquery("SELECT user_id,user_name FROM ".$db_prefix."users WHERE user_status='0' ORDER
BY user_joined DESC LIMIT 0,1");
echo "<img src='".THEME."images/bullet.gif'>";
echo " Naujø nariø vakar: ".dbcount("(user_id)", "users", "user_joined >='".$ganfang."' AND user_joined
<='".$gende."'"."<br>";
echo "<img src='".THEME."images/bullet.gif'> Naujø nariø ðiandien: ".dbcount("(user_id)", "users", "user_joined
>='".$hanfang."' AND user_joined <='".$hende."'"."<br><br>";
echo "<center>Sveikiname naujà nará:<br>
<a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' class='side'>-=".$data['user_name']."=-</a></center>\n";
$tag1= date('d';
$monat1= date('m';
$jahr1= date('Y';
$hanfang = mktime(0,0,0,$monat1,$tag1,$jahr1);
$hende = mktime(23,59,59,$monat1,$tag1,$jahr1);
$ganfang = mktime(0,0,0,$monat1,$tag1-1,$jahr1);
$gende = mktime(23,59,59,$monat1,$tag1-1,$jahr1);
echo "<br><b>Vartotojø istorija:<br> ";
$result=dbquery("SELECT * FROM ".$db_prefix."users ORDER BY user_lastvisit DESC LIMIT 5";
echo "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" class=\"\">";
if(dbrows($result)!=0){
while($data=dbarray($result)){
$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<20){
$lastseen="<img src='".IMAGES."on-line.gif'kod do kartinki' border=0><BR>";
}elseif($lastseen<360){
$lastseen="<small>Prieð 5 Min.</small><br>";
}elseif($iW>0){
if($iW==1) $Text="Savaitës";
else $Text="Savaitës";
$lastseen="$iW $Text";
}elseif($iD>0){
if($iD==1) $Text="Diena";
else $Text="Dienos";
$lastseen="$iD $Text";
}else{
$lastseen="$iH:$iM:$iS";
}
if ($data[user_level] == "103" {
$vartotojas = "<a href='".BASEDIR."profile.php?lookup=$data[user_id]' title='Ðis narys yra ".$locale['user3']."'>
<font color='red'><b> ".$data['user_name']."</b></font></a>";
}elseif ($data[user_level] == "102" {
$vartotojas = "<a href='".BASEDIR."profile.php?lookup=$data[user_id]' title='Ðis narys yra ".$locale['user2']."'>
<font color='red'><b> ".$data['user_name']."</b></font></a>";
}else{
$vartotojas = "<a href='".BASEDIR."profile.php?lookup=$data[user_id]' title='Ðis narys yra".$locale['user1']."'><font color='grey'><b> ".$data['user_name']."</b></a></font>";}
echo "<tr><td class=\"small\" align=\"left\">";
echo "<img src='".THEME."images/bullet.gif' alt=''> $vartotojas";if (iADMIN) {echo "<small><br></small>";}
if (iADMIN) { echo
"";}echo "</td><td class=\"small2\" align=\"center\">".$lastseen."</td></tr>";
}
}
echo "</table>";
closeside();
}
?>
prasau turetu weikti :)
Parašė House· 2008 Rugp. 24 21:08:29
#6
neveikia... nei Lyygio nei Manjack varjantas :/ error meta
Parašė MAnjack· 2008 Rugp. 25 09:08:56
#7
Klaidą padaraiu :D
Keiksį šitą:
<img src='".IMAGES."on-line.gif' border='0'>