lets share wapdesire v2 mods here..i asking for mods,,but the ask me to share first..so i code a mods by myself andi like to share it here..hope its useful..
Wapdesire V2 mods
Collapse
X
-
shoutroom
place for people who like sto shout..
shoutroom.ph.
PHP Code:<?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();
}
if(shoutbanned(getuid_sid($sid))){
echo head_tag("Error!!!",1,getnick_sid($sid));
echo shoutbanned_msg($sid);
echo foot_tag();
exit();
}
mysql_query("UPDATE users SET browser='".browser()."', ipaddress='".ip()."', host='".subno()."' WHERE id='".getuid_sid($sid)."'");
/////////////////////////SHOUTBOX HISTORY/////////////////////////
addonline(getuid_sid($sid),"Viewing Shouts","");
echo head_tag(getnick_sid($sid)."@Shoutbox",1,getnick_sid($sid));
$title="<b>ShoutRoom</b>";
$main="<p align=".align().">\n";
$lshout=mysql_fetch_array(mysql_query("SELECT shout, uid, id FROM shouts ORDER BY shtime DESC LIMIT 1"));
$shnick=getnick_uid($lshout[1]);
$main.="[<i><a href=\"./profile.php?who=$lshout[1]&sid=$sid\" style=\"color:$color;\">".$shnick."</a></i>]<br/>
".getbbcode($lshout[0],$sid,1);
if(delshout(getuid_sid($sid),$lshout[2])){
$main.=" <a href=\"./shoutbox/delete.php?sid=$sid&delete=$lshout[2]\">
| del</a>\n";
}
if(points(getuid_sid($sid))<15){
$points="points";
if(points(getuid_sid($sid))==14){$points="point";}
$main.="<br/>You need ".(15-points(getuid_sid($sid)))." more $points to shout!<hr/>
</div>\n";
}else{
$main.="<br/>
<input name=\"shtxt\" maxlength=\"100\"/><br/>
<input type=\"submit\" value=\"Add Shout\"/><br/>
</form><hr/>
</div>\n";
}
if($page==""||$page<=0)$page=1;
if($who==""){$noi=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM shouts"));}
else{$noi=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM shouts WHERE uid='".$who."'"));}
$num_items=$noi[0];
$items_per_page=10;
$num_pages=ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page=$num_pages;
$limit_start=($page-1)*$items_per_page;
if($who==""){
$sql="SELECT id, shout, uid, shtime FROM shouts
ORDER BY shtime DESC LIMIT $limit_start, $items_per_page
";
}else{
$sql="SELECT id, shout, uid, shtime FROM shoutsWHERE uid='".$who."'
ORDER BY shtime DESC LIMIT $limit_start, $items_per_page
";
}
$items=mysql_query($sql);
$main.=mysql_error();
if(mysql_num_rows($items)>0){
while($item=mysql_fetch_array($items)){
$sex=mysql_fetch_array(mysql_query("SELECT sex FROM profiles WHERE uid='".$item[2]."'"));
if($sex[0]=="M"){$color="#0000FF";}
else if($sex[0]=="F"){$color="#FF0066";}
$main.="<a href=\"../profile.php?who=$item[2]&sid=$sid\" style=\"color:$color;\">".getnick_uid($item[2])."</a>:<br/>
".date("d m y-H:i", $item[3])."<br/>
".getbbcode($item[1],$sid,1)."<br/>\n";
if(delshout(getuid_sid($sid),$item[0])){
$main.="<a href=\"./delete.php?delete=$item[0]&sid=$sid\">
<img src=\"../images/error.gif\" alt=\"[x]\"/></a><br/>\n";
}
}
}
if($page>1){
$main.="<br/><a href=\"./history.php?page=".($page-1)."&sid=$sid\"><-Prev</a> ";
}
if($page<$num_pages){
if($page==1)$main.="<br/>";
$main.="<a href=\"./history.php?page=".($page+1)."&sid=$sid\">Next-></a>\n";
}
$main.="<br/>Page - $page/$num_pages</p>\n";
if($num_pages>2){$main.=getjumper("history","who","$who",$sid);}
$L1="$sixkey<a $key6 href=\"../inbox/inbox.php?sid=$sid\">Inbox</a>";
$L2="$sevenkey<a $key7 href=\"../buds/buds.php?sid=$sid\">BuddyList</a>";
$L3="$eightkey<a $key8 href=\"../chat/public.php?sid=$sid\">Chat</a>";
$L4="$ninekey<a $key9 href=\"../forums/forums.php?sid=$sid\">Forums</a>";
$L5="$zerokey<a $key0 href=\"../main.php?sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a>";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,0,0,0,$main);
echo foot_tag();
?>
-
change own nickname
user can change their nickname themself.
PHP Code:<?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)."'");
/////////////////////////EDIT USER/////////////////////////
if($edit==1)
{
addonline(getuid_sid($sid),"Editing Nickname","");
echo head_tag(getnick_sid($sid)."@Editing Nickname",1,getnick_sid($sid));
$title="<b>Editing Nickname</b>";
$main="<p align=".align().">";
$res=mysql_query("UPDATE users SET username='".$name."' WHERE id='".getuid_sid($sid)."'");
if($res){
mysql_query("INSERT INTO logs SET action='edited', details='<b>".getnick_uid(getuid_sid($sid))."</b> edited ".getnick_uid($who)."', date='".time()."'");
if($type==admintools&&$tools==0){mysql_query("DELETE FROM admintools WHERE uid='".getuid_sid($sid)."'");}
$main.="<img src=\"../images/ok.gif\" alt=\"o\"/><br/>Nickname Was Edited Successfully\n";
}else{
$main.="<img src=\"../images/error.gif\" alt=\"x\"/><br/>Error updating Nickname'\n";
}
$main.="</p>
<p align=".align().">
<a href=\"./moderate.php?edit=1&who=$who&sid=$sid\">Back</a>
</p>\n";
$chat_on=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM chatonline"));
$main.="<center>| <a href=\"../buds/buds.php?sid=$sid\">Buddy (".online_buds(getuid_sid($sid)).")</a> | <a href=\"./chat/public.php?sid=$sid\">Chat ($chat_on[0])</a> | <br/> <a $key9 href=\"../forums/forums.php?sid=$sid\">Forums</a> | <a href=\"../main.php?sid=$sid\">Main Menu</a> </center>\n";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,0,0,0,$main);
echo foot_tag();
exit;
}
addonline(getuid_sid($sid),"Editing Nickname","");
echo head_tag(getnick_sid($sid)."@Editing Nickname",1,getnick_sid($sid));
$title="<b>Editing Nickname</b>";
$name=mysql_fetch_array(mysql_query("SELECT username FROM users WHERE id='".getuid_sid($sid)."'"));
$main="<div class=".align()."><br/>
<form action=\"./chnick.php?edit=1&sid=$sid\" method=\"post\">
Username:<br/>
<input name=\"name\" maxlength=\"100\" value=\"$name[0]\"/><br/>
<input type=\"submit\" value=\"Update\"/>
</form>
</div>\n";
$main.="<p align=".align().">
<a href=\"./chnick.php?edit=1&who=$who&sid=$sid\">Back</a>
</p>\n";
$chat_on=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM chatonline"));
$main.="<center>| <a href=\"../buds/buds.php?sid=$sid\">Buddy (".online_buds(getuid_sid($sid)).")</a> | <a href=\"./chat/public.php?sid=$sid\">Chat ($chat_on[0])</a> | <br/> <a $key9 href=\"../forums/forums.php?sid=$sid\">Forums</a> | <a href=\"../main.php?sid=$sid\">Main Menu</a> </center>\n";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,0,0,0,$main);
echo foot_tag();
?>
Comment
-
MY PIC
user can see their own pic that they have upload
PHP Code:<?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)."'");
/////////////////////////OWN PICS/////////////////////////
addonline(getuid_sid($sid),"My Pics","");
echo head_tag(getnick_sid($sid)."@My Pics",1,getnick_sid($sid));
$title="<b><i>My Pics</i></b>";
$main="<p align=".align().">
<center>Here Are Your Pic in $sitename Gallery</center><br/><br/>\n";
$active=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM gallery_files WHERE uid='".getuid_sid($sid)."'"));
if($active[0]==0){
$main.="<p align=".align().">No Pics Hav Been uploaded Yet.</p>\n";
$main.="<p align=".align().">$fivekey<a $key5 href=\"./gallery.php?sid=$sid\">Back</a></p>\n";
$chat_on=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM chatonline"));
$main.="<center>| <a href=\"../buds/buds.php?sid=$sid\">Buddy (".online_buds(getuid_sid($sid)).")</a> | <a href=\"./chat/public.php?sid=$sid\">Chat ($chat_on[0])</a> | <br/> <a $key9 href=\"../forums/forums.php?sid=$sid\">Forums</a> | <a href=\"../main.php?sid=$sid\">Main Menu</a> </center>\n";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,0,0,0,$main);
echo foot_tag();
exit;
}
$sql="SELECT id, filename, path FROM gallery_files WHERE uid='".getuid_sid($sid)."' ORDER BY id DESC LIMIT 10";
$items=mysql_query($sql);
while($item=mysql_fetch_array($items))
{
$main.="<center><img src=\"$item[2]\" width=\"70\" height=\"100\" alt=\"$item[2]\"/><br/>$item[1]
<a href=\"./delete.php?id=$item[0]&sid=$sid\"><img src=\"../images/error.gif\" alt=\"[delete]\"/></a><br/>
<br/></center>\n";
}
$main.="<p align=".align().">$fivekey<a $key5 href=\"./gallery.php?sid=$sid\">Back</a></p>\n";
$chat_on=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM chatonline"));
$main.="<center>| <a href=\"../buds/buds.php?sid=$sid\">Buddy (".online_buds(getuid_sid($sid)).")</a> | <a href=\"./chat/public.php?sid=$sid\">Chat ($chat_on[0])</a> | <br/> <a $key9 href=\"../forums/forums.php?sid=$sid\">Forums</a> | <a href=\"../main.php?sid=$sid\">Main Menu</a> </center>\n";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,0,0,0,$main);
echo foot_tag();
exit;
?>
but i need help from anybody to add code people can set their pic as avatar..
Comment
-
PHP Code:<?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\">($aut[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\">~back 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\">~back 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\">~back 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\">~back 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\">~back 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\">~back 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;
}
?>Last edited by metulj; 14.08.10, 20:18.
Comment
-
PHP Code:<?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\">($aut[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\">~back 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\">~back 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\">~back 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\">~back 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\">~back 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\">~back 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;
}
?>Last edited by metulj; 14.08.10, 20:18.
Comment
-
LYRICS
people can share lyrics here
PHP Code:<?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($sid!=""&&$sid!="guest"){
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)."'");
/////////////////////////VIEW LYRICS/////////////////////////
if($read==1)
{
$lyrics=mysql_fetch_array(mysql_query("SELECT * FROM lyrics WHERE id='".$id."'"));
echo head_tag(getnick_sid($sid)."@Reading lyrics",1,getnick_uid($who));
addonline(getuid_sid($sid),"Read lyric","");
$title="<b>Read Lyrics</b>";
$main="<p align=".align().">\n";
$main.="<b>Date:</b> ".date("l jS F",$lyrics["date"])."
</p>
<p align=".align().">
<b>Title :</b> ".getbbcode($lyrics["song"],$sid,1)."
<br/>
<b>By :</b> ".getbbcode($lyrics["singer"],$sid,1)."
<br/>
<br/>
<b>Lyrics :</b> <br/> ".getbbcode($lyrics["lyric"],$sid,1)."
</p>
<p align=".align().">\n";
$main.="$onekey<a $key1 href=\"./lyrics.php?comments=add&id=$id&who=$who&sid=$sid\">Add Comment</a><br/>\n";
$comments=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lyric_comments WHERE lyricid='".$id."'"));
$main.="$twokey<a $key2 href=\"./lyrics.php?comments=view&id=$id&who=$who&sid=$sid\">$comments[0] Comments</a><br/>\n";
$main.="$fivekey<a $key5 href=\"./lyrics.php?who=$who&sid=$sid\">Back</a></p>
\n";
$chat_on=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM chatonline"));
$main.="<center>| <a href=\"../buds/buds.php?sid=$sid\">Buddy (".online_buds(getuid_sid($sid)).")</a> | <a href=\"./chat/public.php?sid=$sid\">Chat ($chat_on[0])</a> | <br/> <a $key9 href=\"../forums/forums.php?sid=$sid\">Forums</a> | <a href=\"../main.php?sid=$sid\">Main Menu</a> </center>\n";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,0,0,0,$main);
echo foot_tag();
exit;
}
else if($add==1)
{
echo head_tag(getnick_sid($sid)."@Adding Lyric",1,getnick_sid($sid));
addonline(getuid_sid($sid),"Add Lyric","");
$title="<b>Add Lyric</b>";
$main="<div class=".align().">
<br/><form action=\"./lyrics.php?save=1&sid=$sid\" method=\"post\">
<b>Title:</b><br/>
<input type=\"text\" name=\"song\" value=\"\" maxlength=\"50\"/><br/>
<b>Singer:</b><br/>
<input type=\"text\" name=\"singer\" value=\"\" maxlength=\"50\"/><br/>
<b>Lyrics:</b><br/>
<input type=\"text\" name=\"lyric\" value=\"\" maxlength=\"1000\"/><br/>
<input type=\"submit\" value=\"Save\"/>
</form>
</div>
<p align=".align().">
$fivekey<a $key5 href=\"./update.php?lyrics=1&sid=$sid\">Back</a>
</p>\n";
$chat_on=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM chatonline"));
$main.="<center>| <a href=\"../buds/buds.php?sid=$sid\">Buddy (".online_buds(getuid_sid($sid)).")</a> | <a href=\"./chat/public.php?sid=$sid\">Chat ($chat_on[0])</a> | <br/> <a $key9 href=\"../forums/forums.php?sid=$sid\">Forums</a> | <a href=\"../main.php?sid=$sid\">Main Menu</a> </center>\n";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,0,0,0,$main);
echo foot_tag();
exit;
}
else if($edit==1)
{
echo head_tag(getnick_sid($sid)."@Edit Lyric",1,getnick_sid($sid));
addonline(getuid_sid($sid),"Edit Lyric","");
$title="<b>Edit Lyric</b>";
$lyrics=mysql_fetch_array(mysql_query("SELECT * FROM lyrics WHERE uid='".getuid_sid($sid)."' AND id='".$id."'"));
$main="<div class=".align().">
<br/><form action=\"./lyrics.php?save=1&sid=$sid\" method=\"post\">
<b>Title:</b><br/>
<input type=\"text\" name=\"song\" value=\"\" maxlength=\"50\"/><br/>
<b>Singer:</b><br/>
<input type=\"text\" name=\"singer\" value=\"\" maxlength=\"50\"/><br/>
<b>Lyrics:</b><br/>
<input type=\"text\" name=\"lyric\" value=\"\" maxlength=\"1000\"/><br/>
<input type=\"submit\" value=\"Save\"/>
</form>
</div>
<p align=".align().">
$fivekey<a $key5 href=\"./update.php?blogs=1&sid=$sid\">Back</a>
</p>\n";
$chat_on=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM chatonline"));
$main.="<center>| <a href=\"../buds/buds.php?sid=$sid\">Buddy (".online_buds(getuid_sid($sid)).")</a> | <a href=\"./chat/public.php?sid=$sid\">Chat ($chat_on[0])</a> | <br/> <a $key9 href=\"../forums/forums.php?sid=$sid\">Forums</a> | <a href=\"../main.php?sid=$sid\">Main Menu</a> </center>\n";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,0,0,0,$main);
echo foot_tag();
exit;
}
else if($save==1)
{
echo head_tag(getnick_sid($sid)."@Saving Lyric",1,getnick_sid($sid));
addonline(getuid_sid($sid),"Saving Lyric","");
$title="<b>Saving Lyric</b>";
$main="<p align=".align().">\n";
$Lyric_exist=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM Lyrics WHERE id='".$id."'"));
if($Lyric_exist[0]==0){
$res=mysql_query("INSERT INTO lyrics SET uid='".getuid_sid($sid)."', song='".$song."', singer='".$singer."', lyric='".$lyric."', date='".time()."'");
}else{
$res=mysql_query("UPDATE lyrics SET subject='".$subject."', body='".$body."' WHERE id='".$id."'");
}
if($res){
if(isspam($lyric)||isspam($singer)){mysql_query("UPDATE lyrics SET reported='1' WHERE lyric='".$lyric."");}
$main.="<img src=\"../images/ok.gif\" alt=\"[o]\"/>Lyric Successfully Saved<br/>\n";
}else{
$main.="<img src=\"../images/error.gif\" alt=\"[x]\"/>Error Saving Lyric<br/>\n";
}
$main.="$fivekey<a $key5 href=\"./update.php?lyrics=1&sid=$sid\">Back</a>
</p>\n";
$chat_on=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM chatonline"));
$main.="<center>| <a href=\"../buds/buds.php?sid=$sid\">Buddy (".online_buds(getuid_sid($sid)).")</a> | <a href=\"./chat/public.php?sid=$sid\">Chat ($chat_on[0])</a> | <br/> <a $key9 href=\"../forums/forums.php?sid=$sid\">Forums</a> | <a href=\"../main.php?sid=$sid\">Main Menu</a> </center>\n";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,0,0,0,$main);
echo foot_tag();
exit;
}
else if($delete==1)
{
echo head_tag(getnick_sid($sid)."@Deleting Lyric",1,getnick_sid($sid));
addonline(getuid_sid($sid),"Deleting Lyric","");
$title="<b>Deleting Lyric</b>";
$main="<p align=".align().">\n";
$lyric_exist=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lyrics WHERE id='".$id."'"));
if($blog_exist[0]==1){
$res=mysql_query("DELETE FROM lyrics WHERE uid='".getuid_sid($sid)."'AND id='".$id."'");
if($res){
$main.="<img src=\"../images/ok.gif\" alt=\"[o]\"/>Lyric Successfully Deleted<br/>\n";
}else{
$main.="<img src=\"../images/error.gif\" alt=\"[x]\"/>Error Deleting Lyric<br/>\n";
}
}else{
$main.="<img src=\"../images/error.gif\" alt=\"[x]\"/>Lyric Does Not Exist<br/>\n";
}
$main.="$fivekey<a $key5 href=\"./update.php?blogs=1&sid=$sid\">Back</a>
</p>\n";
$chat_on=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM chatonline"));
$main.="<center>| <a href=\"../buds/buds.php?sid=$sid\">Buddy (".online_buds(getuid_sid($sid)).")</a> | <a href=\"./chat/public.php?sid=$sid\">Chat ($chat_on[0])</a> | <br/> <a $key9 href=\"../forums/forums.php?sid=$sid\">Forums</a> | <a href=\"../main.php?sid=$sid\">Main Menu</a> </center>\n";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,0,0,0,$main);
echo foot_tag();
exit;
}
else if($comments=="view")
{
echo head_tag(getnick_sid($sid)."@Lyric Comments",1,getnick_uid($who));
addonline(getuid_sid($sid),"Blog Comments","profile.php?who=$who");
$title="<b>Lyric Comments</b>";
$main="<p align=".align().">\n";
$lyric=mysql_fetch_array(mysql_query("SELECT * FROM lyrics WHERE id='".$id."'"));
if($page==""||$page<=0)$page=1;
$noi=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lyric_comments WHERE lyricid='".$id."'"));
$num_items=$noi[0];
$items_per_page=10;
$num_pages=ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page=$num_pages;
$limit_start=($page-1)*$items_per_page;
$sql="SELECT * FROM lyric_comments WHERE lyricid='".$id."' ORDER BY date DESC LIMIT $limit_start, $items_per_page";
$query=mysql_query($sql);
if(mysql_num_rows($query)>0){
while($row_comments=mysql_fetch_array($query)){
$main.="<b>Date:</b> ".date("l jS F",$row_comments["date"])."<br/>
<b>Nickname:</b> ".getnick_uid($row_comments[uid])."<br/>
<b>Comment:</b> ".getbbcode($row_comments["comment"],$sid,1)."<br/>\n";
if($lyric[uid]==getuid_sid($sid)){
$main.="<a href=\"./lyrics.php?comments=delete&id=$row_comments[id]&sid=$sid\">[Delete]</a>\n";
}
if(mysql_num_rows($query)>1)$main.="<br/>\n";
}
$main.="<br/>\n";
if($page>1){
$main.="<br/><a href=\"./lyrics.php?id=$id&who=$who&page=".($page-1)."&sid=$sid\"><-Prev</a> ";
}
if($page<$num_pages){
if($page==1)$main.="<br/>";
$main.="<a href=\"./lyrics.php?id=$id&who=$who&page=".($page+1)."&sid=$sid\">Next-></a>";
}
$main.="<br/>Page - $page/$num_pages";
//if($num_pages>2){$main.=getjumper("guestbook","who","$who",$sid);}
}else{
$main.="Lyric Has No Comments\n";
}
$main.="</p>
<p align=".align().">
$fivekey<a $key5 href=\"./wapsite.php?who=$who&sid=$sid\">Back</a>
</p>\n";
$chat_on=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM chatonline"));
$main.="<center>| <a href=\"../buds/buds.php?sid=$sid\">Buddy (".online_buds(getuid_sid($sid)).")</a> | <a href=\"./chat/public.php?sid=$sid\">Chat ($chat_on[0])</a> | <br/> <a $key9 href=\"../forums/forums.php?sid=$sid\">Forums</a> | <a href=\"../main.php?sid=$sid\">Main Menu</a> </center>\n";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,0,0,0,$main);
echo foot_tag();
exit;
}
else if($comments=="add")
{
echo head_tag(getnick_sid($sid)."@Adding Lyrics Comment",1,getnick_uid($who));
addonline(getuid_sid($sid),"Add Lyrics Comment","profile.php?who=$who");
$title="<b>Add Lyrics Comment</b>";
$main="<div class=".align().">
<form action=\"./lyrics.php?comments=save&who=$who&id=$id&sid=$sid\" method=\"post\">
<b>Comment:</b><br/>
<input type=\"text\" name=\"comment\" value=\"\" maxlength=\"255\"/><br/>
<input type=\"submit\" value=\"Save\"/>
</form>
</div>
<p align=".align().">
$fivekey<a $key5 href=\"./lyrics.php?&sid=$sid\">Back</a>
</p>\n";
$chat_on=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM chatonline"));
$main.="<center>| <a href=\"../buds/buds.php?sid=$sid\">Buddy (".online_buds(getuid_sid($sid)).")</a> | <a href=\"./chat/public.php?sid=$sid\">Chat ($chat_on[0])</a> | <br/> <a $key9 href=\"../forums/forums.php?sid=$sid\">Forums</a> | <a href=\"../main.php?sid=$sid\">Main Menu</a> </center>\n";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,0,0,0,$main);
echo foot_tag();
exit;
}
else if($comments=="save")
{
echo head_tag(getnick_sid($sid)."@Saving Lyric Comment",1,getnick_uid($who));
addonline(getuid_sid($sid),"Saving Lyric Comment","");
$title="<b>Saving Lyric Comment</b>";
$main="<p align=".align().">\n";
$lyric=mysql_fetch_array(mysql_query("SELECT * FROM lyrics WHERE id='".$id."'"));
$res=mysql_query("INSERT INTO lyric_comments SET uid='".getuid_sid($sid)."', lyricid='".$id."', comment='".$comment."', date='".time()."'");
if($res){
$main.="<img src=\"../images/ok.gif\" alt=\"[o]\"/>Lyric Comment Successfully Saved<br/>\n";
}else{
$main.="<img src=\"../images/error.gif\" alt=\"[x]\"/>Error Saving Lyric Comment<br/>\n";
}
$main.="$fivekey<a $key5 href=\"./wapsite.php?who=$who&sid=$sid\">Back</a>
</p>\n";
$chat_on=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM chatonline"));
$main.="<center>| <a href=\"../buds/buds.php?sid=$sid\">Buddy (".online_buds(getuid_sid($sid)).")</a> | <a href=\"./chat/public.php?sid=$sid\">Chat ($chat_on[0])</a> | <br/> <a $key9 href=\"../forums/forums.php?sid=$sid\">Forums</a> | <a href=\"../main.php?sid=$sid\">Main Menu</a> </center>\n";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,0,0,0,$main);
echo foot_tag();
exit;
}
else if($comments==delete)
{
echo head_tag(getnick_sid($sid)."@Deleting Lyric Comment",1,getnick_sid($sid));
addonline(getuid_sid($sid),"Deleting Lyric Comment","");
$title="<b>Deleting Lyric Comment</b>";
$main="<p align=".align().">\n";
$comment_exist=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lyric_comments WHERE id='".$id."'"));
$lyric_comment=mysql_fetch_array(mysql_query("SELECT * FROM lyric_comments WHERE id='".$id."'"));
$lyric=mysql_fetch_array(mysql_query("SELECT * FROM blogs WHERE id='".$lyric_comment[lyricid]."'"));
if($lyric[uid]==getuid_sid($sid)){
if($comment_exist[0]==1){
$res=mysql_query("DELETE FROM lyric_comments WHERE id='".$id."'");
if($res){
$main.="<img src=\"../images/ok.gif\" alt=\"[o]\"/>Lyric Comment Successfully Deleted<br/>\n";
}else{
$main.="<img src=\"../images/error.gif\" alt=\"[x]\"/>Error Deleting Lyric Comment<br/>\n";
}
}else{
$main.="<img src=\"../images/error.gif\" alt=\"[x]\"/>Lyric Comment Does Not Exist<br/>\n";
}
}else{
$main.="<img src=\"../images/error.gif\" alt=\"[x]\"/>This Lyric Comment Is Not Yours<br/>\n";
}
$main.="$fivekey<a $key5 href=\"./update.php?blogs=1&sid=$sid\">Back</a>
</p>\n";
$chat_on=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM chatonline"));
$main.="<center>| <a href=\"../buds/buds.php?sid=$sid\">Buddy (".online_buds(getuid_sid($sid)).")</a> | <a href=\"./chat/public.php?sid=$sid\">Chat ($chat_on[0])</a> | <br/> <a $key9 href=\"../forums/forums.php?sid=$sid\">Forums</a> | <a href=\"../main.php?sid=$sid\">Main Menu</a> </center>\n";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,0,0,0,$main);
echo foot_tag();
exit;
}
echo head_tag(getnick_sid($sid)."@View Lyrics",1,getnick_uid($who));
addonline(getuid_sid($sid),"View Lyrics","profile.php?who=$who");
$title="<b>View Lyrics</b>";
$main="<p align=".align().">\n";
if($page==""||$page<=0)$page=1;
$noi=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lyrics WHERE id='".$id."'"));
$num_items=$noi[0];
$items_per_page=5;
$num_pages=ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page=$num_pages;
$limit_start=($page-1)*$items_per_page;
$sql="SELECT * FROM lyrics ORDER BY date DESC LIMIT $limit_start, $items_per_page";
$query=mysql_query($sql);
if(mysql_num_rows($query)>0){
while($row_lyrics=mysql_fetch_array($query)){
$main.="
Title : ".getbbcode($row_lyrics["song"],$sid,1)."
<br/>
By : ".getbbcode($row_lyrics["singer"],$sid,1)."<br/>
".getbbcode($row_lyrics["subject"],$sid,1)." ".date("l jS F",$row_lyrics["date"])."<br/><a href=\"./lyrics.php?read=1&id=".$row_lyrics["id"]."&who=".getuid_sid($sid)."&sid=$sid\">[Read]</a><br/><br/>\n";
}
if($page>1){
$main.="<br/><a href=\"./lyrics.php?page=".($page-1)."&sid=$sid\"><- Prev</a> ";
}
if($page<$num_pages){
if($page==1)$main.="<br/>";
$main.="<a href=\"./lyrics.php?page=".($page+1)."&sid=$sid\">Next -></a>";
}
$main.="<br/>Page - $page/$num_pages</p>";
if($num_pages>2){$main.=getjumper("buds","","",$sid);}
}else{
$main.="No Lyrics atm</p>";
}
$main.="$fivekey<a $key5 href=\"./lyrics.php?add=1&sid=$sid\">Back</a>
<br/>\n";
$chat_on=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM chatonline"));
$main.="<center>| <a href=\"../buds/buds.php?sid=$sid\">Buddy (".online_buds(getuid_sid($sid)).")</a> | <a href=\"./chat/public.php?sid=$sid\">Chat ($chat_on[0])</a> | <br/> <a $key9 href=\"../forums/forums.php?sid=$sid\">Forums</a> | <a href=\"../main.php?sid=$sid\">Main Menu</a> </center></p>\n";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,0,0,0,$main);
echo foot_tag();
?>
Comment
-
Originally posted by JoEsaR View Postchange own nickname
user can change their nickname themself.
PHP Code:<?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)."'");
/////////////////////////EDIT USER/////////////////////////
if($edit==1)
{
addonline(getuid_sid($sid),"Editing Nickname","");
echo head_tag(getnick_sid($sid)."@Editing Nickname",1,getnick_sid($sid));
$title="<b>Editing Nickname</b>";
$main="<p align=".align().">";
$res=mysql_query("UPDATE users SET username='".$name."' WHERE id='".getuid_sid($sid)."'");
if($res){
mysql_query("INSERT INTO logs SET action='edited', details='<b>".getnick_uid(getuid_sid($sid))."</b> edited ".getnick_uid($who)."', date='".time()."'");
if($type==admintools&&$tools==0){mysql_query("DELETE FROM admintools WHERE uid='".getuid_sid($sid)."'");}
$main.="<img src=\"../images/ok.gif\" alt=\"o\"/><br/>Nickname Was Edited Successfully\n";
}else{
$main.="<img src=\"../images/error.gif\" alt=\"x\"/><br/>Error updating Nickname'\n";
}
$main.="</p>
<p align=".align().">
<a href=\"./moderate.php?edit=1&who=$who&sid=$sid\">Back</a>
</p>\n";
$chat_on=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM chatonline"));
$main.="<center>| <a href=\"../buds/buds.php?sid=$sid\">Buddy (".online_buds(getuid_sid($sid)).")</a> | <a href=\"./chat/public.php?sid=$sid\">Chat ($chat_on[0])</a> | <br/> <a $key9 href=\"../forums/forums.php?sid=$sid\">Forums</a> | <a href=\"../main.php?sid=$sid\">Main Menu</a> </center>\n";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,0,0,0,$main);
echo foot_tag();
exit;
}
addonline(getuid_sid($sid),"Editing Nickname","");
echo head_tag(getnick_sid($sid)."@Editing Nickname",1,getnick_sid($sid));
$title="<b>Editing Nickname</b>";
$name=mysql_fetch_array(mysql_query("SELECT username FROM users WHERE id='".getuid_sid($sid)."'"));
$main="<div class=".align()."><br/>
<form action=\"./chnick.php?edit=1&sid=$sid\" method=\"post\">
Username:<br/>
<input name=\"name\" maxlength=\"100\" value=\"$name[0]\"/><br/>
<input type=\"submit\" value=\"Update\"/>
</form>
</div>\n";
$main.="<p align=".align().">
<a href=\"./chnick.php?edit=1&who=$who&sid=$sid\">Back</a>
</p>\n";
$chat_on=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM chatonline"));
$main.="<center>| <a href=\"../buds/buds.php?sid=$sid\">Buddy (".online_buds(getuid_sid($sid)).")</a> | <a href=\"./chat/public.php?sid=$sid\">Chat ($chat_on[0])</a> | <br/> <a $key9 href=\"../forums/forums.php?sid=$sid\">Forums</a> | <a href=\"../main.php?sid=$sid\">Main Menu</a> </center>\n";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,0,0,0,$main);
echo foot_tag();
?>
Comment
-
Originally posted by JoEsaR View Postchange own nickname
user can change their nickname themself.
PHP Code:<?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)."'");
/////////////////////////EDIT USER/////////////////////////
if($edit==1)
{
addonline(getuid_sid($sid),"Editing Nickname","");
echo head_tag(getnick_sid($sid)."@Editing Nickname",1,getnick_sid($sid));
$title="<b>Editing Nickname</b>";
$main="<p align=".align().">";
$res=mysql_query("UPDATE users SET username='".$name."' WHERE id='".getuid_sid($sid)."'");
if($res){
mysql_query("INSERT INTO logs SET action='edited', details='<b>".getnick_uid(getuid_sid($sid))."</b> edited ".getnick_uid($who)."', date='".time()."'");
if($type==admintools&&$tools==0){mysql_query("DELETE FROM admintools WHERE uid='".getuid_sid($sid)."'");}
$main.="<img src=\"../images/ok.gif\" alt=\"o\"/><br/>Nickname Was Edited Successfully\n";
}else{
$main.="<img src=\"../images/error.gif\" alt=\"x\"/><br/>Error updating Nickname'\n";
}
$main.="</p>
<p align=".align().">
<a href=\"./moderate.php?edit=1&who=$who&sid=$sid\">Back</a>
</p>\n";
$chat_on=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM chatonline"));
$main.="<center>| <a href=\"../buds/buds.php?sid=$sid\">Buddy (".online_buds(getuid_sid($sid)).")</a> | <a href=\"./chat/public.php?sid=$sid\">Chat ($chat_on[0])</a> | <br/> <a $key9 href=\"../forums/forums.php?sid=$sid\">Forums</a> | <a href=\"../main.php?sid=$sid\">Main Menu</a> </center>\n";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,0,0,0,$main);
echo foot_tag();
exit;
}
addonline(getuid_sid($sid),"Editing Nickname","");
echo head_tag(getnick_sid($sid)."@Editing Nickname",1,getnick_sid($sid));
$title="<b>Editing Nickname</b>";
$name=mysql_fetch_array(mysql_query("SELECT username FROM users WHERE id='".getuid_sid($sid)."'"));
$main="<div class=".align()."><br/>
<form action=\"./chnick.php?edit=1&sid=$sid\" method=\"post\">
Username:<br/>
<input name=\"name\" maxlength=\"100\" value=\"$name[0]\"/><br/>
<input type=\"submit\" value=\"Update\"/>
</form>
</div>\n";
$main.="<p align=".align().">
<a href=\"./chnick.php?edit=1&who=$who&sid=$sid\">Back</a>
</p>\n";
$chat_on=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM chatonline"));
$main.="<center>| <a href=\"../buds/buds.php?sid=$sid\">Buddy (".online_buds(getuid_sid($sid)).")</a> | <a href=\"./chat/public.php?sid=$sid\">Chat ($chat_on[0])</a> | <br/> <a $key9 href=\"../forums/forums.php?sid=$sid\">Forums</a> | <a href=\"../main.php?sid=$sid\">Main Menu</a> </center>\n";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,0,0,0,$main);
echo foot_tag();
?>
Comment
-
here is my online.php for wapdesire v_2 script it shows where members are and also there avatar pic as well enjoy
Code:<?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)."'"); /////////////////////////ONLINE LIST///////////////////////// addonline(getuid_sid($sid),"Online List","online.php"); echo head_tag(getnick_sid($sid)."@Online List",1,getnick_sid($sid)); $title="<b>".getnumonline($sid)." Online Members </b><br/> Male are <span style=\"color:#0000FF\">blue</span> <br/>Female are <span style=\"color:#FF0066\">pink</span><br/><img src=\"./images/point.gif\" alt=\"!\"/>NO SPAMMING THIS IS A SMALL SITE<img src=\"./images/point.gif\" alt=\"!\"/><br/>"; if($count_popup[0]>0){ $rname=mysql_fetch_array(mysql_query("SELECT name FROM chatrooms WHERE id='".$rid."'")); $popsenabled=mysql_fetch_array(mysql_query("SELECT popups FROM users WHERE id='".getuid_sid($sid)."'")); $pminfo=mysql_fetch_array(mysql_query("SELECT id, text, byid, timesent, toid, reported FROM popups WHERE unread='1' AND toid='".getuid_sid($sid)."'")); mysql_query("UPDATE popups SET unread='0' WHERE id='".$pminfo[0]."'"); if(isspam($pminfo[1])){mysql_query("UPDATE popups SET reported='1' WHERE id='".$pminfo[0]."'");} $sex=mysql_fetch_array(mysql_query("SELECT sex, image FROM profiles WHERE uid='".$pminfo[2]."'")); if($sex[0]=="M"){$usersex="<img src=\"../images/male.gif\" alt=\"(M)\"/>";$color="#0000FF";} if($sex[0]=="F"){$usersex="<img src=\"../images/female.gif\" alt=\"(F)\"/>";$color="#FF0066";} if($sex[1]!=""){$usersex=getbbcode($sex[1],$sid,1);} $main="<div class=".align()."> <b>Popup Message<br/> From $usersex<span style=\"color:$color;\">".getnick_uid($pminfo[2])."</span></b><br/> <small>(".date("H:i-D jS M y",$pminfo[3]).")</small><br/>\n"; $main.=getbbcode($pminfo[1],$sid,1)." <form action=\"../popups.php?send=1&who=$pminfo[2]&sid=$sid\" method=\"post\"> <b>Reply</b><br/> <input name=\"message\" maxlength=\"500\"/><br/> <input type=\"submit\" value=\"Send\"/> </form> </div>\n"; $location=mysql_fetch_array(mysql_query("SELECT link FROM online WHERE uid='".getuid_sid($sid)."'")); $main.="<p align=".align()."> <a href=\"../$location[0]?sid=$sid\">Skip Msg</a><br/><br/>\n"; //$main.="<a href=\"inbxproc.php?action=rptpop&sid=$sid&pmid=$pminfo[0]\">Report</a><br/>"; if($rid!=""){$main.="<a href=\"../chat/chat.php?sid=$sid&rid=$rid$pass\">Back To $rname[0]</a><br/>\n";} }else{ $main="<p align=".align().">\n"; } if($page==""||$page<=0)$page=1; $num_items=getnumonline($sid); $items_per_page=5; $num_pages=ceil($num_items/$items_per_page); if($page>$num_pages)$page=$num_pages; $limit_start=($page-1)*$items_per_page; if(!ghosts(getuid_sid($sid))){$hidden="a.hidden='0'";} else{$hidden="a.hidden<'2'";} $sql=" SELECT a.username, a.level, b.place, b.uid, a.hidden FROM users a INNER JOIN online b ON a.id = b.uid WHERE $hidden OR (a.id='".getuid_sid($sid)."' AND hidden='1') GROUP BY 1,2 LIMIT $limit_start, $items_per_page "; $items=mysql_query($sql); $main.=mysql_error(); while($item=mysql_fetch_array($items)) { if($item[1]=='0'){$lvl="<img src=\"../images/member.gif\" alt=\"\"/>";} else if($item[1]=='1'){$lvl="<img src=\"../images/mod.gif\" alt=\"\"/>";} else if($item[1]=='2'){$lvl="<img src=\"../images/admin.gif\" alt=\"\"/>";} else if($item[1]=='3'){$lvl="<img src=\"../images/head.gif\" alt=\"\"/>";} else if($item[1]=='4'){$lvl="<img src=\"../images/coowner.gif\" alt=\"\"/>";} else if($item[1]=='5'){$lvl="<img src=\"../images/owner.gif\" alt=\"\"/><br/>";} else if($item[1]=='6'){$lvl="<img src=\"../images/host.gif\" alt=\"\"/><br/>";} else if($item[1]=='7'){$lvl="<img src=\"../images/tech.gif\" alt=\"\"/><br/>";} else{$lvl="<img src=\"../images/member.gif\" alt=\"\"/><br/>";} $sex=mysql_fetch_array(mysql_query("SELECT sex, image, site_mood, mood, picture FROM profiles WHERE uid='".$item[3]."'")); $place=mysql_fetch_array(mysql_query("SELECT place, link FROM online WHERE `uid`='".$item[3]."'")); if($sex[0]=="M"){$usersex="";$color=" style=\"color:#0000FF\"";} if($sex[0]=="F"){$usersex="";$color=" style=\"color:#FF0066\"";} if($sex[1]!=""){$usersex=getbbcode($sex[1],$sid,1);} if($item[4]==1){$hide="<img src=\"../images/hidden.gif\" alt=\"[H]\"/>";}else{$hide="";} if($sex[2]==1&&$sex[3]!=""){$item[2]=getbbcode($sex[3],$sid,1);} if ($sex[4]=="") { //$place=mysql_fetch_array(mysql_query("SELECT place, link FROM online WHERE uid='".$item[3]."'")); $info=mysql_fetch_array(mysql_query("SELECT place FROM `online` WHERE `uid` ='".$item[3]."'")); $place=$info[0]; $main.=$usersex.$lvl."<a href=\"../profile.php?who=$item[3]&sid=$sid\"$color>".$item[0]."</a>".$hide." - ".$item[2]."<br/><small>".$place."</small><br/>\n"; //$main.="<small>".$place."</small><br/>"; } else { $info=mysql_fetch_array(mysql_query("SELECT place FROM `online` WHERE `uid` ='".$item[3]."'")); $place=$info[0]; $main.=$usersex.$lvl."<a href=\"../profile.php?who=$item[3]&sid=$sid\"$color>".$item[0]."</a>".$hide." - ".$item[2]."<br/><img src=\"$sex[4]\" width=\"40\" height=\"40\"><br/><small>".$place."</small><br/>\n"; //$main.="<small>".$place."</small><br/>"; } } if($page>1){ $main.="<br/><a href=\"./online.php?page=".($page-1)."&sid=$sid\"><-Prev</a> "; } if($page<$num_pages){ if($page==1)$main.="<br/>"; $main.="<a href=\"./online.php?page=".($page+1)."&sid=$sid\">Next-></a>\n"; } $main.="<br/>Page - $page/$num_pages</p>\n"; if($num_pages>2){$main.=getjumper("online","","",$sid);} $L1="$sixkey<a $key6 title=\"Inbox\" href=\"../inbox/inbox.php?sid=$sid\">Inbox</a><br/><img src=\"../images/point.gif\" alt=\"!\"/>NO SPAMMING THIS IS A SMALL SITE<img src=\"../images/point.gif\" alt=\"!\"/><br/>"; $L2="$sevenkey<a $key7 title=\"BuddyList\" href=\"../buds/buds.php?sid=$sid\">BuddyList</a>"; $L3="$eightkey<a $key8 title=\"Chat\" href=\"../chat/public.php?sid=$sid\">Chat</a>"; $L4="$ninekey<a $key9 title=\"Forums\" href=\"../forums/forums.php?sid=$sid\">Forums</a>"; $L5="$zerokey<a $key0 title=\"Main Menu\" href=\"../main.php?sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a>"; echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,0,0,0,$main); echo foot_tag(); ?>
Comment
Comment