$existingPassword = executesql_returnArray("select emplPassword from tblAppUsers where emplUsername='******'"); if ($existingPassword != md5($oldPassword)) { send_Action_Response('Fail', 'Current Password does not match !'); } else { $result = execute_sqlUpdate('tblAppUsers', array('emplPassword' => md5($newPassword)), array('emplUsername' => $USERNAME)); send_Action_Response('Success', 'Updated!'); } exit; break; case 'updateUserInfo': $name = get_POST_var("name"); $email = get_POST_var("email"); $mobile = get_POST_var("mobile"); $designation = get_POST_var("designation"); $Timezone = get_POST_var("Timezone"); $existingEmail = executesql_returnArray("select emplEmail_id from tblAppUsers where empl_id!='{$CURRENT_USERID}' AND emplEmail_id='{$email}'"); if ($existingEmail) { send_Action_Response('Fail', 'Email Already Exists !'); } else { $result = execute_sqlUpdate('tblAppUsers', array('emplEmail_id' => $email, 'emplFullName' => $name, 'emplMobileNo' => $mobile, 'emplDesignation' => $designation, 'TimeZone' => $Timezone), array('empl_id' => $CURRENT_USERID)); send_Action_Response('Success', 'Updated!'); } exit; break; case 'sendUserInvitation': $fName = get_POST_var("fname"); $lName = get_POST_var("lname"); $eMail = get_POST_var("email"); $msg = get_POST_var("msg"); $roomid = ''; $MU = new ManageUsers();
public function taskHasNewComments($workID) { $USERNAME = $_SESSION['uname']; $lastReadCommentIndex = executesql_returnArray("select user_lastReadCommentIndex from users where username='******'"); $lastCommentIDforthisWork = executesql_returnArray("select commentID from COMMENTS where workID='{$workID}' and comment_by!='{$USERNAME}' ORDER BY `commentID` DESC LIMIT 1"); if (!$lastCommentIDforthisWork) { $lastCommentIDforthisWork = 0; } $lastCommentIDforthisWork = (int) $lastCommentIDforthisWork; if (!$lastReadCommentIndex) { $lastReadCommentIndex = 0; } $lastReadCommentIndex = (int) $lastReadCommentIndex; return $lastCommentIDforthisWork > $lastReadCommentIndex; }
</span> </td> <td class="<?php echo $tdclass; ?> "> <?php echo "{$curusers} users , {$currentsize} Mb , {$expensesCount} Expenses"; ?> </td> <td class="<?php echo $tdclass; ?> "> <?php $sadminemail = executesql_returnArray("select variablevalue from " . $dbname . ".sadmin where variable='sadminemail'"); echo $sadminemail; ?> </td> <td class="<?php echo $tdclass; ?> " TITLE="<?php echo "{$dateCreated} - via {$createdby} "; ?> "><?php echo $shortdate; ?> </td> <td class="<?php echo $tdclass;
<?php include_once "include_db.php"; include_once "include_functions.php"; $uekey = @$_GET["key"]; $USERNAME = executesql_returnArray("select username from users where remindersicalkey='{$uekey}' ;"); if (!$USERNAME) { exit; } $tmp_manageUsers = new manageUsers(); $actual_key = $tmp_manageUsers->get_userSingleDetail($USERNAME, 'remindersicalkey'); if (!$uekey || $uekey != $actual_key) { exit; } $result = mysql_query("select * from scheduledmails where emailby_user='******' order by email_scheduledon"); $scE_Count = @mysql_num_rows($result); ?> BEGIN:VCALENDAR PRODID:-//CenterLimit LLC//DiscreteEvents Reminders Calendar 0.01//EN VERSION:2.0 CALSCALE:GREGORIAN METHOD:PUBLISH X-WR-CALNAME:DiscreteEvents Reminders X-WR-TIMEZONE:Asia/Calcutta X-WR-CALDESC:DiscreteEvents Reminders for <?php echo $USERNAME; if ($scE_Count == 0) { echo "\nEND:VCALENDAR"; exit; } while ($row = mysql_fetch_assoc($result)) {
$processemail_debugoutput = "Invalid Subdomain: Failed adding Task for \n {$thisemail_subject}"; exit(0); } while ($row = @mysql_fetch_array($query)) { extract($row); } // $CLIENTDBNAME, $pkgid, $subdomainStatus, $myTimeZone // Set TimeZone putenv("TZ=" . $myTimeZone); // Connect to this subdomain's database if (!@mysql_select_db($CLIENTDBNAME)) { $processemail_debugoutput = "Unable to connect to client database"; exit(0); } // see if this user is active $SUBDOMAIN_USER = executesql_returnArray("select username from users where user_primaryEmail='" . $thisemail_fromAddress . "' and user_status='A'"); if (!$SUBDOMAIN_USER) { $processemail_debugoutput = "No user found with this emailid under this subdomain "; exit(0); } if ($before_underscore == 'tasks') { list($task_deadline, $task_hour, $task_briefDescription) = parseReminderSubject($thisemail_subject); // (caldate, timeofday , subject) $manageWorks = new manageWorks(); $manageWorks->newWork(array(work_userAssigned => $SUBDOMAIN_USER, work_addedBy => $SUBDOMAIN_USER, work_deadLine => $task_deadline, work_briefDesc => $task_briefDescription, work_Notes => '', work_status => $DE_GLOBALS_WORK_FROMEMAIL, work_priority => 'N', work_projectName => DEFAULTPROJECT, work_isPrivate => 'N')); $this_taskid = mysql_insert_id(); simpleEmail($thisemail_fromAddress, "Added Task {$this_taskid}", "Added Task {$this_taskid} for \n {$task_briefDescription}"); $processemail_debugoutput = "Added Task {$this_taskid} for \n {$thisemail_subject}"; } if ($before_underscore == 'reminders') { list($reminder_emailWhen, $reminder_emailHour, $reminder_emailBody) = parseReminderSubject($thisemail_subject);
function get_AllUnread_Plus_Xread_DirectMessages($userId, $read_CountX = 20) { $count_new = executesql_returnArray("select count(dmsgid) from tbl_DirectMessages where msgStatus='N' and to_uid='{$userId}'"); if ($count_new == 0) { // if no new messages .. get the last X Desc $LIMIT = $read_CountX; } else { // if user has any UnRead Messages (unRead message is not necessarily be the latest message of the user) // so we will make sure that we pull atleast all recent messages till the oldest UnRead $oldestUnRead_dmsgId = executesql_returnArray("select min(dmsgid) from tbl_DirectMessages where msgStatus='N' and to_uid='{$userId}' "); $messageCountAfter_oldestUnRead = executesql_returnArray("select count(dmsgid) from tbl_DirectMessages where (to_uid='{$userId}' or from_uid='{$userId}') and dmsgid > '{$oldestUnRead_dmsgId}' "); $LIMIT = $messageCountAfter_oldestUnRead > $read_CountX ? $messageCountAfter_oldestUnRead + 3 : $read_CountX; } return "select dmsgid, from_uid, to_uid, msg_base64, msgtime, msgType, fileId, msgStatus from tbl_DirectMessages where (to_uid='{$userId}' OR from_uid='{$userId}') ORDER BY dmsgid DESC LIMIT {$LIMIT} "; }
<?php include_once "include_db.php"; $CUSTOM_STYLES = "\n\t#pwdTitleRow{\n\tfont-size: 15px;\n\tfont-weight : bold ;\n\tcolor : #718DA1;\n\t}\n\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"; include_once "include_functions.php"; include_once "include_header.php"; //include_once "include_header_links.php"; if (get_GET_var('id')) { $id = get_GET_var('id'); $key = get_GET_var('key'); $invi_Id = $id; $sql = "SELECT * FROM tbl_Invitations WHERE invi_Id='{$invi_Id}' AND invi_key='{$key}'"; $invi_details = executesql_returnAssocArray($sql); $invi_sent_by = $invi_details['invi_sent_by']; $userFName = executesql_returnArray("select emplFullName from tblAppUsers where emplUsername='******'"); if ($invi_details['invi_status'] != '0') { echo "Invalid Invitation. May be the invitation already used."; exit; } } else { echo "Invalid Invitation. May be the invitation already used."; exit; } ?> <script> var localajaxinit = function(){ }; var checkInvitation = function(){
session_unset(); session_destroy(); logUserEvent('User Logged Out'); send_Action_Response('Success', 'Logged Out!'); exit; break; case 'doLogin': $uname = get_POST_var("uname"); $uepwd = get_POST_var("uepwd"); loginUser($uname, $uepwd); exit; break; case 'updateUserPassword': $upwd_cpass = get_POST_var("upwd_cpass"); $upwd_nupass = get_POST_var("upwd_nupass"); $current_password = executesql_returnArray("select password from users where username='******'"); if ($current_password != $upwd_cpass) { send_Action_Response('Fail', 'Invalid Current Password!'); } $success = execute_sqlUpdate("users", array(password => $upwd_nupass), array(username => $USERNAME)); setcookie(USERCOOKIENAME, "", time() - 3600); session_unset(); session_destroy(); send_Action_Response('Success', 'Password updated successfully!'); exit; break; case 'addUserToProject': if (!IsSadmin()) { send_Action_Response('Fail', 'Invalid Session!'); } $user = get_POST_var('user');