1
Installazione, migrazione e aggiornamento / Re:Warning: Invalid argument supplied for foreach()
« il: 03 Ott 2011, 10:29:48 »
Ciao maicolstaip la versione di php è la 5.31, quella di joomla è la 1.5.23
Questa sezione ti permette di visualizzare tutti i post inviati da questo utente. N.B: puoi vedere solo i post relativi alle aree dove hai l'accesso.
$sendmail
<?php
jimport('joomla.database.database');
jimport( 'joomla.database.table' );
jimport('joomla.mail.helper');
$mailfrom = $mainframe->getCfg( 'mailfrom' );
$conf =& JFactory::getConfig();
$sitename = $mainframe->getCfg( 'sitename' );
$name = $this->user->name;
$subject = sprintf ( JText::_( 'Booking information for' ), $name, $sitename);
$subject = html_entity_decode($subject, ENT_QUOTES);
$sess = session_id();
$session =& JFactory::getSession();
?>
Successivamente viene creato il contenuto del messaggio ed infine si trova il codice per l' invio dell' e-mail:$subject = JText::_( 'EMAILPRCONFPRENO' );
JUtility::sendMail($this->mailfrom, $this->fromname, $this->user->email, $subject, $mailReport, true);
JUtility::sendMail($this->mailfrom, $this->fromname, $this->hotelInfo[0]->ht_contact_email_address, $subject, $mailReport, true);
<a onclick="return hs.htmlExpand(this,{align: 'center', outlineWhileAnimating: true, outlineType: 'rounded-white', minWidth: 550, minHeight: 550, width: 550, height: 550, objectType: 'iframe'})" class="highslide" title="Siti Partners" href="http://www.tuosito.com/cartellachecontieneHTML/pagina.html"><p style="color:#ffffff;">Il link da cliccare</p></a>
<td>"<?php echo JText::_( 'TERMINICONDIZIONI' ); ?>"</td>
JUtility::sendMail($this->mailfrom, $this->fromname, $this->hotelInfo[0]->ht_contact_email_address, $subject, [color=red]$mailReport[/color], true);
$mailReport contiene varie informazioni di riepilogo ordinate in una tabella, vorrei poter tradurre le intestazioni di ciascuna riga ma non saprei proprio come fare:<?php
$mailReport="<table width=\"100%\">
<tbody>
<tr>
<th colspan=\"4\" scope=\"row\">
<b>[color=red] You have successfully reserved[/color]:</b>
</th>
</tr>
<tr>
<td>
[color=red]Hotel Name[/color]
</td>
<td colspan=\"3\">".$this->hotelInfo[0]->hotel_name."<div align=\"right\">";
$star = $this->hotelInfo[0]->ht_startStatus;
for ($st =0; $st<$star; $st++){
$mailReport="<img src=\"components/com_hbsusers/css/star1.png\" />";
}
$mailReport="</div>
</td>
</tr>
<tr class=\"odd\">
<td>[color=red]Hotel Address[/color]</td>
<td colspan=\"3\">".$this->hotelInfo[0]->ht_hotel_address."</td>
</tr>
<tr>
<td>[color=red]Country[/color]</td>
<td colspan=\"3\" id=\"room_name_td\">".$this->hotelInfo[0]->country_name."</td>
</tr>
<tr class=\"odd\">
<td>[color=red][color=pink]State[/color][/color]</td>
<td colspan=\"3\">".$this->hotelInfo[0]->state_name."</td>
</tr>
<tr>
<td>[color=red]City[/color]</td>
<td colspan=\"3\">".$this->hotelInfo[0]->city_name."</td>
</tr>
<tr class=\"odd\">
<td>[color=red]Zip[/color]</td>
<td colspan=\"3\">".$this->hotelInfo[0]->ht_zip_code."</td>
</tr>
<tr>
<td>[color=red]Phone[/color]</td>
<td colspan=\"3\">".$this->hotelInfo[0]->ht_contact_telephone1.", ".$this->hotelInfo[0]->ht_contact_mobile1."</td>
</tr>
<tr class=\"odd\">
<td>[color=red]E-mail Address[/color]</td>
<td colspan=\"3\">".$this->hotelInfo[0]->ht_contact_email_address."</td>
</tr>
<tr>
<td>[color=red]E-mail Address[/color]</td>
<td colspan=\"3\">".$this->hotelInfo[0]->ht_contact_email_address."</td>
</tr>
</tbody>
</table>
<br>
<table width=\"100%\">
<tbody>
<tr>
<th colspan=\"4\" scope=\"row\">
<b> User Information</b>
</th>
</tr>
<tr>
<td>Name</td>
<td colspan=\"3\">".$this->user->name."</td>
</tr>
<tr class=\"odd\">
<td>E-mail Address</td>
<td colspan=\"3\">".$this->user->email."</td>
</tr>
<tr>
<td>E-mail Address</td>
<td colspan=\"3\">".$this->hotelInfo[0]->ht_contact_email_address."</td>
</tr>
</tbody>
</table>
<br>
<table width=\"100%\">
<tbody>
<tr>
<th colspan=\"4\" scope=\"row\">
<b> Room Information</b>
</th>
</tr>
<tr class=\"odd\">
<td>Room name</td>
<td colspan=\"3\">".$this->data[0]->name."</td>
</tr>
<tr class=\"odd\">
<td>Check-in Date</td>
<td colspan=\"3\">".$this->data[0]->f_date."</td>
</tr>
<tr class=\"odd\">
<td>Check-out Date</td>
<td colspan=\"3\">".$this->data[0]->t_date."</td>
</tr>
</tbody>
</table>";
$subject = "Booking confirmation";
JUtility::sendMail($this->mailfrom, $this->fromname, $this->user->email, $subject, $mailReport, true);
JUtility::sendMail($this->mailfrom, $this->fromname, $this->hotelInfo[0]->ht_contact_email_address, $subject, $mailReport, true);
?>
<?php echo JText::_( 'RRI' ); ?>
La traduzione non funziona<?php echo JText::_( 'TERMINICONDIZIONI' ); ?>
<?php
require('../../libraries/joomla/factory.php');
$lang =& Jfactory::getLanguage();
?>
|