Can sumbody fix the followin coding for v2 plz.. keeps givin me errors...
<?php
define('WCS',true);
include('./core/main.inc');
header_type();
cleardata();
if(ipbanned(ip(),browser())){
if(!shield(getuid_sid($sid))){
echo head_tag("Ip Blocked!!!",0,0);
echo ipbanned_msg();
echo foot_tag();
exit();
}
}
if(!islogged($sid)){
echo head_tag("Error!!!",0,0);
echo session_expired();
echo foot_tag();
exit();
}
if(banned(getuid_sid($sid))){
echo head_tag("Error!!!",1,getnick_sid($sid));
echo banned_msg($sid);
echo foot_tag();
exit();
}
mysql_query("UPDATE users SET browser='".browser()."', ipaddress='".ip()."', host='".subno()."' WHERE id='".getuid_sid($sid)."'");
///////////////////////////////////Active Members
if($action=="active")
{
addonline(getuid_sid($sid),"Active members","");
echo head_tag(getnick_sid($sid)."@Active members",1,getnick_sid($sid));
$title="<b>Active members on site</b>";
$main.="<p align=".align().">\n";
$main.="On this page you will find out the active members in different time periods.<br/>";
$main.="------>";
$tm60 = time() - (60*60);
$aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM users WHERE lastact>'".$tm60."'"));
echo mysql_error();
$main.="Active member this hour: <a href=\"active.php?action=acthour&sid=$sid\">($ aut[0])</a><br/>";
$main.="------> ";
$tm24 = time() - (24*60*60);
$aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM users WHERE lastact>'".$tm24."'"));
echo mysql_error();
$main.="Active members today: <a href=\"active.php?action=actmem&sid=$sid\">($a ut[0])</a><br/>";
$main.="------>";
$tm3 = time() - (3*24*60*60);
$aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM users WHERE lastact>'".$tm3."'"));
echo mysql_error();
$main.="Active members Last 3 days: <a href=\"active.php?action=active3&sid=$sid\">($ aut[0])</a><br/>";
$main.="------>";
$tm7 = time() - (7*24*60*60);
$aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM users WHERE lastact>'".$tm7."'"));
echo mysql_error();
$main.="Active members this week: <a href=\"active.php?action=actmemwk&sid=$sid\">( $aut[0])</a><br/>";
$main.="------>";
$tm4 = time() - (4*7*24*60*60);
$aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM users WHERE lastact>'".$tm4."'"));
echo mysql_error();
$main.="Active members this month: <a href=\"active.php?action=actmonth&sid=$sid\">( $aut[0])</a><br/>";
$main.="------>";
$tm4 = time() - (24*7*24*60*60);
$aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM users WHERE lastact>'".$tm4."'"));
echo mysql_error();
$main.="Active members last 6 months: <a href=\"active.php?action=act6month&sid=$sid\"> ($aut[0])</a><br/>";
$main.="------>";
$main.="<p align=".align()."><a href=\"last10.php?action=last10topic&sid=$sid\ ">~10 Active topics~</a><br/>
<a href=\"online.php?sid=$sid\">Online menu</a>|
<a href=\"extras.php?sid=$sid\">Extras</a>|
<a href=\"../inbox/inbox.php?sid=$sid\">Inbox</a>|
<a href=\"../inbox2/inbox2.php?sid=$sid\">Notifications</a>|
<a href=\"../buds/buds.php?sid=$sid\">BuddyList</a>|
<a href=\"../chat/public.php?sid=$sid\">Chat</a>|
<a href=\"../forums/forums.php?sid=$sid\">Forums</a><br/>
<a href=\"main.php?sid=$sid\"><imgsrc=\"../images/home.gif\"alt=\"\"/>Main Menu</a></p>";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,0,0,0,0,$main) ;
echo foot_tag();
exit;
}
///////////////////////////////////Active Members This Hour
elseif($action=="acthour")
{
addonline(getuid_sid($sid),"Active member For This Hour","ative.php?action=$action");
echo head_tag(getnick_sid($sid)."@Active people",1,getnick_sid($sid));
$title="<b>active people ".getnick_uid($who)."</b>";
$main.="<p align=".align().">\n";
$tm60 = time() - (60*60);
$aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM users WHERE lastact>'".$tm60."'"));
echo mysql_error();
if($page=="" || $page<=0)$page=1;
$num_items = $aut[0];//changable
$items_per_page= 10;
$num_pages = ceil($num_items/$items_per_page);
if($page>$num_pages)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$sql = "SELECT username, sex, lastact, id FROM users WHERE lastact>'".$tm60."' ORDER BY lastact DESC LIMIT $limit_start, $items_per_page";
$main.="<br/>";
$items = mysql_query($sql);
echo mysql_error();
while ($item = mysql_fetch_array($items))
{
if($item[1]==M)
{
$usex = "<imgsrc=\"./images/male.gif\"alt=\"M\"/>";
}elseif($item[1]==F){
$usex = "<imgsrc=\"./images/female.gif\"alt=\"F\"/>";
}else{
$usex = "<imgsrc=\"./images/unknown.gif\"alt=\"X\"/>";
}
$lnk = "<a href=\"profile.php?action=viewuser&who=$item[3]&sid=$sid\">$item[0]</a><br/>";
$main.="$usex $lnk -".date("D d M y - H:i:s a", $item[2])."<br/>";
$main.="-------<br/>";
}
if($page>1){
$main.="<br/><a href=\"active.php?action=acthour&page=".($page-1)."&sid=$sid\"><-Prev</a>";
}
if($page<$num_pages){
if($page==1)$main.="<br/>";
$main.="<a href=\"active.php?action=acthour&page=".($page+1). "&sid=$sid\">Next-></a>\n";
}
$main.="<br/>Page - $page/$num_pages</p>\n";
if($num_pages>2){$main.=getjumper("online","","",$ sid);}
////// UNTILL HERE >>
$main.="<p align=".align()."><a href=\"active.php?action=active&sid=$sid\">~ba ck to Active members~</a><br/>
<a href=\"../online.php?sid=$sid\">Online menu</a>|
<a href=\"../extras.php?sid=$sid\">Extras</a>|
<a href=\"../inbox/inbox.php?sid=$sid\">Inbox</a>|
<a href=\"../inbox2/inbox2.php?sid=$sid\">Notifications</a>|
<a href=\"../buds/buds.php?sid=$sid\">BuddyList</a>|
<a href=\"../chat/public.php?sid=$sid\">Chat</a>|
<a href=\"../forums/forums.php?sid=$sid\">Forums</a><br/>
<a href=\"../main.php?sid=$sid\"><imgsrc=\"../images/home.gif\"alt=\"\"/>Main Menu</a></p>";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,0,0,0,0,$main) ;
echo foot_tag();
exit;
}
///////////////////////////////////Active Members Today
elseif($action=="actmem")
{
addonline(getuid_sid($sid),"Active members Today","active.php?action=$action");
echo head_tag(getnick_sid($sid)."@Active people",1,getnick_sid($sid));
$title="<b>active people ".getnick_uid($who)."</b>";
echo"<p align=".align().">\n";
$tm24 = time() - (24*60*60);
$aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM users WHERE lastact>'".$tm24."'"));
echo mysql_error();
$main.="<p align=".align().">\n";
if($page=="" || $page<=0)$page=1;
$num_items = $aut[0];//changable
$items_per_page= 7;
$num_pages = ceil($num_items/$items_per_page);
if($page>$num_pages)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$sql = "SELECT username, sex, lastact, id FROM users WHERE lastact>'".$tm24."' ORDER BY lastact DESC LIMIT $limit_start, $items_per_page";
$main.="<br/>";
$items = mysql_query($sql);
echo mysql_error();
while ($item = mysql_fetch_array($items))
{
if($item[1]==M)
{
$usex = "<imgsrc=\"../images/male.gif\"alt=\"M\"/>";
}elseif($item[1]==F){
$usex = "<imgsrc=\"../images/female.gif\"alt=\"F\"/>";
}else{
$usex = "<imgsrc=\"../images/unknown.gif\"alt=\"X\"/>";
}
$lnk = "<a href=\"profile.php?action=viewuser&who=$item[3]&sid=$sid\">$item[0]</a><br/>";
$main.="$usex $lnk -".date("D d M y - H:i:s a", $item[2])."<br/>";
$main.="-------<br/>";
}
if($page>1){
$main.="<br/><a href=\"active.php?action=actmem&page=".($page-1)."&sid=$sid\"><-Prev</a>";
}
if($page<$num_pages){
if($page==1)$main.="<br/>";
$main.="<a href=\"active.php?action=actmem&page=".($page+1)." &sid=$sid\">Next-></a>\n";
}
$main.="<br/>Page - $page/$num_pages</p>\n";
if($num_pages>2){$main.=getjumper("online","","",$ sid);}
////// UNTILL HERE >>
$main.="<p align=".align()."><a href=\"active.php?action=active&sid=$sid\">~ba ck to Active members~</a><br/>
<a href=\"online.php?sid=$sid\">Online menu</a>|
<a href=\"extras.php?sid=$sid\">Extras</a>|
<a href=\"../inbox/inbox.php?sid=$sid\">Inbox</a>|
<a href=\"../inbox2/inbox2.php?sid=$sid\">Notifications</a>|
<a href=\"../buds/buds.php?sid=$sid\">BuddyList</a>|
<a href=\"../chat/public.php?sid=$sid\">Chat</a>|
<a href=\"../forums/forums.php?sid=$sid\">Forums</a><br/>
<a href=\"main.php?sid=$sid\"><imgsrc=\"../images/home.gif\"alt=\"\"/>Main Menu</a></p>";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,0,0,0,0,$main) ;
echo foot_tag();
exit;
}
///////////////////////////////////Active Members This Week
elseif($action=="actmemwk")
{
addonline(getuid_sid($sid),"Active members For This Week","active.php?action=$action");
echo head_tag(getnick_sid($sid)."@Active people",1,getnick_sid($sid));
$title="<b>active people ".getnick_uid($who)."</b>";
echo"<p align=".align().">\n";
$tm7 = time() - (7*24*60*60);
$aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM users WHERE lastact>'".$tm7."'"));
echo mysql_error();
$main.="<p align=".align().">\n";
if($page=="" || $page<=0)$page=1;
$num_items = $aut[0];//changable
$items_per_page= 10;
$num_pages = ceil($num_items/$items_per_page);
if($page>$num_pages)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$sql = "SELECT username, sex, lastact, id FROM users WHERE lastact>'".$tm7."' ORDER BY lastact DESC LIMIT $limit_start, $items_per_page";
$main.="<br/>";
$items = mysql_query($sql);
echo mysql_error();
while ($item = mysql_fetch_array($items))
{
if($item[1]==M)
{
$usex = "<imgsrc=\"../images/male.gif\"alt=\"M\"/>";
}elseif($item[1]==F){
$usex = "<imgsrc=\"../images/female.gif\"alt=\"F\"/>";
}else{
$usex = "<imgsrc=\"../images/unknown.gif\"alt=\"X\"/>";
}
$lnk = "<a href=\"profile.php?action=viewuser&who=$item[3]&sid=$sid\">$item[0]</a><br/>";
$main.="$usex $lnk -".date("D d M y - H:i:s a", $item[2])."<br/>";
$main.="-------<br/>";
}
if($page>1){
$main.="<br/><a href=\"active.php?action=actmemwk&page=".($page-1)."&sid=$sid\"><-Prev</a>";
}
if($page<$num_pages){
if($page==1)$main.="<br/>";
$main.="<a href=\"active.php?action=actmemwk&page=".($page+1) ."&sid=$sid\">Next-></a>\n";
}
$main.="<br/>Page - $page/$num_pages</p>\n";
if($num_pages>2){$main.=getjumper("online","","",$ sid);}
////// UNTILL HERE >>
$main.="<p align=".align()."><a href=\"active.php?action=active&sid=$sid\">~ba ck to Active members~</a><br/>
<a href=\"online.php?sid=$sid\">Online menu</a>|
<a href=\"extras.php?sid=$sid\">Extras</a>|
<a href=\"../inbox/inbox.php?sid=$sid\">Inbox</a>|
<a href=\"../inbox2/inbox2.php?sid=$sid\">Notifications</a>|
<a href=\"../buds/buds.php?sid=$sid\">BuddyList</a>|
<a href=\"../chat/public.php?sid=$sid\">Chat</a>|
<a href=\"../forums/forums.php?sid=$sid\">Forums</a><br/>
<a href=\"main.php?sid=$sid\"><imgsrc=\"../images/home.gif\"alt=\"\"/>Main Menu</a></p>";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,0,0,0,0,$main) ;
echo foot_tag();
exit;
}
///////////////////////////////////Active Members This Month
elseif($action=="actmonth")
{
addonline(getuid_sid($sid),"Active members For This Month","active.php?action=$action");
echo head_tag(getnick_sid($sid)."@Active people",1,getnick_sid($sid));
$title="<b>active people ".getnick_uid($who)."</b>";
$main.="<p align=".align().">\n";
$tm4 = time() - (4*7*24*60*60);
$aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM users WHERE lastact>'".$tm4."'"));
echo mysql_error();
if($page=="" || $page<=0)$page=1;
$num_items = $aut[0];//changable
$items_per_page= 10;
$num_pages = ceil($num_items/$items_per_page);
if($page>$num_pages)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$sql = "SELECT username, sex, lastact, id FROM users WHERE lastact>'".$tm4."' ORDER BY lastact DESC LIMIT $limit_start, $items_per_page";
$main.="<br/>";
$items = mysql_query($sql);
echo mysql_error();
while ($item = mysql_fetch_array($items))
{
if($item[1]==M)
{
$usex = "<imgsrc=\"../images/male.gif\"alt=\"M\"/>";
}elseif($item[1]==F){
$usex = "<imgsrc=\"../images/female.gif\"alt=\"F\"/>";
}else{
$usex = "<imgsrc=\"../images/unknown.gif\"alt=\"X\"/>";
}
$lnk = "<a href=\"profile.php?action=viewuser&who=$item[3]&sid=$sid\">$item[0]</a><br/>";
$main.="$usex $lnk -".date("D d M y - H:i:s a", $item[2])."<br/>";
$main.="-------<br/>";
}
if($page>1){
$main.="<br/><a href=\"active.php?action=actmonth&page=".($page-1)."&sid=$sid\"><-Prev</a>";
}
if($page<$num_pages){
if($page==1)$main.="<br/>";
$main.="<a href=\"active.php?action=actmonth&page=".($page+1) ."&sid=$sid\">Next-></a>\n";
}
$main.="<br/>Page - $page/$num_pages</p>\n";
if($num_pages>2){$main.=getjumper("online","","",$ sid);}
////// UNTILL HERE >>
$main.="<p align=".align()."><a href=\"active.php?action=active&sid=$sid\">~ba ck to Active members~</a><br/>
<a href=\"online.php?sid=$sid\">Online menu</a>|
<a href=\"extras.php?sid=$sid\">Extras</a>|
<a href=\"../inbox/inbox.php?sid=$sid\">Inbox</a>|
<a href=\"../inbox2/inbox2.php?sid=$sid\">Notifications</a>|
<a href=\"../buds/buds.php?sid=$sid\">BuddyList</a>|
<a href=\"../chat/public.php?sid=$sid\">Chat</a>|
<a href=\"../forums/forums.php?sid=$sid\">Forums</a><br/>
<a href=\"main.php?sid=$sid\"><imgsrc=\"../images/home.gif\"alt=\"\"/>Main Menu</a></p>";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,0,0,0,0,$main) ;
echo foot_tag();
exit;
}
///////////////////////////////////Active Members This Month
elseif($action=="act6month")
{
addonline(getuid_sid($sid),"Active members last 6months","active.php?action=$action");
echo head_tag(getnick_sid($sid)."@Active people",1,getnick_sid($sid));
$title="<b>active people ".getnick_uid($who)."</b>";
$main.="<p align=".align().">\n";
$tm4 = time() - (24*7*24*60*60);
$aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM users WHERE lastact>'".$tm4."'"));
echo mysql_error();
if($page=="" || $page<=0)$page=1;
$num_items = $aut[0];//changable
$items_per_page= 10;
$num_pages = ceil($num_items/$items_per_page);
if($page>$num_pages)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$sql = "SELECT username, sex, lastact, id FROM users WHERE lastact>'".$tm4."' ORDER BY lastact DESC LIMIT $limit_start, $items_per_page";
$main.="";
$items = mysql_query($sql);
echo mysql_error();
while ($item = mysql_fetch_array($items))
{
if($item[1]==M)
{
$usex = "<imgsrc=\"../images/male.gif\"alt=\"M\"/>";
}elseif($item[1]==F){
$usex = "<imgsrc=\"../images/female.gif\"alt=\"F\"/>";
}else{
$usex = "<imgsrc=\"../images/unknown.gif\"alt=\"X\"/>";
}
$lnk = "<a href=\"profile.php?action=viewuser&who=$item[3]&sid=$sid\">$item[0]</a><br/>";
$main.="$usex $lnk -".date("D d M y - H:i:s a", $item[2])."<br/>";
$main.="-------<br/>";
}
if($page>1){
$main.="<br/><a href=\"active.php?action=act6month&page=".($page-1)."&sid=$sid\"><-Prev</a>";
}
if($page<$num_pages){
if($page==1)$main.="<br/>";
$main.="<a href=\"active.php?action=act6month&page=".($page+1 )."&sid=$sid\">Next-></a>\n";
}
$main.="<br/>Page - $page/$num_pages</p>\n";
if($num_pages>2){$main.=getjumper("online","","",$ sid);}
////// UNTILL HERE >>
$main.="<p align=".align()."><a href=\"active.php?action=active&sid=$sid\">~ba ck to Active members~</a><br/>
<a href=\"help.php?action=main&sid=$sid\">Help & Infomation</a><br/>
<a href=\"online.php?sid=$sid\">Online menu ".getnumonline($sid)."</a>|
<a href=\"extras.php?sid=$sid\">Free Extras</a>|
<a href=\"../inbox/inbox.php?sid=$sid\">Inboxs $readinboxes[0]</a>|
<a href=\"../inbox2/inbox2.php?sid=$sid\">Notifications $readinboxes[0]</a>|
<a href=\"../buds/buds.php?sid=$sid\">BuddyList</a>|
<a href=\"../chat/public.php?sid=$sid\">Chat</a>|
<a href=\"../forums/forums.php?sid=$sid\">Forums</a><br/>
<a href=\"main.php?sid=$sid\"><imgsrc=\"../images/home.gif\"alt=\"\"/>Main Menu</a></p>";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,0,0,0,0,$main) ;
echo foot_tag();
exit;
}
///////////////////////////////////Active Members LAST 3 DAYS
elseif($action=="active3")
{
addonline(getuid_sid($sid),"Active members For 3 Days","active.php?action=$action");
echo head_tag(getnick_sid($sid)."@Active people",1,getnick_sid($sid));
$title="<b>active people ".getnick_uid($who)."</b>";
$main.="<p align=".align().">\n";
(3*24*60*60);
$aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM users WHERE lastact>'".$tm3."'"));
echo mysql_error();
if($page=="" || $page<=0)$page=1;
$num_items = $aut[0];//changable
$items_per_page= 10;
$num_pages = ceil($num_items/$items_per_page);
if($page>$num_pages)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$sql = "SELECT username, sex, lastact, id FROM users WHERE lastact>'".$tm3."' ORDER BY lastact DESC LIMIT $limit_start, $items_per_page";
$main.="<br/>";
$items = mysql_query($sql);
echo mysql_error();
while ($item = mysql_fetch_array($items))
{
if($item[1]==M)
{
$usex = "<imgsrc=\"../images/male.gif\"alt=\"M\"/>";
}elseif($item[1]==F){
$usex = "<imgsrc=\"../images/female.gif\"alt=\"F\"/>";
}else{
$usex = "<imgsrc=\"../images/unknown.gif\"alt=\"X\"/>";
}
$lnk = "<a href=\"profile.php?action=viewuser&who=$item[3]&sid=$sid\">$item[0]</a><br/>";
$main.="$usex $lnk -".date("D d M y - H:i:s a", $item[2])."<br/>";
$main.="-------<br/>";
}
if($page>1){
$main.="<br/><a href=\"active.php?action=actuve3&page=".($page-1)."&sid=$sid\"><-Prev</a>";
}
if($page<$num_pages){
if($page==1)$main.="<br/>";
$main.="<a href=\"active.php?action=active3&page=".($page+1). "&sid=$sid\">Next-></a>\n";
}
$main.="<br/>Page - $page/$num_pages</p>\n";
if($num_pages>2){$main.=getjumper("online","","",$ sid);}
////// UNTILL HERE >>
$main.="<p align=".align()."><a href=\"active.php?action=active&sid=$sid\">~ba ck to Active members~</a><br/>
<a href=\"help.php?action=main&sid=$sid\">Help & Infomation</a><br/>
<a href=\"online.php?sid=$sid\">Online menu ".getnumonline($sid)."</a>|
<a href=\"extras.php?sid=$sid\">Free Extras</a>|
<a href=\"../inbox/inbox.php?sid=$sid\">Inboxs $readinboxes[0]</a>|
<a href=\"../inbox2/inbox2.php?sid=$sid\">Notifications $readinboxes[0]</a>|
<a href=\"../buds/buds.php?sid=$sid\">BuddyList</a>|
<a href=\"../chat/public.php?sid=$sid\">Chat</a>|
<a href=\"../forums/forums.php?sid=$sid\">Forums</a><br/>
<a href=\"main.php?sid=$sid\"><imgsrc=\"../images/home.gif\"alt=\"\"/>Main Menu</a></p>";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,0,0,0,0,$main) ;
echo foot_tag();
exit;
}
?>
<?php
define('WCS',true);
include('./core/main.inc');
header_type();
cleardata();
if(ipbanned(ip(),browser())){
if(!shield(getuid_sid($sid))){
echo head_tag("Ip Blocked!!!",0,0);
echo ipbanned_msg();
echo foot_tag();
exit();
}
}
if(!islogged($sid)){
echo head_tag("Error!!!",0,0);
echo session_expired();
echo foot_tag();
exit();
}
if(banned(getuid_sid($sid))){
echo head_tag("Error!!!",1,getnick_sid($sid));
echo banned_msg($sid);
echo foot_tag();
exit();
}
mysql_query("UPDATE users SET browser='".browser()."', ipaddress='".ip()."', host='".subno()."' WHERE id='".getuid_sid($sid)."'");
///////////////////////////////////Active Members
if($action=="active")
{
addonline(getuid_sid($sid),"Active members","");
echo head_tag(getnick_sid($sid)."@Active members",1,getnick_sid($sid));
$title="<b>Active members on site</b>";
$main.="<p align=".align().">\n";
$main.="On this page you will find out the active members in different time periods.<br/>";
$main.="------>";
$tm60 = time() - (60*60);
$aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM users WHERE lastact>'".$tm60."'"));
echo mysql_error();
$main.="Active member this hour: <a href=\"active.php?action=acthour&sid=$sid\">($ aut[0])</a><br/>";
$main.="------> ";
$tm24 = time() - (24*60*60);
$aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM users WHERE lastact>'".$tm24."'"));
echo mysql_error();
$main.="Active members today: <a href=\"active.php?action=actmem&sid=$sid\">($a ut[0])</a><br/>";
$main.="------>";
$tm3 = time() - (3*24*60*60);
$aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM users WHERE lastact>'".$tm3."'"));
echo mysql_error();
$main.="Active members Last 3 days: <a href=\"active.php?action=active3&sid=$sid\">($ aut[0])</a><br/>";
$main.="------>";
$tm7 = time() - (7*24*60*60);
$aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM users WHERE lastact>'".$tm7."'"));
echo mysql_error();
$main.="Active members this week: <a href=\"active.php?action=actmemwk&sid=$sid\">( $aut[0])</a><br/>";
$main.="------>";
$tm4 = time() - (4*7*24*60*60);
$aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM users WHERE lastact>'".$tm4."'"));
echo mysql_error();
$main.="Active members this month: <a href=\"active.php?action=actmonth&sid=$sid\">( $aut[0])</a><br/>";
$main.="------>";
$tm4 = time() - (24*7*24*60*60);
$aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM users WHERE lastact>'".$tm4."'"));
echo mysql_error();
$main.="Active members last 6 months: <a href=\"active.php?action=act6month&sid=$sid\"> ($aut[0])</a><br/>";
$main.="------>";
$main.="<p align=".align()."><a href=\"last10.php?action=last10topic&sid=$sid\ ">~10 Active topics~</a><br/>
<a href=\"online.php?sid=$sid\">Online menu</a>|
<a href=\"extras.php?sid=$sid\">Extras</a>|
<a href=\"../inbox/inbox.php?sid=$sid\">Inbox</a>|
<a href=\"../inbox2/inbox2.php?sid=$sid\">Notifications</a>|
<a href=\"../buds/buds.php?sid=$sid\">BuddyList</a>|
<a href=\"../chat/public.php?sid=$sid\">Chat</a>|
<a href=\"../forums/forums.php?sid=$sid\">Forums</a><br/>
<a href=\"main.php?sid=$sid\"><imgsrc=\"../images/home.gif\"alt=\"\"/>Main Menu</a></p>";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,0,0,0,0,$main) ;
echo foot_tag();
exit;
}
///////////////////////////////////Active Members This Hour
elseif($action=="acthour")
{
addonline(getuid_sid($sid),"Active member For This Hour","ative.php?action=$action");
echo head_tag(getnick_sid($sid)."@Active people",1,getnick_sid($sid));
$title="<b>active people ".getnick_uid($who)."</b>";
$main.="<p align=".align().">\n";
$tm60 = time() - (60*60);
$aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM users WHERE lastact>'".$tm60."'"));
echo mysql_error();
if($page=="" || $page<=0)$page=1;
$num_items = $aut[0];//changable
$items_per_page= 10;
$num_pages = ceil($num_items/$items_per_page);
if($page>$num_pages)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$sql = "SELECT username, sex, lastact, id FROM users WHERE lastact>'".$tm60."' ORDER BY lastact DESC LIMIT $limit_start, $items_per_page";
$main.="<br/>";
$items = mysql_query($sql);
echo mysql_error();
while ($item = mysql_fetch_array($items))
{
if($item[1]==M)
{
$usex = "<imgsrc=\"./images/male.gif\"alt=\"M\"/>";
}elseif($item[1]==F){
$usex = "<imgsrc=\"./images/female.gif\"alt=\"F\"/>";
}else{
$usex = "<imgsrc=\"./images/unknown.gif\"alt=\"X\"/>";
}
$lnk = "<a href=\"profile.php?action=viewuser&who=$item[3]&sid=$sid\">$item[0]</a><br/>";
$main.="$usex $lnk -".date("D d M y - H:i:s a", $item[2])."<br/>";
$main.="-------<br/>";
}
if($page>1){
$main.="<br/><a href=\"active.php?action=acthour&page=".($page-1)."&sid=$sid\"><-Prev</a>";
}
if($page<$num_pages){
if($page==1)$main.="<br/>";
$main.="<a href=\"active.php?action=acthour&page=".($page+1). "&sid=$sid\">Next-></a>\n";
}
$main.="<br/>Page - $page/$num_pages</p>\n";
if($num_pages>2){$main.=getjumper("online","","",$ sid);}
////// UNTILL HERE >>
$main.="<p align=".align()."><a href=\"active.php?action=active&sid=$sid\">~ba ck to Active members~</a><br/>
<a href=\"../online.php?sid=$sid\">Online menu</a>|
<a href=\"../extras.php?sid=$sid\">Extras</a>|
<a href=\"../inbox/inbox.php?sid=$sid\">Inbox</a>|
<a href=\"../inbox2/inbox2.php?sid=$sid\">Notifications</a>|
<a href=\"../buds/buds.php?sid=$sid\">BuddyList</a>|
<a href=\"../chat/public.php?sid=$sid\">Chat</a>|
<a href=\"../forums/forums.php?sid=$sid\">Forums</a><br/>
<a href=\"../main.php?sid=$sid\"><imgsrc=\"../images/home.gif\"alt=\"\"/>Main Menu</a></p>";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,0,0,0,0,$main) ;
echo foot_tag();
exit;
}
///////////////////////////////////Active Members Today
elseif($action=="actmem")
{
addonline(getuid_sid($sid),"Active members Today","active.php?action=$action");
echo head_tag(getnick_sid($sid)."@Active people",1,getnick_sid($sid));
$title="<b>active people ".getnick_uid($who)."</b>";
echo"<p align=".align().">\n";
$tm24 = time() - (24*60*60);
$aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM users WHERE lastact>'".$tm24."'"));
echo mysql_error();
$main.="<p align=".align().">\n";
if($page=="" || $page<=0)$page=1;
$num_items = $aut[0];//changable
$items_per_page= 7;
$num_pages = ceil($num_items/$items_per_page);
if($page>$num_pages)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$sql = "SELECT username, sex, lastact, id FROM users WHERE lastact>'".$tm24."' ORDER BY lastact DESC LIMIT $limit_start, $items_per_page";
$main.="<br/>";
$items = mysql_query($sql);
echo mysql_error();
while ($item = mysql_fetch_array($items))
{
if($item[1]==M)
{
$usex = "<imgsrc=\"../images/male.gif\"alt=\"M\"/>";
}elseif($item[1]==F){
$usex = "<imgsrc=\"../images/female.gif\"alt=\"F\"/>";
}else{
$usex = "<imgsrc=\"../images/unknown.gif\"alt=\"X\"/>";
}
$lnk = "<a href=\"profile.php?action=viewuser&who=$item[3]&sid=$sid\">$item[0]</a><br/>";
$main.="$usex $lnk -".date("D d M y - H:i:s a", $item[2])."<br/>";
$main.="-------<br/>";
}
if($page>1){
$main.="<br/><a href=\"active.php?action=actmem&page=".($page-1)."&sid=$sid\"><-Prev</a>";
}
if($page<$num_pages){
if($page==1)$main.="<br/>";
$main.="<a href=\"active.php?action=actmem&page=".($page+1)." &sid=$sid\">Next-></a>\n";
}
$main.="<br/>Page - $page/$num_pages</p>\n";
if($num_pages>2){$main.=getjumper("online","","",$ sid);}
////// UNTILL HERE >>
$main.="<p align=".align()."><a href=\"active.php?action=active&sid=$sid\">~ba ck to Active members~</a><br/>
<a href=\"online.php?sid=$sid\">Online menu</a>|
<a href=\"extras.php?sid=$sid\">Extras</a>|
<a href=\"../inbox/inbox.php?sid=$sid\">Inbox</a>|
<a href=\"../inbox2/inbox2.php?sid=$sid\">Notifications</a>|
<a href=\"../buds/buds.php?sid=$sid\">BuddyList</a>|
<a href=\"../chat/public.php?sid=$sid\">Chat</a>|
<a href=\"../forums/forums.php?sid=$sid\">Forums</a><br/>
<a href=\"main.php?sid=$sid\"><imgsrc=\"../images/home.gif\"alt=\"\"/>Main Menu</a></p>";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,0,0,0,0,$main) ;
echo foot_tag();
exit;
}
///////////////////////////////////Active Members This Week
elseif($action=="actmemwk")
{
addonline(getuid_sid($sid),"Active members For This Week","active.php?action=$action");
echo head_tag(getnick_sid($sid)."@Active people",1,getnick_sid($sid));
$title="<b>active people ".getnick_uid($who)."</b>";
echo"<p align=".align().">\n";
$tm7 = time() - (7*24*60*60);
$aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM users WHERE lastact>'".$tm7."'"));
echo mysql_error();
$main.="<p align=".align().">\n";
if($page=="" || $page<=0)$page=1;
$num_items = $aut[0];//changable
$items_per_page= 10;
$num_pages = ceil($num_items/$items_per_page);
if($page>$num_pages)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$sql = "SELECT username, sex, lastact, id FROM users WHERE lastact>'".$tm7."' ORDER BY lastact DESC LIMIT $limit_start, $items_per_page";
$main.="<br/>";
$items = mysql_query($sql);
echo mysql_error();
while ($item = mysql_fetch_array($items))
{
if($item[1]==M)
{
$usex = "<imgsrc=\"../images/male.gif\"alt=\"M\"/>";
}elseif($item[1]==F){
$usex = "<imgsrc=\"../images/female.gif\"alt=\"F\"/>";
}else{
$usex = "<imgsrc=\"../images/unknown.gif\"alt=\"X\"/>";
}
$lnk = "<a href=\"profile.php?action=viewuser&who=$item[3]&sid=$sid\">$item[0]</a><br/>";
$main.="$usex $lnk -".date("D d M y - H:i:s a", $item[2])."<br/>";
$main.="-------<br/>";
}
if($page>1){
$main.="<br/><a href=\"active.php?action=actmemwk&page=".($page-1)."&sid=$sid\"><-Prev</a>";
}
if($page<$num_pages){
if($page==1)$main.="<br/>";
$main.="<a href=\"active.php?action=actmemwk&page=".($page+1) ."&sid=$sid\">Next-></a>\n";
}
$main.="<br/>Page - $page/$num_pages</p>\n";
if($num_pages>2){$main.=getjumper("online","","",$ sid);}
////// UNTILL HERE >>
$main.="<p align=".align()."><a href=\"active.php?action=active&sid=$sid\">~ba ck to Active members~</a><br/>
<a href=\"online.php?sid=$sid\">Online menu</a>|
<a href=\"extras.php?sid=$sid\">Extras</a>|
<a href=\"../inbox/inbox.php?sid=$sid\">Inbox</a>|
<a href=\"../inbox2/inbox2.php?sid=$sid\">Notifications</a>|
<a href=\"../buds/buds.php?sid=$sid\">BuddyList</a>|
<a href=\"../chat/public.php?sid=$sid\">Chat</a>|
<a href=\"../forums/forums.php?sid=$sid\">Forums</a><br/>
<a href=\"main.php?sid=$sid\"><imgsrc=\"../images/home.gif\"alt=\"\"/>Main Menu</a></p>";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,0,0,0,0,$main) ;
echo foot_tag();
exit;
}
///////////////////////////////////Active Members This Month
elseif($action=="actmonth")
{
addonline(getuid_sid($sid),"Active members For This Month","active.php?action=$action");
echo head_tag(getnick_sid($sid)."@Active people",1,getnick_sid($sid));
$title="<b>active people ".getnick_uid($who)."</b>";
$main.="<p align=".align().">\n";
$tm4 = time() - (4*7*24*60*60);
$aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM users WHERE lastact>'".$tm4."'"));
echo mysql_error();
if($page=="" || $page<=0)$page=1;
$num_items = $aut[0];//changable
$items_per_page= 10;
$num_pages = ceil($num_items/$items_per_page);
if($page>$num_pages)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$sql = "SELECT username, sex, lastact, id FROM users WHERE lastact>'".$tm4."' ORDER BY lastact DESC LIMIT $limit_start, $items_per_page";
$main.="<br/>";
$items = mysql_query($sql);
echo mysql_error();
while ($item = mysql_fetch_array($items))
{
if($item[1]==M)
{
$usex = "<imgsrc=\"../images/male.gif\"alt=\"M\"/>";
}elseif($item[1]==F){
$usex = "<imgsrc=\"../images/female.gif\"alt=\"F\"/>";
}else{
$usex = "<imgsrc=\"../images/unknown.gif\"alt=\"X\"/>";
}
$lnk = "<a href=\"profile.php?action=viewuser&who=$item[3]&sid=$sid\">$item[0]</a><br/>";
$main.="$usex $lnk -".date("D d M y - H:i:s a", $item[2])."<br/>";
$main.="-------<br/>";
}
if($page>1){
$main.="<br/><a href=\"active.php?action=actmonth&page=".($page-1)."&sid=$sid\"><-Prev</a>";
}
if($page<$num_pages){
if($page==1)$main.="<br/>";
$main.="<a href=\"active.php?action=actmonth&page=".($page+1) ."&sid=$sid\">Next-></a>\n";
}
$main.="<br/>Page - $page/$num_pages</p>\n";
if($num_pages>2){$main.=getjumper("online","","",$ sid);}
////// UNTILL HERE >>
$main.="<p align=".align()."><a href=\"active.php?action=active&sid=$sid\">~ba ck to Active members~</a><br/>
<a href=\"online.php?sid=$sid\">Online menu</a>|
<a href=\"extras.php?sid=$sid\">Extras</a>|
<a href=\"../inbox/inbox.php?sid=$sid\">Inbox</a>|
<a href=\"../inbox2/inbox2.php?sid=$sid\">Notifications</a>|
<a href=\"../buds/buds.php?sid=$sid\">BuddyList</a>|
<a href=\"../chat/public.php?sid=$sid\">Chat</a>|
<a href=\"../forums/forums.php?sid=$sid\">Forums</a><br/>
<a href=\"main.php?sid=$sid\"><imgsrc=\"../images/home.gif\"alt=\"\"/>Main Menu</a></p>";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,0,0,0,0,$main) ;
echo foot_tag();
exit;
}
///////////////////////////////////Active Members This Month
elseif($action=="act6month")
{
addonline(getuid_sid($sid),"Active members last 6months","active.php?action=$action");
echo head_tag(getnick_sid($sid)."@Active people",1,getnick_sid($sid));
$title="<b>active people ".getnick_uid($who)."</b>";
$main.="<p align=".align().">\n";
$tm4 = time() - (24*7*24*60*60);
$aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM users WHERE lastact>'".$tm4."'"));
echo mysql_error();
if($page=="" || $page<=0)$page=1;
$num_items = $aut[0];//changable
$items_per_page= 10;
$num_pages = ceil($num_items/$items_per_page);
if($page>$num_pages)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$sql = "SELECT username, sex, lastact, id FROM users WHERE lastact>'".$tm4."' ORDER BY lastact DESC LIMIT $limit_start, $items_per_page";
$main.="";
$items = mysql_query($sql);
echo mysql_error();
while ($item = mysql_fetch_array($items))
{
if($item[1]==M)
{
$usex = "<imgsrc=\"../images/male.gif\"alt=\"M\"/>";
}elseif($item[1]==F){
$usex = "<imgsrc=\"../images/female.gif\"alt=\"F\"/>";
}else{
$usex = "<imgsrc=\"../images/unknown.gif\"alt=\"X\"/>";
}
$lnk = "<a href=\"profile.php?action=viewuser&who=$item[3]&sid=$sid\">$item[0]</a><br/>";
$main.="$usex $lnk -".date("D d M y - H:i:s a", $item[2])."<br/>";
$main.="-------<br/>";
}
if($page>1){
$main.="<br/><a href=\"active.php?action=act6month&page=".($page-1)."&sid=$sid\"><-Prev</a>";
}
if($page<$num_pages){
if($page==1)$main.="<br/>";
$main.="<a href=\"active.php?action=act6month&page=".($page+1 )."&sid=$sid\">Next-></a>\n";
}
$main.="<br/>Page - $page/$num_pages</p>\n";
if($num_pages>2){$main.=getjumper("online","","",$ sid);}
////// UNTILL HERE >>
$main.="<p align=".align()."><a href=\"active.php?action=active&sid=$sid\">~ba ck to Active members~</a><br/>
<a href=\"help.php?action=main&sid=$sid\">Help & Infomation</a><br/>
<a href=\"online.php?sid=$sid\">Online menu ".getnumonline($sid)."</a>|
<a href=\"extras.php?sid=$sid\">Free Extras</a>|
<a href=\"../inbox/inbox.php?sid=$sid\">Inboxs $readinboxes[0]</a>|
<a href=\"../inbox2/inbox2.php?sid=$sid\">Notifications $readinboxes[0]</a>|
<a href=\"../buds/buds.php?sid=$sid\">BuddyList</a>|
<a href=\"../chat/public.php?sid=$sid\">Chat</a>|
<a href=\"../forums/forums.php?sid=$sid\">Forums</a><br/>
<a href=\"main.php?sid=$sid\"><imgsrc=\"../images/home.gif\"alt=\"\"/>Main Menu</a></p>";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,0,0,0,0,$main) ;
echo foot_tag();
exit;
}
///////////////////////////////////Active Members LAST 3 DAYS
elseif($action=="active3")
{
addonline(getuid_sid($sid),"Active members For 3 Days","active.php?action=$action");
echo head_tag(getnick_sid($sid)."@Active people",1,getnick_sid($sid));
$title="<b>active people ".getnick_uid($who)."</b>";
$main.="<p align=".align().">\n";
(3*24*60*60);
$aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM users WHERE lastact>'".$tm3."'"));
echo mysql_error();
if($page=="" || $page<=0)$page=1;
$num_items = $aut[0];//changable
$items_per_page= 10;
$num_pages = ceil($num_items/$items_per_page);
if($page>$num_pages)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$sql = "SELECT username, sex, lastact, id FROM users WHERE lastact>'".$tm3."' ORDER BY lastact DESC LIMIT $limit_start, $items_per_page";
$main.="<br/>";
$items = mysql_query($sql);
echo mysql_error();
while ($item = mysql_fetch_array($items))
{
if($item[1]==M)
{
$usex = "<imgsrc=\"../images/male.gif\"alt=\"M\"/>";
}elseif($item[1]==F){
$usex = "<imgsrc=\"../images/female.gif\"alt=\"F\"/>";
}else{
$usex = "<imgsrc=\"../images/unknown.gif\"alt=\"X\"/>";
}
$lnk = "<a href=\"profile.php?action=viewuser&who=$item[3]&sid=$sid\">$item[0]</a><br/>";
$main.="$usex $lnk -".date("D d M y - H:i:s a", $item[2])."<br/>";
$main.="-------<br/>";
}
if($page>1){
$main.="<br/><a href=\"active.php?action=actuve3&page=".($page-1)."&sid=$sid\"><-Prev</a>";
}
if($page<$num_pages){
if($page==1)$main.="<br/>";
$main.="<a href=\"active.php?action=active3&page=".($page+1). "&sid=$sid\">Next-></a>\n";
}
$main.="<br/>Page - $page/$num_pages</p>\n";
if($num_pages>2){$main.=getjumper("online","","",$ sid);}
////// UNTILL HERE >>
$main.="<p align=".align()."><a href=\"active.php?action=active&sid=$sid\">~ba ck to Active members~</a><br/>
<a href=\"help.php?action=main&sid=$sid\">Help & Infomation</a><br/>
<a href=\"online.php?sid=$sid\">Online menu ".getnumonline($sid)."</a>|
<a href=\"extras.php?sid=$sid\">Free Extras</a>|
<a href=\"../inbox/inbox.php?sid=$sid\">Inboxs $readinboxes[0]</a>|
<a href=\"../inbox2/inbox2.php?sid=$sid\">Notifications $readinboxes[0]</a>|
<a href=\"../buds/buds.php?sid=$sid\">BuddyList</a>|
<a href=\"../chat/public.php?sid=$sid\">Chat</a>|
<a href=\"../forums/forums.php?sid=$sid\">Forums</a><br/>
<a href=\"main.php?sid=$sid\"><imgsrc=\"../images/home.gif\"alt=\"\"/>Main Menu</a></p>";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,0,0,0,0,$main) ;
echo foot_tag();
exit;
}
?>
Comment