Posted on: 17/12/03 09:03pm
By: paulmon
CREATE TABLE `gl_notifyblock` ( `recp_uid` mediumint(4) NOT NULL default '0', `send_name` varchar(35) NOT NULL default '', `time` datetime NOT NULL default '0000-00-00 00:00:00' ) TYPE=MyISAM;
function phpblock_whosimproved() { global $_TABLES,$_USER,$HTTP_COOKIE_VARS,$HTTP_POST_VARS,$PHP_SELF,$REMOTE_ADDR,$LANG01,$_CONF; $expire_time = time() - $_CONF['whosonline_threshold']; $result = DB_query( "SELECT DISTINCT {$_TABLES['sessions']}.uid, username,photo,showonline FROM {$_TABLES['sessions']},{$_TABLES['users']},{$_TABLES['userprefs']} WHERE {$_TABLES['users']}.uid = {$_TABLES['sessions']}.uid AND {$_TABLES['users']}.uid = {$_TABLES['userprefs']}.uid AND start_time >= $expire_time AND {$_TABLES['sessions']}.uid <> 1 ORDER BY username" ); $nrows = DB_numRows( $result ); $num_anon = 0; for( $i = 1; $i <= $nrows; $i++ ) { $A = DB_fetchArray( $result ); $retval .= "<form action='$PHP_SELF' method='post'>"; if( $A['showonline'] == 1 ) { $retval .= '<a href="' . $_CONF['site_url'] . '/users.php?mode=profile&uid=' . $A['uid'] . '">' . $A['username'] . '</a>' . '<INPUT type="radio" name="notify" value="' . $A['uid'] . '" >'; if( !empty( $A['photo'] ) AND $_CONF['allow_user_photo'] == 1) { $retval .= ' <a href="' . $_CONF['site_url'] . '/users.php?mode=profile&uid=' . $A['uid'] . '"><img src="' . $_CONF['layout_url'] . '/images/smallcamera.gif" border="0" alt=""></a>'; } $retval .= '<br>'; } else { // this user does not want to show up in Who's Online $num_anon++; // count as anonymous } } $result = DB_query( "SELECT DISTINCT uid,remote_ip FROM {$_TABLES['sessions']} WHERE uid = 1" ); $num_anon += DB_numRows( $result ); if( $num_anon > 0 ) { $retval .= $LANG01[41] . ': ' . $num_anon . '<br>'; } $retval .= '<input type="hidden" name="send_name" value="' . $_USER[username] . '"><input type="submit" value="Chat Notify"></form>'; $notify_uid=COM_checkWords($HTTP_POST_VARS["notify"]); $send_name=COM_checkWords($HTTP_POST_VARS["send_name"]); if ( $notify_uid != 0 ) { $retval .= 'A chat request has been sent'; $result = DB_query("INSERT INTO gl_notifyblock (recp_uid,send_name,time)"."VALUES ("$notify_uid", "$send_name",now() )"); } $getnotifies = DB_query("SELECT * from gl_notifyblock WHERE recp_uid = $_USER[uid] AND NOW() - time < 300"); $cleantable = DB_query("DELETE FROM gl_notifyblock WHERE NOW() - time > 300"); $notifies = DB_fetchArray($getnotifies); $userquery = mysql_query( "SELECT * FROM chat_users WHERE name = '$_USER[username]'" ); $inchat = DB_fetchArray($userquery); $recpuid = $notifies[recp_uid]; if ($inchat[name] != $_USER[username]) { if ($recpuid == $_USER[uid]) { $retval .= '<TABLE BORDER=2><TR><TD align=center><font size=5 color=#FF0000>CHAT REQUEST FROM<br>' . $notifies[send_name] . '</FONT><br><a href="" onclick="window.open('/FlashChat/index.php',1,'directories=no,menubar=no,top=0,left=0,width=550,height=560');">Join Chat</a></TD></TR></TABLE>'; } } return $retval; }
Posted on: 18/12/03 11:24am
By: destr0yr
Parse error: parse error in /homepages/12/d88571136/htdocs/okg/system/lib-custom.php on line 534 Warning: Cannot add header information - headers already sent by (output started at /homepages/12/d88571136/htdocs/okg/system/lib-custom.php:534) in /homepages/12/d88571136/htdocs/okg/system/lib-sessions.php on line 180 Warning: Cannot add header information - headers already sent by (output started at /homepages/12/d88571136/htdocs/okg/system/lib-custom.php:534) in /homepages/12/d88571136/htdocs/okg/system/lib-sessions.php on line 192
Posted on: 04/01/04 01:10pm
By: paulmon
Parse error: parse error in /homepages/12/d88571136/htdocs/okg/system/lib-custom.php on line 534 Warning: Cannot add header information - headers already sent by (output started at /homepages/12/d88571136/htdocs/okg/system/lib-custom.php:534) in /homepages/12/d88571136/htdocs/okg/system/lib-sessions.php on line 180 Warning: Cannot add header information - headers already sent by (output started at /homepages/12/d88571136/htdocs/okg/system/lib-custom.php:534) in /homepages/12/d88571136/htdocs/okg/system/lib-sessions.php on line 192
Posted on: 21/01/04 05:47pm
By: jnordquist
Posted on: 17/03/04 10:31am
By: JoeyE
Posted on: 17/03/04 02:15pm
By: paulmon
Posted on: 17/03/04 02:23pm
By: PSF
Posted on: 17/03/04 02:33pm
By: paulmon
Posted on: 17/03/04 03:24pm
By: PSF
Posted on: 17/03/04 07:02pm
By: paulmon
function phpblock_whochat() { global $_CONF,$_USER; $query = mysql_query( "SELECT COUNT(id) FROM gl_connections WHERE gl_connections.userid > 1" ); $numchat = DB_fetchArray($query); $numinchat = $numchat[0]; $userquery = mysql_query( "SELECT username FROM gl_users, gl_connections WHERE gl_users.uid = gl_connections.userid"); //$userquery = mysql_query( "SELECT name FROM chat_users WHERE NOW() - datetime < 12"); if ($numinchat > 0) { while ($usersinchat = DB_fetchArray($userquery)) { $retval = $retval . $usersinchat[username] . '<br>'; } } else { $retval .= 'Currently no users in chat'; } $retval .= "<br><a href=\"\"onclick=\"window.open('/FlashChat/index.php',1,'directories=no,menubar=no,top=0,left=0,width=600,height=490')\"><center>Join Chat</center></a>"; return $retval; }
$menurul = " \" onclick=\"window.open('/FlashChat/index.php',1,'directories=no,menubar=no,top=0,left=0,width=600,height=490')";
Geeklog - Forum
https://www.geeklog.net/forum/viewtopic.php?showtopic=28055