if (trim($emails) == '') { $errMsg .= 'Please enter valid email address(s)<br />'; } if ($errMsg == '') { $valid_email_cnt = 0; $invalid_emails = ''; $emails = str_replace(chr(13), "", $emails); //remove carriage returns $emails = str_replace(chr(10), "", $emails); //remove line feeds $file_name = UPLOAD_PATH . $send_FILEINFO['fileRandomName']; $file_act_name = $send_FILEINFO['fileName']; $subject = 'Simple Chat File'; $body = nl2br($your_comment) . "<br/><br/><br/>Please find the file attached."; $send_FileUploadInfo = $send_MF->getChatFileUploadInfo($send_FILEINFO['fileId']); $msg = sendMailUsingMailer($emails, $subject, $body, $file_name, $file_act_name); if ($msg == 'Letter is sent') { $newmsg = "has emailed " . $file_act_name . "</a> to " . $emails . " [ <a href=\"chatfiledownload.php?fc={$send_FILEINFO['fileId']}\">View File</a> ]"; $success = execute_sqlInsert('tbl_ChatRooms', array('saidBy_username' => $_SESSION["uname"], 'saidBy_empl_id' => $_SESSION["empl_id"], 'message_base64' => '', 'message_plain_mysqlescaped' => $newmsg, 'chatRoom' => $send_FileUploadInfo['roomId'], 'msgType' => 'E')); } else { } register_LastPingAt(); } } if (get_GET_var('fid')) { $fid = get_GET_var('fid'); $MF = new ManageFiles(); $FILEINFO = $MF->get_file_Info($fid, $_SESSION["empl_id"]); if (!count($FILEINFO)) { echo "Invalid file or privilege"; exit;
send_Action_Response('Fail', 'Email already exists !'); exit; } $user_id = $MU->insert_newUser($uName, $pwd, $eMail, $invi_fName, $mobile, $des, $timezone); $subject = "Your account has been created"; $message = '<h2>Your account has been created.</h2><br/>'; $message .= 'You\'re all set. You\'ll find your login details and a link to sign in below.<br/>'; $message .= '<B>Your Username is:</B><br/>'; $message .= $uName . '<br/><br/>'; $message .= '<B>Your Password is:</B><br/>'; $message .= $pwd . '<br/><br/>'; $message .= 'Access your ' . APPNAME . ' account now:<br/>'; $message .= '<a href="' . APPURL . '">' . APPURL . '</a><br/><br/>'; $message .= '<b>' . $_SESSION["emplFullName"] . '</b> says:<br/>'; $message .= nl2br($msg); $msg_ack = sendMailUsingMailer($eMail, $subject, $message); if ($msg_ack == 'Letter is sent') { send_Action_Response('Success', $msg_ack); } else { } break; case 'createRoom': $room_name = get_POST_var("room_name"); $room_desc = get_POST_var("room_desc"); $room_users = explode('||', get_POST_var("room_users")); $MCR = new ManageChatRooms(); if ($MCR->create_Room($room_name, $room_desc, $room_users)) { send_Action_Response('Success', 'Room Created Successfully !'); } else { send_Action_Response('Fail', 'There was an error creating the Room !'); }