Panda Multi Resorts - 4.2.0 (Dec 18, 2016)
Replace the following files and execute the queries in your SQL manager to perform the updates.
NEW FEATURES/IMPROVEMENTS
New navigation management (new module Menu)
/admin/modules/menu/
/admin/modules/page/config.xml
/index.php
/common/db.sql
>> New table pm_menu
CREATE TABLE IF NOT EXISTS pm_menu(
id int NOT NULL AUTO_INCREMENT,
lang int NOT NULL,
name varchar(50),
title varchar(250),
id_parent int,
item_type varchar(30),
id_item int,
url text,
main int DEFAULT 1,
footer int DEFAULT 0,
checked int DEFAULT 0,
rank int DEFAULT 0,
PRIMARY KEY(id, lang)
) ENGINE=INNODB DEFAULT CHARSET=utf8;
ALTER TABLE pm_menu ADD CONSTRAINT menu_lang_fkey FOREIGN KEY (lang) REFERENCES pm_lang(id) ON DELETE CASCADE ON UPDATE NO ACTION;
>> Copy the following PHP script (add the opening php tag at the beginning) in a new file (e.g. update.php) in the root of your website (beside index.php) and execute the script (e.g. in your browser: http//www.mywebsite.tld/update.php), then remove the file:
require("common/lib.php");
require("common/define.php");
$i = 0;
$result = $db->query("SELECT * FROM pm_page WHERE footer = 1 OR main = 1 OR id_parent IN(SELECT id FROM pm_page WHERE main = 1) ORDER BY id, lang");
if($result !== false){
foreach($result as $row){
$data = array();
$data['id'] = $row['id'];
$data['lang'] = $row['lang'];
$data['name'] = $row['name'];
$data['title'] = $row['title'];
$data['id_parent'] = ($row['id_parent'] == 0) ? null : $row['id_parent'];
$data['item_type'] = "page";
$data['id_item'] = $row['id'];
$data['main'] = (empty($row['footer']) && empty($row['main'])) ? 1 : $row['main'];
$data['footer'] = $row['footer'];
$data['checked'] = $row['checked'];
$data['rank'] = $row['rank'];
$result_insert = db_prepareInsert($db, "pm_menu", $data);
if($result_insert !== false){
if($result_insert->execute() !== false) $i++;
}
}
}
echo "$i menu items successfully inserted!";
$i = 0;
$n = 0;
$id = 0;
$result = $db->query("SELECT * FROM pm_widget WHERE pos = 'footer' ORDER BY rank, id");
if($result !== false){
foreach($result as $row){
if($id != $row['id']){
$id = $row['id'];
$n++;
}
if($n > 3) $n = 3;
$data = array();
$data['id'] = $row['id'];
$data['pos'] = "footer_col_".$n;
$result_update = db_prepareUpdate($db, "pm_widget", $data);
if($result_update !== false){
if($result_update->execute() !== false) $i++;
}
}
}
echo "$i widgets successfully updated!";
/common/lib.php
/templates/default/common/header.php
/templates/default/models/article.php
/templates/default/models/gallery.php
/templates/default/models/sitemap.php (articles no longer displayed here)
Possibility to add multiple widgets / column in the footer
/admin/modules/widgets/config.xml
/templates/default/css/layout.css
>> WIDGETS block
/templates/default/common/footer.php
/templates/default/models/page.php
New module Social (social network links)
/admin/modules/social/
/common/db.sql
>> New table pm_social:
CREATE TABLE IF NOT EXISTS pm_social(
id int NOT NULL AUTO_INCREMENT,
type varchar(50),
url text,
checked int DEFAULT 1,
rank int DEFAULT 0,
PRIMARY KEY(id)
) ENGINE=INNODB DEFAULT CHARSET=utf8;
/templates/default/widget/contact_informations.php
User account management / Booking history
/common/db.sql
>> new entries in the table pm_text (!replace with your translation and lang ids):
INSERT INTO pm_text (id, lang, name, value) VALUES (143, 1, 'BOOKING_HISTORY', 'Historique des réservations'), (143, 2, 'BOOKING_HISTORY', 'Booking history'), (143, 3, 'BOOKING_HISTORY', 'Booking history'), (144, 1, 'BOOKING_SUMMARY', 'Résumé de la réservation'), (144, 2, 'BOOKING_SUMMARY', 'Booking summary'), (144, 3, 'BOOKING_SUMMARY', 'Booking summary'), (145, 1, 'BOOKING_DATE', 'Date de la réservations'), (145, 2, 'BOOKING_DATE', 'Booking date'), (145, 3, 'BOOKING_DATE', 'Booking date'), (146, 1, 'NO_BOOKING_YET', 'Pas encore de réservation...'), (146, 2, 'NO_BOOKING_YET', 'No booking yet...'), (146, 3, 'NO_BOOKING_YET', 'No booking yet...'), (147, 1, 'PAYMENT', 'Paiement'), (147, 2, 'PAYMENT', 'Payment'), (147, 3, 'PAYMENT', 'Payment'), (148, 1, 'PAYMENT_DATE', 'Date du paiement'), (148, 2, 'PAYMENT_DATE', 'Payment date'), (148, 3, 'PAYMENT_DATE', 'Payment date'), (149, 1, 'PAYMENT_METHOD', 'Méthode de paiement'), (149, 2, 'PAYMENT_METHOD', 'Payment method'), (149, 3, 'PAYMENT_METHOD', 'Payment method'), (150, 1, 'NUM_TRANSACTION', 'N°transaction'), (150, 2, 'NUM_TRANSACTION', 'Num. transaction'), (150, 3, 'NUM_TRANSACTION', 'Num. transaction'), (151, 1, 'STATUS', 'Statut'), (151, 2, 'STATUS', 'Status'), (151, 3, 'STATUS', 'Status'), (152, 1, 'AWAITING', 'En attente'), (152, 2, 'AWAITING', 'Awaiting'), (152, 3, 'AWAITING', 'Awaiting'), (153, 1, 'CANCELLED', 'Annulé'), (153, 2, 'CANCELLED', 'Cancelled'), (153, 3, 'CANCELLED', 'Cancelled'), (154, 1, 'REJECTED_PAYMENT', 'Paiement rejeté'), (154, 2, 'REJECTED_PAYMENT', 'Rejected payment'), (154, 3, 'REJECTED_PAYMENT', 'Rejected payment'), (155, 1, 'PAYED', 'Payé'), (155, 2, 'PAYED', 'Payed'), (155, 3, 'PAYED', 'Payed');
>> new column "id_user" in the table pm_booking:
ALTER TABLE pm_booking ADD id_user INT AFTER extra_services;
>> column "name" renamed to "firstname" in the table pm_user
>> new column "lastname":
ALTER TABLE pm_user CHANGE name firstname VARCHAR(100), ADD lastname VARCHAR(100) AFTER firstname;
/admin/modules/user/config.xml
/js/custom.js
/common/define.php
/templates/default/common/register/signup.php
/templates/default/common/header.php
/templates/default/common/booking-popup.php
/templates/default/models/account.php
/templates/default/models/details.php
/templates/default/models/payment.php
/templates/default/css/print.css
/templates/default/css/layout.css
>> new css rule:
label.control-label {
text-align: right;
}
FIXED ISSUES
String truncation issue with HTML tags in the listings of the admin panel
/common/lib.php
Error parsing translation file of the admin panel
/common/define.php
Log out from admin panel if user type is "registered"
/common/define.php
/admin/index.php
/admin/setup.php
/admin/login.php
/admin/settings.php
/admin/modules/default/common.php
