Elxis CMS Forum

Extensions => Components => Topic started by: Davide on February 06, 2011, 11:21:42

Title: Last Reservation
Post by: Davide on February 06, 2011, 11:21:42
If i want to publish in the home page:
Quote
Last reseration was made by (user) in (hotel) on (date).
using (hotel) as a link to the hotels' owner page.

How can i do that?
Title: Re: Last Reservation
Post by: CREATIVE Options on February 06, 2011, 11:52:34
This is against privacy data and is against several countries.
I suggest not to use such a thing.
Title: Re: Last Reservation
Post by: Davide on February 06, 2011, 11:58:46
Why? If i said that
Last reservation was made by babbonatale81 for Von Casa Falco on 21/11/2011
Or if the users register its name:
Last Reservation was made by Davide I. (surname not showing) for Von Casa Falco on 21/11/2011

that's similar to booking.com it is using this phrases actually.
Title: Re: Last Reservation
Post by: CREATIVE Options on February 06, 2011, 12:05:55
Booking.com don't post username or name or surname just the following:

Most recent booking for this hotel was today at 11:19 from Italy
Title: Re: Last Reservation
Post by: Davide on February 06, 2011, 12:12:15
wow that's right i remembered wrong. sorry

So how can i do only this phrase?
I tried to make a new post published in the home Page after installing php module:

Code: [Select]
<?php
if (
$data->lastreserv) {

$lastd mosFormatDate($data->lastreserv[&#39;resdate&#39;], _GEM_DATE_FORMLC2);

$lrLink $resmaster->secureURL($mainframe->getCfg(&#39;live_site&#39;).&#39;/index2.php?option=com_reservations&task=cpanel&act=resdetails&resid=&#39;.$data->lastreserv[&#39;resid&#39;].&#39;&Itemid=&#39;.$Itemid);

echo &#39;<tr class="irrow&#39;.$k.&#39;">&#39;."\n".&#39;<td colspan="2">&#39;;

printf($resmaster->lng->LASTRESBYON,  $data->lastreserv[&#39;ofirstname&#39;].&#39; &#39;.$data->lastreserv[&#39;olastname&#39;], $lastd);

echo " \n";

echo &#39;<a href="&#39;.$lrLink.&#39;" title="&#39;.$data->lastreserv[&#39;rescode&#39;].&#39;" class="resmaplink">&#39;.$resmaster->lng->RESDETAILS."</a>\n";

echo "</td>\n</tr>\n";

$k $k;

}
?>


I think there's to many code and it is wrong.
Title: Re: Last Reservation
Post by: webgift on February 06, 2011, 13:30:49
There are a lot of parameters that affects the final result.
Where did you write that code ?
Title: Re: Last Reservation
Post by: Davide on February 07, 2011, 01:18:05
I have create a new page .php saved it and with this bot (http://www.elxis-downloads.com/it/downloads/content/219.html) included. the path was correct but no message display. maybe because i don't have made any reservation after  ;D Will work for you?
Title: Re: Last Reservation
Post by: webgift on February 07, 2011, 12:30:34
It's a wrong process that.
Delete this Bot. PHP Bot give us the option to add source code non relative with elxis components .
You must create a module on which you will include specific file of IOSR Component, database query etc.
Title: Re: Last Reservation
Post by: Davide on February 08, 2011, 01:05:54
ah ok... thanks