Can Anyone Help Me Please?
Started on the old forum in February 2007 · view the original in the archive · old links redirect here
I'm using the scotspaul script, i would like to now how to get peoples moods to show up in the users online page, anyone know how to do this please?
u'd have to post the script here
CODE<?php header("Cache-Control: no-cache, must-revalidate"); include("config.inc.php"); header("Pragma: no-cache"); header("Content-type: text/vnd.wap.wml"); echo "<?xml version=\"1.0\"?>"; echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"http://www.wapforum.org/DTD/wml_1.1.xml\">"; echo "<wml>"; $Connect = mysql_connect("$server","$user","$pass"); mysql_select_db("$dbname"); $result=mysql_query("select * from members where username='$username' and password='$password'"); $number_of_rows = mysql_num_rows($result); if ($number_of_rows>0) { include("check.inc.php"); } if ($ok>0) { include("online.inc.php");
$exp = time() + 300; //300 seconds for 5 minutes $time = time();
$query = "select * from latest where ip='$username'"; $result = mysql_query($query); //send the query!
if(mysql_num_rows($result) == 1) { $query = "update latest set time='$exp' where ip='$username'"; mysql_query($query); //send the query!
}else{ $query = "insert into latest VALUES('$username','$exp')"; mysql_query($query); }
//delete IP's that have expired... $query = "delete from latest where $time > time"; // ^^ This query will look in the database for entries where the current time is greater than the expiration time that was entered into the database and delete those entries because those users are expired/not active. For example, if a a visitor visted the site at 8:00 their expiration time would be marked as 8:05. If this script is accessed at 8:10, that query will see that the current time (8:10) is greater than the expiration time of that entry (8:05) and delete it because that user has not been active (online) in the last 5 minutes.
mysql_query($query); //send the query!
$uonline = mysql_num_rows(mysql_query("select * from latest")); //this variable might seem complicated, but it's really simple. The first thing it does is sends the query "select * from latest" to the database. This finds all the entries in the database. After that, it counts the number of entries with mysql_num_rows to find out exactly how many users are online.
//print the variable on our page! echo "<card id="card1" title="$uonline Users Online">"; echo " "; $id=1; $sqlthing = mysql_query("SELECT * FROM highest WHERE id='$id'"); $highest=(mysql_result($sqlthing,0,"highest")); if ($highest < $uonline) { $highest=$uonline; $query = "update highest set highest='$highest' where id='$id'"; mysql_query($query); //send the query! } echo "Highest Online: $highest "; $count=0; $result=mysql_query("select * from latest order by ip asc"); while ($count < $uonline) { $name=(mysql_result($result,$count,"ip")); $sqlthing = mysql_query("SELECT * FROM members WHERE username='$name'"); $stars=(mysql_result($sqlthing,0,"stars")); $name2=$name; if($stars>0){ $symbol="*"; $name= $symbol. $name. $symbol; }
$result5=mysql_query("select * from buddylist where username1='$username' and username2='$name2'");
$number_of_rows2 = mysql_num_rows($result5); if($number_of_rows2>0){ $bud="[~]"; $name= $name. $bud; }
echo "<a title="Enter" href="profile.php?username=$username&password=$password&name=$name2">$name</a> "; $count=$count+1; } ?> External image (may be gone)
[~] = buddy
<?php $sqlthing = mysql_query("SELECT * FROM members WHERE username='$username'"); $pmname=(mysql_result($sqlthing,0,"pmname")); $buddyname=(mysql_result($sqlthing,0,"buddyname")); echo "<a title=\"Enter\" href=\"pm.php?username=$username&password=$password\">[$pmname Menu]</a>"; echo " "; echo "<a title=\"Enter\" href=\"forumindex.php?username=$username&password=$password\">[Forums]</a>"; echo " "; echo "<a title=\"Enter\" href=\"chatindex.php?username=$username&password=$password\">[Chat]</a>"; echo " "; echo "<a title=\"Enter\" href=\"welcome.php?username=$username&password=$password\">[Main Menu]</a>"; echo " "; } echo " "; echo "</card>"; echo "</wml>"; ?>