Initial commit

Esse commit está contido em:
ajaximrpg
2013-12-11 12:26:49 -08:00
commit b2bc222a31
283 arquivos alterados com 14256 adições e 3 exclusões
+16
Ver Arquivo
@@ -0,0 +1,16 @@
///////////////////////////////////
// ajax im 3.4 //
// AJAX Instant Messenger //
// Copyright (c) 2006-2008 //
// http://www.ajaxim.com/ //
// Do not remove this notice //
///////////////////////////////////
The is_online.php script allows you to display a users status as an image. It is very simple to use.
To use:
1. Upload the is_online.php script and accompanying images folder to your server.
2. To display a user's status, insert this line anywhere:
<img src="[pathtoscript]/is_online.php?user=[username]" />
Replace [pathtoscript] with the path to the script and [username] with the username you want to display the status of.
Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 829 B

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 149 B

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 149 B

+41
Ver Arquivo
@@ -0,0 +1,41 @@
<?php
///////////////////////////////////
// ajax im 3.4 //
// AJAX Instant Messenger //
// Copyright (c) 2006-2008 //
// http://www.ajaxim.com/ //
// Do not remove this notice //
///////////////////////////////////
require('../config.php');
// checks if a user is online or not //
function is_online($username) {
$query = @mysql_query("SELECT is_online FROM ".SQL_PREFIX."users WHERE username='".mysql_real_escape_string($username)."'");
$result = @mysql_fetch_assoc($query);
return $result['is_online'];
}
// connect to database //
$link = mysql_connect($sql_host, $sql_user, $sql_pass);
mysql_select_db($sql_db);
header("Content-type: image/gif");
$isonline = is_online($_GET['user']);
switch($isonline) {
case 1:
readfile('images/online.gif');
break;
case 2:
readfile('images/away.gif');
break;
case 0:
case 50:
case 100:
readfile('images/offline.gif');
break;
}
mysql_close($link);
?>