Exemple #1
0
 /**
  * function_description
  *
  * @param   unknown_type  $mail  param_description
  *
  * @return return_description
  */
 protected function parseEMailIcon($mail)
 {
     $cfg = JtgHelper::getConfig();
     $link = "<img src=\"" . JUri::base() . "components/com_jtg/assets/template/" . $cfg->template . "/images/emailButton.png\" />";
     $return = JHtml::_('email.cloak', $mail, true, $link, 0);
     return $return;
 }
Exemple #2
0
 *
 */
// No direct access
defined('_JEXEC') or die('Restricted access');
if (isset($this->id)) {
    $description = $this->track->description;
    $button = "submitbutton('update')";
    $buttontext = JText::_('COM_JTG_SAVE_TO_FILEVIEW');
    $title = JText::_('COM_JTG_UPDATE_GPS_FILE');
} else {
    $description = "";
    $button = "submitbutton('save')";
    $buttontext = JText::_('COM_JTG_SAVE');
    $title = JText::_('COM_JTG_NEW_TRACK');
}
$cfg = JtgHelper::getConfig();
$user = JFactory::getUser();
$juser = new JUser($user->id);
$k = 0;
?>
<script type="text/javascript">

Joomla.submitbutton = function(pressbutton)
{
	var form = document.adminForm;
	if (pressbutton == 'cancel')
		{
		submitform( pressbutton );
		return;
	}
	if (pressbutton == 'reset') {
Exemple #3
0
 /**
  * function_description
  *
  * @return return_description
  */
 function savecomment()
 {
     $mainframe = JFactory::getApplication();
     // Check for request forgeries
     JSession::checkToken() or jexit(JTEXT::_('JINVALID_TOKEN'));
     $cfg = JtgHelper::getConfig();
     $id = JRequest::getInt('id');
     if ($cfg->captcha == 1) {
         $return = false;
         $word = JFactory::getApplication()->input->get('word', false, '', 'CMD');
         $mainframe->triggerEvent('onCaptcha_confirm', array($word, &$return));
         if (!$return) {
             echo "<script> alert('" . JText::_('COM_JTG_CAPTCHA_WRONG') . "'); window.history.go(-1); </script>\n";
         } else {
             $model = $this->getModel('files');
             if (!$model->savecomment($id, $cfg)) {
                 $msg = JText::_('COM_JTG_COMMENT_NOT_SAVED');
             } else {
                 $msg = JText::_('COM_JTG_COMMENT_SAVED');
             }
             $this->setRedirect(JRoute::_('index.php?option=com_jtg&view=files&layout=file&id=' . $id . '#jtg_param_header_comment', false), $msg);
         }
     } else {
         $model = $this->getModel('files');
         if (!$model->savecomment($id, $cfg)) {
             $msg = JText::_('COM_JTG_COMMENT_NOT_SAVED');
         } else {
             $msg = JText::_('COM_JTG_COMMENT_SAVED');
         }
         $this->setRedirect(JRoute::_('index.php?option=com_jtg&view=files&layout=file&id=' . $id . '#jtg_param_header_comment', false), $msg);
     }
 }