Parašė Lietuvos_pilietis· 2008 Geg. 1 12:05:39
#1
Sumaniau pagaliau ištaisyti panele tad rades sia svetainę pateikiau su tokia sios panelės klaida jog prisijungus nepateikia tvarkyngai duomenų gal kas patvarkytu o cia foto kada neprisijungus gerai rodo
[img]http://96xx.xz.lt/neprisijungus.bmp[/img]
o čia prisijungus su klaidom jau [img]http://96xx.xz.lt/prisijungus.bmp[/img]
openside("Portalo statistika");
echo "<img src='http://img337.imageshack.us/img337/8075/nariai3bt8.gif'> <font class='menu'><b>Nariu info</b><br>";
$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' alt=''> ".$locale['016']."<a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' class='side'>".$data['user_name']."</a></br>";
$tag1= date('d');
$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 "<img src='".THEME."images/bullet.gif' alt=''> Užsiregistravo vakar: ".dbcount("(user_id)", "users", "user_joined >='".$ganfang."' AND user_joined <='".$gende."'")."<br>";
echo "<img src='".THEME."images/bullet.gif' alt=''> Užsiregistravo šiandien: ".dbcount("(user_id)", "users", "user_joined >='".$hanfang."' AND user_joined <='".$hende."'")."<br>";
echo "<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'")."</center><br><hr>\n";
echo "<img src='".THEME."images/bullet.gif' alt=''> Neaktyvūs nariai: ".dbcount("(user_id)", "users", "user_status='2'")."<br>";
echo "<img src='".THEME."images/bullet.gif' alt=''> Uždrausti nariai: ".dbcount("(user_id)", "users", "user_status='1'")."<br>";
echo "<b><img src='".BASEDIR."/infusions/user_info_panel/images/4.gif'>Portalo info:</b><br>";
echo "<img src='".THEME."images/bullet.gif' alt=''> Forumo pranešimai: ".dbcount("(post_id)", "posts")." <br>";
echo "<img src='".THEME."images/bullet.gif' alt=''> Shoutbox'o žinutės: ".dbcount("(shout_id)", "shoutbox")."<br>";
echo "<img src='".THEME."images/bullet.gif' alt=''> Komentarai: ".dbcount("(comment_id)", "comments")."<br>";
echo "<img src='".THEME."images/bullet.gif' alt=''> Foto nuotrukos: ".dbcount("(photo_id)", "photos")." <br>";
echo "<img src='".THEME."images/bullet.gif' alt=''> Straipsniai: ".dbcount("(article_id)", "articles")." <br>";
echo "<img src='".THEME."images/bullet.gif' alt=''> Naujienos: ".dbcount("(news_id)", "news")." <br>";
echo "<img src='http://img337.imageshack.us/img337/8075/nariai3bt8.gif'> <font class='menu'><b>Kas kur naršo</b><br>";
if (file_exists(INFUSIONS."kim_nerede_panel/locale/".$settings['locale'].".php")) {
// Load the locale file matching the current site locale setting.
include INFUSIONS."kim_nerede_panel/locale/".$settings['locale'].".php";
} else {
// Load the infusion's default locale file.
include INFUSIONS."kim_nerede_panel/locale/Turkce.php";
}
$loged_users = array();
$querystring = "";
$page = $_SERVER[PHP_SELF];
$dir = dirname($page);
if(file_exists("config.php")) {
$dir = '';
} else {
$dir = basename (dirname($page),"/").'/';
}
if($_SERVER[QUERY_STRING]) {
$querystring = "?".$_SERVER[QUERY_STRING];
}
$page = $dir.basename($page).$querystring;
$result = dbquery("SELECT kimnerede_sayfa FROM ".$db_prefix."kimnerede_bilgi WHERE kimnerede_ip = '".USER_IP."';");
if(dbrows($result)>0) {
$result = dbquery("UPDATE ".$db_prefix."kimnerede_bilgi SET kimnerede_zaman='".time()."', kimnerede_sayfa='".$page."' WHERE kimnerede_ip='".USER_IP."';");
} else {
$result = dbquery("INSERT INTO ".$db_prefix."kimnerede_bilgi (kimnerede_zaman, kimnerede_sayfa, kimnerede_ip) VALUES ('".time()."', '".$page."', '".USER_IP."');");
}
$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."");
$rows = dbrows($result);
if ($rows != 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 VALUES('$name', '".USER_IP."', '".time()."')");
}
$result = dbquery("DELETE FROM ".$db_prefix."online WHERE online_lastactive<".(time()-60)."");
$result = dbquery(
"SELECT ton.*, user_id,user_name,user_ip FROM ".$db_prefix."online ton
LEFT JOIN ".$db_prefix."users tu ON ton.online_user=tu.user_id
WHERE online_user!='0'"
);
$members = dbrows($result);
if ($members!=0) {
$result = dbquery("
SELECT * FROM ".$db_prefix."online tbl1
INNER JOIN ".$db_prefix."kimnerede_bilgi tbl2 ON tbl2.kimnerede_ip = tbl1.online_ip
INNER JOIN ".$db_prefix."users tbl3 ON tbl3.user_id = tbl1.online_user
WHERE tbl1.online_user!='0' AND tbl2.kimnerede_zaman>=".(time()-60).";");
while ($data = dbarray($result)) {
$loged_users[]=$data['user_ip'];
$pos = strrpos($data['kimnerede_sayfa'], ".php");
$script = substr(basename($data['kimnerede_sayfa']), 0, $pos + 4);
echo "<img src='".THEME."images/bullet.gif' border='0'> <span style='font-size:9px'><a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' class='side'>".$data['user_name']."</a> @ <a href='".BASEDIR.$data['kimnerede_sayfa']."'>".trimlink($script, 15)."</a></span><br />\n";
}
echo "</div>\n";
}
$result2 = dbquery("SELECT * FROM ".$db_prefix."online WHERE online_user='0';");
$rows = dbrows($result2);
if ($rows!=0) {
$result = dbquery("SELECT * FROM ".$db_prefix."kimnerede_bilgi WHERE kimnerede_zaman>=".(time()-60).";");
while ($data = dbarray($result)) {
if (!in_array($data['kimnerede_ip'], $loged_users)) {
$pos = strrpos($data['kimnerede_sayfa'], ".php");
$script = substr($data['kimnerede_sayfa'], 0, $pos + 4);
$explode = explode(".", $data['kimnerede_ip']);
$visitor_ip = $explode[0].".".$explode[1].".".$explode[2].".xxx";
echo "<img src='".THEME."images/bullet.gif' border='0'> <span style='font-size:9px'>".$visitor_ip."</a> @ <a href='".BASEDIR.$data['kimnerede_sayfa']."'>".trimlink($script, 8)."</a></span><br />\n";
}
}
} else {
echo $locale['KMNRD_103'];
}
echo "</div>\n";
closeside();
sql
CREATE TABLE `prefix_kimnerede_bilgi` (
`kimnerede_id` int(10) unsigned NOT NULL auto_increment,
`kimnerede_zaman` int(5) NOT NULL default '0',
`kimnerede_sayfa` varchar(250) collate utf8_lithuanian_ci NOT NULL default '',
`kimnerede_ip` varchar(15) collate utf8_lithuanian_ci NOT NULL default '',
PRIMARY KEY (`kimnerede_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_lithuanian_ci AUTO_INCREMENT=5388
Redagavo ozzWANTED· 2008 Geg. 1 13:05:12