本文整理汇总了PHP中JHTML::Date方法的典型用法代码示例。如果您正苦于以下问题:PHP JHTML::Date方法的具体用法?PHP JHTML::Date怎么用?PHP JHTML::Date使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JHTML
的用法示例。
在下文中一共展示了JHTML::Date方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: export
function export()
{
global $mainframe;
$model = $this->getModel('attendees');
$datas = $model->getData();
header('Content-Type: text/x-csv');
header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Content-Disposition: attachment; filename=attendees.csv');
header('Pragma: no-cache');
$k = 0;
$export = '';
$col = array();
for ($i = 0, $n = count($datas); $i < $n; $i++) {
$data =& $datas[$i];
$col[] = str_replace("\"", "\"\"", $data->name);
$col[] = str_replace("\"", "\"\"", $data->username);
$col[] = str_replace("\"", "\"\"", $data->email);
$col[] = str_replace("\"", "\"\"", JHTML::Date($data->uregdate, JText::_('DATE_FORMAT_LC2')));
$col[] = str_replace("\"", "\"\"", $data->uid);
for ($j = 0; $j < count($col); $j++) {
$export .= "\"" . $col[$j] . "\"";
if ($j != count($col) - 1) {
$export .= ";";
}
}
$export .= "\r\n";
$col = '';
$k = 1 - $k;
}
echo $export;
$mainframe->close();
}
示例2: substr
$number = "{$num}. ";
}
// add description in tooltip
if ($view_tooltip && $files[$i]->description != '') {
$link_text = '<a href="' . $link . '">' . JHTML::tooltip(strip_tags(substr($files[$i]->description, 0, $view_tooltip_length)) . $short_char, JText::_('MOD_JDOWNLOADS_LAST_UPDATED_DESCRIPTION_TITLE'), $files[$i]->file_title . ' ' . $version . $files[$i]->release, $files[$i]->file_title . ' ' . $version . $files[$i]->release) . '</a>';
} else {
$link_text = '<a href="' . $link . '">' . $files[$i]->file_title . ' ' . $version . $files[$i]->release . '</a>';
}
$html .= '<tr style="vertical-align:top;"><td style="text-align:' . $alignment . ';">' . $number . $files_pic . $link_text . '</td>';
// add the modified date
if ($view_date) {
if ($files[$i]->modified_date) {
if ($view_date_same_line) {
$html .= '<td style="text-align:' . $date_alignment . ';"><small>' . $view_date_text . ' ' . substr(JHTML::Date($files[$i]->modified_date, $date_format), 0, 10) . '</small></td>';
} else {
$html .= '</tr><tr><td style="text-align:' . $date_alignment . ';"><small>' . $view_date_text . ' ' . substr(JHTML::Date($files[$i]->modified_date, $date_format), 0, 10) . '</small></td>';
}
}
}
$html .= '</tr>';
// add the first download screenshot when exists and activated in options
if ($view_thumbnails) {
if ($first_image) {
$thumbnail = '<img class="img" src="' . $thumbfolder . $first_image . '" style="text-align:top;padding:5px;border:' . $border . ';" width="' . $view_thumbnails_size . '" height="' . $view_thumbnails_size . '" alt="' . $files[$i]->file_title . '" />';
} else {
// use placeholder
if ($view_thumbnails_dummy) {
$thumbnail = '<img class="img" src="' . $thumbfolder . 'no_pic.gif" style="text-align:top;padding:5px;border:' . $border . ';" width="' . $view_thumbnails_size . '" height="' . $view_thumbnails_size . '" alt="" />';
}
}
if ($thumbnail) {
示例3: store
/**
* Method to store the venue
*
* @access public
* @return id
* @since 0.9
*/
function store($data, $file)
{
global $mainframe;
jimport('joomla.utilities.date');
$user =& JFactory::getUser();
$elsettings = ELHelper::config();
//Get mailinformation
$SiteName = $mainframe->getCfg('sitename');
$MailFrom = $mainframe->getCfg('mailfrom');
$FromName = $mainframe->getCfg('fromname');
$tzoffset = $mainframe->getCfg('offset');
$row =& JTable::getInstance('eventlist_venues', '');
//bind it to the table
if (!$row->bind($data)) {
JError::raiseError(500, $this->_db->stderr());
return false;
}
//Are we saving from an item edit?
if ($row->id) {
$owner = ELUser::isOwner($row->id, 'venues');
//check if user is allowed to edit venues
$allowedtoeditvenue = ELUser::editaccess($elsettings->venueowner, $owner, $elsettings->venueeditrec, $elsettings->venueedit);
if ($allowedtoeditvenue == 0) {
$row->checkin();
$mainframe->enqueueMessage(JText::_('NO ACCESS'));
return false;
}
$date = new JDate($row->modified, $tzoffset);
$row->modified = $date->toMySQL();
$row->modified_by = $user->get('id');
//Is editor the owner of the venue
//This extra Check is needed to make it possible
//that the venue is published after an edit from an owner
if ($elsettings->venueowner == 1 && $owner == $user->get('id')) {
$owneredit = 1;
} else {
$owneredit = 0;
}
} else {
//check if user is allowed to submit new venues
$delloclink = ELUser::validate_user($elsettings->locdelrec, $elsettings->deliverlocsyes);
if ($delloclink == 0) {
$mainframe->enqueueMessage(JText::_('NO ACCESS'));
return false;
}
//get IP, time and userid
$date = new JDate($row->created, $tzoffset);
$row->created = $date->toMySQL();
$row->author_ip = $elsettings->storeip ? getenv('REMOTE_ADDR') : 'DISABLED';
$row->created_by = $user->get('id');
//set owneredit to false
$owneredit = 0;
}
//Image upload
//If image upload is required we will stop here if no file was attached
if (empty($file['name']) && $elsettings->imageenabled == 2) {
$this->setError(JText::_('IMAGE EMPTY'));
return false;
}
if (($elsettings->imageenabled == 2 || $elsettings->imageenabled == 1) && !empty($file['name'])) {
jimport('joomla.filesystem.file');
$base_Dir = JPATH_SITE . '/images/eventlist/venues/';
//check the image
$check = ELImage::check($file, $elsettings);
if ($check === false) {
$mainframe->redirect($_SERVER['HTTP_REFERER']);
}
//sanitize the image filename
$filename = ELImage::sanitize($base_Dir, $file['name']);
$filepath = $base_Dir . $filename;
if (!JFile::upload($file['tmp_name'], $filepath)) {
$this->setError(JText::_('UPLOAD FAILED'));
return false;
} else {
$row->locimage = $filename;
}
} else {
//keep image if edited and left blank
$row->locimage = $row->curimage;
}
//end image upload if
//Check description
$editoruser = ELUser::editoruser();
if (!$editoruser) {
//check datdescription --> wipe out code
$row->locdescription = strip_tags($row->locdescription, '<br />');
//convert the linux \n (Mac \r, Win \r\n) to <br /> linebreaks
$row->locdescription = str_replace(array("\r\n", "\r", "\n"), "<br />", $row->locdescription);
//cut too long words
$row->locdescription = wordwrap($row->locdescription, 75, " ", 1);
//check length
$length = JString::strlen($row->locdescription);
if ($length > $elsettings->datdesclimit) {
//.........这里部分代码省略.........
示例4: onVenueEdited
/**
* This method handles any mailings triggered by an venue store action
*
* @access public
* @param int $venue_id Integer Venue identifier
* @param int $edited Integer Venue new or edited
* @return boolean
* @since 1.0
*/
public function onVenueEdited($venue_id, $edited)
{
//simple, skip if processing not needed
if (!$this->params->get('newvenue_mail_user', '1') && !$this->params->get('newvenue_mail_admin', '0') && !$this->params->get('editvenue_mail_user', '1') && !$this->params->get('editvenue_mail_admin', '0')) {
return true;
}
$db =& JFactory::getDBO();
$user =& JFactory::getUser();
$query = ' SELECT v.id, v.published, v.venue, v.city, v.street, v.plz, v.url, v.country, v.locdescription, v.created, v.modified,' . ' CASE WHEN CHAR_LENGTH(v.alias) THEN CONCAT_WS(\':\', v.id, v.alias) ELSE v.id END as slug' . ' FROM #__eventlist_venues AS v' . ' WHERE v.id = ' . (int) $venue_id;
$db->setQuery($query);
if (!($venue = $db->loadObject())) {
if ($db->getErrorNum()) {
JError::raiseWarning('0', $db->getErrorMsg());
}
return false;
}
//link for event
$link = JRoute::_(JURI::base() . 'index.php?option=com_eventlist&view=venueevents&id=' . $venue->slug, false);
//strip description from tags / scripts, etc...
$text_description = JFilterOutput::cleanText($venue->locdescription);
$modified_ip = getenv('REMOTE_ADDR');
$edited = JHTML::Date($venue->modified, JText::_('DATE_FORMAT_LC2'));
$state = $venue->published ? JText::sprintf('MAIL VENUE PUBLISHED', $link) : JText::_('MAIL VENUE UNPUBLISHED');
if (edited) {
if ($this->params->get('editvenue_mail_admin', '0')) {
$data = new stdClass();
$edited = JHTML::Date($venue->modified, JText::_('DATE_FORMAT_LC2'));
$data->subject = JText::sprintf('EDIT VENUE MAIL', $this->_SiteName);
$data->body = JText::sprintf('MAIL EDIT VENUE', $user->name, $user->username, $user->email, $modified_ip, $edited, $venue->venue, $venue->url, $venue->street, $venue->plz, $venue->city, $venue->country, $text_description, $state);
$data->receivers = $this->_receivers;
$this->_mailer($data);
}
} else {
if ($this->params->get('newvenue_mail_admin', '0')) {
$data = new stdClass();
$created = JHTML::Date($venue->created, JText::_('DATE_FORMAT_LC2'));
$data->subject = JText::sprintf('NEW VENUE MAIL', $this->_SiteName);
$data->body = JText::sprintf('MAIL NEW VENUE', $user->name, $user->username, $user->email, $venue->author_ip, $created, $venue->venue, $venue->url, $venue->street, $venue->plz, $venue->city, $venue->country, $text_description, $state);
$data->receivers = $this->_receivers;
$this->_mailer($data);
}
}
//overwrite $state with usermail text
$state = $venue->published ? JText::sprintf('USER MAIL VENUE PUBLISHED', $link) : JText::_('USER MAIL VENUE UNPUBLISHED');
if (edited) {
if ($this->params->get('editvenue_mail_user', '1')) {
$data = new stdClass();
$edited = JHTML::Date($venue->modified, JText::_('DATE_FORMAT_LC2'));
$data->body = JText::sprintf('USER MAIL EDIT VENUE', $user->name, $user->username, $isNew, $venue->venue, $venue->url, $venue->street, $venue->plz, $venue->city, $venue->country, $text_description, $state);
$data->subject = JText::sprintf('EDIT USER VENUE MAIL', $this->_SiteName);
$data->receivers = $user->email;
$this->_mailer($data);
}
} else {
if ($this->params->get('newvenue_mail_user', '1')) {
$data = new stdClass();
$created = JHTML::Date($venue->created, JText::_('DATE_FORMAT_LC2'));
$data->body = JText::sprintf('USER MAIL NEW VENUE', $user->name, $user->username, $created, $venue->venue, $venue->url, $venue->street, $venue->plz, $venue->city, $venue->country, $text_description, $state);
$data->subject = JText::sprintf('NEW USER VENUE MAIL', $this->_SiteName);
$data->receivers = $user->email;
$this->_mailer($data);
}
}
return true;
}
示例5:
echo $row->author;
?>
</a><br />
<?php
echo JText::_('EMAIL') . ': ';
?>
<a href="mailto:<?php
echo $row->email;
?>
"><?php
echo $row->email;
?>
</a><br />
<?php
$created = JHTML::Date($row->created, JText::_('DATE_FORMAT_LC2'));
$edited = JHTML::Date($row->modified, JText::_('DATE_FORMAT_LC2'));
$ip = $row->author_ip == 'DISABLED' ? JText::_('DISABLED') : $row->author_ip;
$image = JHTML::_('image', 'administrator/templates/' . $this->template . '/images/menu/icon-16-info.png', JText::_('NOTES'));
$overlib = JText::_('CREATED AT') . ': ' . $created . '<br />';
$overlib .= JText::_('WITH IP') . ': ' . $ip . '<br />';
if ($row->modified != '0000-00-00 00:00:00') {
$overlib .= JText::_('EDITED AT') . ': ' . $edited . '<br />';
$overlib .= JText::_('EDITED FROM') . ': ' . $row->editor . '<br />';
}
?>
<span class="editlinktip hasTip" title="<?php
echo JText::_('EVENT STATS');
?>
::<?php
echo $overlib;
?>
示例6:
?>
</td>
<td><?php
echo $this->escape($item->asset_id);
?>
</td>
<td><?php
echo $this->escape($item->to_addr);
?>
</td>
<td><?php
echo JHTML::Date($item->created, JText::_('DATE_FORMAT_LC2'));
?>
</td>
<td><?php
echo $item->status == 0 ? 'N/A' : JHTML::Date($item->processed, JText::_('DATE_FORMAT_LC2'));
?>
</td>
<td align="center"><i class="<?php
echo $item->html ? 'icon-ok' : 'icon-remove';
?>
"></i></td>
<td align="center">
<div class="badge <?php
echo $item->status == 1 ? 'badge-success' : 'badge-warning';
?>
tooltip-hover"
title="<?php
echo $item->status == 1 ? JText::_('COM_CJLIB_SENT') : JText::_('COM_CJLIB_PENDING');
?>
">
示例7: getFileDate
public function getFileDate($filename, $date)
{
$dateO = '';
$ddt = $this->params->get('display_date_type', 0);
if ((int) $ddt > 0) {
if ($filename != '') {
$dateO = PhocaDownloadFile::getFileTime($filename, $ddt);
}
} else {
$dateO = JHTML::Date($date, JText::_('DATE_FORMAT_LC3'));
}
return $dateO;
}
示例8: defined
<?php
defined('_JEXEC') or die('Restricted access');
foreach ($this->comments as $comment) {
?>
<p> </p>
<p><strong><?php
echo htmlspecialchars($comment->full_name);
?>
</strong>
<em><?php
echo JHTML::Date($comment->comment_date);
?>
</em></p>
<p><?php
echo htmlspecialchars($comment->comment_text);
?>
</p>
<?php
}
示例9:
$html .= '<tr valign="top"><td align="' . $alignment . '">' . $number . $files_pic . $link_text . '</td>';
if ($view_date) {
if ($view_date_text) {
$view_date_text .= ' ';
}
if ($view_date_same_line) {
if ($view_user) {
$html .= '<td align="' . $date_alignment . '" class="td_jd_ldf_date_row">' . $view_date_text . JHTML::Date($files[$i]->log_datetime, $date_format, false) . $view_user_by . ' ' . $files[$i]->username . '</td>';
} else {
$html .= '<td align="' . $date_alignment . '" class="td_jd_ldf_date_row">' . $view_date_text . JHTML::Date($files[$i]->log_datetime, $date_format, false) . '</td>';
}
} else {
if ($view_user) {
$html .= '</tr><tr><td align="' . $date_alignment . '" class="td_jd_ldf_date_row">' . $view_date_text . JHTML::Date($files[$i]->log_datetime, $date_format, false) . $view_user_by . ' ' . $files[$i]->username . '</td>';
} else {
$html .= '</tr><tr><td align="' . $date_alignment . '" class="td_jd_ldf_date_row">' . $view_date_text . JHTML::Date($files[$i]->log_datetime, $date_format, false) . '</td>';
}
}
} else {
if ($view_user) {
$html .= '</tr><tr><td align="' . $date_alignment . '" class="td_jd_ldf_date_row">' . $view_user_by . ' ' . $files[$i]->username . '</td>';
}
}
$html .= '</tr>';
// add category info
if ($cat_show_text2) {
if ($cat_show_as_link) {
if ($files[$i]->menu_cat_itemid) {
$html .= '<tr style="vertical-align:top;"><td style="text-align:' . $alignment . ';font-size:' . $cat_show_text_size . '; color:' . $cat_show_text_color . ';"><a href="index.php?option=' . $option . '&view=category&catid=' . $files[$i]->cat_id . '&Itemid=' . $files[$i]->menu_cat_itemid . '">' . $cat_show_text2 . '</a></td></tr>';
} else {
$html .= '<tr style="vertical-align:top;"><td style="text-align:' . $alignment . ';font-size:' . $cat_show_text_size . '; color:' . $cat_show_text_color . ';"><a href="index.php?option=' . $option . '&view=category&catid=' . $files[$i]->cat_id . '&Itemid=' . $Itemid . '">' . $cat_show_text2 . '</a></td></tr>';
示例10: getFileTime
public static function getFileTime($filename, $function, $format = "d. M Y") {
$path = PhocaDownloadPath::getPathSet();
$fileNameAbs = JPath::clean($path['orig_abs'] . DS . $filename);
if (JFile::exists($fileNameAbs)) {
switch($function) {
case 2:
$fileTime = filectime($fileNameAbs);
break;
case 3:
$fileTime = fileatime($fileNameAbs);
break;
case 1:
default:
$fileTime = filemtime($fileNameAbs);
break;
}
$fileTime = JHTML::Date($fileTime, $format);
} else {
$fileTime = '';
}
return $fileTime;
}
示例11:
?>
</span></td>
<td class="center"><span class="badge badge-info"><?php
echo JText::_($row->secure ? 'FLEXI_YES' : 'FLEXI_NO');
?>
</span></td>
<?php
}
?>
<td class="center"><?php
echo $row->uploader;
?>
</td>
<td class="center"><?php
echo JHTML::Date($row->uploaded, JText::_('DATE_FORMAT_LC4') . " H:i:s");
?>
</td>
<?php
if (!$this->folder_mode) {
?>
<td class="center"><?php
echo $row->id;
?>
</td>
<?php
}
?>
</tr>
<?php
示例12: store
//.........这里部分代码省略.........
$row->datdescription = strip_tags($row->datdescription, '<br><br/>');
//convert the linux \n (Mac \r, Win \r\n) to <br /> linebreaks
$row->datdescription = str_replace(array("\r\n", "\r", "\n"), "<br />", $row->datdescription);
// cut too long words
$row->datdescription = wordwrap($row->datdescription, 75, ' ', 1);
//check length
$length = JString::strlen($row->datdescription);
if ($length > $elsettings->datdesclimit) {
//too long then shorten datdescription
$row->datdescription = JString::substr($row->datdescription, 0, $elsettings->datdesclimit);
//add ...
$row->datdescription = $row->datdescription . '...';
}
}
$row->title = trim(JFilterOutput::ampReplace($row->title));
//set registration regarding the el settings
switch ($elsettings->showfroregistra) {
case 0:
$row->registra = 0;
break;
case 1:
$row->registra = 1;
break;
case 2:
$row->registra = $row->registra;
break;
}
switch ($elsettings->showfrounregistra) {
case 0:
$row->unregistra = 0;
break;
case 1:
$row->unregistra = 1;
break;
case 2:
if ($elsettings->showfroregistra >= 1) {
$row->unregistra = $row->unregistra;
} else {
$row->unregistra = 0;
}
break;
}
//Make sure the table is valid
if (!$row->check($elsettings)) {
$this->setError($row->getError());
return false;
}
//is this an edited event or not?
//after store we allways have an id
$edited = $row->id ? $row->id : false;
//store it in the db
if (!$row->store(true)) {
JError::raiseError(500, $this->_db->stderr());
return false;
}
$this->_db->setQuery('SELECT * FROM #__eventlist_venues WHERE id = ' . (int) $row->locid);
$rowloc = $this->_db->loadObject();
jimport('joomla.utilities.mail');
$link = JURI::base() . JRoute::_('index.php?view=details&id=' . $row->id, false);
//create the mail for the site owner
if ($elsettings->mailinform == 1 || $elsettings->mailinform == 3) {
$mail = JFactory::getMailer();
$state = $row->published ? JText::sprintf('MAIL EVENT PUBLISHED', $link) : JText::_('MAIL EVENT UNPUBLISHED');
if ($edited) {
$modified_ip = getenv('REMOTE_ADDR');
$edited = JHTML::Date($row->modified, JText::_('DATE_FORMAT_LC2'));
$mailbody = JText::sprintf('MAIL EDIT EVENT', $user->name, $user->username, $user->email, $modified_ip, $edited, $row->title, $row->dates, $row->times, $rowloc->venue, $rowloc->city, $row->datdescription, $state);
$mail->setSubject($SiteName . JText::_('EDIT EVENT MAIL'));
} else {
$created = JHTML::Date($row->created, JText::_('DATE_FORMAT_LC2'));
$mailbody = JText::sprintf('MAIL NEW EVENT', $user->name, $user->username, $user->email, $row->author_ip, $created, $row->title, $row->dates, $row->times, $rowloc->venue, $rowloc->city, $row->datdescription, $state);
$mail->setSubject($SiteName . JText::_('NEW EVENT MAIL'));
}
$receivers = explode(',', trim($elsettings->mailinformrec));
$mail->addRecipient($receivers);
$mail->setSender(array($MailFrom, $FromName));
$mail->setBody($mailbody);
$sent = $mail->Send();
}
//mail end
//create the mail for the user
if ($elsettings->mailinformuser == 1 || $elsettings->mailinformuser == 3) {
$usermail = JFactory::getMailer();
$state = $row->published ? JText::sprintf('USER MAIL EVENT PUBLISHED', $link) : JText::_('USER MAIL EVENT UNPUBLISHED');
if ($edited) {
$edited = JHTML::Date($row->modified, JText::_('DATE_FORMAT_LC2'));
$mailbody = JText::sprintf('USER MAIL EDIT EVENT', $user->name, $user->username, $edited, $row->title, $row->dates, $row->times, $rowloc->venue, $rowloc->city, $row->datdescription, $state);
$usermail->setSubject($SiteName . JText::_('EDIT USER EVENT MAIL'));
} else {
$created = JHTML::Date($row->created, JText::_('DATE_FORMAT_LC2'));
$mailbody = JText::sprintf('USER MAIL NEW EVENT', $user->name, $user->username, $created, $row->title, $row->dates, $row->times, $rowloc->venue, $rowloc->city, $row->datdescription, $state);
$usermail->setSubject($SiteName . JText::_('NEW USER EVENT MAIL'));
}
$usermail->addRecipient($user->email);
$usermail->setSender(array($MailFrom, $FromName));
$usermail->setBody($mailbody);
$sent = $usermail->Send();
}
return $row->id;
}
示例13: store
//.........这里部分代码省略.........
$editoruser = ELUser::editoruser();
if (!$editoruser) {
//check description --> wipe out code
$row->locdescription = strip_tags($row->locdescription, '<br><br/>');
//convert the linux \n (Mac \r, Win \r\n) to <br /> linebreaks
$row->locdescription = str_replace(array("\r\n", "\r", "\n"), "<br />", $row->locdescription);
//cut too long words
$row->locdescription = wordwrap($row->locdescription, 75, " ", 1);
//check length
$length = JString::strlen($row->locdescription);
if ($length > $params->get('max_description', 1000)) {
// if required shorten it
$row->locdescription = JString::substr($row->locdescription, 0, $params->get('max_description', 1000));
//if shortened add ...
$row->locdescription = $row->locdescription . '...';
}
}
$row->venue = trim(JFilterOutput::ampReplace($row->venue));
//Make sure the data is valid
if (!$row->check($elsettings)) {
$this->setError($row->getError());
return false;
}
//is this an edited venue or not?
//after store we allways have an id
$edited = $row->id ? $row->id : false;
//store it in the db
if (!$row->store()) {
$this->setError($this->_db->getErrorMsg());
return false;
}
// update the event category xref
// first, delete current rows for this event
$query = ' DELETE FROM #__redevent_venue_category_xref WHERE venue_id = ' . $this->_db->Quote($row->id);
$this->_db->setQuery($query);
if (!$this->_db->query()) {
$this->setError($this->_db->getErrorMsg());
return false;
}
// insert new ref
foreach ((array) $data['categories'] as $cat_id) {
$query = ' INSERT INTO #__redevent_venue_category_xref (venue_id, category_id) VALUES (' . $this->_db->Quote($row->id) . ', ' . $this->_db->Quote($cat_id) . ')';
$this->_db->setQuery($query);
if (!$this->_db->query()) {
$this->setError($this->_db->getErrorMsg());
return false;
}
}
// attachments
if ($params->get('allow_attachments', 1)) {
REAttach::store('venue' . $row->id);
}
jimport('joomla.utilities.mail');
$link = JRoute::_(JURI::base() . RedeventHelperRoute::getVenueEventsRoute($row->id), false);
//create mail
if ($params->get('mailinform') == 2 || $params->get('mailinform') == 3) {
$mail = JFactory::getMailer();
$state = $row->published ? JText::sprintf('COM_REDEVENT_MAIL_VENUE_PUBLISHED', $link) : JText::_('COM_REDEVENT_MAIL_VENUE_UNPUBLISHED');
if ($edited) {
$modified_ip = getenv('REMOTE_ADDR');
$edited = JHTML::Date($row->modified, JText::_('DATE_FORMAT_LC2'));
$mailbody = JText::sprintf('COM_REDEVENT_MAIL_EDIT_VENUE', $user->name, $user->username, $user->email, $modified_ip, $edited, $row->venue, $row->url, $row->street, $row->plz, $row->city, $row->country, $row->locdescription, $state);
$mail->setSubject($SiteName . JText::_('COM_REDEVENT_EDIT_VENUE_MAIL'));
} else {
$created = JHTML::Date($row->modified, JText::_('DATE_FORMAT_LC2'));
$mailbody = JText::sprintf('COM_REDEVENT_MAIL_NEW_VENUE', $user->name, $user->username, $user->email, $row->author_ip, $created, $row->venue, $row->url, $row->street, $row->plz, $row->city, $row->country, $row->locdescription, $state);
$mail->setSubject($SiteName . JText::_('COM_REDEVENT_NEW_VENUE_MAIL'));
}
$receivers = explode(',', trim($params->get('mailinformrec')));
$mail->addRecipient($receivers);
$mail->setSender(array($MailFrom, $FromName));
$mail->setBody($mailbody);
if (!$mail->Send()) {
RedeventHelperLog::simpleLog('Error sending created/edited venue notification to site owner');
}
}
//create the mail for the user
if ($params->get('mailinformuser') == 2 || $params->get('mailinformuser') == 3) {
$usermail = JFactory::getMailer();
$state = $row->published ? JText::sprintf('COM_REDEVENT_USER_MAIL_VENUE_PUBLISHED', $link) : JText::_('COM_REDEVENT_USER_MAIL_VENUE_UNPUBLISHED');
if ($edited) {
$edited = JHTML::Date($row->modified, JText::_('DATE_FORMAT_LC2'));
$mailbody = JText::sprintf('COM_REDEVENT_USER_MAIL_EDIT_VENUE', $user->name, $user->username, $edited, $row->venue, $row->url, $row->street, $row->plz, $row->city, $row->country, $row->locdescription, $state);
$usermail->setSubject($SiteName . JText::_('COM_REDEVENT_EDIT_USER_VENUE_MAIL'));
} else {
$created = JHTML::Date($row->modified, JText::_('DATE_FORMAT_LC2'));
$mailbody = JText::sprintf('COM_REDEVENT_USER_MAIL_NEW_VENUE', $user->name, $user->username, $created, $row->venue, $row->url, $row->street, $row->plz, $row->city, $row->country, $row->locdescription, $state);
$usermail->setSubject($SiteName . JText::_('COM_REDEVENT_NEW_USER_VENUE_MAIL'));
}
$usermail->addRecipient($user->email);
$usermail->setSender(array($MailFrom, $FromName));
$usermail->setBody($mailbody);
if (!$usermail->Send()) {
RedeventHelperLog::simpleLog('Error sending created/edited venue notification to venue owner');
}
}
//update item order
$row->reorder();
return $row->id;
}
示例14:
?>
</a></td>
<td><?php
echo $row->survey_key;
?>
</td>
<td><?php
echo $this->escape($row->category);
?>
</td>
<td><?php
echo $this->escape($row->name) . ' (' . $this->escape($row->username) . ')';
?>
</td>
<td><?php
echo JHTML::Date($row->created, JText::_('DATE_FORMAT_LC2'));
?>
</td>
<td>
<div><?php
echo $row->publish_up;
?>
</div>
<div><?php
echo $row->publish_down;
?>
</div>
</td>
<td class="center">
<a href="<?php
echo JRoute::_('index.php?option=' . S_APP_NAME . '&view=reports&task=responses&id=' . $row->id);
示例15: stripslashes
<a href="<?php
echo $link;
?>
"><?php
echo stripslashes($row->title);
?>
</a>
</td>
<td>
<?php
echo $row->type;
?>
</td>
<td align="center">
<?php
echo $row->date == "0000-00-00" ? "" : JHTML::Date($row->date);
?>
</td>
<td>
<?php
echo $row->format;
?>
</td>
<td align="center">
<?php
echo $published;
?>
</td>
</tr>
<?php
$k = 1 - $k;