Example #1
0
<?php

set_time_limit(0);
include_once "include_db.php";
include_once "include_functions.php";
if (!$_SESSION["uname"]) {
    header('Location: logout.php');
    exit;
}
$CURRENT_USER = $_SESSION["uname"];
// check whether this user has access to this room
$GMU = new ManageUsers();
$GMU->userId = $_SESSION['empl_id'];
$rid = get_POST_var('rid');
if (!$GMU->has_AccessToRoom($rid)) {
    echo "You are not authorised to access this page.";
    exit;
}
// get file size and generate a random code
$MF = new ManageFiles();
$UFID = $MF->createUnique_FID(16);
$size = $_FILES['myfile']['size'];
$file_name = str_replace(' ', '_', $_FILES['myfile']['name']);
$file_type = $_FILES['myfile']['type'];
$errors = $_FILES['myfile']['error'];
//move the uploaded file to UPLOAD_PATH and insert into database
$result = 0;
if ($errors == UPLOAD_ERR_OK) {
    $tmp_name = $tmp_names;
    //$allowedExtensions = array("txt","csv","htm","html","xml","css","doc","xls","rtf","ppt","pdf","swf","flv","avi","wmv","mov","jpg","jpeg","gif","png");
    $type = end(explode(".", strtolower($file_name)));
Example #2
0
     $uid = $_SESSION['empl_id'];
     $DM = new DirectMessages();
     $res = $DM->Mark_As_Read($UMDMSGIDS, $_SESSION['empl_id']);
     send_Action_Response('Success', $res);
     exit;
     break;
 case 'fetchArchives':
     $date = get_POST_var('DATE');
     $roomId = get_POST_var('ROOMID');
     $MCR = new ManageChatRooms();
     $ARMSGS = $MCR->get_Archives_fromRoom($date, $roomId, $_SESSION['empl_id']);
     send_Action_Response('Success', " NEW_MESSAGES = " . json_encode($ARMSGS['NEW_MESSAGES']) . "; LASTFETCHEDMSGID = {$ARMSGS['LASTFETCHEDMSGID']} ;");
     exit;
     break;
 case 'getRoomIdsForUser':
     $MU = new ManageUsers();
     $MU->userId = get_POST_var('uid');
     $user_rooms = $MU->getUser_AllowedChatRooms_IncludeDepricatedOnes();
     send_Action_Response('Success', " USER_ROOMS = " . json_encode($user_rooms) . "; ");
     exit;
     break;
 case 'searchFiles':
     $date = get_POST_var('DATE');
     list($stDay, $stMonth, $stYear) = explode("-", $date);
     $newdate = $stYear . '-' . $stMonth . '-' . $stDay;
     $MF = new ManageFiles();
     $FILES = $MF->get_ListOfFiles_Search_with_details($_SESSION['empl_id'], $newdate);
     send_Action_Response('Success', " FILES = " . json_encode($FILES['NEW_FILES']) . "; ");
     exit;
     break;
 default:
Example #3
0
<?php

include_once "activeuserstracking.php";
$TMCR = new ManageChatRooms();
$MU = new ManageUsers();
$MU->userId = $CURRENT_USERID;
$DM_COUNT = $MU->get_newDirectMessageCount();
$DM_COUNT_STR = $DM_COUNT ? " ({$DM_COUNT})" : "";
$LOGGEDIN_ROOMS = $MU->get_LoggedInRooms();
?>
<div class="mainMenu" style='margin-top: 5px;'>
	<span style='font-size:110%;'><I><?php 
echo $CURRENT_USER;
?>
</I></span>
	<SPAN class='i' selclass='ic' goto="lobby.php" TITLE="Get into the ChatRooms from the Lobby">Lobby</SPAN>
	
	<?php 
foreach ($LOGGEDIN_ROOMS as $THIS_ROOM) {
    echo "<SPAN class='l' selclass='lc' goto='chatroom.php?rid={$THIS_ROOM}' TITLE='Goto ChatRoom'>" . $TMCR->get_roomTitle($THIS_ROOM) . "</SPAN>";
}
?>
	
	<SPAN class='j' selclass='jc' goto="bookmarks.php" TITLE="list of bookmarked messages">BookMarks</SPAN>
	<SPAN class='g' selclass='gc' goto="files.php" TITLE="Files from various Chat Rooms">Files</SPAN>
	<SPAN class='h' selclass='hc' goto="dchat.php" TITLE="Send Direct Messages to other users">Messages<?php 
echo $DM_COUNT_STR;
?>
</SPAN>
</div>
Example #4
0
<?php

include_once "include_db.php";
include_once "include_functions.php";
if (!$_SESSION["uname"]) {
    header('Location: logout.php');
    exit;
}
$CURRENT_USER = $_SESSION["uname"];
$TMP_MU = new ManageUsers();
$TMP_MU->userId = $_SESSION['empl_id'];
if (!$TMP_MU->isAdminUser()) {
    echo 'You are not authorised to access this page.';
    exit;
}
$cname = $_POST['c_name'];
$result = 1;
setAppVariable('comp_Name', $cname);
$size = $_FILES['c_logo']['size'];
$type = $_FILES['c_logo']['type'];
$errors = $_FILES['c_logo']['error'];
$file_name = $_FILES['c_logo']['name'];
$comp_Id = 1;
if (in_array($type, array('image/gif', 'image/jpeg', 'image/png', 'image/pjpeg', 'image/bmp'))) {
    if ($errors == UPLOAD_ERR_OK) {
        $tmp_name = $tmp_names;
        if ($type == "image/gif") {
            $name = $comp_Id . ".gif";
        } else {
            if ($type == "image/jpeg") {
                $name = $comp_Id . ".jpg";
Example #5
0
 public function get_ListOfFiles_Search_with_details($userId = 0, $OnDay, $room_id = 0, $uploadBy = '')
 {
     if (!$userId) {
         $userId = $_SESSION['empl_id'];
     }
     $MU = new ManageUsers();
     $MU->userId = $userId;
     $start_time_fixed = $OnDay . ' 00:00:00';
     $end_time_fixed = $OnDay . ' 23:59:59';
     $start_time_GMT = $MU->convert_from_UsersTimeZone($start_time_fixed);
     $end_time_GMT = $MU->convert_from_UsersTimeZone($end_time_fixed);
     $chatRoom_Condition = $room_id ? " and tbl_ChatRooms.chatRoom='{$room_id}' " : " and tbl_ChatRooms.chatRoom IN (select rid from tbl_RoomPrivilages where uid='{$userId}') ";
     //return executesql_returnStrictArray("select tbl_chatFiles.*, tbl_ChatRooms.* from tbl_chatFiles, tbl_ChatRooms where tbl_ChatRooms.fileId = tbl_chatFiles.fileId and (tbl_ChatRooms.msgtime between '{$start_time_GMT}' and '{$end_time_GMT}') $chatRoom_Condition ");
     $this_query = "select * from tbl_chatFiles, tbl_ChatRooms where tbl_ChatRooms.fileId = tbl_chatFiles.fileId and (tbl_ChatRooms.msgtime between '{$start_time_GMT}' and '{$end_time_GMT}') {$chatRoom_Condition} ";
     $result = mysql_query($this_query);
     while ($row = mysql_fetch_array($result)) {
         $converted_date = $MU->convert_to_UsersTimeZone($row['msgtime']);
         $NEW_FILES[] = array('fileid' => $row['fileId'], 'msgBy' => $row['saidBy_username'], 'msgTime' => $converted_date, 'filename' => $row['fileName'], 'fileRandomName' => $row['fileRandomName'], 'fileExt' => $row['fileExt'], 'filesize' => $row['fileSize']);
     }
     return array('NEW_FILES' => $NEW_FILES);
 }
Example #6
0
				callback:function(a){
					if(a){
						 My_JsLibrary.showfbmsg("Room Access Updated !", 'green', 4);
					}else{
						My_JsLibrary.showErrMsg();
					}
				}
			});
		});
	};

</script>


<?php 
$MU = new ManageUsers();
$users = $MU->getAllUserIdsInDomain();
$privilages = $MU->get_All_Privileges_in_App();
?>
<table align=center class="manageLRS" cellpadding=5 cellspacing=5 width="500" style='margin-top:30px;'>
<tbody>
<div id="member_list">
	<table class="members">
	<tbody>
	<?php 
foreach ($users as $this_userId) {
    $MU->userId = $this_userId;
    $THIS_USER_PROFILE = $MU->getUserProfile();
    $THIS_USER_PRIVILEGES = $MU->get_Privileges();
    ?>
		<tr>
Example #7
0
			};
			
			
			
			
			
	</script>

	<div style='float:left;'>
		
		
		<table cellpadding=5 cellspacing=5 width="600" style='margin-top:30px;' align='center' border=0>
			<tbody>
			<TR><TD>
			<?php 
$MU = new ManageUsers();
$MCR = new ManageChatRooms();
$MU->userId = $CURRENT_USERID;
$MY_ROOMS = $MU->getUser_AllowedChatRooms();
if (!count($MY_ROOMS)) {
    echo "You dont have access to any rooms.";
} else {
    foreach ($MY_ROOMS as $THIS_ROOM) {
        $ACTIVE_MEMBER_COUNT = count($MCR->get_ListOfActiveUsersIn_ChatRoom($THIS_ROOM));
        if ($MU->isUserCurrently_InRoom($THIS_ROOM)) {
            $OTHERS = $ACTIVE_MEMBER_COUNT - 1;
            $me_in_class = "mein";
            if ($OTHERS > 0) {
                $members_string = "You and {$OTHERS} others";
            } else {
                $members_string = "Only You";
Example #8
0
<?php

header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
// date in the past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
// always modified
header("Cache-Control: no-store, no-cache, must-revalidate");
// HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
// HTTP/1.0
$CURRENT_USER = $_SESSION["uname"];
$CURRENT_USERID = $_SESSION["empl_id"];
$CURRENT_SCRIPTNAME = getCurrentScriptFileName();
$GMU = new ManageUsers();
$GMU->userId = $CURRENT_USERID;
$AM_I_ADMIN = $GMU->isAdminUser();
$AM_I_PRIVILEGEDUSER = $GMU->isPrivilagedUser();
?>
<html lang="en-US">
<HEAD>
	<TITLE><?php 
echo APPNAME;
?>
</TITLE>
	<meta charset="UTF-8">
	<script type="text/javascript" src="js/alljs.php?t=13"></script>
	<link rel="stylesheet" href="css/allcss.php?t=6" type="text/css" charset="utf-8">
	<?php 
if (in_array($CURRENT_SCRIPTNAME, array('chatroom.php', 'bookmarks.php', 'directory.php'))) {
    ?>
Example #9
0
File: dmsg.php Project: pari/rand0m
include_once "include_functions.php";
if (!$_SESSION["uname"]) {
    header('Location: logout.php');
    exit;
}
?>
<script>
	var localajaxinit = function(){
		
		
	};	
</script>
	

<?php 
$TMP_MU = new ManageUsers();
$ALLUSERS = $TMP_MU->getAllUserIdsInDomain();
if (get_GET_var('id')) {
    $id = get_GET_var('id');
    $to_user_Id = base64_decode($id);
} else {
    echo "Invalid User.";
    exit;
}
$res = get_GET_var('re');
?>
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Direct Message</title>
<meta charset="UTF-8">
<script type="text/javascript" src="js/alljs.php?t=1"></script>
Example #10
0
<?php

include_once "include_db.php";
if ($_SESSION["uname"] || $_SESSION["empl_id"]) {
    $CURRENT_USERID = $_SESSION["empl_id"];
    include_once "include_functions.php";
    $MU = new ManageUsers();
    $MU->userId = $CURRENT_USERID;
    $MU->Logout_fromAllRooms();
    session_unset();
    session_destroy();
}
header('Location: index.php');
exit;
Example #11
0
}
$CUSTOM_STYLES = " \n\t\n\t#pwdTitleRow{\n\tfont-size: 15px;\n\tfont-weight : bold ;\n\tcolor : #718DA1;\n\t}\n\t\n\tspan.bluebuttonSmall , div.bluebuttonSmall {\n\tbackground-color: #EBE9E9;\n\tborder: 1px outset #B6C7E5;\n\tcolor: #445A80;\n\tline-height: 1.4em;\n\tpadding: 2px 4px;\n\tcursor: pointer;\n\tfont-size: 85%;\n\t}\n\t\n\ttable.members {\n\tborder-color:#EEEEEE -moz-use-text-color -moz-use-text-color;\n\tborder-right:medium none;\n\tborder-style:solid none none;\n\tborder-width:1px medium medium;\n\tfont-size:11px;\n\tmargin:0;\n\talign:center;\n\t}\n\ttable {\n\tborder-collapse:collapse;\n\t}\n\t\n\ttable.members td.avatar {\n\twidth:55px;\n\t}\n\t\n\ttable.members td {\n\tborder-bottom:1px solid #EFEFEF;\n\tcolor:#666666;\n\tfont-size:12px;\n\tpadding:8px;\n\tvertical-align:top;\n\t}\n\t\n\ttd {\n\tfont-family:'Lucida Grande',verdana,arial,helvetica,sans-serif;\n\t}\n\ttable.members td.name {\n\tcolor:#222222;\n\tfont-size:12px;\n\tfont-weight:bold;\n\twidth:100px;\n\t}\n\t\n\ttable.members td.perms {\n\tfont-size:11px;\n\tpadding-left:10px;\n\tvertical-align:middle;\n\twhite-space:normal;\n\twidth:50%;\n\t}\n\t\n\ttable.members td.name a {\n\tcolor:#666666;\n\tfont-size:11px;\n\tfont-weight:normal;\n\ttext-decoration:none;\n\t}\n\t\n\ttable.members td.name a:hover {\n\tbackground-color:#0066CC;\n\tcolor:#FFFFFF;\n\t}\n\t\n\t\n\ttable.members td.access a {\n\tcolor:#666666;\n\tfont-size:11px;\n\tfont-weight:normal;\n\ttext-decoration:underline;\n\t}\n\t\n\ttable.members td.access a:hover {\n\tbackground-color:#0066CC;\n\tcolor:#FFFFFF;\n\t}\n\t\n\ttable.members td.perms div {\n\tdisplay:inline;\n\tline-height:21px;\n\t}";
include_once "include_functions.php";
include_once "include_header.php";
include_once "include_header_links.php";
?>
<script>
	var localajaxinit = function(){
		
		
	};	
</script>
	

<?php 
$TMP_MU = new ManageUsers();
$ALLUSERS = $TMP_MU->getAllUserIdsInDomain();
$TMP_MCR = new ManageChatRooms();
$ACTIVE_USERS = $TMP_MCR->get_ListOfActiveUsersIn_Application();
?>
<table align=center class="manageLRS" cellpadding=5 cellspacing=5 width="500" style='margin-top:30px;'>
<tbody>

	<table class="members">
	<tbody>
	<?php 
foreach ($ALLUSERS as $this_uId) {
    $TMP_MU->userId = $this_uId;
    if ($this_uId == $CURRENT_USERID) {
        continue;
    }