$mobile = get_POST_var("mobile"); $des = get_POST_var("des"); $invi_id = get_POST_var("invi_id"); $invi_fName = get_POST_var("invi_fName"); $invi_email = get_POST_var("invi_email"); $timezone = get_POST_var("Timezone"); $MU = new ManageUsers(); $MU->userId = $CURRENT_USERID; $existingUserName = $MU->checkFor_UserName_Existence($uName); //$existingUserName = executesql_returnArray("select emplUsername from tblAppUsers where emplUsername='******'");; if ($existingUserName) { send_Action_Response('Fail', 'Username already exists !'); exit; } $user_id = $MU->insert_newUser($uName, $pwd, $invi_email, $invi_fName, $mobile, $des, $timezone); $result = execute_sqlQuery("UPDATE tbl_Invitations SET invi_status='1' WHERE invi_Id='{$invi_id}'"); $subject = "Your account has been created"; $message = '<h2>Thanks for creating an account.</h2><br/>'; $message .= 'You\'re all set. You\'ll find your username and a link to sign in below.<br/>'; $message .= '<B>Your new username is:</B><br/>'; $message .= $uName . '<br/><br/>'; $message .= 'Access your ' . APPNAME . ' account now:<br/>'; $message .= '<a href="' . APPURL . '">' . APPURL . '</a><br/>'; $msg_ack = sendMailUsingMailer($invi_email, $subject, $message); if ($msg_ack == 'Letter is sent') { send_Action_Response('Success', $msg_ack); } break; case 'createUser': $uName = get_POST_var("uname"); $pwd = get_POST_var("pwd");
function executesql_returnStrictArray($sqlquery) { // use this function to get one column values $vars = array(); $result = execute_sqlQuery($sqlquery); if (@mysql_num_rows($result) == 0) { return $vars; } while ($row = mysql_fetch_assoc($result)) { foreach ($row as $key => $value) { array_push($vars, $value); } } return $vars; }
public function Mark_As_Read($msgIds, $uId) { $umsgids = implode(',', $msgIds); $sql_up = "UPDATE tbl_DirectMessages SET msgStatus='Y' WHERE to_uid='{$uId}' AND dmsgid IN ({$umsgids})"; echo "<script> console.log('" . addslashes($sql_up) . "'); </script>"; if (execute_sqlQuery($sql_up)) { return true; } }
$name = $uid . ".jpg"; } else { if ($type == "image/bmp") { $name = $uid . ".bmp"; } } } } } // Edit upload location here $destination_path = 'files/users/'; $target_path = $destination_path . $name; $Thumb_Path = $destination_path . 'thumbs/' . $name; if (@move_uploaded_file($_FILES['userimg']['tmp_name'], $target_path)) { $result = 1; $sql = execute_sqlQuery("UPDATE tblAppUsers SET userImage='{$name}' WHERE empl_id='{$uid}'"); try { // initialize object $image = new Gmagick(); $image->readImage($target_path); $image->thumbnailImage(55, 55); $image->writeImage($Thumb_Path); // free resource handle $image->destroy(); } catch (Exception $e) { die($e->getMessage()); } } } } }