IMPORTANT
———————————————————
Please make sure to always back up your files before updating. I am not responsible for any update going wrong and messing / losing your previous or actual files. 


FILE CHANGES
———————————————————
1. THE EASIEST WAY
Replace all the folders / files except the "uploads" folder, "install" folder and the "config.php" file.

2. THE ADVANCED WAY
Copy/Paste the following files, replace if needed.

app/controllers/AccountPayments.php
app/controllers/ActivateUser.php
app/controllers/Campaign.php
app/controllers/Dashboard.php
app/controllers/Login.php
app/controllers/LostPassword.php
app/controllers/Notification.php
app/controllers/NotificationsAjax.php
app/controllers/Pay.php
app/controllers/Pixel.php
app/controllers/Register.php
app/controllers/ResendActivation.php
app/controllers/WebhookPaypal.php
app/controllers/admin-api/AdminApiUsers.php
app/controllers/admin/AdminApiDocumentation.php
app/controllers/admin/AdminCodeCreate.php
app/controllers/admin/AdminCodeUpdate.php
app/controllers/admin/AdminPayments.php
app/controllers/admin/AdminSettings.php
app/controllers/admin/AdminUserCreate.php
app/controllers/admin/AdminUsers.php
app/core/Router.php
app/helpers/Captcha.php
app/helpers/Date.php
app/helpers/Filters.php
app/helpers/Response.php
app/helpers/email.php
app/helpers/links.php
app/helpers/others.php
app/includes/notifications.php
app/includes/product.php
app/init.php
app/languages/english.json
app/models/User.php
app/traits/Apiable.php
themes/altum/assets/css/admin-custom.css
themes/altum/assets/css/custom.css
themes/altum/assets/css/pixel.css
themes/altum/assets/js/chartjs_defaults.js
themes/altum/assets/js/libraries/fontawesome-brands.modified.js
themes/altum/assets/js/pixel-header.js
themes/altum/views/account-payments/index.php
themes/altum/views/account-plan/index.php
themes/altum/views/admin/api-documentation/index.php
themes/altum/views/admin/code-create/index.php
themes/altum/views/admin/code-update/index.php
themes/altum/views/admin/index/index.php
themes/altum/views/admin/page-create/index.php
themes/altum/views/admin/page-update/index.php
themes/altum/views/admin/pages/index.php
themes/altum/views/admin/partials/admin_sidebar.php
themes/altum/views/admin/payments/index.php
themes/altum/views/admin/plans/index.php
themes/altum/views/admin/settings/index.php
themes/altum/views/admin/statistics/index.php
themes/altum/views/admin/user-update/index.php
themes/altum/views/admin/user-view/index.php
themes/altum/views/admin/users/index.php
themes/altum/views/admin/wrapper.php
themes/altum/views/campaign/index.php
themes/altum/views/campaign/settings.method.php
themes/altum/views/campaign/statistics.method.php
themes/altum/views/dashboard/index.php
themes/altum/views/index/index.php
themes/altum/views/login/index.php
themes/altum/views/lost-password/index.php
themes/altum/views/notification-create/index.php
themes/altum/views/notification/ - WHOLE FOLDER
themes/altum/views/partials/ - WHOLE FOLDER
themes/altum/views/pay/index.php
themes/altum/views/register/index.php
themes/altum/views/resend-activation/index.php
themes/altum/views/wrapper.php


DATABASE CHANGES 
--------------------
IMPORTANT: MAKE SURE YOU BACKUP YOUR DATABASE JUST TO BE SAFE. 

You will have to run the following queries into your database. 

You can run those with PhpMyAdmin -> selecting the database -> going to the SQL tab and running the following mysql queries:


COPY & RUN THE FOLLOWING QUERIES
--------
alter table users add api_key varchar(32) null after name;
create index users_api_key_index on users (api_key);
UPDATE users SET api_key = concat(
    lpad(conv(floor(rand()*pow(36,8)), 10, 36), 8, 0),
    lpad(conv(floor(rand()*pow(36,8)), 10, 36), 8, 0),
    lpad(conv(floor(rand()*pow(36,8)), 10, 36), 8, 0),
    lpad(conv(floor(rand()*pow(36,8)), 10, 36), 8, 0)
);
alter table users add one_time_login_code varchar(32) null after twofa_secret;
INSERT INTO `settings` (`key`, `value`) VALUES ('webhooks', '{"user_new":"","user_delete":""}');
--------


COPY & RUN THE FOLLOWING QUERIES ONLY IF YOU HAVE AN EXTENDED LICENSE
--------
alter table payments modify payment_id varchar(128) null;
--------
