Cookies help us provide better user experience. By using our website, you agree to the use of cookies.

Panda Resort - 4.0.0 (Oct 24, 2016)

Replace the following files and execute the queries in your SQL manager to perform the updates.

Be careful: Big changes in this update (design, code and structure).
Given the number of files modified in this update, the files affected by each new feature or fix is not specified.
It’s recommended to make a backup before doing this update in your live website.

NEW FEATURES/IMPROVEMENTS

- New module Activities
- Default template used as source if a file is not found in the current template
- New template management
- Possibility to add attachements when sendMail() is called
- Social media tags
- HTML entities allowed in config.php
- Disable direct access (security)
- Possibility to rename the admin folder
- Google Analytics code in the settings section

FIXED ISSUES

- Submenu display issue
- Invalid amount format for PayPal
- Page alias issue when sending a comment

REPLACE THE FOLLOWING FILES
and execute the queries in your SQL manager

/admin/css/layout.css
/admin/includes/Column.class.php
/admin/includes/config.xsd
/admin/includes/Field.class.php
/admin/includes/fn_actions.php
/admin/includes/fn_form.php
/admin/includes/fn_list.php
/admin/includes/fn_module.php
/admin/includes/inc_header_common.php
/admin/includes/inc_header_form.php
/admin/includes/inc_header_list.php
/admin/includes/inc_library.php
/admin/includes/inc_top.php
/admin/includes/lang.ini
>> new entries: ADMIN_FOLDER, ADMIN_FOLDER_NOTICE, ALPHANUM_ONLY, FOLDER_EXISTS, ANALYTICS_CODE, ANALYTICS_CODE_NOTICE
/admin/index.php
/admin/login.php
/admin/modules/booking/activity/
/admin/modules/booking/activity_session/
/admin/modules/comment/config.xml
/admin/modules/default/common.php
/admin/modules/default/form.php
/admin/modules/default/list.php
/admin/settings.php
/admin/setup.php
/common/config(-tmp).php
>> edit entries: MAINTENANCE_MSG (decode HTML entities), TEMPLATE => “booking” becomes “default”, ADMIN_FOLDER, ANALYTICS_CODE
/common/db.sql
>> new tables: pm_activity, pm_activity_file, pm_activity_session, pm_activity_session_hour, pm_booking_activity

-- =============== CREATION OF THE TABLE pm_activity =============

CREATE TABLE pm_activity(
    id int NOT NULL AUTO_INCREMENT,
    lang int NOT NULL,
    max_children int DEFAULT 1,
    max_adults int DEFAULT 1,
    max_people int,
    title varchar(250),
    subtitle varchar(250),
    alias varchar(100),
    descr longtext,
    duration float DEFAULT 0,
    duration_unit varchar(50),
    price double DEFAULT 0,
    lat double,
    lng double,
    home int DEFAULT 0,
    checked int DEFAULT 0,
    rank int DEFAULT 0,
    PRIMARY KEY(id, lang)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

ALTER TABLE pm_activity ADD CONSTRAINT activity_lang_fkey FOREIGN KEY (lang) REFERENCES pm_lang(id) ON DELETE CASCADE ON UPDATE NO ACTION;

-- ============ CREATION OF THE TABLE pm_activity_file ===========

CREATE TABLE pm_activity_file(
    id int NOT NULL AUTO_INCREMENT,
    lang int NOT NULL,
    id_item int NOT NULL,
    home int DEFAULT 0,
    checked int DEFAULT 1,
    rank int DEFAULT 0,
    file varchar(250),
    label varchar(250),
    type varchar(20),
    PRIMARY KEY(id, lang)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

ALTER TABLE pm_activity_file ADD CONSTRAINT activity_file_fkey FOREIGN KEY (id_item, lang) REFERENCES pm_activity(id, lang) ON DELETE CASCADE ON UPDATE NO ACTION;
ALTER TABLE pm_activity_file ADD CONSTRAINT activity_file_lang_fkey FOREIGN KEY (lang) REFERENCES pm_lang(id) ON DELETE CASCADE ON UPDATE NO ACTION;

-- ========== CREATION OF THE TABLE pm_activity_session ==========

CREATE TABLE pm_activity_session(
    id int NOT NULL AUTO_INCREMENT,
    id_activity int NOT NULL,
    days varchar(20),
    start_date int,
    end_date int,
    price double DEFAULT 0,
    price_child double DEFAULT 0,
    discount double DEFAULT 0,
    discount_type varchar(10),
    vat_rate double,
    PRIMARY KEY(id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

ALTER TABLE pm_activity_session ADD CONSTRAINT activity_session_fkey FOREIGN KEY (id_activity) REFERENCES pm_activity(id) ON DELETE CASCADE ON UPDATE NO ACTION;

-- ======= CREATION OF THE TABLE pm_activity_session_hour ========

CREATE TABLE pm_activity_session_hour(
    id int NOT NULL AUTO_INCREMENT,
    id_activity_session int NOT NULL,
    start_h int,
    start_m int,
    PRIMARY KEY(id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

ALTER TABLE pm_activity_session_hour ADD CONSTRAINT activity_session_hour_fkey FOREIGN KEY (id_activity_session) REFERENCES pm_activity_session(id) ON DELETE CASCADE ON UPDATE NO ACTION;

-- ========== CREATION OF THE TABLE pm_booking_activity ==========

CREATE TABLE pm_booking_activity(
    id int NOT NULL AUTO_INCREMENT,
    id_booking int NOT NULL,
    id_activity int NOT NULL,
    title varchar(250),
    children int DEFAULT 0,
    adults int DEFAULT 0,
    duration varchar(50),
    amount double DEFAULT 0,
    date int,
    PRIMARY KEY(id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

ALTER TABLE pm_booking_activity ADD CONSTRAINT booking_activity_fkey FOREIGN KEY (id_booking) REFERENCES pm_booking(id) ON DELETE CASCADE ON UPDATE NO ACTION;

>> new entries in table pm_text: DURATION, PERSON, CHOOSE_A_DATE, TIMESLOT, ACTIVITIES, DESTINATION, FOR, FIND_ACTIVITIES_AND_TOURS

INSERT INTO pm_text (id, lang, name, value) VALUES
(129, 1, 'DURATION', 'Durée'),
(129, 2, 'DURATION', 'Duration'),
(129, 3, 'DURATION', 'Duration'),
(130, 1, 'PERSON', 'Personne'),
(130, 2, 'PERSON', 'Person'),
(130, 3, 'PERSON', 'Person'),
(131, 1, 'CHOOSE_A_DATE', 'Choisissez une date'),
(131, 2, 'CHOOSE_A_DATE', 'Choose a date'),
(131, 3, 'CHOOSE_A_DATE', 'Choose a date'),
(132, 1, 'TIMESLOT', 'Horaire'),
(132, 2, 'TIMESLOT', 'Time slot'),
(132, 3, 'TIMESLOT', 'Time slot'),
(133, 1, 'ACTIVITIES', 'Activités'),
(133, 2, 'ACTIVITIES', 'Activities'),
(133, 3, 'ACTIVITIES', 'Activities'),
(134, 1, 'DESTINATION', 'Destination'),
(134, 2, 'DESTINATION', 'Destination'),
(134, 3, 'DESTINATION', 'Destination'),
(135, 1, 'NO_HOTEL_FOUND', 'Aucun hotel trouvé'),
(135, 2, 'NO_HOTEL_FOUND', 'No hotel found'),
(135, 3, 'NO_HOTEL_FOUND', 'No hotel found'),
(136, 1, 'FOR', 'pour'),
(136, 2, 'FOR', 'for'),
(136, 3, 'FOR', 'for'),
(137, 1, 'FIND_ACTIVITIES_AND_TOURS', 'Découvrez nos activités et excursions'),
(137, 2, 'FIND_ACTIVITIES_AND_TOURS', 'Find out our activities and tours'),
(137, 3, 'FIND_ACTIVITIES_AND_TOURS', 'Find out our activities and tours');

>> new entries in table pm_page: id 15 & 16 (replace with your own auto incremented ids and lang ids)

INSERT INTO pm_page (id, lang, name, title, subtitle, title_tag, alias, descr, robots, keywords, intro, text, text2, id_parent, page_model, article_model, main, footer, home, checked, rank, add_date, edit_date, comment, rating, system) VALUES
(15, 1, 'Activités', 'Activités', '', 'Activités', 'reservation-activitees', '', 'noindex,nofollow', '', '', '', '', 10, 'booking-activities', '', 1, 0, 0, 1, 7, 1477306761, 1477306761, 0, 0, 1),
(15, 2, 'Activities', 'Activities', '', 'Activities', 'booking-activities', '', 'noindex,nofollow', '', '', '', '', 10, 'booking-activities', '', 1, 0, 0, 1, 7, 1477306761, 1477306761, 0, 0, 1),
(15, 3, 'Activities', 'Activities', '', 'Activities', 'booking-activities', '', 'noindex,nofollow', '', '', '', '', 10, 'booking-activities', '', 1, 0, 0, 1, 7, 1477306761, 1477306761, 0, 0, 1),
(16, 1, 'Activités', 'Activités', '', 'Activités', 'activitees', '', 'noindex,nofollow', '', '', '', '', null, 'activities', 'activity', 1, 0, 0, 1, 4, 1477306761, 1477306761, 0, 0, 1),
(16, 2, 'Activities', 'Activities', '', 'Activities', 'activities', '', 'noindex,nofollow', '', '', '', '', null, 'activities', 'activity', 1, 0, 0, 1, 4, 1477306761, 1477306761, 0, 0, 1),
(16, 3, 'Activities', 'Activities', '', 'Activities', 'activities', '', 'noindex,nofollow', '', '', '', '', null, 'activities', 'activity', 1, 0, 0, 1, 4, 1477306761, 1477306761, 0, 0, 1);

/common/define.php
/common/lib.php
/common/phpmailer/class.phpmailer.php
/index.php
/js/custom.js
/js/plugins/jquery.event.calendar/css/jquery.event.calendar.css
/js/plugins/sharrre/jquery.sharrre.min.js
/templates/booking/ renamed with /templates/default/
/templates/default/common/(all files)
/templates/default/css/colors.css
/templates/default/css/custom.css (!empty file, keep your own changes in this file)
/templates/default/css/layout.css
/templates/default/css/main.css (old content of custom.css)
/templates/default/maintenance.php
/templates/default/models/(all files)
/templates/default/widgets/(all files)