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. 

!!! READ !!!

If you install this update, you would need to reinstall all the Javascript pixel codes, because the system has changed to a Campaign based pixel instead of a global user pixel.

!!! READ !!!


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

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

app/controllers/Campaign.php
app/controllers/CampaignsAjax.php
app/controllers/Dashboard.php
app/controllers/Login.php
app/controllers/Pixel.php
app/controllers/PixelTrack.php
app/controllers/Register.php
app/controllers/ResetPassword.php
app/controllers/admin/AdminPageCreate.php
app/controllers/admin/AdminPageUpdate.php
app/controllers/admin/AdminStatistics.php
app/controllers/admin/AdminUserCreate.php
app/controllers/admin/AdminUserView.php
app/core/App.php
app/core/Router.php
app/core/Language.php
app/helpers/Cache.php
app/helpers/Date.php
app/includes/notifications.php
app/includes/product.php
app/languages/english.json
app/init.php
themes/altum/assets/css/admin-bootstrap-dark.min.css
themes/altum/assets/css/admin-bootstrap.min.css
themes/altum/assets/css/admin-custom.css
themes/altum/assets/css/custom.css
themes/altum/assets/css/pixel.css
themes/altum/assets/js/libraries/clipboard.min.js
themes/altum/views/admin/page-create/index.php
themes/altum/views/admin/page-update/index.php
themes/altum/views/admin/pages-category-create/index.php
themes/altum/views/admin/pages-category-update/index.php
themes/altum/views/admin/settings/index.php
themes/altum/views/admin/statistics/index.php
themes/altum/views/admin/statistics/partials/growth.php
themes/altum/views/admin/statisticsx/index.php
themes/altum/views/admin/user-update/index.php
themes/altum/views/campaign/campaign_pixel_key_modal.php
themes/altum/views/campaign/create_campaign_modal.php
themes/altum/views/campaign/custom_branding_campaign_modal.php
themes/altum/views/campaign/index.php
themes/altum/views/campaign/update_campaign_modal.php
themes/altum/views/dashboard/index.php
themes/altum/views/notification-create/index.php
themes/altum/views/notification/data/data.create_data_modal.method.php
themes/altum/views/notification/data/data.create_review_data_modal.method.php
themes/altum/views/notification/settings/settings.engagement_links.method.php
themes/altum/views/partials/email.html
themes/altum/views/partials/menu.php
themes/altum/views/partials/notifications/countdown_collector.php
themes/altum/views/pixel/index.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 drop column pixel_key;
alter table campaigns add pixel_key varchar(32) null after user_id;
create index campaigns_pixel_key_index on campaigns (pixel_key);
UPDATE campaigns SET pixel_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)
);

--------
