cometchat 4.4 tested OKKKKK

by adel222 - 13-10-2015, 10:13 AM
Lurker
Posts:
2
Joined:
Oct 2015
Likes:
0
Credits:
3
Reputation:
0
2 Years of Service
#1
OP
Posted: 13-10-2015, 10:13 AM (This post was last modified: 13-10-2015, 10:15 AM by adel222.)
cometchat 4.4 tested OKKKKK



http://www.filedropper.com/cometchat440nulledsohail564



PHP Code:
<?php

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

/* ADVANCED */

define('SET_SESSION_NAME','');            // Session name
define('DO_NOT_START_SESSION','0');        // Set to 1 if you have already started the session
define('DO_NOT_DESTROY_SESSION','0');    // Set to 1 if you do not want to destroy session on logout
define('SWITCH_ENABLED','0');        
define('INCLUDE_JQUERY','1');    
define('FORCE_MAGIC_QUOTES','0');

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

/* DATABASE */

include_once(dirname(dirname(__FILE__))).DIRECTORY_SEPARATOR.'inc'.DIRECTORY_SEPARATOR.'config.php';

define('DB_SERVER',                    $config['database']['hostname']            );
define('DB_PORT',                    "3306"                                    );
define('DB_USERNAME',                $config['database']['username']            );
define('DB_PASSWORD',                $config['database']['password']            );
define('DB_NAME',                    $config['database']['database']            );
define('TABLE_PREFIX',                $config['database']['table_prefix']        );
define('DB_USERTABLE',                "users"                                    );
define('DB_USERTABLE_USERID',        "uid"                                    );
define('DB_USERTABLE_NAME',            "username"                                );
define('DB_AVATARTABLE',            " "                                     );
define('DB_AVATARFIELD',            " ".TABLE_PREFIX.DB_USERTABLE.".avatar" );
define('DB_USERTABLE_LASTACTIVITY',    "lastactive"                            );

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

/* FUNCTIONS */

function getUserID() {
    
$userid 0;

    if (!empty(
$_SESSION['basedata']) && $_SESSION['basedata'] != 'null') {
        
$_REQUEST['basedata'] = $_SESSION['basedata'];
    }

    if (!empty(
$_REQUEST['basedata'])) {
        
$userid $_REQUEST['basedata'];
    }

    if (!empty(
$_COOKIE['mybbuser'])) {    
        
$udata explode('_',$_COOKIE['mybbuser']);
        
$userid $udata[0];
    }

    return 
$userid;
}

function 
chatLogin($userName,$userPass){
    
$userid 0;
    if (
filter_var($userNameFILTER_VALIDATE_EMAIL)) {
        
$sql ="SELECT * FROM ".TABLE_PREFIX.DB_USERTABLE." WHERE email ='".$userName."'"
    } else {
        
$sql ="SELECT * FROM ".TABLE_PREFIX.DB_USERTABLE." WHERE username ='".$userName."'"
    }
    
$result=mysql_query($sql);
    
$row mysql_fetch_array($result); 
    if(
$row['password']== md5(md5($row['salt']).md5($userPass))){
        
$userid $row['uid'];        
    }    
    return 
$userid;            
}


function 
getFriendsList($userid,$time) {

    
$query mysql_query("select buddylist from ".TABLE_PREFIX.DB_USERTABLE." where uid = '".mysql_real_escape_string($userid)."'");
    
$result mysql_fetch_array($query);

    
$sql = ("select DISTINCT ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." userid, ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_NAME." username, ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_LASTACTIVITY." lastactivity," .DB_AVATARFIELD" avatar, ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." link, cometchat_status.message, cometchat_status.status from ".TABLE_PREFIX.DB_USERTABLE." left join cometchat_status on ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." = cometchat_status.userid ".DB_AVATARTABLE." where ".TABLE_PREFIX.DB_USERTABLE.'.'.DB_USERTABLE_USERID." IN (".$result[0].") order by username asc");

    if (
defined('DISPLAY_ALL_USERS') && DISPLAY_ALL_USERS == 1) {
         
$sql = ("select DISTINCT ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." userid, ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_NAME." username, ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_LASTACTIVITY." lastactivity, " .DB_AVATARFIELD" avatar, ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." link, cometchat_status.message, cometchat_status.status from ".TABLE_PREFIX.DB_USERTABLE." left join cometchat_status on ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." = cometchat_status.userid ".DB_AVATARTABLE." where ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." <> '".mysql_real_escape_string($userid)."' and ('".mysql_real_escape_string($time)."'-".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_LASTACTIVITY." < '".((ONLINE_TIMEOUT)*2)."') and (cometchat_status.status IS NULL OR cometchat_status.status <> 'invisible' OR cometchat_status.status <> 'offline') order by username asc");
    }

    return 
$sql;

}

function 
getUserDetails($userid) {
    
$sql = ("select ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." userid, ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_NAME." username, ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_LASTACTIVITY." lastactivity,  ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." link,  " .DB_AVATARFIELD" avatar, cometchat_status.message, cometchat_status.status from ".TABLE_PREFIX.DB_USERTABLE." left join cometchat_status on ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." = cometchat_status.userid ".DB_AVATARTABLE." where ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." = '".mysql_real_escape_string($userid)."'");
    return 
$sql;
}

function 
updateLastActivity($userid) {
    
$sql = ("update `".TABLE_PREFIX.DB_USERTABLE."` set ".DB_USERTABLE_LASTACTIVITY." = '".getTimeStamp()."' where ".DB_USERTABLE_USERID." = '".mysql_real_escape_string($userid)."'");
    return 
$sql;
}

function 
getUserStatus($userid) {
     
$sql = ("select cometchat_status.message, cometchat_status.status from cometchat_status where userid = '".mysql_real_escape_string($userid)."'");
     return 
$sql;
}

function 
getLink($link) {
 
   return BASE_URL.'../member.php?action=profile&uid='.$link;
}


function 
getAvatar($image) {

    if(!empty(
$image)) {
        return 
BASE_URL.'.'.$image;
    } else {
        return 
BASE_URL.'../images/default_avatar.gif';
    }
}

function 
getTimeStamp() {
    return 
time();
}

function 
processTime($time) {
    return 
$time;
}

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

/* HOOKS */

function hooks_statusupdate($userid,$statusmessage) {
    
}

function 
hooks_forcefriends() {
    
}

function 
hooks_activityupdate($userid,$status) {

}

function 
hooks_message($userid,$unsanitizedmessage) {
    
}

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

/* Nulled by TrioxX */

$p_ 4;

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 

integration.php is hirrrrrrrr
http://www.filedropper.com/integration
Novice
Posts:
25
Joined:
Oct 2015
Likes:
0
Credits:
13
Reputation:
0
2 Years of Service
#2
Posted: 09-11-2015, 03:06 PM
hi man

pls re-up or re post link

becasuse id dead


many thanks
Novice
Posts:
23
Joined:
Apr 2015
Likes:
0
Credits:
25
Reputation:
0
2 Years of Service
#3
Posted: 11-01-2016, 11:59 PM
Bad plugin, only it slows and has various bugs
Supreme
Posts:
469
Joined:
Jan 2016
Likes:
12
Credits:
146
Reputation:
31
2 Years of Service
#4
Posted: 15-01-2016, 04:49 AM
How do i install it, very unclear.
Novice
Posts:
30
Joined:
Jan 2016
Likes:
1
Credits:
21
Reputation:
0
2 Years of Service
#5
Posted: 17-01-2016, 01:33 AM
you should do a tutorial to us
The last reply on this thread is older than a month. Please do not unnecessarily bump it.
Register an account or login to reply
Create an account
Create a free account today and start posting right away. It only takes a few seconds.
Login
Log into an existing account.
1 Guest(s)